消息中心提交
This commit is contained in:
@@ -14,7 +14,12 @@ class WechatGroupController extends BaseController
|
||||
$userId = $this->getUserInfo('id');
|
||||
$companyId = $this->getUserInfo('companyId');
|
||||
|
||||
$query = Db::table('s2_wechat_group')->where(['accountId' => $accountId])->whereIn('groupType',[1,2])->order('sortIndex desc,id desc');
|
||||
$query = Db::table('s2_wechat_group')
|
||||
->where(function ($query) use ($accountId,$companyId) {
|
||||
$query->where('accountId', $accountId)->whereOr('departmentId', $companyId);
|
||||
})
|
||||
->whereIn('groupType',[1,2])
|
||||
->order('groupType desc,sortIndex desc,id desc');
|
||||
$list = $query->select();
|
||||
$total = $query->count();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user