|
|
@@ -425,16 +425,15 @@
|
|
|
|
|
|
<select id="selectMaxRefundGoodsName" resultType="java.lang.String">
|
|
|
select (select title from goods_don where id = o.goods_id limit 1)
|
|
|
- from refund_order_don rd inner join order_don o
|
|
|
+ from (select distinct order_id from refund_order_don where operator = #{operator}
|
|
|
+ and refund_method not in ('EX_CODE'
|
|
|
+ , 'balance')) rd inner join order_don o
|
|
|
on o.id = rd.order_id
|
|
|
- where rd.operator = #{operator}
|
|
|
- and rd.refund_method not in ('EX_CODE'
|
|
|
- , 'balance')
|
|
|
<if test="startTime != null">
|
|
|
- and rd.created_time >= #{startTime}
|
|
|
+ and o.created_time >= #{startTime}
|
|
|
</if>
|
|
|
<if test="endTime != null">
|
|
|
- and rd.created_time < #{endTime}
|
|
|
+ and o.created_time < #{endTime}
|
|
|
</if>
|
|
|
group by o.goods_id
|
|
|
order by count(*) desc limit 1
|