| | |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="ArdAppTaskSubResult" type="ArdAppTask" extends="ArdAppTaskResult"> |
| | | <collection property="ardAppTaskPicList" notNullColumn="sub2_id" javaType="java.util.List" |
| | | resultMap="ArdAppTaskPicResult"/> |
| | | <collection property="ardAppTaskDetailList" notNullColumn="sub1_id" javaType="java.util.List" |
| | | resultMap="ArdAppTaskDetailResult"/> |
| | | </resultMap> |
| | | <resultMap type="ArdAppTaskDetail" id="ArdAppTaskDetailResult"> |
| | | <result property="id" column="sub1_id"/> |
| | | <result property="name" column="sub1_name"/> |
| | | <result property="longitude" column="sub1_longitude"/> |
| | | <result property="latitude" column="sub1_latitude"/> |
| | | <result property="altitude" column="sub1_altitude"/> |
| | | <result property="userId" column="sub1_user_id"/> |
| | | <result property="text" column="sub1_text"/> |
| | | <result property="voice" column="sub1_voice"/> |
| | | <result property="taskId" column="sub1_task_id"/> |
| | | </resultMap> |
| | | <resultMap type="ArdAppTaskPic" id="ArdAppTaskPicResult"> |
| | | <result property="id" column="sub2_id"/> |
| | | <result property="taskId" column="sub2_task_id"/> |
| | | <result property="picUrl" column="sub2_pic_url"/> |
| | | </resultMap> |
| | | <resultMap id="ArdAppTaskArdAppTaskPicResult" type="ArdAppTask" extends="ArdAppTaskResult"> |
| | | <collection property="ardAppTaskPicList" notNullColumn="sub_id" javaType="java.util.List" |
| | | resultMap="ArdAppTaskPicResult"/> |
| | |
| | | <resultMap id="ArdAppTaskArdAppTaskDetailResult" type="ArdAppTask" extends="ArdAppTaskResult"> |
| | | <collection property="ardAppTaskDetailList" notNullColumn="sub_id" javaType="java.util.List" |
| | | resultMap="ArdAppTaskDetailResult"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="ArdAppTaskDetail" id="ArdAppTaskDetailResult"> |
| | | <result property="id" column="sub_id"/> |
| | | <result property="name" column="sub_name"/> |
| | | <result property="longitude" column="sub_longitude"/> |
| | | <result property="latitude" column="sub_latitude"/> |
| | | <result property="altitude" column="sub_altitude"/> |
| | | <result property="userId" column="sub_user_id"/> |
| | | <result property="text" column="sub_text"/> |
| | | <result property="voice" column="sub_voice"/> |
| | | <result property="taskId" column="sub_task_id"/> |
| | | </resultMap> |
| | | <resultMap type="ArdAppTaskPic" id="ArdAppTaskPicResult"> |
| | | <result property="id" column="sub_id"/> |
| | | <result property="taskId" column="sub_task_id"/> |
| | | <result property="picUrl" column="sub_pic_url"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectArdAppTaskVo"> |
| | |
| | | <if test="name != null and name != ''">and name like '%'||#{name}||'%'</if> |
| | | <if test="text != null and text != ''">and text = #{text}</if> |
| | | <if test="voice != null and voice != ''">and voice = #{voice}</if> |
| | | <if test="deptId != null ">and (c.dept_id = #{deptId} OR c.dept_id IN ( SELECT t.dept_id FROM sys_dept t |
| | | <if test="deptId != null and deptId != 0 "> |
| | | and (c.dept_id = #{deptId} OR c.dept_id IN ( SELECT t.dept_id FROM sys_dept t |
| | | WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) )) |
| | | </if> |
| | | <if test="userId != null and userId != ''">and user_id = #{userId}</if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | </where> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | </select> |
| | | |
| | | <select id="selectArdAppTaskById" parameterType="String" 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 a.id = #{id} |
| | | </select> |
| | | <select id="selectArdAppTaskByIdWithPic" parameterType="String" resultMap="ArdAppTaskArdAppTaskPicResult"> |
| | | select a.id, |
| | | a.name, |
| | |
| | | left join ard_app_task_detail c on c.task_id = a.id |
| | | where a.id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertArdAppTask" parameterType="ArdAppTask"> |
| | | insert into ard_app_task |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |