| | |
| | | ${params.dataScope} |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectArdAppTaskListWithDetail" parameterType="ArdAppTask" resultMap="ArdAppTaskSubResult"> |
| | | select a.id, |
| | | a.name, |
| | | a.text, |
| | | a.voice, |
| | | a.dept_id, |
| | | a.user_id, |
| | | a.create_by, |
| | | a.create_time, |
| | | a.update_by, |
| | | a.update_time, |
| | | b.id as sub2_id, |
| | | b.task_id as sub2_task_id, |
| | | b.pic_url as sub2_pic_url, |
| | | c.id as sub1_id, |
| | | c.name as sub1_name, |
| | | c.longitude as sub1_longitude, |
| | | c.latitude as sub1_latitde, |
| | | c.altitude as sub1_altitude, |
| | | c.user_id as sub1_user_id, |
| | | c.text as sub1_text, |
| | | c.voice as sub1_voice |
| | | from ard_app_task a |
| | | left join ard_app_task_pic b on b.task_id = a.id |
| | | left join ard_app_task_detail c on c.task_id = a.id |
| | | where c.user_id = #{userId} |
| | | </select> |
| | | <select id="selectArdAppTaskById" parameterType="String" resultMap="ArdAppTaskSubResult"> |
| | | select a.id, |
| | | a.name, |
| | |
| | | ( #{item.id}, #{item.taskId}, #{item.picUrl}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="deleteArdAppTaskDetailByTaskIds" parameterType="String"> |
| | | delete from ard_app_task_detail where task_id in |
| | | <foreach item="taskId" collection="array" open="(" separator="," close=")"> |
| | |
| | | #{item.text}, #{item.voice}, #{item.taskId}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <update id="updateArdAppTaskDetail" parameterType="ArdAppTaskDetail"> |
| | | update ard_app_task_detail |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="text != null">text = #{text},</if> |
| | | <if test="voice != null">voice = #{voice},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | <insert id="batchArdAppTaskDetailPic"> |
| | | insert into ard_app_task_detail_pic( id, task_detail_id, pic_url) values |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | ( #{item.id}, #{item.taskDetailId}, #{item.picUrl}) |
| | | </foreach> |
| | | </insert> |
| | | <delete id="deleteArdAppTaskDetailPicByTaskDetailId" parameterType="String"> |
| | | delete |
| | | from ard_app_task_detail_pic |
| | | where task_detail_id = #{taskDetailId} |
| | | </delete> |
| | | </mapper> |