|
@@ -9,6 +9,7 @@ import com.fdkankan.site.common.util.JwtUtil;
|
|
import com.fdkankan.site.common.util.VUtils;
|
|
import com.fdkankan.site.common.util.VUtils;
|
|
import com.fdkankan.site.entity.Project;
|
|
import com.fdkankan.site.entity.Project;
|
|
import com.fdkankan.site.entity.ProjectTeam;
|
|
import com.fdkankan.site.entity.ProjectTeam;
|
|
|
|
+import com.fdkankan.site.exception.BusinessException;
|
|
import com.fdkankan.site.httpClient.client.FdKKClient;
|
|
import com.fdkankan.site.httpClient.client.FdKKClient;
|
|
import com.fdkankan.site.httpClient.request.FdkkLoginRequest;
|
|
import com.fdkankan.site.httpClient.request.FdkkLoginRequest;
|
|
import com.fdkankan.site.httpClient.response.FdkkResponse;
|
|
import com.fdkankan.site.httpClient.response.FdkkResponse;
|
|
@@ -130,9 +131,14 @@ public class ProjectTeamServiceImpl extends ServiceImpl<IProjectTeamMapper, Proj
|
|
ProjectTeam team = this.getById(param.getTeamId());
|
|
ProjectTeam team = this.getById(param.getTeamId());
|
|
VUtils.isTure(team.getIsCreater() == 1).throwMessage(ResultCode.NOT_PERM);
|
|
VUtils.isTure(team.getIsCreater() == 1).throwMessage(ResultCode.NOT_PERM);
|
|
|
|
|
|
- ProjectTeam projectTeam = this.getProjectCreater(team.getProjectId());
|
|
|
|
- VUtils.isTure(projectTeam == null).throwMessage(ResultCode.PROJECT_CREATER_NOT_EXIST);
|
|
|
|
- VUtils.isTure(!projectTeam.getUserName().equals(JwtUtil.getUserName(token))).throwMessage(ResultCode.NOT_PERM);
|
|
|
|
|
|
+ ProjectTeam createrTeam = this.getProjectCreater(team.getProjectId());
|
|
|
|
+ VUtils.isTure(createrTeam == null).throwMessage(ResultCode.PROJECT_CREATER_NOT_EXIST);
|
|
|
|
+ String userName = JwtUtil.getUserName(token);
|
|
|
|
+ if(!createrTeam.getUserName().equals(userName)){
|
|
|
|
+ if(!team.getUserName().equals(userName)){
|
|
|
|
+ throw new BusinessException(ResultCode.NOT_PERM);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
this.removeById(param.getTeamId());
|
|
this.removeById(param.getTeamId());
|
|
}
|
|
}
|