修改部分,微信模板消息会员费率变动

This commit is contained in:
liuyingfang 2023-04-21 15:03:24 +08:00
parent 6af4f70998
commit 0b76bc417d
2 changed files with 4 additions and 3 deletions

View File

@ -96,5 +96,5 @@ public class WxConstants {
* 会员卡余额变动通知模板ID
* @date: 2021/12/9 18:19
*/
public static final String VIP_BALANCE_CHANGE_TEMPLATE_ID = "GNwluamISkPhGQU-NC1uBH-ftb7z28rknYe7hZyDKyI";
public static final String VIP_BALANCE_CHANGE_TEMPLATE_ID = "QNYK59v0h1Q4yQ2lIIrJGE0Fk0JnizhJ-_Gz1cA8_5Q";
}

View File

@ -375,9 +375,10 @@ public class MerchantMenberServiceImpl extends ServiceImpl<MerchantMenberMapper,
String remark = "如对此会员卡余额变动有疑问,可以点此进入小程序中查看!";
String transTitle = "1".equals(type) ? "会员充值" : "2".equals(type) ? "会员消费" :"现金充值";
String useFee = BigDecimal.valueOf(menber.getUsableRechargeFee() + menber.getUsableGiveFee()).setScale(2,BigDecimal.ROUND_HALF_DOWN).toString();
String[] array = {transTitle,amt.toString(), DateUtils.toString(new Date(),"yyyy-MM-dd HH:mm:ss"),useFee};
String[] array = {menber.getMemberCode(),amt.toString(), DateUtils.toString(new Date(),"yyyy-MM-dd HH:mm:ss"),transTitle, useFee};
WxAccessTokenRequest request = WxAccessTokenRequest.buidWxToken(ParametersUtil.APPID, ParametersUtil.APPSECRET, null, WxConstants.ACCESS_TOKEN_URL);
WxTemolateRequest temolateRequest = new WxTemolateRequest(menber.getOpenid(),WxConstants.VIP_BALANCE_CHANGE_TEMPLATE_ID,null,miniprogram)
//TODO miniprogram后续小程序调整好后再接
WxTemolateRequest temolateRequest = new WxTemolateRequest(menber.getOpenid(),WxConstants.VIP_BALANCE_CHANGE_TEMPLATE_ID,null,null)
.buildData(first,remark,array);
wxCommonService.sendTemplateMsg(temolateRequest,request);
}