From e16fe8edd170ff42973e0a4b6585ec51a1862e90 Mon Sep 17 00:00:00 2001 From: "Stormeye.Wu" Date: Sun, 21 Oct 2018 07:07:49 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=A0=B8=E9=94=80=E5=8F=91=E5=88=B8][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9]:=E6=A0=B8=E9=94=80=E5=8F=91=E5=88=B8?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=96=B0=E5=A2=9E=E8=AE=A2=E5=8D=95=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E5=92=8C=E6=B8=A9=E9=A6=A8=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxCouponOrderServiceImpl.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java index 4be9a4218..51fd0a411 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java @@ -470,27 +470,34 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { throw new MallinkException(ErrorCode.TEMPLATE_NOT_FOUND); } String gotopage = "pages/index/index"; + String notes = ""; if (hadSentCoupon) { gotopage = "pages/couponorder/index/index"; + notes = "您有新的券"; } /** * 核销成功 * 核销金额 {{keyword1.DATA}} * 商家名称 {{keyword2.DATA}} * 商品 {{keyword3.DATA}} - * 核销时间 {{keyword4.DATA}} - * 商品描述 {{keyword5.DATA}} + * 商品描述 {{keyword4.DATA}} + * 订单金额 {{keyword5.DATA}} + * 核销时间 {{keyword6.DATA}} + * 温馨提示 {{keyword7.DATA}} + * */ templateMessage = WxMaTemplateMessage.builder() .toUser(user.getOpenId()) .formId(payOrder.getPrepayId()) // 微信支付的formId是prepayId .page(gotopage) .data(Lists.newArrayList( - new WxMaTemplateMessage.Data("keyword1", String.valueOf(coupon.getPrice() * 1.0 / 100) + "元", "#173177"), + new WxMaTemplateMessage.Data("keyword1", coupon.getPriceStr() + "元", "#173177"), new WxMaTemplateMessage.Data("keyword2", merchant.getName(), "#173177"), new WxMaTemplateMessage.Data("keyword3", coupon.getTitle(), "#173177"), - new WxMaTemplateMessage.Data("keyword4", dateFormat.format(new Date()), "#173177"), - new WxMaTemplateMessage.Data("keyword5", couponDetail, "#173177")) + new WxMaTemplateMessage.Data("keyword4", couponDetail, "#173177"), + new WxMaTemplateMessage.Data("keyword5", coupon.getSalePriceStr() + "元", "#173177"), + new WxMaTemplateMessage.Data("keyword6", dateFormat.format(new Date()), "#173177"), + new WxMaTemplateMessage.Data("keyword7", notes, "#173177")) ) .templateId(msg.getTemplateId()) .emphasisKeyword("keyword1.DATA")