Commit 7bc9623f by zhoupeng

提交导入组织架构openapi接口

parent 6018f990
FROM openjdk:8 FROM openjdk:8
COPY ./lyf-beidou-cdp-api-1.0.0-SNAPSHOT.jar lyf-beidou-cdp-api-1.0.0-SNAPSHOT.jar COPY ./lyf-beidou-cdp-api-1.0.0-SNAPSHOT.jar lyf-beidou-cdp-api-1.0.0-SNAPSHOT.jar
EXPOSE 8080 EXPOSE 8089
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","./lyf-beidou-cdp-api-1.0.0-SNAPSHOT.jar","--server.port=8080","--spring.profiles.active=test",">log.out &"] ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","./lyf-beidou-cdp-api-1.0.0-SNAPSHOT.jar","--server.port=8089","--spring.profiles.active=test",">log.out &"]
...@@ -60,14 +60,19 @@ public class QiDianServiceImpl implements QiDianService { ...@@ -60,14 +60,19 @@ public class QiDianServiceImpl implements QiDianService {
@Value("${qidian.password:}") @Value("${qidian.password:}")
private String password; private String password;
private String corporationId="0"; @Value("${beidou.corporationId:}")
private String secret="ajdjhfwjk123"; private String corporationId;
@Value("${beidou.secret:}")
private String secret;
@Value("${beidou.openapiUrl:}") @Value("${beidou.openapiUrl:}")
private String beidouOpenapiUrl; private String beidouOpenapiUrl;
private String consoleUrl="https://beidou.test.laiyifen.com/console"; @Value("${beidou.consoleUrl:}")
private String consoleUrl;
......
...@@ -57,8 +57,11 @@ public class SyncEmployeCdpServiceImpl implements SyncEmployeCdpService { ...@@ -57,8 +57,11 @@ public class SyncEmployeCdpServiceImpl implements SyncEmployeCdpService {
@Value("${beidou.email:}") @Value("${beidou.email:}")
private Boolean beidouEmail; private Boolean beidouEmail;
private String corporationId="0"; @Value("${beidou.corporationId:}")
private String secret="ajdjhfwjk123"; private String corporationId;
@Value("${beidou.secret:}")
private String secret;
@Override @Override
...@@ -76,24 +79,21 @@ public class SyncEmployeCdpServiceImpl implements SyncEmployeCdpService { ...@@ -76,24 +79,21 @@ public class SyncEmployeCdpServiceImpl implements SyncEmployeCdpService {
ParameterCheckUtils.noNull(ResponseMsg.PARAM_EMPLOYEENUMBER_EMPT,dataResDTO); ParameterCheckUtils.noNull(ResponseMsg.PARAM_EMPLOYEENUMBER_EMPT,dataResDTO);
Long userId = dataResDTO.getUserId(); Long userId = dataResDTO.getUserId();
String result = this.orgSetAdminAccountId(userId + ""); String result = this.orgSetAdminAccountId(userId + "");
//成功标识
Boolean successFlag=false; Boolean successFlag=false;
String errMsg=""; String errMsg="";
if(StringUtils.isNotBlank(result)){ if(StringUtils.isNotBlank(result)){
Map map = JSONObject.parseObject(result, Map.class); JSONObject jsonObject = JSON.parseObject(result);
if (Objects.nonNull(map.get("status"))) {
Object statusObj = map.get("status");
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(statusObj));
String code = jsonObject.getString("code"); String code = jsonObject.getString("code");
String message=jsonObject.getString("message"); String message=jsonObject.getString("msg");
//返回为1 表示成功 //返回为1 表示成功
if(RemoteConstant.CODE.equals(code)){ if(RemoteConstant.SUCCESS_MSG.equals(message)){
successFlag=true; successFlag=true;
}else{ }else{
//其他的表示失败 //其他的表示失败
errMsg=message; errMsg=message;
} }
} }
}
return successFlag; return successFlag;
} }
...@@ -277,21 +277,17 @@ public class SyncEmployeCdpServiceImpl implements SyncEmployeCdpService { ...@@ -277,21 +277,17 @@ public class SyncEmployeCdpServiceImpl implements SyncEmployeCdpService {
Boolean successFlag=false; Boolean successFlag=false;
String errMsg=""; String errMsg="";
if(StringUtils.isNotBlank(result)){ if(StringUtils.isNotBlank(result)){
Map map = JSONObject.parseObject(result, Map.class); JSONObject jsonObject = JSON.parseObject(result);
if (Objects.nonNull(map.get("status"))) {
Object statusObj = map.get("status");
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(statusObj));
String code = jsonObject.getString("code"); String code = jsonObject.getString("code");
String message=jsonObject.getString("message"); String message=jsonObject.getString("msg");
//返回为1 表示成功 //返回为1 表示成功
if(RemoteConstant.CODE.equals(code)){ if(RemoteConstant.SUCCESS_MSG.equals(message)){
successFlag=true; successFlag=true;
}else{ }else{
//其他的表示失败 //其他的表示失败
errMsg=message; errMsg=message;
} }
} }
}
//整个批次成功 //整个批次成功
if(successFlag){ if(successFlag){
empResList.forEach(s->{ empResList.forEach(s->{
......
...@@ -155,4 +155,10 @@ public class RemoteConstant { ...@@ -155,4 +155,10 @@ public class RemoteConstant {
1-表示成功 1-表示成功
*/ */
public static final String CODE="1"; public static final String CODE="1";
/**
* 成功标识
*/
public static final String SUCCESS_MSG="success";
} }
...@@ -122,8 +122,9 @@ tsa: ...@@ -122,8 +122,9 @@ tsa:
# 腾讯广告服务地址 # 腾讯广告服务地址
remote_address: https://api.e.qq.com/v1.1/ remote_address: https://api.e.qq.com/v1.1/
#openapi接口地址
beidou: beidou:
#openapi接口地址
openapiUrl: https://beidou.test.laiyifen.com openapiUrl: https://beidou.test.laiyifen.com
#企业ID #企业ID
corporationId: 0 corporationId: 0
...@@ -131,6 +132,8 @@ beidou: ...@@ -131,6 +132,8 @@ beidou:
secret: ajdjhfwjk123 secret: ajdjhfwjk123
#是否同步邮件 #是否同步邮件
email: false email: false
#登录完成后回调业务地址
consoleUrl: https://beidou.test.laiyifen.com/console
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment