|  |  |  | 
|---|
|  |  |  | <mapper namespace="com.ruoyi.app.patrolplan.mapper.ArdAppPatroluserMapper"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <resultMap type="ArdAppPatroluser" id="ArdAppPatroluserResult"> | 
|---|
|  |  |  | <result property="reserved1"    column="reserved_1"    /> | 
|---|
|  |  |  | <result property="id"    column="id"    /> | 
|---|
|  |  |  | <result property="patrolplanId"    column="patrolplan_id"    /> | 
|---|
|  |  |  | <result property="appUserId"    column="app_user_id"    /> | 
|---|
|  |  |  | </resultMap> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <sql id="selectArdAppPatroluserVo"> | 
|---|
|  |  |  | select reserved_1, patrolplan_id, app_user_id from ard_app_patroluser | 
|---|
|  |  |  | select id, patrolplan_id, app_user_id from ard_app_patroluser | 
|---|
|  |  |  | </sql> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectArdAppPatroluserList" parameterType="ArdAppPatroluser" resultMap="ArdAppPatroluserResult"> | 
|---|
|  |  |  | <include refid="selectArdAppPatroluserVo"/> | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test="reserved1 != null  and reserved1 != ''"> and reserved_1 = #{reserved1}</if> | 
|---|
|  |  |  | <if test="patrolplanId != null  and patrolplanId != ''"> and patrolplan_id = #{patrolplanId}</if> | 
|---|
|  |  |  | <if test="appUserId != null  and appUserId != ''"> and app_user_id = #{appUserId}</if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectArdAppPatroluserByReserved1" parameterType="String" resultMap="ArdAppPatroluserResult"> | 
|---|
|  |  |  | <select id="selectArdAppPatroluserById" parameterType="String" resultMap="ArdAppPatroluserResult"> | 
|---|
|  |  |  | <include refid="selectArdAppPatroluserVo"/> | 
|---|
|  |  |  | where reserved_1 = #{reserved1} | 
|---|
|  |  |  | where id = #{id} | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <insert id="insertArdAppPatroluser" parameterType="ArdAppPatroluser"> | 
|---|
|  |  |  | insert into ard_app_patroluser | 
|---|
|  |  |  | <trim prefix="(" suffix=")" suffixOverrides=","> | 
|---|
|  |  |  | <if test="reserved1 != null">reserved_1,</if> | 
|---|
|  |  |  | <if test="id != null">id,</if> | 
|---|
|  |  |  | <if test="patrolplanId != null">patrolplan_id,</if> | 
|---|
|  |  |  | <if test="appUserId != null">app_user_id,</if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | <trim prefix="values (" suffix=")" suffixOverrides=","> | 
|---|
|  |  |  | <if test="reserved1 != null">#{reserved1},</if> | 
|---|
|  |  |  | <if test="id != null">#{id},</if> | 
|---|
|  |  |  | <if test="patrolplanId != null">#{patrolplanId},</if> | 
|---|
|  |  |  | <if test="appUserId != null">#{appUserId},</if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="patrolplanId != null">patrolplan_id = #{patrolplanId},</if> | 
|---|
|  |  |  | <if test="appUserId != null">app_user_id = #{appUserId},</if> | 
|---|
|  |  |  | </trim> | 
|---|
|  |  |  | where reserved_1 = #{reserved1} | 
|---|
|  |  |  | where id = #{id} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <delete id="deleteArdAppPatroluserByReserved1" parameterType="String"> | 
|---|
|  |  |  | delete from ard_app_patroluser where patrolplan_id = #{id} | 
|---|
|  |  |  | <delete id="deleteArdAppPatroluserById" parameterType="String"> | 
|---|
|  |  |  | delete from ard_app_patroluser where id = #{id} | 
|---|
|  |  |  | </delete> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <delete id="deleteArdAppPatroluserByReserved1s" parameterType="String"> | 
|---|
|  |  |  | delete from ard_app_patroluser where reserved_1 in | 
|---|
|  |  |  | <foreach item="reserved1" collection="array" open="(" separator="," close=")"> | 
|---|
|  |  |  | #{reserved1} | 
|---|
|  |  |  | <delete id="deleteArdAppPatroluserByIds" parameterType="String"> | 
|---|
|  |  |  | delete from ard_app_patroluser where id in | 
|---|
|  |  |  | <foreach item="id" collection="array" open="(" separator="," close=")"> | 
|---|
|  |  |  | #{id} | 
|---|
|  |  |  | </foreach> | 
|---|
|  |  |  | </delete> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <insert id="insertArdAppPatroluserList" parameterType="ArdAppPatroluser"> | 
|---|
|  |  |  | insert into ard_app_patroluser (id,patrolplan_id,app_user_id) values | 
|---|
|  |  |  | <foreach collection="ardAppPatroluserList" separator="," item="ardAppPatroluser"> | 
|---|
|  |  |  | (#{ardAppPatroluser.id},#{ardAppPatroluser.patrolplanId},#{ardAppPatroluser.appUserId}) | 
|---|
|  |  |  | </foreach> | 
|---|
|  |  |  | </insert> | 
|---|
|  |  |  | <delete id="deleteArdAppPatroluserByPlanId" parameterType="String"> | 
|---|
|  |  |  | delete from ard_app_patroluser aap where aap.patrolplan_id = #{id} | 
|---|
|  |  |  | </delete> | 
|---|
|  |  |  | </mapper> | 
|---|