Browse Source

fix 优惠券可用列表排序 相同优惠到期时间前先使用

zoujiajian 5 months ago
parent
commit
3911e0f75f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      netflix-dao/src/main/resources/mapper/CouponUserMapper.xml

+ 1 - 1
netflix-dao/src/main/resources/mapper/CouponUserMapper.xml

@@ -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>