Browse Source

broadcast data sync

tags/B.1.1.0.0_20230818_base^2
yk 2 years ago
parent
commit
124601373d
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      xueyi-modules/xueyi-message/src/main/java/com/xueyi/message/transfer/controller/ApiController.java

+ 4
- 4
xueyi-modules/xueyi-message/src/main/java/com/xueyi/message/transfer/controller/ApiController.java View File

@@ -301,10 +301,7 @@ public class ApiController {
public R broadcast(@RequestParam(value = "channel") String channel){
try {
JSONObject json = new JSONObject();
R<JSONObject> objectR = remoteDigitalmanService.mansInfo();
JSONObject jsonObj = objectR.getData();
json.put("manCount", jsonObj.getIntValue("manCount"));
json.put("serviceTimeCount", jsonObj.getLongValue("serviceTimeCount"));


json.put("chatTimes", 865531);
json.put("chatDurationCount", 10068);
@@ -315,6 +312,9 @@ public class ApiController {
json.put("meetingServiceCount", 1762);
json.put("visitServiceCount", 523);

R<JSONObject> objectR = remoteDigitalmanService.mansInfo();
JSONObject jsonObj = objectR.getData();
jsonObj.keySet().forEach(key -> json.put(key, jsonObj.get(key)));
String str = json.toJSONString();

messageQueueService.broadcast(channel, str);


Loading…
Cancel
Save