mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-01 02:38:43 +08:00 
			
		
		
		
	【代码优化】SYSTEM:微信小程序的订阅
This commit is contained in:
		| @@ -10,6 +10,7 @@ public interface MessageTemplateConstants { | ||||
|     //======================= 小程序订阅消息 ======================= | ||||
|  | ||||
|     String WALLET_RECHARGER_PAID = "充值成功通知"; | ||||
|     // TODO @puhui999:这个放在售后那。aftersale | ||||
|     String WALLET_RECHARGE_REFUNDED = "退款申请通知"; | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -59,8 +59,6 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService { | ||||
|  | ||||
|     private static final String WALLET_RECHARGE_ORDER_SUBJECT = "钱包余额充值"; | ||||
|  | ||||
|     public static final String WALLET_MONEY_PATH = "pages/user/wallet/money"; // 钱包详情页 | ||||
|  | ||||
|     @Resource | ||||
|     private PayWalletRechargeMapper walletRechargeMapper; | ||||
|     @Resource | ||||
| @@ -148,8 +146,10 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService { | ||||
|         // 1. 获得会员钱包信息 | ||||
|         PayWalletDO wallet = payWalletService.getWallet(walletRecharge.getWalletId()); | ||||
|         // 2. 构建并发送模版消息 | ||||
|         socialClientApi.sendWxaSubscribeMessage(new SocialWxaSubscribeMessageSendReqDTO().setPage(WALLET_MONEY_PATH) | ||||
|                 .setUserId(wallet.getUserId()).setUserType(wallet.getUserType()).setTemplateTitle(WALLET_RECHARGER_PAID) | ||||
|         socialClientApi.sendWxaSubscribeMessage(new SocialWxaSubscribeMessageSendReqDTO() | ||||
|                 .setUserId(wallet.getUserId()).setUserType(wallet.getUserType()) | ||||
|                 .setTemplateTitle(WALLET_RECHARGER_PAID) | ||||
|                 .setPage("pages/user/wallet/money") // 钱包详情界面 | ||||
|                 .addMessage("character_string1", String.valueOf(payOrderId)) // 支付单编号 | ||||
|                 .addMessage("amount2", fenToYuanStr(walletRecharge.getTotalPrice())) // 充值金额 | ||||
|                 .addMessage("time3", LocalDateTimeUtil.formatNormal(walletRecharge.getCreateTime())) // 充值时间 | ||||
| @@ -229,8 +229,10 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService { | ||||
|         PayWalletDO wallet = payWalletService.getWallet(walletId); | ||||
|         // 2. 构建并发送模版消息 | ||||
|         String thing8 = PayRefundStatusEnum.isSuccess(payRefund.getStatus()) ? SUCCESS.getName() : FAILURE.getName(); | ||||
|         socialClientApi.sendWxaSubscribeMessage(new SocialWxaSubscribeMessageSendReqDTO().setPage(WALLET_MONEY_PATH) | ||||
|                 .setUserId(wallet.getUserId()).setUserType(wallet.getUserType()).setTemplateTitle(WALLET_RECHARGE_REFUNDED) | ||||
|         socialClientApi.sendWxaSubscribeMessage(new SocialWxaSubscribeMessageSendReqDTO() | ||||
|                 .setUserId(wallet.getUserId()).setUserType(wallet.getUserType()) | ||||
|                 .setTemplateTitle(WALLET_RECHARGE_REFUNDED) | ||||
|                 .setPage("pages/user/wallet/money") // 钱包详情界面 | ||||
|                 .addMessage("character_string1", String.valueOf(payRefund.getId())) // 退款订单编号 | ||||
|                 .addMessage("time7", LocalDateTimeUtil.formatNormal(payRefund.getCreateTime())) // 申请时间 | ||||
|                 .addMessage("amount3", fenToYuanStr(payRefund.getRefundPrice())) // 退款金额 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV