+19
-6
@@ -332,33 +332,42 @@ public class SyncIamController {
|
|||||||
|
|
||||||
MessageHeader messageHeader = acceptDecryptPo.getMessageHeader();
|
MessageHeader messageHeader = acceptDecryptPo.getMessageHeader();
|
||||||
BpmcResponseDto bpmcResponseDto = BpmcResponseDto.success();
|
BpmcResponseDto bpmcResponseDto = BpmcResponseDto.success();
|
||||||
|
SendPoEncryptPo sendPoEncryptPo = new SendPoEncryptPo();
|
||||||
|
|
||||||
if (CharSequenceUtil.isEmpty(bpmcAcceptDto.getType())){
|
if (CharSequenceUtil.isEmpty(bpmcAcceptDto.getType())){
|
||||||
bpmcResponseDto.setReturnCode(DockingConstant.IAM_ERROR_RESULT_CODE);
|
bpmcResponseDto.setReturnCode(DockingConstant.IAM_ERROR_RESULT_CODE);
|
||||||
bpmcResponseDto.setMessage("接口类型(type)未传参,请检查");
|
bpmcResponseDto.setMessage("接口类型(type)未传参,请检查");
|
||||||
log.error(bpmcResponseDto.getMessage());
|
log.error(bpmcResponseDto.getMessage());
|
||||||
return this.syncIamService.handlerGloablEncryptResponse(messageHeader, bpmcResponseDto);
|
sendPoEncryptPo = this.syncIamService.handlerGloablEncryptResponse(messageHeader, bpmcResponseDto);
|
||||||
|
sendPoEncryptPo.getReturns().setData(bpmcResponseDto.toString());
|
||||||
|
return sendPoEncryptPo;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CharSequenceUtil.isEmpty(bpmcAcceptDto.getEntity())){
|
if (CharSequenceUtil.isEmpty(bpmcAcceptDto.getEntity())){
|
||||||
bpmcResponseDto.setReturnCode(DockingConstant.IAM_ERROR_RESULT_CODE);
|
bpmcResponseDto.setReturnCode(DockingConstant.IAM_ERROR_RESULT_CODE);
|
||||||
bpmcResponseDto.setMessage("数据实体(entity)未传参,请检查");
|
bpmcResponseDto.setMessage("数据实体(entity)未传参,请检查");
|
||||||
log.error(bpmcResponseDto.getMessage());
|
log.error(bpmcResponseDto.getMessage());
|
||||||
return this.syncIamService.handlerGloablEncryptResponse(messageHeader, bpmcResponseDto);
|
sendPoEncryptPo = this.syncIamService.handlerGloablEncryptResponse(messageHeader, bpmcResponseDto);
|
||||||
|
sendPoEncryptPo.getReturns().setData(bpmcResponseDto.toString());
|
||||||
|
return sendPoEncryptPo;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CharSequenceUtil.isEmpty(bpmcAcceptDto.getAction())){
|
if (CharSequenceUtil.isEmpty(bpmcAcceptDto.getAction())){
|
||||||
bpmcResponseDto.setReturnCode(DockingConstant.IAM_ERROR_RESULT_CODE);
|
bpmcResponseDto.setReturnCode(DockingConstant.IAM_ERROR_RESULT_CODE);
|
||||||
bpmcResponseDto.setMessage("操作方式(action)未传参,请检查");
|
bpmcResponseDto.setMessage("操作方式(action)未传参,请检查");
|
||||||
log.error(bpmcResponseDto.getMessage());
|
log.error(bpmcResponseDto.getMessage());
|
||||||
return this.syncIamService.handlerGloablEncryptResponse(messageHeader, bpmcResponseDto);
|
sendPoEncryptPo = this.syncIamService.handlerGloablEncryptResponse(messageHeader, bpmcResponseDto);
|
||||||
|
sendPoEncryptPo.getReturns().setData(bpmcResponseDto.toString());
|
||||||
|
return sendPoEncryptPo;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CharSequenceUtil.isEmpty(bpmcAcceptDto.getSignature())){
|
if (CharSequenceUtil.isEmpty(bpmcAcceptDto.getSignature())){
|
||||||
bpmcResponseDto.setReturnCode(DockingConstant.IAM_ERROR_RESULT_CODE);
|
bpmcResponseDto.setReturnCode(DockingConstant.IAM_ERROR_RESULT_CODE);
|
||||||
bpmcResponseDto.setMessage("签名(signature)未传参,请检查");
|
bpmcResponseDto.setMessage("签名(signature)未传参,请检查");
|
||||||
log.error(bpmcResponseDto.getMessage());
|
log.error(bpmcResponseDto.getMessage());
|
||||||
return this.syncIamService.handlerGloablEncryptResponse(messageHeader, bpmcResponseDto);
|
sendPoEncryptPo = this.syncIamService.handlerGloablEncryptResponse(messageHeader, bpmcResponseDto);
|
||||||
|
sendPoEncryptPo.getReturns().setData(bpmcResponseDto.toString());
|
||||||
|
return sendPoEncryptPo;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 验证签名
|
// 验证签名
|
||||||
@@ -367,7 +376,9 @@ public class SyncIamController {
|
|||||||
bpmcResponseDto.setReturnCode(DockingConstant.IAM_ERROR_RESULT_CODE);
|
bpmcResponseDto.setReturnCode(DockingConstant.IAM_ERROR_RESULT_CODE);
|
||||||
bpmcResponseDto.setMessage("签名校验不通过,请检查");
|
bpmcResponseDto.setMessage("签名校验不通过,请检查");
|
||||||
log.error(bpmcResponseDto.getMessage());
|
log.error(bpmcResponseDto.getMessage());
|
||||||
return this.syncIamService.handlerGloablEncryptResponse(messageHeader, bpmcResponseDto);
|
sendPoEncryptPo = this.syncIamService.handlerGloablEncryptResponse(messageHeader, bpmcResponseDto);
|
||||||
|
sendPoEncryptPo.getReturns().setData(bpmcResponseDto.toString());
|
||||||
|
return sendPoEncryptPo;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -402,7 +413,9 @@ public class SyncIamController {
|
|||||||
bpmcResponseDto = BpmcResponseDto.error(e.getMessage());
|
bpmcResponseDto = BpmcResponseDto.error(e.getMessage());
|
||||||
}
|
}
|
||||||
log.info(bpmcResponseDto.getMessage());
|
log.info(bpmcResponseDto.getMessage());
|
||||||
return this.syncIamService.handlerGloablEncryptResponse(messageHeader, bpmcResponseDto);
|
sendPoEncryptPo = this.syncIamService.handlerGloablEncryptResponse(messageHeader, bpmcResponseDto);
|
||||||
|
sendPoEncryptPo.getReturns().setData(bpmcResponseDto.toString());
|
||||||
|
return sendPoEncryptPo;
|
||||||
}
|
}
|
||||||
private BpmcResponseDto bpmcTypeRoleResource(ObjectMapper objectMapper, BpmcAcceptDto bpmcAcceptDto, BpmcResponseDto bpmcResponseDto) throws JsonProcessingException {
|
private BpmcResponseDto bpmcTypeRoleResource(ObjectMapper objectMapper, BpmcAcceptDto bpmcAcceptDto, BpmcResponseDto bpmcResponseDto) throws JsonProcessingException {
|
||||||
List<RoleResourceDto> roleResourceDtoList = objectMapper.readValue(bpmcAcceptDto.getEntity(), new TypeReference<List<RoleResourceDto>>() {});
|
List<RoleResourceDto> roleResourceDtoList = objectMapper.readValue(bpmcAcceptDto.getEntity(), new TypeReference<List<RoleResourceDto>>() {});
|
||||||
|
|||||||
+8
-1
@@ -7,8 +7,15 @@ public class BpmcResponseDto {
|
|||||||
|
|
||||||
private String returnCode;
|
private String returnCode;
|
||||||
|
|
||||||
private String message;
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "{" +
|
||||||
|
"returnCode='" + returnCode + '\'' +
|
||||||
|
", message='" + message + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
|
||||||
|
private String message;
|
||||||
public static BpmcResponseDto success(){
|
public static BpmcResponseDto success(){
|
||||||
BpmcResponseDto bpmcResponseDto = new BpmcResponseDto();
|
BpmcResponseDto bpmcResponseDto = new BpmcResponseDto();
|
||||||
bpmcResponseDto.returnCode = "200"; // 成功时固定为200
|
bpmcResponseDto.returnCode = "200"; // 成功时固定为200
|
||||||
|
|||||||
Reference in New Issue
Block a user