|
|
@@ -92,7 +92,7 @@ class UserCouponLogic extends BaseLogic
|
|
|
$query->where(' expire_time >'. (time()-86400*7));
|
|
|
})
|
|
|
->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'])
|
|
|
+ ->append(['voucher_status_text','discount_ratio_text'])
|
|
|
->order(['id' => 'desc'])
|
|
|
->select()
|
|
|
->toArray();
|
|
|
@@ -129,6 +129,7 @@ class UserCouponLogic extends BaseLogic
|
|
|
$query->where('goods_category_id',$params['goods_category_id']);
|
|
|
}])->where('remaining_count','>',0)
|
|
|
->where('voucher_status',1)
|
|
|
+ ->append(['discount_ratio_text'])
|
|
|
->order(['id' => 'desc'])
|
|
|
->field(['code','amount','amount_require','discount_ratio','server_category_name',
|
|
|
'event_name','expire_time','max_deductible_price','mold_type',])
|
|
|
@@ -158,6 +159,7 @@ class UserCouponLogic extends BaseLogic
|
|
|
}])->where('user_id',$params['user_id'])
|
|
|
->where('voucher_count','>',0)
|
|
|
->where('voucher_status',0)
|
|
|
+ ->append(['discount_ratio_text'])
|
|
|
->where('amount_require','<=',$params['amount'])
|
|
|
->visible(['id','amount','amount_require','begin_use','discount_ratio','event_name','expire_time','max_deductible_price','server_category_name','mold_type'])
|
|
|
->select()->toArray();
|