作者 王智

修复生成订单号 失败

@@ -8,6 +8,7 @@ use app\common\model\Version; @@ -8,6 +8,7 @@ use app\common\model\Version;
8 use Qiniu\Auth; 8 use Qiniu\Auth;
9 use think\Config; 9 use think\Config;
10 use think\Hook; 10 use think\Hook;
  11 +
11 //use EasyWeChat\Factory; 12 //use EasyWeChat\Factory;
12 use EasyWeChat\Foundation\Application; 13 use EasyWeChat\Foundation\Application;
13 use think\Db; 14 use think\Db;
@@ -733,4 +734,10 @@ class Common extends Api @@ -733,4 +734,10 @@ class Common extends Api
733 ]; 734 ];
734 $this->success('成功', $data); 735 $this->success('成功', $data);
735 } 736 }
  737 +
  738 + //定时任务
  739 + public function delNoPay()
  740 + {
  741 + Db::name('agreement')->where('createtime', '>', time() - 60)->where('pay', 0)->delete();
  742 + }
736 } 743 }
@@ -347,6 +347,7 @@ class Index extends Api @@ -347,6 +347,7 @@ class Index extends Api
347 'card_image' => $params['card_image'], 347 'card_image' => $params['card_image'],
348 'status' => 0, 348 'status' => 0,
349 'refind_status' => 3, 349 'refind_status' => 3,
  350 + 'pay' => 0,
350 'createtime' => time(), 351 'createtime' => time(),
351 'updatetime' => time(), 352 'updatetime' => time(),
352 'EXP_time' => time() + 86400 * 30 353 'EXP_time' => time() + 86400 * 30