解决消息订阅提醒bug
This commit is contained in:
parent
f8a0845c6e
commit
3ceabc2e7c
@ -6,7 +6,6 @@ import cn.iocoder.yudao.framework.common.template.vo.MsgData;
|
|||||||
import cn.iocoder.yudao.framework.common.template.vo.SubscribeMessageReqDTO;
|
import cn.iocoder.yudao.framework.common.template.vo.SubscribeMessageReqDTO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialClientDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialClientDO;
|
||||||
import cn.iocoder.yudao.module.system.service.social.SocialClientService;
|
import cn.iocoder.yudao.module.system.service.social.SocialClientService;
|
||||||
import lombok.SneakyThrows;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import me.chanjar.weixin.mp.bean.template.WxMpTemplateData;
|
import me.chanjar.weixin.mp.bean.template.WxMpTemplateData;
|
||||||
import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage;
|
import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage;
|
||||||
@ -33,20 +32,26 @@ public class SubscribeMessageSendApiImpl implements SubscribeMessageSendApi {
|
|||||||
@Resource
|
@Resource
|
||||||
private SocialClientService socialClientService;
|
private SocialClientService socialClientService;
|
||||||
|
|
||||||
@SneakyThrows
|
|
||||||
@Override
|
@Override
|
||||||
public CommonResult<Long> sendMaMsg(SubscribeMessageReqDTO reqDTO) {
|
public CommonResult<Long> sendMaMsg(SubscribeMessageReqDTO reqDTO) {
|
||||||
//发送审批结果通知
|
try {
|
||||||
socialClientService.getWxMaService(reqDTO.getSocialType()).getMsgService().sendSubscribeMsg(initWxMaSubscribeMessage(reqDTO));
|
//发送审批结果通知
|
||||||
|
socialClientService.getWxMaService(reqDTO.getSocialType()).getMsgService().sendSubscribeMsg(initWxMaSubscribeMessage(reqDTO));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("发送小程序订阅消息失败:{}", e.getMessage());
|
||||||
|
}
|
||||||
return success(1L);
|
return success(1L);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SneakyThrows
|
|
||||||
public CommonResult<Long> sendMpMsg(SubscribeMessageReqDTO reqDTO) {
|
public CommonResult<Long> sendMpMsg(SubscribeMessageReqDTO reqDTO) {
|
||||||
// -- 公众号 点击 跳转 小程序 - 需要获取到小程序appId
|
// -- 公众号 点击 跳转 小程序 - 需要获取到小程序appId
|
||||||
// 判断是否需要跳转小程序 - 通过
|
// 判断是否需要跳转小程序 - 通过
|
||||||
socialClientService.getWxMpService().getTemplateMsgService().sendTemplateMsg(initWxMpSubscribeMessage(reqDTO));
|
try {
|
||||||
|
socialClientService.getWxMpService().getTemplateMsgService().sendTemplateMsg(initWxMpSubscribeMessage(reqDTO));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("发送公众号消息失败:{}", e.getMessage());
|
||||||
|
}
|
||||||
return success(1L);
|
return success(1L);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.system.service.auth;
|
package cn.iocoder.yudao.module.system.service.auth;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.auth.AdminOauthUserOtherInfoDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.auth.AdminOauthUserOtherInfoDO;
|
||||||
import cn.iocoder.yudao.module.system.dal.mysql.auth.AdminOauthUserOtherInfoMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.auth.AdminOauthUserOtherInfoMapper;
|
||||||
import cn.iocoder.yudao.module.system.service.auth.dto.AdminOauthUserOtherInfoDTO;
|
import cn.iocoder.yudao.module.system.service.auth.dto.AdminOauthUserOtherInfoDTO;
|
||||||
@ -8,6 +9,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user