|
@@ -772,10 +772,11 @@ class UserInfo extends BaseController
|
|
|
$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');
|
|
|
+ ->alias('a')
|
|
|
+ ->leftJoin('account b', 'b.id=a.account_id')
|
|
|
+ ->where(['a.companyCode' => $supplierNos, 'a.is_del' => 0, 'a.status' => 1, 'b.level' => 3])
|
|
|
+ ->whereLike('a.companyCode', 'QS%')
|
|
|
+ ->column('a.account_id', 'a.companyCode');
|
|
|
|
|
|
return json_show(0, '获取供应商账号开通情况成功', $list);
|
|
|
|