|
@@ -16,6 +16,8 @@ import com.xjrsoft.module.organization.entity.User;
|
|
|
import com.xjrsoft.module.organization.service.IDepartmentService;
|
|
import com.xjrsoft.module.organization.service.IDepartmentService;
|
|
|
import com.xjrsoft.module.organization.service.IUserService;
|
|
import com.xjrsoft.module.organization.service.IUserService;
|
|
|
import com.xjrsoft.module.organization.service.IWeChatService;
|
|
import com.xjrsoft.module.organization.service.IWeChatService;
|
|
|
|
|
+import com.xjrsoft.module.system.entity.WechatMessageSendLog;
|
|
|
|
|
+import com.xjrsoft.module.system.mapper.WechatMessageSendLogMapper;
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
@@ -30,6 +32,7 @@ public class WeChatServiceImgl implements IWeChatService {
|
|
|
private final IDepartmentService departmentService;
|
|
private final IDepartmentService departmentService;
|
|
|
private final IUserService userService;
|
|
private final IUserService userService;
|
|
|
private List<WeChatDepartDto> deptDepartlist = new ArrayList<>();
|
|
private List<WeChatDepartDto> deptDepartlist = new ArrayList<>();
|
|
|
|
|
+ private final WechatMessageSendLogMapper wechatMessageSendLogMapper;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public boolean updateInfo() {
|
|
public boolean updateInfo() {
|
|
@@ -50,7 +53,15 @@ public class WeChatServiceImgl implements IWeChatService {
|
|
|
object.put("url", dto.getUrl());
|
|
object.put("url", dto.getUrl());
|
|
|
object.put("client_msg_id", dto.getMsgId());
|
|
object.put("client_msg_id", dto.getMsgId());
|
|
|
object.put("data", dto.getContent());
|
|
object.put("data", dto.getContent());
|
|
|
- weChatUtil.sendTemplateMessage(object);
|
|
|
|
|
|
|
+ String result = weChatUtil.sendTemplateMessage(object);
|
|
|
|
|
+
|
|
|
|
|
+ //新增微信模板消息发送记录
|
|
|
|
|
+ wechatMessageSendLogMapper.insert(new WechatMessageSendLog(){{
|
|
|
|
|
+ setOpenId(dto.getUserId());
|
|
|
|
|
+ setTemplateId(dto.getTemplateId());
|
|
|
|
|
+ setResult(result);
|
|
|
|
|
+ setParams(dto.getContent().toString());
|
|
|
|
|
+ }});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private boolean updatedepart() {
|
|
private boolean updatedepart() {
|