diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java index 504c55e78..4bba58f4e 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java @@ -371,11 +371,10 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { MapUtil.builder().put("expressName", express != null ? express.getName() : "") .put("logisticsNo", express != null ? deliveryReqVO.getLogisticsNo() : "").build()); - // TODO @puhui999:可以改成 4.1 4.2。因为都算通知哈; - // 4. 发送站内信 + // 4.1 发送站内信 tradeMessageService.sendMessageWhenDeliveryOrder(new TradeOrderMessageWhenDeliveryOrderReqBO() .setOrderId(order.getId()).setUserId(order.getUserId()).setMessage(null)); - // 5. 发送订阅消息 + // 4.2 发送订阅消息 getSelf().sendDeliveryOrderMessage(order, deliveryReqVO); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java index 273f6616f..46993b622 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/social/SocialClientServiceImpl.java @@ -73,7 +73,7 @@ import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*; public class SocialClientServiceImpl implements SocialClientService { /** - * 小程序版本 + * 小程序码要打开的小程序版本 * * 1. release:正式版 * 2. trial:体验版 @@ -81,6 +81,11 @@ public class SocialClientServiceImpl implements SocialClientService { */ @Value("${yudao.wxa-code.env-version:release}") public String envVersion; + /** + * 订阅消息跳转小程序类型:developer为开发版;trial为体验版;formal为正式版; + */ + @Value("${yudao.wxa-subscribe-message.miniprogram-state:formal}") + public String miniprogramState; @Resource private AuthRequestFactory authRequestFactory; @@ -307,7 +312,7 @@ public class SocialClientServiceImpl implements SocialClientService { String templateId, String openId) { // 设置订阅消息基本参数 WxMaSubscribeMessage subscribeMessage = new WxMaSubscribeMessage().setLang(WxMaConstants.MiniProgramLang.ZH_CN) - .setMiniprogramState(envVersion).setTemplateId(templateId).setToUser(openId).setPage(reqDTO.getPage()); + .setMiniprogramState(miniprogramState).setTemplateId(templateId).setToUser(openId).setPage(reqDTO.getPage()); // 设置具体消息参数 Map messages = reqDTO.getMessages(); if (CollUtil.isNotEmpty(messages)) { diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index a3a770080..bd33bd33b 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -223,6 +223,8 @@ yudao: demo: false # 关闭演示模式 wxa-code: env-version: develop # 小程序版本: 正式版为 "release";体验版为 "trial";开发版为 "develop" + wxa-subscribe-message: + miniprogram-state: developer # 跳转小程序类型:developer为开发版;trial为体验版;formal为正式版; tencent-lbs-key: TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E # QQ 地图的密钥 https://lbs.qq.com/service/staticV2/staticGuide/staticDoc justauth: