From 2bc96fe5216dd8413532701c6277ddd6482ffbeb Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 31 Jul 2024 12:58:06 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91SYSTEM=EF=BC=9A=E8=AE=A2=E9=98=85=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trade/service/order/TradeOrderUpdateServiceImpl.java | 5 ++--- .../system/service/social/SocialClientServiceImpl.java | 9 +++++++-- yudao-server/src/main/resources/application-local.yaml | 2 ++ 3 files changed, 11 insertions(+), 5 deletions(-) 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: