wuggemail@foxmail.com 1 week ago
parent
commit
7d6e9f70b4
2 changed files with 6 additions and 2 deletions
  1. 2 2
      app/controller/Headquarters.php
  2. 4 0
      app/controller/UserInfo.php

+ 2 - 2
app/controller/Headquarters.php

@@ -33,7 +33,7 @@ class Headquarters extends BaseController
         if ($post['type'] !== '') $condition[] = ['type', '=', $post['type']];
 
         //兼容原有各个接口的筛选
-        $count = Db::name('headquarters')
+        $count = Db::name('supplier')
             ->where($condition)
             ->count('id');
 
@@ -336,7 +336,7 @@ class Headquarters extends BaseController
     {
         $companyNo = $this->request->filter('trim')->post('code');
 
-        $res_1 = Db::name('headquarters')
+        $res_1 = Db::name('supplier')
             ->where('is_del', 0)
             ->whereIn('code', $companyNo)
             ->column('name', 'code');

+ 4 - 0
app/controller/UserInfo.php

@@ -95,6 +95,10 @@ class UserInfo extends BaseController
 		$list['system_version']=(new AccountPlat())->where(['account_id'=>$list['id']])->column('system_version','plat_code');
         $list['company_relaton'] = Db::name("account_company")->where(["account_id" => $list['id'], "is_del" => 0, "status" => 1])
             ->column("companyCode,companyName,company_type,is_main,status");
+        if($list['level']==1){
+
+            $list['company_relaton']= \app\user\model\Supplier::where(['is_del'=>0,"is_upgrade"=>1])->field("code companyCode ,name companyName,company_status status")->select();
+        }
         return json_show(0, "获取成功", $list);
     }