Просмотр исходного кода

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

release_toaliyun_real
Stormeye.Wu 7 лет назад
Родитель
Сommit
e16fe8edd1
1 измененных файлов: 12 добавлений и 5 удалений
  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 Просмотреть файл

@@ -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")


Загрузка…
Отмена
Сохранить