完善c端接口
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="deviceType != null">device_type,</if>
|
||||
<if test="headImg != null">head_img,</if>
|
||||
<if test="vipStartTime != null">vip_start_time,</if>
|
||||
<if test="vipEndTime != null">vip_end_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
@@ -39,6 +41,8 @@
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="deviceType != null">#{deviceType},</if>
|
||||
<if test="headImg != null">#{headImg},</if>
|
||||
<if test="vipStartTime != null">#{vipStartTime},</if>
|
||||
<if test="vipEndTime != null">#{vipEndTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -65,7 +69,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectShopUserVo">
|
||||
select id, user_id, username, password,device_type,device_id, phone, nickname, sex, birthday, addr, register_time, status, vip, online, create_time, update_time, is_del,head_img from shop_user
|
||||
select id, user_id, username, password,device_type,device_id, phone, nickname, sex, birthday, addr, register_time, status, vip, online, create_time, update_time, is_del,head_img,vip_end_time,vip_start_time from shop_user
|
||||
</sql>
|
||||
|
||||
<select id="selectShopUserList" parameterType="ShopUser" resultMap="ShopUserResult">
|
||||
@@ -84,6 +88,8 @@
|
||||
<if test="vip != null "> and vip = #{vip}</if>
|
||||
<if test="online != null and online != ''"> and online = #{online}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
<if test="vipStartTime != null"> and #{vipStartTime},</if>
|
||||
<if test="vipEndTime != null"> and #{vipEndTime},</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -103,7 +109,7 @@
|
||||
|
||||
<select id="selectShopUserById" parameterType="String" resultMap="ShopUserResult">
|
||||
<include refid="selectShopUserVo"/>
|
||||
where id = #{id}
|
||||
where shop_user.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertShopUser" parameterType="ShopUser" useGeneratedKeys="true" keyProperty="id">
|
||||
@@ -162,8 +168,10 @@
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="vipStartTime != null"> vip_start_time = #{vipStartTime},</if>
|
||||
<if test="vipEndTime != null"> vip_end_time = #{vipEndTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
where shop_user.user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteShopUserById" parameterType="String">
|
||||
@@ -177,4 +185,9 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectShopUserByUserId" resultMap="ShopUserResult">
|
||||
<include refid="selectShopUserVo"/>
|
||||
where shop_user.user_id = #{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user