dd72cfec by xiaojie

【数据资产】

1、连接器注册到数据港
1 parent 653402e3
...@@ -57,52 +57,6 @@ public class DataPortConnectUtil { ...@@ -57,52 +57,6 @@ public class DataPortConnectUtil {
57 } 57 }
58 58
59 /** 59 /**
60 * 经办人用户注册
61 * @return
62 */
63 public String operatorRegister(Object obj) {
64 HttpHeaders headers = new HttpHeaders();
65 headers.set("Content-Type", "application/json");
66 headers.set("authKey", dataPortConfig.getAuthKey());
67
68 HttpEntity<Object> request = new HttpEntity<>(obj, headers);
69 DataPortRes dataPortRes = restTemplate.postForObject(
70 dataPortConfig.getRequestUri() + "/api/user/user/operatorRegister"
71 , request, DataPortRes.class);
72
73 if (ObjectUtils.isEmpty(dataPortRes)) {
74 throw new CsbrSystemException(SystemError.DATA_GET_ERROR, "经办人用户注册失败.");
75 }
76 if (200 != dataPortRes.getCode() && 201 != dataPortRes.getCode()) {
77 throw new CsbrSystemException(SystemError.DATA_GET_ERROR, dataPortRes.getMessage());
78 }
79 return (String) dataPortRes.getData();
80 }
81
82 /**
83 * 法人用户注册
84 * @return
85 */
86 public String enterpriseRegister(Object obj) {
87 HttpHeaders headers = new HttpHeaders();
88 headers.set("Content-Type", "application/json");
89 headers.set("authKey", dataPortConfig.getAuthKey());
90
91 HttpEntity<Object> request = new HttpEntity<>(obj, headers);
92 DataPortRes dataPortRes = restTemplate.postForObject(
93 dataPortConfig.getRequestUri() + "/api/user/user/enterpriseRegister"
94 , request, DataPortRes.class);
95
96 if (ObjectUtils.isEmpty(dataPortRes)) {
97 throw new CsbrSystemException(SystemError.DATA_GET_ERROR, "法人用户注册失败.");
98 }
99 if (200 != dataPortRes.getCode() && 201 != dataPortRes.getCode()) {
100 throw new CsbrSystemException(SystemError.DATA_GET_ERROR, dataPortRes.getMessage());
101 }
102 return (String) dataPortRes.getData();
103 }
104
105 /**
106 * 调用数据港接口(authKey调用) 60 * 调用数据港接口(authKey调用)
107 * @return 61 * @return
108 */ 62 */
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!