消息中心提交

This commit is contained in:
wong
2025-09-29 11:34:01 +08:00
parent 5102f02083
commit 0e6b885095
4 changed files with 127 additions and 2 deletions

View File

@@ -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();