Browse Source

绑定报错

zhangxiaobin 1 year ago
parent
commit
530aeab846
1 changed files with 5 additions and 0 deletions
  1. 5 0
      application/api/controller/Companys.php

+ 5 - 0
application/api/controller/Companys.php

@@ -121,6 +121,7 @@ class Companys extends Api
             $comeform = $this->request->param('comeform','');
             $where['id'] = $id;
             $where['status'] = 1;
+            $time = time();
             $company = $this->model->where($where)->find();
             if (empty($company)) {
                 throw new Exception('未找到门店信息');
@@ -145,6 +146,10 @@ class Companys extends Api
                     'company_id' => $id,
                     'staff_id' => 0,
                     'money' => 0.00,
+                    'address' => '',
+                    'createtime' => $time,
+                    'updatetime' => $time,
+                    'remark' => '',
                     'comefrom' => $comeform,
                 ];
                 $walletRes = model('UserWallet')->insertGetId($walletData);