|
|
|
@ -22,22 +22,14 @@ |
|
|
|
SELECT o.`status`,u.`name`,ticket.id,ticket.pdfUrl,u.uscc,ticket.tickettime,ticket.ticketid,ticket.batchcode, |
|
|
|
ticket.ticket_status,ticket.ticketimage,ticket.ticketurl,ticket.ticketmoney,ticket.islicode,ticket.ticketApiMessage |
|
|
|
FROM ticket |
|
|
|
INNER JOIN order_user u ON u.batchcode = ticket.batchcode AND u.islicode = ticket.islicode |
|
|
|
LEFT JOIN order_user u ON u.batchcode = ticket.batchcode AND u.islicode = ticket.islicode |
|
|
|
LEFT JOIN `order` as o ON o.batchcode = ticket.batchcode |
|
|
|
<where> |
|
|
|
<if test="map!=null"> |
|
|
|
<foreach collection="map" item="v" index="k" separator="and"> |
|
|
|
<if test="v != null and v != '' and k!='ticketid' and k!='u.name' and k!='o.status'"> |
|
|
|
<if test="v != null and v != '' and k!='ticketid' and k!='u.name'"> |
|
|
|
${k} = #{v} |
|
|
|
</if> |
|
|
|
<!-- 订单状态 --> |
|
|
|
<if test="k=='o.status'"> |
|
|
|
t.batchcode IN ( |
|
|
|
SELECT batchcode FROM `order` |
|
|
|
<if test="v!='' "> |
|
|
|
WHERE `status`=#{v} LIMIT #{start},#{limit} |
|
|
|
</if> |
|
|
|
) |
|
|
|
</if> |
|
|
|
<if test="k=='ticketid'"> |
|
|
|
ticket.ticketid like concat ('%',#{v},'%') |
|
|
|
</if> |
|
|
|
|