|
@@ -5,6 +5,7 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.xjrsoft.common.enums.DeleteMark;
|
|
|
import com.xjrsoft.common.enums.EnabledMark;
|
|
@@ -47,8 +48,14 @@ public class WeChatServiceImgl implements WeChatService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void sendMessage(WeChatSendMessageDto dto){
|
|
|
- //weChatUtil.sendMessage(dto.getContent(),dto.getUserId());
|
|
|
+ public void sendTemplateMessage(WeChatSendMessageDto dto) {
|
|
|
+ JSONObject object = new JSONObject();
|
|
|
+ object.put("touser", dto.getUserId());
|
|
|
+ object.put("template_id", dto.getTemplateId());
|
|
|
+ object.put("url", dto.getUrl());
|
|
|
+ object.put("client_msg_id", dto.getMsgId());
|
|
|
+ object.put("data", dto.getContent());
|
|
|
+ weChatUtil.sendTemplateMessage(object);
|
|
|
}
|
|
|
|
|
|
private boolean updatedepart() {
|