perf:消息发送接口该body类型为JSONObject

This commit is contained in:
曾文豪
2023-05-22 11:12:29 +08:00
parent c418a0b952
commit e29e9552ac
3 changed files with 6 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import com.tiesheng.core.mapper.CoreLogMessageMapper;
import com.tiesheng.core.pojos.dao.CoreLogMessage;
import com.tiesheng.message.pojos.MessageReqResp;
@@ -34,7 +35,7 @@ public class CoreMessageService {
* @param body
* @param channels 消息通道如果为all时表示发送全部通道
*/
public void multiple(String user, String title, Object body, String... channels) {
public void multiple(String user, String title, JSONObject body, String... channels) {
if (StrUtil.isEmpty(user) || ArrayUtil.isEmpty(channels)) {
return;
}
@@ -56,7 +57,7 @@ public class CoreMessageService {
* @param title
* @param body
*/
public MessageReqResp send(String user, String title, Object body, String channel) {
public MessageReqResp send(String user, String title, JSONObject body, String channel) {
if (StrUtil.isEmpty(user) || StrUtil.isEmpty(channel)) {
return null;
}