Explorar el Código

添加sql片段Base_Column_list

pull/357/head
suqin hace 9 meses
padre
commit
04a64a661c
Se han modificado 1 ficheros con 4 adiciones y 5 borrados
  1. +4
    -5
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml

+ 4
- 5
tuoheng-service/tuoheng-admin/src/main/resources/mapper/InspectionMapper.xml Ver fichero

<resultMap id="ForeignResult" type="com.tuoheng.admin.entity.Inspection" extends="InspectionResult"> <resultMap id="ForeignResult" type="com.tuoheng.admin.entity.Inspection" extends="InspectionResult">
<result property="createUserName" column="create_user_name" /> <result property="createUserName" column="create_user_name" />
</resultMap> </resultMap>
<!--
<sql id="Base_Column_list"> <sql id="Base_Column_list">
id, tenant_id, dept_id, code, name, type, road_id, road_name, section_id, section_name, inspection_type, id, tenant_id, dept_id, code, name, type, road_id, road_name, section_id, section_name, inspection_type,
inspectionCycleId, airport_task_id, airport_id, drone_id, airport_name, inspection_line, inspection_line_name, inspectionCycleId, airport_task_id, airport_id, drone_id, airport_name, inspection_line, inspection_line_name,
fly_height, flytime, mileage, srt_name, heartbeat_time, execution_status, fly_height, flytime, mileage, srt_name, heartbeat_time, execution_status,
start_longitude, start_latitude, end_longitude, end_latitude, mobile, patrol_location, start_longitude, start_latitude, end_longitude, end_latitude, mobile, patrol_location,
create_user, create_time, update_user, update_time, mark create_user, create_time, update_user, update_time, mark
</sql>-->
</sql>


<sql id="Base_Column_list">
<sql id="Base_Column_list2">
t.id, t.tenant_id, t.dept_id, t.code, t.name, t.type, t.inspection_type, t.inspection_cycle_id, t.airport_task_id, t.id, t.tenant_id, t.dept_id, t.code, t.name, t.type, t.inspection_type, t.inspection_cycle_id, t.airport_task_id,
t.airport_id, t.drone_id, t.inspection_line, t.airport_line_length, t.equipment_id, t.equipment_name, t.equipment_mount_id,
t.airport_id, t.drone_id, t.inspection_line, t.equipment_id, t.equipment_name, t.equipment_mount_id,
t.equipment_mount_name, t.cloud_box_id, t.cloud_box_name, t.box_sn, t.flight_hand, t.flight_hand_name, t.inspection_time, t.equipment_mount_name, t.cloud_box_id, t.cloud_box_name, t.box_sn, t.flight_hand, t.flight_hand_name, t.inspection_time,
t.execution_start_time, t.execution_end_time, t.is_live, t.is_taken, t.is_tilt, t.video_url, t.ai_video_url, t.report_url, t.srt_url, t.execution_start_time, t.execution_end_time, t.is_live, t.is_taken, t.is_tilt, t.video_url, t.ai_video_url, t.report_url, t.srt_url,
t.status, t.analyse_status, t.progressbar, t.note, t.weather, t.fly_height, t.mileage, t.flytime, t.srt_name, t.heartbeat_time, t.execution_status, t.status, t.analyse_status, t.progressbar, t.note, t.weather, t.fly_height, t.mileage, t.flytime, t.srt_name, t.heartbeat_time, t.execution_status,
</select> </select>


<select id="selectPageList" parameterType="com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest" resultMap="ForeignResult"> <select id="selectPageList" parameterType="com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest" resultMap="ForeignResult">
select <include refid="Base_Column_list"/> ,u.realname as create_user_name
select <include refid="Base_Column_list2"/> ,u.realname as create_user_name
from th_inspection t from th_inspection t
left join th_user u on u.id = t.create_user left join th_user u on u.id = t.create_user
<where> <where>
#{deptId} #{deptId}
</foreach> </foreach>
</if> </if>
<if test="request.deptId != null and request.deptId !=''"> <if test="request.deptId != null and request.deptId !=''">
and t.dept_id = #{request.deptId} and t.dept_id = #{request.deptId}
</if> </if>

Cargando…
Cancelar
Guardar