Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lyf-beidou-cdp-api
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhoupeng
lyf-beidou-cdp-api
Commits
7bc9623f
Commit
7bc9623f
authored
Sep 12, 2023
by
zhoupeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交导入组织架构openapi接口
parent
6018f990
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
34 deletions
+44
-34
Dockerfile
Dockerfile
+2
-2
QiDianServiceImpl.java
...com/rome/order/domain/service/impl/QiDianServiceImpl.java
+8
-3
SyncEmployeCdpServiceImpl.java
.../order/domain/service/impl/SyncEmployeCdpServiceImpl.java
+24
-28
RemoteConstant.java
.../order/infrastructure/remote/constant/RemoteConstant.java
+6
-0
application.yml
src/main/resources/application.yml
+4
-1
No files found.
Dockerfile
View file @
7bc9623f
FROM
openjdk:8
COPY
./lyf-beidou-cdp-api-1.0.0-SNAPSHOT.jar lyf-beidou-cdp-api-1.0.0-SNAPSHOT.jar
EXPOSE
808
0
ENTRYPOINT
["java","-Djava.security.egd=file:/dev/./urandom","-jar","./lyf-beidou-cdp-api-1.0.0-SNAPSHOT.jar","--server.port=808
0
","--spring.profiles.active=test",">log.out &"]
EXPOSE
808
9
ENTRYPOINT
["java","-Djava.security.egd=file:/dev/./urandom","-jar","./lyf-beidou-cdp-api-1.0.0-SNAPSHOT.jar","--server.port=808
9
","--spring.profiles.active=test",">log.out &"]
src/main/java/com/rome/order/domain/service/impl/QiDianServiceImpl.java
View file @
7bc9623f
...
...
@@ -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
;
...
...
src/main/java/com/rome/order/domain/service/impl/SyncEmployeCdpServiceImpl.java
View file @
7bc9623f
...
...
@@ -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
;
}
}
//整个批次成功
...
...
src/main/java/com/rome/order/infrastructure/remote/constant/RemoteConstant.java
View file @
7bc9623f
...
...
@@ -155,4 +155,10 @@ public class RemoteConstant {
1-表示成功
*/
public
static
final
String
CODE
=
"1"
;
/**
* 成功标识
*/
public
static
final
String
SUCCESS_MSG
=
"success"
;
}
src/main/resources/application.yml
View file @
7bc9623f
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment