Explorar el Código

[核销发券][修改]:核销发券提示新增订单金额和温馨提示

release_toaliyun_real
Stormeye.Wu hace 7 años
padre
commit
e16fe8edd1
Se han modificado 1 ficheros con 12 adiciones y 5 borrados
  1. +12
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java

+ 12
- 5
mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java Ver fichero

@@ -470,27 +470,34 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService {
throw new MallinkException(ErrorCode.TEMPLATE_NOT_FOUND); throw new MallinkException(ErrorCode.TEMPLATE_NOT_FOUND);
} }
String gotopage = "pages/index/index"; String gotopage = "pages/index/index";
String notes = "";
if (hadSentCoupon) { if (hadSentCoupon) {
gotopage = "pages/couponorder/index/index"; gotopage = "pages/couponorder/index/index";
notes = "您有新的券";
} }
/** /**
* 核销成功 * 核销成功
* 核销金额 {{keyword1.DATA}} * 核销金额 {{keyword1.DATA}}
* 商家名称 {{keyword2.DATA}} * 商家名称 {{keyword2.DATA}}
* 商品 {{keyword3.DATA}} * 商品 {{keyword3.DATA}}
* 核销时间 {{keyword4.DATA}}
* 商品描述 {{keyword5.DATA}}
* 商品描述 {{keyword4.DATA}}
* 订单金额 {{keyword5.DATA}}
* 核销时间 {{keyword6.DATA}}
* 温馨提示 {{keyword7.DATA}}
*
*/ */
templateMessage = WxMaTemplateMessage.builder() templateMessage = WxMaTemplateMessage.builder()
.toUser(user.getOpenId()) .toUser(user.getOpenId())
.formId(payOrder.getPrepayId()) // 微信支付的formId是prepayId .formId(payOrder.getPrepayId()) // 微信支付的formId是prepayId
.page(gotopage) .page(gotopage)
.data(Lists.newArrayList( .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("keyword2", merchant.getName(), "#173177"),
new WxMaTemplateMessage.Data("keyword3", coupon.getTitle(), "#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()) .templateId(msg.getTemplateId())
.emphasisKeyword("keyword1.DATA") .emphasisKeyword("keyword1.DATA")


Cargando…
Cancelar
Guardar