fix(系统设置): 修复项目列表展示成员数错误的缺陷
This commit is contained in:
parent
47a70f2eeb
commit
81a5b794bc
|
@ -21,7 +21,6 @@ import io.metersphere.system.request.ProjectAddMemberRequest;
|
|||
import io.metersphere.system.request.ProjectMemberRequest;
|
||||
import io.metersphere.system.service.OrganizationProjectLogService;
|
||||
import io.metersphere.system.service.OrganizationProjectService;
|
||||
import io.metersphere.system.service.UserService;
|
||||
import io.metersphere.validation.groups.Created;
|
||||
import io.metersphere.validation.groups.Updated;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
@ -43,8 +42,6 @@ import java.util.List;
|
|||
public class OrganizationProjectController {
|
||||
@Resource
|
||||
private OrganizationProjectService organizationProjectService;
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@PostMapping("/add")
|
||||
@RequiresPermissions(PermissionConstants.ORGANIZATION_PROJECT_READ_ADD)
|
||||
|
|
|
@ -36,12 +36,11 @@
|
|||
p.delete_user,
|
||||
p.update_user,
|
||||
p.enable,
|
||||
count(distinct u.id) as memberCount,
|
||||
count(distinct temp.id) as memberCount,
|
||||
o.name as organizationName,
|
||||
p.module_setting
|
||||
FROM project p
|
||||
LEFT JOIN user_role_relation ur on p.id = ur.source_id
|
||||
left join user u on u.id = p.create_user
|
||||
LEFT JOIN (SELECT ur.source_id, u.id from user_role_relation ur left join user u on u.id = ur.user_id where u.deleted = 0) temp on p.id = temp.source_id
|
||||
INNER JOIN organization o on p.organization_id = o.id
|
||||
<include refid="queryWhereCondition"/>
|
||||
group by p.id
|
||||
|
@ -71,9 +70,8 @@
|
|||
|
||||
<sql id="queryWhereCondition">
|
||||
<where>
|
||||
u.deleted = 0
|
||||
<if test="request.organizationId != null">
|
||||
and p.organization_id = #{request.organizationId}
|
||||
p.organization_id = #{request.organizationId}
|
||||
</if>
|
||||
<if test="request.keyword != null">
|
||||
and (
|
||||
|
|
Loading…
Reference in New Issue