|
@@ -18,7 +18,24 @@
|
|
|
<result property="userId" column="user_id" jdbcType="VARCHAR"/>
|
|
|
<result property="appointmentTime" column="appointment_time" jdbcType="TIMESTAMP"/>
|
|
|
<result property="maintenanceAddress" column="maintenance_address" jdbcType="VARCHAR"/>
|
|
|
+ </resultMap>
|
|
|
|
|
|
+ <resultMap type="com.example.nngkxxdp.program.entity.DTO.RepairDTO" id="SRepairDTOMap">
|
|
|
+ <result property="id" column="id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="repairType" column="repair_type" jdbcType="INTEGER"/>
|
|
|
+ <result property="userDescription" column="user_description" jdbcType="VARCHAR"/>
|
|
|
+ <result property="repairPic" column="repair_pic" jdbcType="VARCHAR"/>
|
|
|
+ <result property="phoneNum" column="phone_num" jdbcType="INTEGER"/>
|
|
|
+ <result property="status" column="status" jdbcType="INTEGER"/>
|
|
|
+ <result property="workerDescription" column="worker_description" jdbcType="VARCHAR"/>
|
|
|
+ <result property="resultPic" column="result_pic" jdbcType="VARCHAR"/>
|
|
|
+ <result property="workerId" column="worker_id" jdbcType="INTEGER"/>
|
|
|
+ <result property="workerName" column="name" jdbcType="INTEGER"/>
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="userId" column="user_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="appointmentTime" column="appointment_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="maintenanceAddress" column="maintenance_address" jdbcType="VARCHAR"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<!--查询单个-->
|
|
@@ -30,42 +47,46 @@
|
|
|
</select>
|
|
|
|
|
|
<!--查询指定行数据-->
|
|
|
- <select id="queryAllByLimit" resultMap="SRepairMap">
|
|
|
+ <select id="queryAllByLimit" resultMap="SRepairDTOMap">
|
|
|
select
|
|
|
- id, repair_type, user_description, repair_pic, phone_num, status, worker_description, result_pic, worker_id, create_time, update_time,user_id,appointment_time,maintenance_address
|
|
|
- from s_repair
|
|
|
+ sr.id, sr.repair_type, sr.user_description, sr.repair_pic,
|
|
|
+ sr.phone_num, sr.status, sr.worker_description, sr.result_pic,
|
|
|
+ sr.worker_id, sr.create_time, sr.update_time,sr.user_id,sr.appointment_time,
|
|
|
+ sr.maintenance_address,sw.name
|
|
|
+ from s_repair sr
|
|
|
+ left join s_worker sw on sr.worker_id = sw.id
|
|
|
<where>
|
|
|
<if test="sRepair.repairType != null">
|
|
|
- and repair_type = #{sRepair.repairType}
|
|
|
+ and sr.repair_type = #{sRepair.repairType}
|
|
|
</if>
|
|
|
<if test="sRepair.userDescription != null and sRepair.userDescription != ''">
|
|
|
- and user_description = #{sRepair.userDescription}
|
|
|
+ and sr.user_description = #{sRepair.userDescription}
|
|
|
</if>
|
|
|
<if test="sRepair.repairPic != null and sRepair.repairPic != ''">
|
|
|
- and repair_pic = #{sRepair.repairPic}
|
|
|
+ and sr.repair_pic = #{sRepair.repairPic}
|
|
|
</if>
|
|
|
<if test="sRepair.phoneNum != null">
|
|
|
- and phone_num = #{sRepair.phoneNum}
|
|
|
+ and sr.phone_num = #{sRepair.phoneNum}
|
|
|
</if>
|
|
|
<if test="sRepair.status != null">
|
|
|
- and status = #{sRepair.status}
|
|
|
+ and sr.status = #{sRepair.status}
|
|
|
</if>
|
|
|
<if test="sRepair.workerDescription != null and sRepair.workerDescription != ''">
|
|
|
- and worker_description = #{sRepair.workerDescription}
|
|
|
+ and sr.worker_description = #{sRepair.workerDescription}
|
|
|
</if>
|
|
|
<if test="sRepair.resultPic != null and sRepair.resultPic != ''">
|
|
|
- and result_pic = #{sRepair.resultPic}
|
|
|
+ and sr.result_pic = #{sRepair.resultPic}
|
|
|
</if>
|
|
|
<if test="sRepair.workerId != null">
|
|
|
- and worker_id = #{sRepair.workerId}
|
|
|
+ and sr.worker_id = #{sRepair.workerId}
|
|
|
</if>
|
|
|
<if test="sRepair.createTime != null">
|
|
|
- and create_time = #{sRepair.createTime}
|
|
|
+ and sr.create_time = #{sRepair.createTime}
|
|
|
</if>
|
|
|
<if test="sRepair.updateTime != null">
|
|
|
- and update_time = #{sRepair.updateTime}
|
|
|
+ and sr.update_time = #{sRepair.updateTime}
|
|
|
</if>
|
|
|
- and is_del = 0
|
|
|
+ and sr.is_del = 0
|
|
|
</where>
|
|
|
limit #{pageable.offset}, #{pageable.pageSize}
|
|
|
</select>
|