feat(website): 添加网站查询中的协作成员筛选功能

- 在CmsWebsiteParam中新增memberUserId参数用于协作成员筛选
- 修改CmsWebsiteMapper.xml添加按memberUserId查询的SQL逻辑
- 实现通过app_user表关联查询指定用户的协作网站列表
- 支持同时查询用户直接创建和作为成员参与的网站
- 保持原有websiteIds和keywords查询条件的兼容性
This commit is contained in:
2026-03-30 12:43:12 +08:00
parent 85e0b062b8
commit ee2d95da91
2 changed files with 12 additions and 0 deletions

View File

@@ -430,6 +430,15 @@
#{item}
</foreach>
</if>
<if test="param.memberUserId != null">
AND (
a.user_id = #{param.memberUserId}
OR a.website_id IN (
SELECT website_id FROM app_user
WHERE user_id = #{param.memberUserId} AND deleted = 0
)
)
</if>
<if test="param.keywords != null">
AND (a.website_name LIKE CONCAT('%', #{param.keywords}, '%')
OR a.website_code LIKE CONCAT('%', #{param.keywords}, '%')

View File

@@ -214,6 +214,9 @@ public class CmsWebsiteParam extends BaseParam {
@Schema(description = "按WebsiteIds集搜索")
private Set<Integer> websiteIds;
@Schema(description = "协作成员userId查该用户作为成员参与的应用联表 app_user")
private Integer memberUserId;
@Schema(description = "当前登录用户ID")
@QueryField(type = QueryType.EQ)
private Integer loginUserId;