Commit 5ddef215 by YG8999

微信订阅消息配置文件设置

parent e4c4d4a7
......@@ -22,6 +22,7 @@ wechat:
signKey: ZEKu56XCezuESfNEdM4zVZEN3cz2PuHz
certPath: /var/gxpt/wechat_ssl/apiclient_cert.p12
token: coujio
miniprogram_state: formal
wx:
miniapp:
configs:
......
......@@ -7,6 +7,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
......@@ -36,6 +37,9 @@ public class WxMsgPushController {
private final WxMaProperties properties;
@Autowired
private WechatNewService wechatNewService;
@Value("${wechat.miniprogram_state}")
private String miniprogramState;
/**
* // * 跳转的小程序页面
* //
......@@ -73,7 +77,7 @@ public class WxMsgPushController {
HashMap<String, SendTemplateMessageItemVo> data = new HashMap<>();
TemplateMessageVo templateMessageVo = new TemplateMessageVo();
templateMessageVo.setTouser(openId);
templateMessageVo.setMiniprogram_state("trial");
templateMessageVo.setMiniprogram_state(miniprogramState);
templateMessageVo.setPage("/pages/orderResult/orderResult?orderNo=CJ431705545528576539");
templateMessageVo.setTemplate_id(MessageReminderEnum.END.getValue());
data.put("thing5", new SendTemplateMessageItemVo("武汉"));
......
......@@ -22,6 +22,7 @@ wechat:
signKey: ZEKu56XCezuESfNEdM4zVZEN3cz2PuHz
certPath: /Users/project/pseer/apiclient_cert.p12
token: coujio
miniprogram_state: formal
wx:
miniapp:
configs:
......
......@@ -1090,7 +1090,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
// 55分钟内是否有保洁记录
LambdaQueryWrapper<SCleanRecords> recordsQueryWrapper = new LambdaQueryWrapper<>();
recordsQueryWrapper.eq(SCleanRecords::getRoomId, sOrder.getRoomId());
recordsQueryWrapper.ge(SCleanRecords::getCreateTime, cn.hutool.core.date.DateUtil.offset(cn.hutool.core.date.DateUtil.date(), DateField.MINUTE, -55));
recordsQueryWrapper.ge(SCleanRecords::getCreateTime, cn.hutool.core.date.DateUtil.offset(cn.hutool.core.date.DateUtil.date(), DateField.MINUTE, -60));
List<SCleanRecords> recordsList = cleanRecordsService.list(recordsQueryWrapper);
if(recordsList != null && recordsList.size() > 0) {
SCleanRecords records = recordsList.get(0);
......
......@@ -15,6 +15,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import share.common.config.WeChatConfig;
import share.common.constant.PayConstants;
......@@ -70,6 +71,9 @@ public class WechatNewServiceImpl implements WechatNewService {
@Autowired
private ISRoomService roomService;
@Value("${wechat.miniprogram_state}")
private String miniprogramState;
/**
* 获取公众号accessToken
*/
......@@ -567,7 +571,7 @@ public class WechatNewServiceImpl implements WechatNewService {
//测试页面
String url = "/pages/orderResult/orderResult?orderNo=" + byOrderNo.getOrderNo();
templateMessageVo.setPage(url);
templateMessageVo.setMiniprogram_state("trial");
templateMessageVo.setMiniprogram_state(miniprogramState);
HashMap<String, SendTemplateMessageItemVo> data = new HashMap<>();
SStore sStore = storeService.getById(byOrderNo.getStoreId());
SRoomVo sRoomVo = roomService.selectSRoomById(byOrderNo.getRoomId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment