GroupTemplateUserMapper.xml
1.74 KB
<?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="cn.com.glsx.entmicro.mapper.GroupTemplateUserMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.entity.GroupTemplateUser">
<!--@Table scrm_group_template_staff-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="template_id" jdbcType="INTEGER" property="templateId" />
<result column="staff_id" jdbcType="INTEGER" property="staffId" />
<result column="master_status" jdbcType="TINYINT" property="masterStatus" />
<result column="follow" jdbcType="INTEGER" property="follow" />
<result column="del_flag" jdbcType="TINYINT" property="delFlag" />
<result column="created_by" jdbcType="INTEGER" property="createdBy" />
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
<result column="updated_by" jdbcType="INTEGER" property="updatedBy" />
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
</resultMap>
<sql id="Base_Column_List">
id, template_id, staff_id, master_status,follow, del_flag,created_by,created_time,updated_by,updated_time
</sql>
<update id="updateUserListStatusByIds">
update scrm_group_template_staff set del_flag=#{delFlag} WHERE id in
<foreach collection="userIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<update id="updateUserList">
<foreach collection="userList" item="item" separator=";" >
update scrm_group_template_staff set del_flag = #{delFlag},follow = #{item.follow}
WHERE template_id=#{templateId} and staff_id = #{item.staffId}
</foreach>
</update>
</mapper>