Ver Fonte

检查供应商是否有开通账号

wufeng há 2 anos atrás
pai
commit
a1fbc5134e
2 ficheiros alterados com 15 adições e 0 exclusões
  1. 14 0
      app/controller/UserInfo.php
  2. 1 0
      route/app.php

+ 14 - 0
app/controller/UserInfo.php

@@ -765,6 +765,20 @@ class UserInfo extends BaseController
         return json_show(0, "获取成功", $list);
     }
 
+    //检查供应商是否有开通账号
+    public function checkHasAccountBySupplierNos()
+    {
+
+        $supplierNos = $this->request->post('supplierNo', '', 'trim');
+
+        $list = Db::name('account_company')
+            ->where(['companyCode' => $supplierNos, 'is_del' => 0, 'status' => 1])
+            ->whereLike('companyCode', 'QS%')
+            ->group('companyCode')
+            ->column('count(id)', 'companyCode');
+
+        return json_show(0, '获取供应商账号开通情况成功', $list);
 
+    }
 
 }

+ 1 - 0
route/app.php

@@ -30,6 +30,7 @@ Route::rule('userDelete', 'UserInfo/userDelete');
 Route::rule('userlistbycompany', 'UserInfo/UserListByCompany');
 Route::rule('passSetByPassword', 'UserInfo/passSetByPassword');
 Route::rule('get_company_list', 'UserInfo/getCompanyList');
+Route::rule('check_has_account_by_supplierNos', 'UserInfo/checkHasAccountBySupplierNos');
 
 //【公司账号管理】
 Route::rule('userCompanyBasicAdd', 'UserCompanyBasic/add');