Mr_Tang 3 lat temu
rodzic
commit
407eb5bf5d

+ 9 - 12
src/main/webapp/css/CartCss.css

@@ -1,4 +1,4 @@
-body {
+    body {
     /* background-color: transparent; */
     position: relative;
     margin: 0;
@@ -168,6 +168,7 @@ form>div.Store>div.goods>div#exp>div#count>*:active {
 form>div#BottomBar {
     position: fixed;
     bottom: 0;
+    width: 100%;
     padding: 15px;
 }
 
@@ -183,16 +184,12 @@ form>div#BottomBar input:nth-of-type(2) {
     font-size: 15px;
     color: white;
     padding: 10px 30px;
-    border: white;
-    background-color: rgb(92, 52, 235);
-}
-
-
-/* form>div#BottomBar input:nth-of-type(1) {
+    border: 2px solid rgb(82, 40, 236);
+    background-color: rgb(171, 151, 243);
+    /* form>div#BottomBar input:nth-of-type(1) {
     float: right;
 } */
-
-@font-face {
-    font-family: 'Harmony SC';
-    src: url(../fonts/HarmonyOS_Sans_SC_Medium.ttf);
-}
+    @font-face {
+        font-family: 'Harmony SC';
+        src: url(../fonts/HarmonyOS_Sans_SC_Medium.ttf);
+    }

+ 78 - 0
target/classes/DataBase.sql

@@ -0,0 +1,78 @@
+drop database if exists ShoppingWebsite;
+create database if not exists ShoppingWebsite;
+use ShoppingWebsite;
+
+
+
+
+/*  node*/
+create table if not exists nodeinfo
+(
+    id bigint not null primary key,
+    prev_id bigint null,
+    next_id bigint null,
+    parent_id bigint null,
+    child_id bigint null,
+    obj_type varchar(100) default 'group04.BasicNode'
+);
+
+/*  node stuctor
+    userAccount
+    +   cart
+        +   user_cart[]
+    +   collect
+        +   goods[]
+*/
+create table if not exists userAccount
+(
+    userId bigint not null,
+    email varchar(50) not null,
+    password varchar(16) not null,
+    permission int not null default 0,
+    primary key(email,userId)
+);
+
+/*goods*/
+create table if not exists user_cart
+(
+    user_Cart_Id bigint not null primary key,
+    count int not null,
+);
+
+/*  node stuctor
+    store
+    +   goods[]
+        +   selections
+            +   selectionGroup[]
+                +   selection[]
+        +   comments
+            +   comment[]
+*/
+create table if not exists store
+(
+    store_Id bigint not null primary key,
+    postion varchar(100) not null,
+    name varchar(50) not null,
+    star int
+);
+
+create table if not exists goods
+(
+    goods_id bigint not null primary key,
+    postion varchar(100) not null,
+    name varchar(50) not null,
+    star int
+);
+
+create table if not exists selection_group
+(
+    selection_group_id bigint not null primary key,
+    name varchar(50) not null
+);
+
+create table if not exists selection
+(
+    selection_id bigint not null primary key,
+    name varchar(50) not null,
+    price float(13,2)
+);

+ 31 - 0
target/classes/MyBatis-config.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration
+        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <settings>
+        <setting name="mapUnderscoreToCamelCase" value="true"/>
+    </settings>
+<!--    <typeAliases>-->
+<!--        <package name="myBatisTest.myBatis"/>-->
+<!--    </typeAliases>-->
+<!--    <environments default="development">-->
+<!--        <environment id="development">-->
+<!--            <transactionManager type="JDBC"/>-->
+<!--            <dataSource type="POOLED">-->
+<!--                <property name="driver" value="com.mysql.jdbc.Driver"/>-->
+<!--                <property name="url" value="jdbc:mysql://localhost:3306/user"/>-->
+<!--                <property name="username" value="root"/>-->
+<!--                <property name="password" value="123456"/>-->
+<!--            </dataSource>-->
+<!--        </environment>-->
+<!--    </environments>-->
+    <mappers>
+        <mapper resource="myBatisMap/GoodsMapper.xml"/>
+        <mapper resource="myBatisMap/NodeinfoMapper.xml"/>
+        <mapper resource="myBatisMap/SelectionMapper.xml"/>
+        <mapper resource="myBatisMap/StoreMapper.xml"/>
+        <mapper resource="myBatisMap/UseraccountMapper.xml"/>
+<!--        <mapper resource="StuMapper.xml"/>-->
+    </mappers>
+</configuration>

