| | |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.cache.UrlCache; |
| | | import com.java110.utils.constant.WechatConstant; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.ExceptionUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | |
| | | data.setKeyword2(new Content(noticeDto.getStartTime())); |
| | | data.setKeyword3(new Content(StringUtil.delHtmlTag(noticeDto.getContext()))); |
| | | data.setRemark(new Content("如有疑问请联系相关物业人员")); |
| | | templateMessage.setData(data); |
| | | templateMessage.setData(BeanConvertUtil.beanCovertJson(data)); |
| | | |
| | | if (!StringUtil.isEmpty(wechatUrl)) { |
| | | if (miniprogram == null) { |
| | | templateMessage.setUrl(wechatUrl + "/#/pages/notice/detail/detail?noticeId=" + noticeDto.getNoticeId() + "&wAppId=" + weChatDto.getAppId() + "&communityId=" + noticeDto.getCommunityId()); |
| | |
| | | data.setKeyword2(new Content(noticeDto.getStartTime())); |
| | | data.setKeyword3(new Content(StringUtil.delHtmlTag(noticeDto.getContext()))); |
| | | data.setRemark(new Content("如有疑问请联系相关物业人员")); |
| | | templateMessage.setData(data); |
| | | templateMessage.setData(BeanConvertUtil.beanCovertJson(data)); |
| | | |
| | | //获取业主公众号地址 |
| | | String wechatUrl = UrlCache.getOwnerUrl(); |
| | | if (!StringUtil.isEmpty(wechatUrl) && wechatUrl.contains("?")) { |
| | |
| | | data.setKeyword2(new Content(noticeDto.getStartTime())); |
| | | data.setKeyword3(new Content(StringUtil.delHtmlTag(noticeDto.getContext()))); |
| | | data.setRemark(new Content("如有疑问请联系相关物业人员")); |
| | | templateMessage.setData(data); |
| | | templateMessage.setData(BeanConvertUtil.beanCovertJson(data)); |
| | | |
| | | templateMessage.setUrl(wechatUrl + noticeDto.getNoticeId() + "&wAppId=" + weChatDto.getAppId() + "&communityId=" + noticeDto.getCommunityId()); |
| | | logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage)); |
| | | responseEntity = outRestTemplate.postForEntity(sendTemplate + accessToken, JSON.toJSONString(templateMessage), String.class); |