消息发送调整
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package com.cool.store.enums;
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zhangchenbiao
|
* @author zhangchenbiao
|
||||||
* @FileName: MessageTypeEnum
|
* @FileName: MessageTypeEnum
|
||||||
@@ -47,4 +49,13 @@ public enum MessageTypeEnum {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public JSONObject getMessageTypeObject() {
|
||||||
|
JSONObject object = new JSONObject();
|
||||||
|
object.put("code", this.code);
|
||||||
|
object.put("name", this.name);
|
||||||
|
object.put("imageMediaId", this.imageMediaId);
|
||||||
|
return object;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -358,9 +358,8 @@ public class ISVHttpRequest {
|
|||||||
ResultDTO responseEntity = null;
|
ResultDTO responseEntity = null;
|
||||||
try {
|
try {
|
||||||
MessageTypeEnum messageType = param.getMessageType();
|
MessageTypeEnum messageType = param.getMessageType();
|
||||||
String messageTypeStr = JSONObject.toJSONString(messageType);
|
|
||||||
JSONObject request = JSONObject.parseObject(JSONObject.toJSONString(param));
|
JSONObject request = JSONObject.parseObject(JSONObject.toJSONString(param));
|
||||||
request.put("messageType", messageTypeStr);
|
request.put("messageType", messageType.getMessageTypeObject());
|
||||||
responseEntity = httpRestTemplateService.postForObject(url, request, ResultDTO.class);
|
responseEntity = httpRestTemplateService.postForObject(url, request, ResultDTO.class);
|
||||||
log.info("url:{}, response:{}", url, JSONObject.toJSONString(responseEntity));
|
log.info("url:{}, response:{}", url, JSONObject.toJSONString(responseEntity));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -269,9 +269,9 @@ public class TestController {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/followTaskAnHourAgoRemind")
|
@GetMapping("/followTaskDailyRemind")
|
||||||
public ResponseResult followTaskAnHourAgoRemind() {
|
public ResponseResult followTaskDailyRemind() {
|
||||||
followTaskService.followTaskAnHourAgoRemind();
|
followTaskService.followTaskDailyRemind();
|
||||||
return ResponseResult.success();
|
return ResponseResult.success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user