|
@@ -11,10 +11,12 @@ import java.util.List;
|
|
|
|
|
|
public interface CouponDao extends BaseMapper<PatientCoupon> {
|
|
|
|
|
|
- @Select("select id,value,effective_days,salesman='SystemGift' from t_zd_coupons where id='assessment_gift'")
|
|
|
+ @Select("select id,value,effective_days,salesman='SystemGift' from t_zd_coupons " +
|
|
|
+ "where id='assessment_gift' and state='ACTIVATED'")
|
|
|
CouponAttribute selectAssessmentGiftCouponValue();
|
|
|
|
|
|
- @Select("select id,value,left_quantity,effective_days from t_zd_coupons where id=#{couponId}")
|
|
|
+ @Select("select id,value,left_quantity,effective_days from t_zd_coupons " +
|
|
|
+ "where id=#{couponId} and state='ACTIVATED' ")
|
|
|
CouponAttribute selectSalesmanOperationCouponValue(String couponId);
|
|
|
|
|
|
@Update("update t_zd_coupons set left_quantity=left_quantity-1 where id=#{couponId}")
|