BIN
target/classes/WebsiteES/myBatis/Goods.class


BIN
target/classes/WebsiteES/myBatis/GoodsMapper.class


BIN
target/classes/WebsiteES/myBatis/Selection.class


BIN
target/classes/WebsiteES/myBatis/SelectionMapper.class


BIN
target/classes/WebsiteES/myBatis/Store.class


BIN
target/classes/WebsiteES/myBatis/StoreMapper.class


BIN
target/classes/WebsiteES/myBatis/Useraccount.class


BIN
target/classes/WebsiteES/myBatis/UseraccountKey.class


BIN
target/classes/WebsiteES/myBatis/UseraccountMapper.class


+ 4 - 0
target/classes/db.properties

@@ -0,0 +1,4 @@
+jdbc.driver=com.mysql.jdbc.Driver
+jdbc.url=jdbc:mysql://localhost:3306/ShoppingWebsite
+jdbc.username=root
+jdbc.password=123456

+ 83 - 0
target/classes/generatorConfig.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE generatorConfiguration PUBLIC
+        "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
+        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
+<generatorConfiguration>
+    <classPathEntry location="C:\Users\16096\.m2\repository\mysql\mysql-connector-java\8.0.23\mysql-connector-java-8.0.23.jar"/>
+    <context id="context" targetRuntime="MyBatis3">
+        <commentGenerator>
+            <property name="suppressAllComment" value="false"/>
+            <property name="suppressDate" value="true"/>
+        </commentGenerator>
+        <jdbcConnection
+                driverClass="com.mysql.jdbc.Driver"
+                connectionURL="jdbc:mysql://localhost:3306/ShoppingWebsite"
+                userId="root"
+                password="123456"
+        />
+        <javaTypeResolver>
+            <property name="forceBigDecimals" value="false"/>
+        </javaTypeResolver>
+
+        <javaModelGenerator targetPackage="WebsiteES.myBatis" targetProject="src/main/java">
+            <property name="enableSubPackages" value="true"/>
+            <property name="trimStrings" value="false"/>
+        </javaModelGenerator>
+
+        <sqlMapGenerator targetPackage="myBatisMap" targetProject="src/main/resources">
+            <property name="enableSubPackages" value="true"/>
+        </sqlMapGenerator>
+
+        <javaClientGenerator targetPackage="WebsiteES.myBatis" targetProject="src/main/java" type="XMLMAPPER">
+            <property name="enableSubPackages" value="true"/>
+        </javaClientGenerator>
+
+        <table
+                tableName="userAccount"
+        enableCountByExample="false"
+        enableDeleteByExample="false"
+        enableSelectByExample="false"
+        enableUpdateByExample="false"
+        />
+
+        <table
+                tableName="user_cart"
+        enableCountByExample="false"
+        enableDeleteByExample="false"
+        enableSelectByExample="false"
+        enableUpdateByExample="false"
+        />
+
+        <table
+                tableName="store"
+        enableCountByExample="false"
+        enableDeleteByExample="false"
+        enableSelectByExample="false"
+        enableUpdateByExample="false"
+        />
+
+        <table
+                tableName="goods"
+        enableCountByExample="false"
+        enableDeleteByExample="false"
+        enableSelectByExample="false"
+        enableUpdateByExample="false"
+        />
+
+        <table
+                tableName="selectionGroup"
+        enableCountByExample="false"
+        enableDeleteByExample="false"
+        enableSelectByExample="false"
+        enableUpdateByExample="false"
+        />
+
+        <table
+                tableName="selection"
+        enableCountByExample="false"
+        enableDeleteByExample="false"
+        enableSelectByExample="false"
+        enableUpdateByExample="false"
+        />
+    </context>
+</generatorConfiguration>

+ 114 - 0
target/classes/myBatisMap/GoodsMapper.xml

