|
@@ -79,6 +79,19 @@ class Timedtask
|
|
|
$info['status'] = 2;
|
|
|
$info['cancel_at'] = date('Y-m-d H:i:s');
|
|
|
Db::name('store_order_info_order')->where('id',$v['id'])->update($info);
|
|
|
+
|
|
|
+ $cancle = [
|
|
|
+ 'mid'=>$v['mid'],
|
|
|
+ 'order_id'=>$v['id']
|
|
|
+ ];
|
|
|
+ Db::name('store_order_info_cancel_log')->insert($cancle);
|
|
|
+
|
|
|
+ $time = date('Y-m-d H:i:s',time()-(60*60));
|
|
|
+ $count = Db::name('store_order_info_cancel_log')->where('mid',$v['mid'])->where('create_at','gt',$time)->count();
|
|
|
+ if ($count>2){
|
|
|
+ $buy_time = date('Y-m-d H:i:s',time()+(24*60*60));
|
|
|
+ Db::name('store_member')->where('id',$v['mid'])->update(['buy_time'=>$buy_time]);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|