Commit 70780078 authored by liuyuzhen's avatar liuyuzhen

优惠券过期数据

parent 81131c49
...@@ -17,7 +17,9 @@ class CouponServiceModel extends \Business\AbstractModel{ ...@@ -17,7 +17,9 @@ class CouponServiceModel extends \Business\AbstractModel{
\Error\ErrorModel::throwException($memberCouponDao->errorCode); \Error\ErrorModel::throwException($memberCouponDao->errorCode);
} }
if($where['couponState'] == \Our\ApiConst::couponUnused){ if($where['couponState'] == \Our\ApiConst::couponUnused){
$whereSql = ' coupon_state ='.$where['couponState'].' and member_id ='.$memberId.' and out_time > '.time(); $whereSql = ' coupon_state ='.$where['couponState'].' and member_id ='.$memberId.' and out_time >= '.time();
}else if($where['couponState']==\Our\ApiConst::couponOverdue) {
$whereSql = ' coupon_state in ('.\Our\ApiConst::couponUnused.','.\Our\ApiConst::couponOverdue.') and member_id ='.$memberId.' and out_time < '.time();
}else{ }else{
$whereSql = ' coupon_state ='.$where['couponState'].' and member_id ='.$memberId; $whereSql = ' coupon_state ='.$where['couponState'].' and member_id ='.$memberId;
} }
......
File mode changed from 100755 to 100644
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment