fix[project]: 查询团队成员时,返回值新增用户类型作为区分
This commit is contained in:
@@ -62,7 +62,7 @@ public interface SimulationNodeMapper extends BaseMapper<SimulationNode> {
|
||||
|
||||
List<SpdmNodeMemberVo> getNodeMemberListByNodeIdList(@Param("nodeIdList") List<String> nodeIdList);
|
||||
|
||||
List<SpdmNodeMemberVo> getOnlyNodeMemberListByNodeIdList(@Param("nodeIdList") List<String> nodeIdList);
|
||||
List<SpdmNodeMemberVo> getOnlyNodeMemberListByNodeIdList(@Param("nodeIdList") List<String> nodeIdList,@Param("userType") Integer userType);
|
||||
|
||||
List<ProjectNodePo> allList(@Param("nodeIdList") List<String> deleteNodeList);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.sdm.project.model.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -16,4 +17,10 @@ public class GetProjectListReq {
|
||||
|
||||
private String phaseNodeId;
|
||||
|
||||
/**
|
||||
* 用户类型,0:团队成员,3:项目参与人员
|
||||
*/
|
||||
@Schema(description = "用户类型,0:团队成员,3:项目参与人员")
|
||||
private Integer userType = 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -2026,6 +2026,7 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
|
||||
Long tenantId = ThreadLocalContext.getTenantId();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
String projectNodeId = req.getProjectNodeId();
|
||||
Integer userType = req.getUserType();
|
||||
SpdmNodeVo spdmNodeVo = nodeMapper.getNodeById(projectNodeId);
|
||||
if (ObjectUtils.isEmpty(spdmNodeVo)) {
|
||||
log.error("根据projectNodeId:{},未查询到团队成员", projectNodeId);
|
||||
@@ -2035,7 +2036,7 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
|
||||
List<String> allNodeIdList = new ArrayList<>();
|
||||
allNodeIdList.add(spdmNodeVo.getUuid());
|
||||
recursionAllNodeIdList(Collections.singletonList(spdmNodeVo.getUuid()), allNodeIdList);
|
||||
List<SpdmNodeMemberVo> spdmNodeMemberVoList = nodeMapper.getNodeMemberListByNodeIdList(allNodeIdList);
|
||||
List<SpdmNodeMemberVo> spdmNodeMemberVoList = nodeMapper.getOnlyNodeMemberListByNodeIdList(allNodeIdList,userType);
|
||||
if (CollectionUtils.isEmpty(spdmNodeMemberVoList)) {
|
||||
log.error("allNodeIdList:{},未查询到团队成员", allNodeIdList);
|
||||
jsonObject.put("data", new ArrayList<CIDUserResp>());
|
||||
@@ -5250,7 +5251,7 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
|
||||
return SdmResponse.failed("参数不能为空");
|
||||
}
|
||||
// 查询当前项目的团队成员,如果是团队成员,则不允许添加
|
||||
List<SpdmNodeMemberVo> spdmNodeMemberVoList = nodeMapper.getOnlyNodeMemberListByNodeIdList(Collections.singletonList(projectId));
|
||||
List<SpdmNodeMemberVo> spdmNodeMemberVoList = nodeMapper.getOnlyNodeMemberListByNodeIdList(Collections.singletonList(projectId),NodeMemberTypeEnum.MANAGER.getCode());
|
||||
List<Long> expUserIdList = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(spdmNodeMemberVoList)) {
|
||||
List<Long> existUserIdList = spdmNodeMemberVoList.stream().map(SpdmNodeMemberVo::getUserId).toList();
|
||||
|
||||
@@ -401,7 +401,10 @@
|
||||
<foreach collection='nodeIdList' item='nodeId' index='index' separator=','>
|
||||
#{nodeId}
|
||||
</foreach>
|
||||
) and type = 0
|
||||
)
|
||||
<if test="userType != null and userType !='' ">
|
||||
and type = #{userType}
|
||||
</if>
|
||||
group by user_id, type,nodeId
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user