|
|
@@ -54,7 +54,7 @@
|
|
|
order by isAvailable desc,orderby,couponMoney desc
|
|
|
</if>
|
|
|
<if test="couponId != null">
|
|
|
- order by case when cp.id = #{couponId} then 2 else isAvailable end desc,orderby,couponMoney desc
|
|
|
+ order by case when cp.id = #{couponId} then 2 else isAvailable end desc,orderby,couponMoney desc,valid_end_time asc
|
|
|
</if>)s where flag = 1 and couponUserStatus != 'used' and orderby != 2
|
|
|
</select>
|
|
|
|