fix(iam): 权限服务接口接收参数问题修复
This commit is contained in:
+6
-6
@@ -5,18 +5,17 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.jero.common.constant.CacheConstant;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.modules.base.service.BaseCommonService;
|
||||
import com.jero.modules.docking.iam.dto.bpmc.*;
|
||||
import com.jero.modules.docking.iam.dto.IamCommonAcceptDto;
|
||||
import com.jero.modules.docking.iam.dto.IamOrgAcceptDto;
|
||||
import com.jero.modules.docking.iam.dto.IamUserAcceptDto;
|
||||
import com.jero.modules.docking.iam.dto.bpmc.*;
|
||||
import com.jero.modules.docking.iam.dto.response.*;
|
||||
import com.jero.modules.docking.iam.exception.IamGlobalException;
|
||||
import com.jero.modules.docking.iam.po.MessageHeader;
|
||||
import com.jero.modules.docking.iam.po.decrypt.AcceptDecryptPo;
|
||||
import com.jero.modules.docking.iam.po.decrypt.SendPoDecryptPo;
|
||||
import com.jero.modules.docking.iam.po.encrypt.AcceptEncryptPo;
|
||||
import com.jero.modules.docking.iam.po.MessageHeader;
|
||||
import com.jero.modules.docking.iam.po.encrypt.SendPoEncryptPo;
|
||||
import com.jero.modules.docking.iam.service.SyncIamService;
|
||||
import com.jero.modules.docking.utils.BamboocloudUtils;
|
||||
@@ -295,7 +294,7 @@ public class SyncIamController {
|
||||
* 通过type字段来区分
|
||||
*/
|
||||
@PostMapping({"/bpmcCreate"})
|
||||
public SendPoDecryptPo<BpmcResponseDto> bpmcCreate(@RequestBody AcceptDecryptPo<BpmcAcceptDto> acceptDecryptPo) throws JsonProcessingException {
|
||||
public SendPoDecryptPo<BpmcResponseDto> bpmcCreate(@RequestBody AcceptDecryptPo acceptDecryptPo) throws JsonProcessingException {
|
||||
if (acceptDecryptPo == null
|
||||
|| acceptDecryptPo.getMessageDecryptTabels() == null
|
||||
|| acceptDecryptPo.getMessageDecryptTabels().getHeader() == null){
|
||||
@@ -303,8 +302,10 @@ public class SyncIamController {
|
||||
}
|
||||
|
||||
log.info("统一权限服务平台请求数据:{}", acceptDecryptPo.toString());
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
BpmcAcceptDto bpmcAcceptDto = objectMapper.readValue(acceptDecryptPo.getMessageDecryptTabels().getHeader().getData(), BpmcAcceptDto.class);
|
||||
|
||||
BpmcAcceptDto bpmcAcceptDto = acceptDecryptPo.getMessageDecryptTabels().getHeader();
|
||||
// BpmcAcceptDto bpmcAcceptDto = acceptDecryptPo.getMessageDecryptTabels().getHeader();
|
||||
MessageHeader messageHeader = acceptDecryptPo.getMessageHeader();
|
||||
|
||||
if (CharSequenceUtil.isEmpty(bpmcAcceptDto.getType())){
|
||||
@@ -346,7 +347,6 @@ public class SyncIamController {
|
||||
|
||||
BpmcResponseDto bpmcResponseDto = BpmcResponseDto.success();
|
||||
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
// 分接口类型分别处理
|
||||
if (bpmcAcceptDto.getType().equals(DockingConstant.BPMC_TYPE_ROLE)){
|
||||
RoleDto roleDto = objectMapper.readValue(bpmcAcceptDto.getEntity(), RoleDto.class);
|
||||
|
||||
+2
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.docking.iam.dto.bpmc;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -8,6 +9,7 @@ import java.util.Date;
|
||||
* 统一权限服务平台的菜单实体
|
||||
*/
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ResourceDto {
|
||||
|
||||
private String id;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.docking.iam.dto.bpmc;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -8,6 +9,7 @@ import java.util.Date;
|
||||
* 统一权限服务平台的角色实体
|
||||
*/
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class RoleDto {
|
||||
|
||||
private String id;
|
||||
|
||||
+2
@@ -1,11 +1,13 @@
|
||||
package com.jero.modules.docking.iam.dto.bpmc;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 统一权限服务平台的 角色-菜单关联 实体
|
||||
*/
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class RoleResourceDto {
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -1,13 +1,13 @@
|
||||
package com.jero.modules.docking.iam.dto.bpmc;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 统一权限服务平台的 用户-角色关联 实体
|
||||
*/
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class UserRoleDto {
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -8,12 +8,12 @@ import lombok.Data;
|
||||
* 和PO系统做数据交互的最外层壳,做数据接收用
|
||||
*/
|
||||
@Data
|
||||
public class AcceptDecryptPo<T> {
|
||||
public class AcceptDecryptPo {
|
||||
|
||||
@JsonProperty("MessageHeader")
|
||||
private MessageHeader messageHeader;
|
||||
|
||||
@JsonProperty("Tables")
|
||||
private MessageDecryptTabels<T> messageDecryptTabels;
|
||||
private MessageDecryptTabels messageDecryptTabels;
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -7,9 +7,8 @@ import lombok.Data;
|
||||
* PO系统交互必须的实体,包含接口传递的正式数据(仅为套的一层壳)
|
||||
*/
|
||||
@Data
|
||||
public class MessageDecryptTabels<T> {
|
||||
public class MessageDecryptTabels {
|
||||
|
||||
@JsonProperty("Header")
|
||||
private T header;
|
||||
|
||||
private MessageTablesData header;
|
||||
}
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.modules.docking.iam.po.decrypt;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName: MessageTablesData
|
||||
* @Description:
|
||||
* @Author: yjz
|
||||
* @Date: 2023-11-07 14:21
|
||||
* @Version: 1.0
|
||||
**/
|
||||
@Data
|
||||
public class MessageTablesData {
|
||||
@JsonProperty("data")
|
||||
private String data;
|
||||
}
|
||||
Reference in New Issue
Block a user