first version of aida_back
This commit is contained in:
27
src/main/resources/mapper/AccountMapper.xml
Normal file
27
src/main/resources/mapper/AccountMapper.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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="com.ai.da.mapper.AccountMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.ai.da.mapper.entity.Account">
|
||||
<id column="id" property="id" />
|
||||
<result column="user_email" property="userEmail" />
|
||||
<result column="user_name" property="userName" />
|
||||
<result column="user_password" property="userPassword" />
|
||||
<result column="create_date" property="createDate" />
|
||||
</resultMap>
|
||||
<select id="findByPhoneList" resultType="com.ai.da.mapper.entity.Account">
|
||||
select id , user_email AS userEmail, user_Name AS userName,
|
||||
user_password AS userPassword from t_account
|
||||
where user_Name in
|
||||
<foreach collection="phoneList" item="phone" open="(" separator="," close=")">
|
||||
#{phone}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="findById" resultType="com.ai.da.mapper.entity.Account">
|
||||
select id ,user_email AS userEmail, user_phone AS userPhone,
|
||||
user_password AS userPassword from t_account
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
21
src/main/resources/mapper/CollectionMapper.xml
Normal file
21
src/main/resources/mapper/CollectionMapper.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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="com.ai.da.mapper.CollectionMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.ai.da.mapper.entity.Collection">
|
||||
<id column="id" property="id" />
|
||||
<result column="account_id" property="accountId" />
|
||||
<result column="create_date" property="createDate" />
|
||||
<result column="update_date" property="updateDate" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertCollection" parameterType="com.ai.da.mapper.entity.Collection" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
insert into t_collection
|
||||
(account_id,create_date)
|
||||
values(
|
||||
#{accountId},
|
||||
#{createDate});
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
33
src/main/resources/mapper/DesignItemMapper.xml
Normal file
33
src/main/resources/mapper/DesignItemMapper.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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="com.ai.da.mapper.DesignItemMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.ai.da.mapper.entity.DesignItem">
|
||||
<id column="id" property="id" />
|
||||
<result column="account_id" property="accountId" />
|
||||
<result column="design_id" property="designId" />
|
||||
<result column="collection_id" property="collectionId" />
|
||||
<result column="print_scale" property="printScale" />
|
||||
<result column="design_url" property="designUrl" />
|
||||
<result column="high_design_url" property="highDesignUrl" />
|
||||
<result column="is_like" property="hasLike" />
|
||||
<result column="create_date" property="createDate" />
|
||||
<result column="update_date" property="updateDate" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertDesignItem" parameterType="com.ai.da.mapper.entity.DesignItem" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
insert into t_design_item
|
||||
(account_id,design_id,collection_id,print_scale,design_url,high_design_url,is_like,create_date)
|
||||
values(
|
||||
#{accountId},
|
||||
#{designId},
|
||||
#{collectionId},
|
||||
#{printScale},
|
||||
#{designUrl},
|
||||
#{highDesignUrl},
|
||||
#{hasLike},
|
||||
#{createDate});
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
29
src/main/resources/mapper/DesignMapper.xml
Normal file
29
src/main/resources/mapper/DesignMapper.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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="com.ai.da.mapper.DesignMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.ai.da.mapper.entity.Design">
|
||||
<id column="id" property="id" />
|
||||
<result column="account_id" property="accountId" />
|
||||
<result column="collection_id" property="collectionId" />
|
||||
<result column="system_scale" property="systemScale" />
|
||||
<result column="single_overall" property="singleOverall" />
|
||||
<result column="switch_category" property="switchCategory" />
|
||||
<result column="create_date" property="createDate" />
|
||||
<result column="update_date" property="updateDate" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertDesign" parameterType="com.ai.da.mapper.entity.Design" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
insert into t_design
|
||||
(account_id,collection_id,system_scale,single_overall,switch_category,create_date)
|
||||
values(
|
||||
#{accountId},
|
||||
#{collectionId},
|
||||
#{systemScale},
|
||||
#{singleOverall},
|
||||
#{switchCategory},
|
||||
#{createDate});
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
29
src/main/resources/mapper/PantoneMapper.xml
Normal file
29
src/main/resources/mapper/PantoneMapper.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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="com.ai.da.mapper.PanToneMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.ai.da.mapper.entity.PanTone">
|
||||
<id column="id" property="id" />
|
||||
<result column="pantone_index" property="pantoneIndex" />
|
||||
<result column="name" property="name" />
|
||||
<result column="tcx" property="tcx" />
|
||||
<result column="r" property="r" />
|
||||
<result column="g" property="g" />
|
||||
<result column="b" property="b" />
|
||||
<result column="h" property="h" />
|
||||
<result column="s" property="s" />
|
||||
<result column="v" property="v" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getRgbByHsvBatch" resultType="com.ai.da.mapper.entity.PanTone">
|
||||
select * from pantone
|
||||
<where>
|
||||
<if test="rgbByHsvBatch != null and rgbByHsvBatch.size() > 0">
|
||||
<foreach collection="idList" index="index" item="item" open="(" separator="or" close=")">
|
||||
r = #{item.r} and g = #{item.g} and b = #{item.b}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
26
src/main/resources/mapper/UserLikeGroupMapper.xml
Normal file
26
src/main/resources/mapper/UserLikeGroupMapper.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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="com.ai.da.mapper.UserLikeGroupMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.ai.da.mapper.entity.UserLikeGroup">
|
||||
<id column="id" property="id" />
|
||||
<result column="account_id" property="accountId" />
|
||||
<result column="collection_id" property="collectionId" />
|
||||
<result column="name" property="name" />
|
||||
<result column="create_date" property="createDate" />
|
||||
<result column="update_date" property="updateDate" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertUserLikeGroup" parameterType="com.ai.da.mapper.entity.UserLikeGroup" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
insert into t_user_like_group
|
||||
(account_id,collection_id,`name`,create_date,update_date)
|
||||
values(
|
||||
#{accountId},
|
||||
#{collectionId},
|
||||
#{name},
|
||||
#{createDate},
|
||||
#{updateDate});
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user