Browse Source

列表

master
sunyuchao 3 years ago
parent
commit
cd21a84cf4
  1. 33
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiComparisonRecordDao.xml

33
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiComparisonRecordDao.xml

@ -74,26 +74,13 @@
b.comparison_result comparisonResult b.comparison_result comparisonResult
FROM FROM
ic_resi_user a ic_resi_user a
<choose> LEFT JOIN ic_resi_comparison_record b ON a.id = b.resi_id AND b.del_flag = '0'
<when test='identical == null or identical == "" or identical == "0" or type == null and type == "" or type == "0" '> <if test='identical != null and identical != "" and identical == "0" '>
LEFT JOIN ic_resi_comparison_record b ON a.id = b.resi_id AND b.del_flag = '0' AND b.identical =#{identical}
<if test="identical != null and identical != ''"> </if>
AND b.identical =#{identical} <if test='type != null and type != "" and type == "0" '>
</if> AND b.type =#{type}
<if test="type != null and type != ''"> </if>
AND b.type =#{type}
</if>
</when>
<otherwise>
INNER JOIN ic_resi_comparison_record b ON a.id = b.resi_id AND b.del_flag = '0'
<if test="identical != null and identical != ''">
AND b.identical =#{identical}
</if>
<if test="type != null and type != ''">
AND b.type =#{type}
</if>
</otherwise>
</choose>
WHERE WHERE
a.del_flag = '0' a.del_flag = '0'
AND a.customer_id = #{customerId} AND a.customer_id = #{customerId}
@ -101,6 +88,12 @@
<if test="idCard != null and idCard != ''"> <if test="idCard != null and idCard != ''">
AND a.id_card =#{idCard} AND a.id_card =#{idCard}
</if> </if>
<if test='identical != null and identical != "" and identical != "0" '>
AND b.identical =#{identical}
</if>
<if test='type != null and type != "" and type != "0" '>
AND b.type =#{type}
</if>
ORDER BY a.pids ASC, b.created_time DESC ORDER BY a.pids ASC, b.created_time DESC
</select> </select>

Loading…
Cancel
Save