소스 검색

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

zoujiajian 7 달 전
부모
커밋
3911e0f75f
1개의 변경된 파일과 1개의 추가작업 그리고 1개의 파일을 삭제
  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>