作者 macbook

开通会员赠送优惠券

... ... @@ -154,7 +154,7 @@ class Coupons extends Model
if ($coupon) {
if($u->package_coupons_time > 0){
// 开通会员后赠送的优惠券
if($u->package_coupons_time > time()){
if($u->package_coupons_time >= time()){
$coupon->user_coupons_id = $u->id;
$coupon->status_code = 'no_use';
$coupon->status_name = '未使用';
... ...
... ... @@ -273,7 +273,7 @@ class PackageOrder extends Base
->alias('pc')
->join('shopro_coupons sc','pc.coupons_id = sc.id')
->where('pc.package_id',$order['package_id'])
->field('pc.coupons_id,')
->field('pc.coupons_id,pc.give_num,pc.exipre_days')
->select();
$user_coupons_data = [];
foreach ($package_coupons as $v) {
... ...