2022-10-09 17:33:16 +08:00
|
|
|
<?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.rzyc.mapper.EntPostDutyMapper">
|
|
|
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.rzyc.model.EntPostDuty">
|
|
|
|
|
<id column="duty_id" property="dutyId" />
|
|
|
|
|
<result column="post_id" property="postId" />
|
|
|
|
|
<result column="duty_item" property="dutyItem" />
|
|
|
|
|
<result column="sort_id" property="sortId" />
|
|
|
|
|
<result column="enterprise_id" property="enterpriseId" />
|
|
|
|
|
<result column="create_time" property="createTime" />
|
|
|
|
|
<result column="create_by" property="createBy" />
|
|
|
|
|
<result column="modify_time" property="modifyTime" />
|
|
|
|
|
<result column="modify_by" property="modifyBy" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
duty_id, post_id, duty_item, sort_id, enterprise_id, create_time, create_by, modify_time, modify_by
|
|
|
|
|
</sql>
|
|
|
|
|
|
2022-12-29 18:02:27 +08:00
|
|
|
<update id="updatePostDuty">
|
|
|
|
|
update ent_post_duty set post_id = #{postId},dutyItem = #{dutyItem},sort_id = #{sortId},enterprise_id = #{enterpriseId},modify_by = #{modifyBy},modify_time = #{modifyTime}
|
|
|
|
|
where duty_id = #{dutyId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
2022-10-09 17:33:16 +08:00
|
|
|
<select id="selectEntUserPostDuty" resultMap="BaseResultMap">
|
2023-02-02 17:39:18 +08:00
|
|
|
select * from ent_post_duty where enterprise_id = #{enterpriseId} and post_id = #{postId} order by sort_id asc
|
2022-10-09 17:33:16 +08:00
|
|
|
</select>
|
|
|
|
|
|
2022-12-29 18:02:27 +08:00
|
|
|
<insert id="insertList">
|
|
|
|
|
insert into ent_post_duty (duty_id,post_id,duty_item,sort_id,enterprise_id,create_time,create_by) values
|
|
|
|
|
<foreach collection="list" item="list" separator=",">
|
|
|
|
|
(#{list.dutyId},
|
|
|
|
|
#{list.postId},
|
|
|
|
|
#{list.dutyItem},
|
|
|
|
|
#{list.sortId},
|
|
|
|
|
#{list.enterpriseId},
|
|
|
|
|
#{list.createTime},
|
|
|
|
|
#{list.createBy})
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteByPostId">
|
|
|
|
|
delete from ent_post_duty where post_id = #{postId}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
2022-10-09 17:33:16 +08:00
|
|
|
</mapper>
|