作者 chencheng

0601-23

... ... @@ -186,9 +186,22 @@ class Client extends Base
$receive=Db::name('verification_receive')
->alias('a')
->join('verification_coupon b','a.verification_coupon_id=b.id')
->field("a.id,b.name,b.type,b.voucher_amount,b.gift,b.consumption,b.reduction,b.consumption_name,b.image,DATE_FORMAT(FROM_UNIXTIME(b.closetime), '%Y-%m-%d') AS closetime")
->field("a.id,b.name,a.type,
b.type as verification_coupon_type,
b.closetime,b.voucher_amount,b.gift,b.consumption,b.reduction,b.consumption_name,b.image,DATE_FORMAT(FROM_UNIXTIME(b.closetime), '%Y-%m-%d') AS closetime")
->where($receivewhere)->select();
$time = time();
if(!empty($receive)){
//过期检测
foreach($receive as $k=>&$v){
//已过期
if(strtotime($v['closetime']." 23:59:59") < $time){
Db::name('verification_receive')->where(['id'=>$v['id']])->update(['type'=>'2']);
$v['type'] = '2';
}
}
}
$order['receive']=$receive;
foreach ($order['receive'] as $key => $value) {
if($order['receive'][$key]['image']){
... ...