@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="WebsiteES.myBatis.GoodsMapper" >
+  <resultMap id="BaseResultMap" type="WebsiteES.myBatis.Goods" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="goods_id" property="goodsId" jdbcType="BIGINT" />
+    <result column="postion" property="postion" jdbcType="VARCHAR" />
+    <result column="name" property="name" jdbcType="VARCHAR" />
+    <result column="star" property="star" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    goods_id, postion, name, star
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from goods
+    where goods_id = #{goodsId,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from goods
+    where goods_id = #{goodsId,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="WebsiteES.myBatis.Goods" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into goods (goods_id, postion, name, 
+      star)
+    values (#{goodsId,jdbcType=BIGINT}, #{postion,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
+      #{star,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="WebsiteES.myBatis.Goods" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into goods
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="goodsId != null" >
+        goods_id,
+      </if>
+      <if test="postion != null" >
+        postion,
+      </if>
+      <if test="name != null" >
+        name,
+      </if>
+      <if test="star != null" >
+        star,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="goodsId != null" >
+        #{goodsId,jdbcType=BIGINT},
+      </if>
+      <if test="postion != null" >
+        #{postion,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null" >
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="star != null" >
+        #{star,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="WebsiteES.myBatis.Goods" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update goods
+    <set >
+      <if test="postion != null" >
+        postion = #{postion,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null" >
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="star != null" >
+        star = #{star,jdbcType=INTEGER},
+      </if>
+    </set>
+    where goods_id = #{goodsId,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="WebsiteES.myBatis.Goods" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update goods
+    set postion = #{postion,jdbcType=VARCHAR},
+      name = #{name,jdbcType=VARCHAR},
+      star = #{star,jdbcType=INTEGER}
+    where goods_id = #{goodsId,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 141 - 0
target/classes/myBatisMap/NodeinfoMapper.xml

@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="group04.myBatis.NodeinfoMapper" >
+  <resultMap id="BaseResultMap" type="group04.myBatis.Nodeinfo" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="id" property="id" jdbcType="BIGINT" />
+    <result column="prev_id" property="prevId" jdbcType="BIGINT" />
+    <result column="next_id" property="nextId" jdbcType="BIGINT" />
+    <result column="parent_id" property="parentId" jdbcType="BIGINT" />
+    <result column="child_id" property="childId" jdbcType="BIGINT" />
+    <result column="obj_type" property="objType" jdbcType="VARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    id, prev_id, next_id, parent_id, child_id, obj_type
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from nodeinfo
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from nodeinfo
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="group04.myBatis.Nodeinfo" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into nodeinfo (id, prev_id, next_id, 
+      parent_id, child_id, obj_type
+      )
+    values (#{id,jdbcType=BIGINT}, #{prevId,jdbcType=BIGINT}, #{nextId,jdbcType=BIGINT}, 
+      #{parentId,jdbcType=BIGINT}, #{childId,jdbcType=BIGINT}, #{objType,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="group04.myBatis.Nodeinfo" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into nodeinfo
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="prevId != null" >
+        prev_id,
+      </if>
+      <if test="nextId != null" >
+        next_id,
+      </if>
+      <if test="parentId != null" >
+        parent_id,
+      </if>
+      <if test="childId != null" >
+        child_id,
+      </if>
+      <if test="objType != null" >
+        obj_type,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="prevId != null" >
+        #{prevId,jdbcType=BIGINT},
+      </if>
+      <if test="nextId != null" >
+        #{nextId,jdbcType=BIGINT},
+      </if>
+      <if test="parentId != null" >
+        #{parentId,jdbcType=BIGINT},
+      </if>
+      <if test="childId != null" >
+        #{childId,jdbcType=BIGINT},
+      </if>
+      <if test="objType != null" >
+        #{objType,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="group04.myBatis.Nodeinfo" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update nodeinfo
+    <set >
+      <if test="prevId != null" >
+        prev_id = #{prevId,jdbcType=BIGINT},
+      </if>
+      <if test="nextId != null" >
+        next_id = #{nextId,jdbcType=BIGINT},
+      </if>
+      <if test="parentId != null" >
+        parent_id = #{parentId,jdbcType=BIGINT},
+      </if>
+      <if test="childId != null" >
+        child_id = #{childId,jdbcType=BIGINT},
+      </if>
+      <if test="objType != null" >
+        obj_type = #{objType,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="group04.myBatis.Nodeinfo" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update nodeinfo
+    set prev_id = #{prevId,jdbcType=BIGINT},
+      next_id = #{nextId,jdbcType=BIGINT},
+      parent_id = #{parentId,jdbcType=BIGINT},
+      child_id = #{childId,jdbcType=BIGINT},
+      obj_type = #{objType,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="commit">
+    commit
+  </update>
+</mapper>

+ 103 - 0
target/classes/myBatisMap/SelectionMapper.xml

@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="WebsiteES.myBatis.SelectionMapper" >
+  <resultMap id="BaseResultMap" type="WebsiteES.myBatis.Selection" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="selection_id" property="selectionId" jdbcType="BIGINT" />
+    <result column="name" property="name" jdbcType="VARCHAR" />
+    <result column="price" property="price" jdbcType="REAL" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    selection_id, name, price
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from selection
+    where selection_id = #{selectionId,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from selection
+    where selection_id = #{selectionId,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="WebsiteES.myBatis.Selection" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into selection (selection_id, name, price
+      )
+    values (#{selectionId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{price,jdbcType=REAL}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="WebsiteES.myBatis.Selection" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into selection
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="selectionId != null" >
+        selection_id,
+      </if>
+      <if test="name != null" >
+        name,
+      </if>
+      <if test="price != null" >
+        price,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="selectionId != null" >
+        #{selectionId,jdbcType=BIGINT},
+      </if>
+      <if test="name != null" >
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="price != null" >
+        #{price,jdbcType=REAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="WebsiteES.myBatis.Selection" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update selection
+    <set >
+      <if test="name != null" >
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="price != null" >
+        price = #{price,jdbcType=REAL},
+      </if>
+    </set>
+    where selection_id = #{selectionId,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="WebsiteES.myBatis.Selection" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update selection
+    set name = #{name,jdbcType=VARCHAR},
+      price = #{price,jdbcType=REAL}
+    where selection_id = #{selectionId,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 59 - 0
target/classes/myBatisMap/StoreMapper.xml

@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="WebsiteES.myBatis.StoreMapper">
+  <resultMap id="BaseResultMap" type="WebsiteES.myBatis.Store">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <result column="store_id" jdbcType="TINYINT" property="storeId" />
+    <result column="manager_staff_id" jdbcType="TINYINT" property="managerStaffId" />
+    <result column="address_id" jdbcType="SMALLINT" property="addressId" />
+    <result column="last_update" jdbcType="TIMESTAMP" property="lastUpdate" />
+  </resultMap>
+  <insert id="insert" parameterType="WebsiteES.myBatis.Store">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into store (store_id, manager_staff_id, address_id, 
+      last_update)
+    values (#{storeId,jdbcType=TINYINT}, #{managerStaffId,jdbcType=TINYINT}, #{addressId,jdbcType=SMALLINT}, 
+      #{lastUpdate,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="WebsiteES.myBatis.Store">
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into store
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="storeId != null">
+        store_id,
+      </if>
+      <if test="managerStaffId != null">
+        manager_staff_id,
+      </if>
+      <if test="addressId != null">
+        address_id,
+      </if>
+      <if test="lastUpdate != null">
+        last_update,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="storeId != null">
+        #{storeId,jdbcType=TINYINT},
+      </if>
+      <if test="managerStaffId != null">
+        #{managerStaffId,jdbcType=TINYINT},
+      </if>
+      <if test="addressId != null">
+        #{addressId,jdbcType=SMALLINT},
+      </if>
+      <if test="lastUpdate != null">
+        #{lastUpdate,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+</mapper>

+ 114 - 0
target/classes/myBatisMap/UseraccountMapper.xml

@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="WebsiteES.myBatis.UseraccountMapper" >
+  <resultMap id="BaseResultMap" type="WebsiteES.myBatis.Useraccount" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="email" property="email" jdbcType="VARCHAR" />
+    <id column="userId" property="userid" jdbcType="BIGINT" />
+    <result column="password" property="password" jdbcType="VARCHAR" />
+    <result column="permission" property="permission" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    email, userId, password, permission
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="WebsiteES.myBatis.UseraccountKey" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from useraccount
+    where email = #{email,jdbcType=VARCHAR}
+      and userId = #{userid,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="WebsiteES.myBatis.UseraccountKey" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from useraccount
+    where email = #{email,jdbcType=VARCHAR}
+      and userId = #{userid,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="WebsiteES.myBatis.Useraccount" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into useraccount (email, userId, password, 
+      permission)
+    values (#{email,jdbcType=VARCHAR}, #{userid,jdbcType=BIGINT}, #{password,jdbcType=VARCHAR}, 
+      #{permission,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="WebsiteES.myBatis.Useraccount" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into useraccount
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="email != null" >
+        email,
+      </if>
+      <if test="userid != null" >
+        userId,
+      </if>
+      <if test="password != null" >
+        password,
+      </if>
+      <if test="permission != null" >
+        permission,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="email != null" >
+        #{email,jdbcType=VARCHAR},
+      </if>
+      <if test="userid != null" >
+        #{userid,jdbcType=BIGINT},
+      </if>
+      <if test="password != null" >
+        #{password,jdbcType=VARCHAR},
+      </if>
+      <if test="permission != null" >
+        #{permission,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="WebsiteES.myBatis.Useraccount" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update useraccount
+    <set >
+      <if test="password != null" >
+        password = #{password,jdbcType=VARCHAR},
+      </if>
+      <if test="permission != null" >
+        permission = #{permission,jdbcType=INTEGER},
+      </if>
+    </set>
+    where email = #{email,jdbcType=VARCHAR}
+      and userId = #{userid,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="WebsiteES.myBatis.Useraccount" >
+    <!--
+      WARNING - @mbggenerated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update useraccount
+    set password = #{password,jdbcType=VARCHAR},
+      permission = #{permission,jdbcType=INTEGER}
+    where email = #{email,jdbcType=VARCHAR}
+      and userId = #{userid,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 61 - 0
target/classes/springmvc-config.xml

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:mvc="http://www.springframework.org/schema/mvc"
+    xmlns:context="http://www.springframework.org/schema/context"
+    xsi:schemaLocation="
+    http://www.springframework.org/schema/beans
+    http://www.springframework.org/schema/beans/spring-beans.xsd
+    http://www.springframework.org/schema/context
+    http://www.springframework.org/schema/context/spring-context.xsd
+    http://www.springframework.org/schema/mvc
+    http://www.springframework.org/schema/mvc/spring-mvc.xsd">
+
+    <context:property-placeholder location="classpath:db.properties"/>
+
+    <context:component-scan base-package="group04"/>
+    <context:component-scan base-package="WebsiteES"/>
+
+    <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" destroy-method="close">
+        <property name="driverClassName" value="${jdbc.driver}"/>
+        <property name="url" value="${jdbc.url}"/>
+        <property name="username" value="${jdbc.username}"/>
+        <property name="password"  value="${jdbc.password}"/>
+    </bean>
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dataSource" />
+        <property name="configLocation" value="classpath:MyBatis-config.xml"/>
+    </bean>
+
+    <!--MyBatis Mapper FactoryBean-->
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="group04.myBatis"/>
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="WebsiteES.myBatis"/>
+    </bean>
+
+    <!--Spring MVC.....(for primary web service)-->
+    <!-- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+        <property name="prefix" value = "/"/>
+        <property name="suffix" value = ".jsp"/>
+    </bean> -->
+
+    <!-- should add multipartResolver to use  -->
+    <!-- <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
+        <property name="defaultEncoding" value="utf-8"/>
+        <property name="maxUploadSize" value="2097152"/>
+    </bean> -->
+
+    <!-- <mvc:annotation-driven/>
+    <mvc:default-servlet-handler/> -->
+    <!--    <mvc:interceptors>-->
+    <!--        <mvc:interceptor>-->
+    <!--            <mvc:mapping path="/*"/>-->
+    <!--            <mvc:exclude-mapping path="/LoginPage"/>-->
+    <!--            <bean id="InterceptorLogin" class="MVCTry.InterceptorLogin"/>-->
+    <!--        </mvc:interceptor>-->
+    <!--    </mvc:interceptors>-->
+</beans>