|
|
@@ -95,7 +95,7 @@ class UserCouponLogic extends BaseLogic
|
|
|
|
|
|
$data = UserCoupon::where($where)
|
|
|
->where(function(Query $query){
|
|
|
- $query->where(' expire_time >'. (time()-86400*7));
|
|
|
+ $query->where(' expire_time >'. time());
|
|
|
})
|
|
|
->field(['id','code','amount','amount_require','begin_use','voucher_status','discount_ratio','event_name','expire_time','max_deductible_price','server_category_name','mold_type'])
|
|
|
->append(['voucher_status_text','discount_ratio_text'])
|
|
|
@@ -165,7 +165,7 @@ class UserCouponLogic extends BaseLogic
|
|
|
$coupon_all_ids =UserCoupon::where('user_id',$params['user_id'])
|
|
|
->where('voucher_count','>',0)
|
|
|
->where('voucher_status',0)
|
|
|
- ->where('expire_time','>',(time()-86400*7))
|
|
|
+ ->where('expire_time','>',time())
|
|
|
->where('amount_require','<=',$params['amount'])
|
|
|
->column('coupon_id');
|
|
|
|
|
|
@@ -174,7 +174,7 @@ class UserCouponLogic extends BaseLogic
|
|
|
$data = UserCoupon::where('user_id',$params['user_id'])
|
|
|
->whereIn('coupon_id',$coupon_ids)
|
|
|
->append(['discount_ratio_text'])
|
|
|
- ->where('expire_time','>',(time()-86400*7))
|
|
|
+ ->where('expire_time','>',time())
|
|
|
->visible(['id','coupon_id','amount','amount_require','begin_use','discount_ratio','event_name','expire_time','max_deductible_price','server_category_name','mold_type'])
|
|
|
->select()->toArray();
|
|
|
foreach($data as $k => $v){
|