Commit 82ee827f authored by 王淑君's avatar 王淑君

添加同步人员

parent 159b1932
...@@ -66,23 +66,26 @@ public class MTCotactApiRequestClient { ...@@ -66,23 +66,26 @@ public class MTCotactApiRequestClient {
* @return * @return
*/ */
public List<GetAllRspDTO> accountGetMyInfoList(String corpId,String updateTime) { public List<GetAllRspDTO> accountGetMyInfoList(String corpId,String updateTime) {
login(); if("dev".equalsIgnoreCase(serverType)) {
Map<String, String> queries = new HashMap<>(2); login();
queries.put("corpId", corpId);
queries.put("updateTime", updateTime);
Map<String, String> headerParams = new HashMap<>(2); Map<String, String> queries = new HashMap<>(2);
headerParams.put("clientType", "app"); queries.put("corpId", corpId);
headerParams.put("Authorization", "Bearer " + ACCESS_TOKEN); queries.put("updateTime", updateTime);
String json = okHttpUtil.get(api + "contact/v1/user/getUsersByUpdateTime", queries, headerParams);
if(StrUtil.isNotEmpty(json)) { Map<String, String> headerParams = new HashMap<>(2);
return JSON.parseObject(json, new TypeReference<Ret<List<GetAllRspDTO>>>() { headerParams.put("clientType", "app");
}).getData(); 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 { ...@@ -151,7 +154,7 @@ public class MTCotactApiRequestClient {
* @return * @return
*/ */
public List<MTUserInfoRspDTO> userGets(MTUserGetsReqDTO mtUserGetsReqDTO) { public List<MTUserInfoRspDTO> userGets(MTUserGetsReqDTO mtUserGetsReqDTO) {
if("dev".equalsIgnoreCase(serverType)){ // if("dev".equalsIgnoreCase(serverType)){
login(); login();
Map<String, String> headerParams = new HashMap<>(2); Map<String, String> headerParams = new HashMap<>(2);
headerParams.put("clientType", "app"); headerParams.put("clientType", "app");
...@@ -162,8 +165,8 @@ public class MTCotactApiRequestClient { ...@@ -162,8 +165,8 @@ public class MTCotactApiRequestClient {
}).getData(); }).getData();
} }
return new ArrayList<>(); return new ArrayList<>();
} // }
return contactFeignClient.userGets(mtUserGetsReqDTO,zxClientType,zxAccountId).getData(); // return contactFeignClient.userGets(mtUserGetsReqDTO,zxClientType,zxAccountId).getData();
} }
public List<GetAllRspDTO> userAll(String corpId) { public List<GetAllRspDTO> userAll(String corpId) {
......
...@@ -36,27 +36,27 @@ public class MTNotificationApiRequestClient { ...@@ -36,27 +36,27 @@ public class MTNotificationApiRequestClient {
* @param mtNotificationSendReqDTO * @param mtNotificationSendReqDTO
* @return * @return
*/ */
public boolean send(MTNotificationSendReqDTO mtNotificationSendReqDTO, String type) { // public boolean send(MTNotificationSendReqDTO mtNotificationSendReqDTO, String type) {
List<String> userIds = mtNotificationSendReqDTO.getReceiverIds(); // List<String> userIds = mtNotificationSendReqDTO.getReceiverIds();
List<String> accountIds = new ArrayList<>(); // List<String> accountIds = new ArrayList<>();
MTUserGetsReqDTO mtUserGetsReqDTO = new MTUserGetsReqDTO(); // MTUserGetsReqDTO mtUserGetsReqDTO = new MTUserGetsReqDTO();
mtUserGetsReqDTO.setCorpId(mtNotificationSendReqDTO.getCorpId()); // mtUserGetsReqDTO.setCorpId(mtNotificationSendReqDTO.getCorpId());
mtUserGetsReqDTO.setIds(userIds); // mtUserGetsReqDTO.setIds(userIds);
List<MTUserInfoRspDTO> allUserList = mtCotactApiRequestClient.userGets(mtUserGetsReqDTO); // List<MTUserInfoRspDTO> allUserList = mtCotactApiRequestClient.userGets(mtUserGetsReqDTO);
if(allUserList != null && allUserList.size() > 0){ // if(allUserList != null && allUserList.size() > 0){
for(MTUserInfoRspDTO mtUserInfoRspDTO : allUserList){ // for(MTUserInfoRspDTO mtUserInfoRspDTO : allUserList){
accountIds.add(mtUserInfoRspDTO.getAccountId()); // accountIds.add(mtUserInfoRspDTO.getAccountId());
} // }
} // }
log.info("消息发送人accountId:" + accountIds); // log.info("消息发送人accountId:" + accountIds);
mtNotificationSendReqDTO.setReceiverIds(accountIds); // mtNotificationSendReqDTO.setReceiverIds(accountIds);
mtNotificationSendReqDTO.setChannels("ALL"); // mtNotificationSendReqDTO.setChannels("ALL");
mtNotificationSendReqDTO.setCategoryCodes(Arrays.asList(new String[]{type})); // mtNotificationSendReqDTO.setCategoryCodes(Arrays.asList(new String[]{type}));
Ret ret = notificationFeignClient.sendMessage(mtNotificationSendReqDTO,"app",(long)1); // Ret ret = notificationFeignClient.sendMessage(mtNotificationSendReqDTO,"app",(long)1);
if(ret != null && ResultCode.SUCCESS.getCode().toString().equals(ret.getCode())){ // if(ret != null && ResultCode.SUCCESS.getCode().toString().equals(ret.getCode())){
return true; // return true;
} // }
return false; // return false;
} // }
} }
...@@ -5,7 +5,7 @@ server: ...@@ -5,7 +5,7 @@ server:
servlet: servlet:
context-path: / context-path: /
#uri-encoding: UTF-8 #uri-encoding: UTF-8
type: dev1 type: dev
maxHttpHeaderSize: 102400 maxHttpHeaderSize: 102400
#logging: #logging:
...@@ -14,11 +14,13 @@ server: ...@@ -14,11 +14,13 @@ server:
# org.springframework.web: DEBUG # org.springframework.web: DEBUG
druid: 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://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://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 #url: jdbc:mysql://120.52.179.75:13318/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username: root username: root
password: 91isoft password: 123456
# password: 91isoft
# password: root # password: root
initial-size: 1 initial-size: 1
min-idle: 1 min-idle: 1
...@@ -60,6 +62,8 @@ spring: ...@@ -60,6 +62,8 @@ spring:
multipart: multipart:
max-file-size: 100MB max-file-size: 100MB
max-request-size: 100MB max-request-size: 100MB
application:
name: zx-education
global: global:
lk: lk:
...@@ -91,6 +95,7 @@ libreoffice: ...@@ -91,6 +95,7 @@ libreoffice:
ip: 192.168.1.125 ip: 192.168.1.125
port: 10188 port: 10188
mt: mt:
# api: http://192.168.5.41/api/
api: http://221.239.114.20:6789/api/ api: http://221.239.114.20:6789/api/
......
...@@ -5,7 +5,7 @@ server: ...@@ -5,7 +5,7 @@ server:
servlet: servlet:
context-path: / context-path: /
#uri-encoding: UTF-8 #uri-encoding: UTF-8
type: dev1 type: prod
#logging: #logging:
# level: # level:
...@@ -56,6 +56,8 @@ spring: ...@@ -56,6 +56,8 @@ spring:
multipart: multipart:
max-file-size: 100MB max-file-size: 100MB
max-request-size: 100MB max-request-size: 100MB
application:
name: ZX-EDUCATION
global: global:
lk: lk:
......
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