Commit 7bc9623f by zhoupeng

提交导入组织架构openapi接口

parent 6018f990
FROM openjdk:8
COPY ./lyf-beidou-cdp-api-1.0.0-SNAPSHOT.jar lyf-beidou-cdp-api-1.0.0-SNAPSHOT.jar
EXPOSE 8080
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 &"]
EXPOSE 8089
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 {
@Value("${qidian.password:}")
private String password;
private String corporationId="0";
private String secret="ajdjhfwjk123";
@Value("${beidou.corporationId:}")
private String corporationId;
@Value("${beidou.secret:}")
private String secret;
@Value("${beidou.openapiUrl:}")
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 {
@Value("${beidou.email:}")
private Boolean beidouEmail;
private String corporationId="0";
private String secret="ajdjhfwjk123";
@Value("${beidou.corporationId:}")
private String corporationId;
@Value("${beidou.secret:}")
private String secret;
@Override
......@@ -76,22 +79,19 @@ public class SyncEmployeCdpServiceImpl implements SyncEmployeCdpService {
ParameterCheckUtils.noNull(ResponseMsg.PARAM_EMPLOYEENUMBER_EMPT,dataResDTO);
Long userId = dataResDTO.getUserId();
String result = this.orgSetAdminAccountId(userId + "");
//成功标识
Boolean successFlag=false;
String errMsg="";
if(StringUtils.isNotBlank(result)){
Map map = JSONObject.parseObject(result, Map.class);
if (Objects.nonNull(map.get("status"))) {
Object statusObj = map.get("status");
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(statusObj));
String code = jsonObject.getString("code");
String message=jsonObject.getString("message");
//返回为1 表示成功
if(RemoteConstant.CODE.equals(code)){
successFlag=true;
}else{
//其他的表示失败
errMsg=message;
}
JSONObject jsonObject = JSON.parseObject(result);
String code = jsonObject.getString("code");
String message=jsonObject.getString("msg");
//返回为1 表示成功
if(RemoteConstant.SUCCESS_MSG.equals(message)){
successFlag=true;
}else{
//其他的表示失败
errMsg=message;
}
}
return successFlag;
......@@ -277,19 +277,15 @@ public class SyncEmployeCdpServiceImpl implements SyncEmployeCdpService {
Boolean successFlag=false;
String errMsg="";
if(StringUtils.isNotBlank(result)){
Map map = JSONObject.parseObject(result, Map.class);
if (Objects.nonNull(map.get("status"))) {
Object statusObj = map.get("status");
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(statusObj));
String code = jsonObject.getString("code");
String message=jsonObject.getString("message");
//返回为1 表示成功
if(RemoteConstant.CODE.equals(code)){
successFlag=true;
}else{
//其他的表示失败
errMsg=message;
}
JSONObject jsonObject = JSON.parseObject(result);
String code = jsonObject.getString("code");
String message=jsonObject.getString("msg");
//返回为1 表示成功
if(RemoteConstant.SUCCESS_MSG.equals(message)){
successFlag=true;
}else{
//其他的表示失败
errMsg=message;
}
}
//整个批次成功
......
......@@ -155,4 +155,10 @@ public class RemoteConstant {
1-表示成功
*/
public static final String CODE="1";
/**
* 成功标识
*/
public static final String SUCCESS_MSG="success";
}
......@@ -122,8 +122,9 @@ tsa:
# 腾讯广告服务地址
remote_address: https://api.e.qq.com/v1.1/
#openapi接口地址
beidou:
#openapi接口地址
openapiUrl: https://beidou.test.laiyifen.com
#企业ID
corporationId: 0
......@@ -131,6 +132,8 @@ beidou:
secret: ajdjhfwjk123
#是否同步邮件
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