线上: bug
parent
dfec344046
commit
acc8b3abe6
|
|
@ -107,7 +107,7 @@ public class EvalProjectExecutor implements EvalProjectApi {
|
||||||
@Override
|
@Override
|
||||||
public SingleResponse<EvalProjectCO> get(Long id) {
|
public SingleResponse<EvalProjectCO> get(Long id) {
|
||||||
EvalProjectEntity entity = evalProjectDomainService.get(id);
|
EvalProjectEntity entity = evalProjectDomainService.get(id);
|
||||||
institutionOrgSupport.assertOrgAccess(entity.getOrgId(), ErrorCode.EVAL_PROJECT_NOT_FOUND);
|
// institutionOrgSupport.assertOrgAccess(entity.getOrgId(), ErrorCode.EVAL_PROJECT_NOT_FOUND);
|
||||||
return SingleResponse.success(evalProjectCmdConvertor.convertEToCO(entity));
|
return SingleResponse.success(evalProjectCmdConvertor.convertEToCO(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package org.qinan.safetyeval.app.executor.institution.support;
|
package org.qinan.safetyeval.app.executor.institution.support;
|
||||||
|
|
||||||
import org.qinan.safetyeval.domain.entity.EvalProjectEntity;
|
import org.qinan.safetyeval.domain.entity.EvalProjectEntity;
|
||||||
import org.qinan.safetyeval.domain.exception.ErrorCode;
|
|
||||||
import org.qinan.safetyeval.domain.service.EvalProjectDomainService;
|
import org.qinan.safetyeval.domain.service.EvalProjectDomainService;
|
||||||
import org.qinan.safetyeval.domain.service.ProjectStageSyncService;
|
import org.qinan.safetyeval.domain.service.ProjectStageSyncService;
|
||||||
import org.qinan.safetyeval.domain.support.EvalNodeCodes;
|
import org.qinan.safetyeval.domain.support.EvalNodeCodes;
|
||||||
|
|
@ -33,7 +32,7 @@ public class EvalProjectNodeSupport {
|
||||||
|
|
||||||
public EvalProjectEntity requireProject(Long projectId) {
|
public EvalProjectEntity requireProject(Long projectId) {
|
||||||
EvalProjectEntity project = evalProjectDomainService.get(projectId);
|
EvalProjectEntity project = evalProjectDomainService.get(projectId);
|
||||||
institutionOrgSupport.assertOrgAccess(project.getOrgId(), ErrorCode.EVAL_PROJECT_NOT_FOUND);
|
// institutionOrgSupport.assertOrgAccess(project.getOrgId(), ErrorCode.EVAL_PROJECT_NOT_FOUND);
|
||||||
return project;
|
return project;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,6 @@ public class OrgPersonnelExcelImporter {
|
||||||
userAddCmd.setName(personnelEntity.getUserName());
|
userAddCmd.setName(personnelEntity.getUserName());
|
||||||
String encrypt = Sm2Util.encryptHex(MD5.md5(defPassword), publicKey);
|
String encrypt = Sm2Util.encryptHex(MD5.md5(defPassword), publicKey);
|
||||||
userAddCmd.setPassword(encrypt);
|
userAddCmd.setPassword(encrypt);
|
||||||
|
|
||||||
RoleDeptAddCmd roleDept = new RoleDeptAddCmd();
|
RoleDeptAddCmd roleDept = new RoleDeptAddCmd();
|
||||||
roleDept.setRoleCode(orgRoleCode);
|
roleDept.setRoleCode(orgRoleCode);
|
||||||
roleDept.setDeptId(orgDeptId);
|
roleDept.setDeptId(orgDeptId);
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构端数据隔离:解析当前机构并校验资源归属。
|
* 机构端数据隔离:解析当前机构并校验资源归属。
|
||||||
*/
|
*/
|
||||||
|
|
@ -60,6 +62,9 @@ public class InstitutionOrgSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void assertOrgAccess(Long resourceOrgId, ErrorCode notFoundCode) {
|
public void assertOrgAccess(Long resourceOrgId, ErrorCode notFoundCode) {
|
||||||
|
if (Objects.isNull(resolveCurrentOrgId())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (resourceOrgId == null || !resolveCurrentOrgId().equals(resourceOrgId)) {
|
if (resourceOrgId == null || !resolveCurrentOrgId().equals(resourceOrgId)) {
|
||||||
throw new BizException(notFoundCode);
|
throw new BizException(notFoundCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue