feat(website): 添加网站查询中的协作成员筛选功能
- 在CmsWebsiteParam中新增memberUserId参数用于协作成员筛选 - 修改CmsWebsiteMapper.xml添加按memberUserId查询的SQL逻辑 - 实现通过app_user表关联查询指定用户的协作网站列表 - 支持同时查询用户直接创建和作为成员参与的网站 - 保持原有websiteIds和keywords查询条件的兼容性
This commit is contained in:
@@ -430,6 +430,15 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</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">
|
<if test="param.keywords != null">
|
||||||
AND (a.website_name LIKE CONCAT('%', #{param.keywords}, '%')
|
AND (a.website_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
OR a.website_code LIKE CONCAT('%', #{param.keywords}, '%')
|
OR a.website_code LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
|||||||
@@ -214,6 +214,9 @@ public class CmsWebsiteParam extends BaseParam {
|
|||||||
@Schema(description = "按WebsiteIds集搜索")
|
@Schema(description = "按WebsiteIds集搜索")
|
||||||
private Set<Integer> websiteIds;
|
private Set<Integer> websiteIds;
|
||||||
|
|
||||||
|
@Schema(description = "协作成员userId(查该用户作为成员参与的应用,联表 app_user)")
|
||||||
|
private Integer memberUserId;
|
||||||
|
|
||||||
@Schema(description = "当前登录用户ID")
|
@Schema(description = "当前登录用户ID")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer loginUserId;
|
private Integer loginUserId;
|
||||||
|
|||||||
Reference in New Issue
Block a user