fix: member 接口增加 q 请求参数

This commit is contained in:
zhangshuai
2024-09-06 10:07:35 +08:00
parent af7635d508
commit ac391799de
2 changed files with 10 additions and 5 deletions

View File

@@ -87,9 +87,8 @@ public class WorkspaceController {
}
@GetMapping("/{workspaceId}/member")
public R getMember(@PathVariable String workspaceId) {
Map params = T.MapUtil.builder("workspaceId", workspaceId).build();
public R getMember(@PathVariable String workspaceId, @RequestParam Map params) {
params.put("workspaceId", workspaceId);
List<WorkspaceMemberEntity> memberEntityList = workspaceMemberService.queryList(params);
return R.ok().putData("records", memberEntityList);
}

View File

@@ -19,6 +19,7 @@
<association property="user" columnPrefix="su_" javaType="net.geedge.asw.module.sys.entity.SysUserEntity">
<id property="id" column="id"/>
<result property="name" column="name"/>
<result property="userName" column="user_name"/>
</association>
<association property="role" columnPrefix="sr_" javaType="net.geedge.asw.module.sys.entity.SysRoleEntity">
@@ -40,6 +41,7 @@
cu.user_name AS cu_user_name,
su.id AS su_id,
su.name AS su_name,
su.user_name AS su_user_name,
sr.id AS sr_id,
sr.name AS sr_name,
ws.id AS w_id,
@@ -52,12 +54,16 @@
LEFT JOIN workspace ws ON wm.workspace_id = ws.id
<where>
<if test="params.workspaceId != null and params.workspaceId != ''">
wm.workspace_id = #{params.workspaceId}
AND wm.workspace_id = #{params.workspaceId}
</if>
<if test="params.userId != null and params.userId != ''">
wm.user_id = #{params.userId}
AND wm.user_id = #{params.userId}
</if>
<if test="params.q != null and params.q != ''">
AND ( locate(#{params.q}, su.name) OR locate(#{params.q}, su.user_name) )
</if>
</where>
</select>
</mapper>