|
|
@@ -68,10 +68,10 @@ public interface LifeCouponMapper extends BaseMapper<LifeCoupon> {
|
|
|
|
|
|
@Update(" UPDATE life_coupon\n" +
|
|
|
" SET \n" +
|
|
|
- " single_qty = single_qty - #{buyCount},\n" +
|
|
|
" status = CASE WHEN (single_qty - #{buyCount}) = 0 \n" +
|
|
|
" THEN #{soldOutStatus} \n" +
|
|
|
- " ELSE status END\n" +
|
|
|
+ " ELSE status END,\n" +
|
|
|
+ " single_qty = single_qty - #{buyCount}\n" +
|
|
|
" WHERE \n" +
|
|
|
" id = #{couponId} \n" +
|
|
|
" AND single_qty >= #{buyCount}")
|