|
@@ -2,13 +2,13 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.caimei.mapper.cmMapper.AuthTemplateMapper">
|
|
|
<insert id="insertTemplate">
|
|
|
- insert into cm_brand_auth_template (authUserId, templateImage, qrPosition, qrSize)
|
|
|
- values (#{authUserId}, #{templateImage}, #{qrPosition}, #{qrSize})
|
|
|
+ insert into cm_brand_auth_template (authUserId, templateImage, templateSize, qrPosition, qrSize, addTime)
|
|
|
+ values (#{authUserId}, #{templateImage}, #{templateSize}, #{qrPosition}, #{qrSize}, NOW())
|
|
|
</insert>
|
|
|
<update id="updateSelective">
|
|
|
update cm_brand_auth_template
|
|
|
<set>
|
|
|
- <if test="authUserId != null">
|
|
|
+ <if test="authUserId != null and null == authFlag and null == productFlag">
|
|
|
authUserId = #{authUserId},
|
|
|
</if>
|
|
|
<if test="templateImage != null and templateImage != ''">
|
|
@@ -41,16 +41,17 @@
|
|
|
</update>
|
|
|
|
|
|
<select id="getTemplateList" resultType="com.caimei.model.vo.TemplateVo">
|
|
|
- select id as templateId,authUserId, templateImage, authFlag, productFlag, qrPosition, status, addTime
|
|
|
- from cm_brand_auth_template
|
|
|
+ select t.id as templateId,t.authUserId,u.name as shopName, templateImage, templateSize, authFlag, productFlag, qrPosition,
|
|
|
+ qrSize, t.status, addTime
|
|
|
+ from cm_brand_auth_template t left join cm_brand_auth_user u on t.authUserId = u.authUserId
|
|
|
<where>
|
|
|
<if test="authUserId != null">
|
|
|
- and authUserId = #{authUserId}
|
|
|
+ and t.authUserId = #{authUserId}
|
|
|
</if>
|
|
|
<if test="listType == 2">
|
|
|
- and status = 1
|
|
|
+ and t.status = 1
|
|
|
</if>
|
|
|
</where>
|
|
|
- order by addTime desc
|
|
|
+ order by t.addTime desc
|
|
|
</select>
|
|
|
</mapper>
|