|
|
|
@ -32,19 +32,25 @@ |
|
|
|
SELECT u.islicode as islicode,u.`name`,u.publicAccount, |
|
|
|
u.bankName,u.userType,o.close_status FROM order_user u |
|
|
|
INNER JOIN `order` o ON u.batchcode=o.batchcode |
|
|
|
WHERE |
|
|
|
<if test="map!=null"> |
|
|
|
<foreach collection="map" item="v" index="k" separator="and"> |
|
|
|
<if test="v != null and v != '' and k!='u.name'"> |
|
|
|
${k} = #{v} |
|
|
|
</if> |
|
|
|
<if test="k=='u.name'"> |
|
|
|
u.`name` like CONCAT('%',${v},'%') |
|
|
|
</if> |
|
|
|
</foreach> |
|
|
|
AND |
|
|
|
</if> |
|
|
|
u.id IN (SELECT MAX(id) FROM order_user GROUP BY islicode) |
|
|
|
<where> |
|
|
|
<if test="map!=null"> |
|
|
|
<foreach collection="map" item="v" index="k" separator="and"> |
|
|
|
<if test="v != null and v != '' and k!='u.name'"> |
|
|
|
${k} = #{v} |
|
|
|
</if> |
|
|
|
<if test="k=='u.publicAccount'"> |
|
|
|
u.publicAccount like concat('%',#{v},'%') |
|
|
|
</if> |
|
|
|
<if test="k=='u.name'"> |
|
|
|
u.`name` like concat('%',#{v},'%') |
|
|
|
</if> |
|
|
|
</foreach> |
|
|
|
|
|
|
|
</if> |
|
|
|
<if test="map==null"> |
|
|
|
u.id IN (SELECT MAX(id) FROM order_user GROUP BY islicode) |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
ORDER BY u.id DESC |
|
|
|
</select> |
|
|
|
|
|
|
|
|