Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
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
李丛阳
education
Commits
82ee827f
Commit
82ee827f
authored
Oct 12, 2019
by
王淑君
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加同步人员
parent
159b1932
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
43 deletions
+53
-43
MTCotactApiRequestClient.java
...isoft/common/util/outClient/MTCotactApiRequestClient.java
+19
-16
MTNotificationApiRequestClient.java
...common/util/outClient/MTNotificationApiRequestClient.java
+22
-22
application-dev.yml
src/main/resources/application-dev.yml
+9
-4
application-prod.yml
src/main/resources/application-prod.yml
+3
-1
No files found.
src/main/java/org/rcisoft/common/util/outClient/MTCotactApiRequestClient.java
View file @
82ee827f
...
...
@@ -66,23 +66,26 @@ public class MTCotactApiRequestClient {
* @return
*/
public
List
<
GetAllRspDTO
>
accountGetMyInfoList
(
String
corpId
,
String
updateTime
)
{
login
();
if
(
"dev"
.
equalsIgnoreCase
(
serverType
))
{
Map
<
String
,
String
>
queries
=
new
HashMap
<>(
2
);
queries
.
put
(
"corpId"
,
corpId
);
queries
.
put
(
"updateTime"
,
updateTime
);
login
();
Map
<
String
,
String
>
headerParams
=
new
HashMap
<>(
2
);
headerParams
.
put
(
"clientType"
,
"app"
);
headerParams
.
put
(
"Authorization"
,
"Bearer "
+
ACCESS_TOKEN
);
String
json
=
okHttpUtil
.
get
(
api
+
"contact/v1/user/getUsersByUpdateTime"
,
queries
,
headerParams
);
if
(
StrUtil
.
isNotEmpty
(
json
))
{
return
JSON
.
parseObject
(
json
,
new
TypeReference
<
Ret
<
List
<
GetAllRspDTO
>>>()
{
}).
getData
();
Map
<
String
,
String
>
queries
=
new
HashMap
<>(
2
);
queries
.
put
(
"corpId"
,
corpId
);
queries
.
put
(
"updateTime"
,
updateTime
);
Map
<
String
,
String
>
headerParams
=
new
HashMap
<>(
2
);
headerParams
.
put
(
"clientType"
,
"app"
);
headerParams
.
put
(
"Authorization"
,
"Bearer "
+
ACCESS_TOKEN
);
String
json
=
okHttpUtil
.
get
(
api
+
"contact/v1/user/getUsersByUpdateTime"
,
queries
,
headerParams
);
if
(
StrUtil
.
isNotEmpty
(
json
))
{
return
JSON
.
parseObject
(
json
,
new
TypeReference
<
Ret
<
List
<
GetAllRspDTO
>>>()
{
}).
getData
();
}
return
null
;
}
return
null
;
//
return contactFeignClient.getUsersByUpdateTime(corpId,updateTime,zxClientType,zxAccountId).getData();
return
contactFeignClient
.
getUsersByUpdateTime
(
corpId
,
updateTime
,
zxClientType
,
zxAccountId
).
getData
();
}
/**
...
...
@@ -151,7 +154,7 @@ public class MTCotactApiRequestClient {
* @return
*/
public
List
<
MTUserInfoRspDTO
>
userGets
(
MTUserGetsReqDTO
mtUserGetsReqDTO
)
{
if
(
"dev"
.
equalsIgnoreCase
(
serverType
)){
//
if("dev".equalsIgnoreCase(serverType)){
login
();
Map
<
String
,
String
>
headerParams
=
new
HashMap
<>(
2
);
headerParams
.
put
(
"clientType"
,
"app"
);
...
...
@@ -162,8 +165,8 @@ public class MTCotactApiRequestClient {
}).
getData
();
}
return
new
ArrayList
<>();
}
return
contactFeignClient
.
userGets
(
mtUserGetsReqDTO
,
zxClientType
,
zxAccountId
).
getData
();
//
}
//
return contactFeignClient.userGets(mtUserGetsReqDTO,zxClientType,zxAccountId).getData();
}
public
List
<
GetAllRspDTO
>
userAll
(
String
corpId
)
{
...
...
src/main/java/org/rcisoft/common/util/outClient/MTNotificationApiRequestClient.java
View file @
82ee827f
...
...
@@ -36,27 +36,27 @@ public class MTNotificationApiRequestClient {
* @param mtNotificationSendReqDTO
* @return
*/
public
boolean
send
(
MTNotificationSendReqDTO
mtNotificationSendReqDTO
,
String
type
)
{
List
<
String
>
userIds
=
mtNotificationSendReqDTO
.
getReceiverIds
();
List
<
String
>
accountIds
=
new
ArrayList
<>();
MTUserGetsReqDTO
mtUserGetsReqDTO
=
new
MTUserGetsReqDTO
();
mtUserGetsReqDTO
.
setCorpId
(
mtNotificationSendReqDTO
.
getCorpId
());
mtUserGetsReqDTO
.
setIds
(
userIds
);
List
<
MTUserInfoRspDTO
>
allUserList
=
mtCotactApiRequestClient
.
userGets
(
mtUserGetsReqDTO
);
if
(
allUserList
!=
null
&&
allUserList
.
size
()
>
0
){
for
(
MTUserInfoRspDTO
mtUserInfoRspDTO
:
allUserList
){
accountIds
.
add
(
mtUserInfoRspDTO
.
getAccountId
());
}
}
log
.
info
(
"消息发送人accountId:"
+
accountIds
);
mtNotificationSendReqDTO
.
setReceiverIds
(
accountIds
);
mtNotificationSendReqDTO
.
setChannels
(
"ALL"
);
mtNotificationSendReqDTO
.
setCategoryCodes
(
Arrays
.
asList
(
new
String
[]{
type
}));
Ret
ret
=
notificationFeignClient
.
sendMessage
(
mtNotificationSendReqDTO
,
"app"
,(
long
)
1
);
if
(
ret
!=
null
&&
ResultCode
.
SUCCESS
.
getCode
().
toString
().
equals
(
ret
.
getCode
())){
return
true
;
}
return
false
;
}
//
public boolean send(MTNotificationSendReqDTO mtNotificationSendReqDTO, String type) {
//
List<String> userIds = mtNotificationSendReqDTO.getReceiverIds();
//
List<String> accountIds = new ArrayList<>();
//
MTUserGetsReqDTO mtUserGetsReqDTO = new MTUserGetsReqDTO();
//
mtUserGetsReqDTO.setCorpId(mtNotificationSendReqDTO.getCorpId());
//
mtUserGetsReqDTO.setIds(userIds);
//
List<MTUserInfoRspDTO> allUserList = mtCotactApiRequestClient.userGets(mtUserGetsReqDTO);
//
if(allUserList != null && allUserList.size() > 0){
//
for(MTUserInfoRspDTO mtUserInfoRspDTO : allUserList){
//
accountIds.add(mtUserInfoRspDTO.getAccountId());
//
}
//
}
//
log.info("消息发送人accountId:" + accountIds);
//
mtNotificationSendReqDTO.setReceiverIds(accountIds);
//
mtNotificationSendReqDTO.setChannels("ALL");
//
mtNotificationSendReqDTO.setCategoryCodes(Arrays.asList(new String[]{type}));
//
Ret ret = notificationFeignClient.sendMessage(mtNotificationSendReqDTO,"app",(long)1);
//
if(ret != null && ResultCode.SUCCESS.getCode().toString().equals(ret.getCode())){
//
return true;
//
}
//
return false;
//
}
}
src/main/resources/application-dev.yml
View file @
82ee827f
...
...
@@ -5,7 +5,7 @@ server:
servlet
:
context-path
:
/
#uri-encoding: UTF-8
type
:
dev
1
type
:
dev
maxHttpHeaderSize
:
102400
#logging:
...
...
@@ -14,11 +14,13 @@ server:
# org.springframework.web: DEBUG
druid
:
# url: jdbc:mysql://127.0.0.1:3306/edu_db2?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
url
:
jdbc:mysql://10.96.131.16:55558/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
url
:
jdbc:mysql://127.0.0.1:3306/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
# url: jdbc:mysql://10.96.131.16:55558/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
# url: jdbc:mysql://192.168.137.1/1012mt?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
#url: jdbc:mysql://120.52.179.75:13318/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username
:
root
password
:
91isoft
password
:
123456
# password: 91isoft
# password: root
initial-size
:
1
min-idle
:
1
...
...
@@ -60,6 +62,8 @@ spring:
multipart
:
max-file-size
:
100MB
max-request-size
:
100MB
application
:
name
:
zx-education
global
:
lk
:
...
...
@@ -91,6 +95,7 @@ libreoffice:
ip
:
192.168.1.125
port
:
10188
mt
:
# api: http://192.168.5.41/api/
api
:
http://221.239.114.20:6789/api/
...
...
src/main/resources/application-prod.yml
View file @
82ee827f
...
...
@@ -5,7 +5,7 @@ server:
servlet
:
context-path
:
/
#uri-encoding: UTF-8
type
:
dev1
type
:
prod
#logging:
# level:
...
...
@@ -56,6 +56,8 @@ spring:
multipart
:
max-file-size
:
100MB
max-request-size
:
100MB
application
:
name
:
ZX-EDUCATION
global
:
lk
:
...
...
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