|
|
|
@@ -107,7 +107,7 @@ public class WxCouponPresentServiceImpl implements WxCouponPresentService { |
|
|
|
wxCouponPresentMapper.insertSelective(record); |
|
|
|
//小程序 |
|
|
|
WxAppinfo appInfo = wxAppinfoService.getCAppInfo(tenantId); |
|
|
|
String priceStr = wxCoupon.getPriceStr(); |
|
|
|
String title = wxCoupon.getTitle(); |
|
|
|
String name = appInfo.getName(); |
|
|
|
List<WxCouponPassword> tempList = wxCouponPasswordMapper.findList(wxCouponPassword); |
|
|
|
//循环发送 |
|
|
|
@@ -115,7 +115,7 @@ public class WxCouponPresentServiceImpl implements WxCouponPresentService { |
|
|
|
for (String phone : phoneSet) { |
|
|
|
WxCouponPassword couponPassword = list.get(i); |
|
|
|
//发送 |
|
|
|
sendMsg(tenantId, phone, priceStr, name, couponPassword.getPassword(), couponPassword.getId().toString()); |
|
|
|
sendMsg(tenantId, phone, title, name, couponPassword.getPassword(), couponPassword.getId().toString()); |
|
|
|
//记录发送数据便于更新状态 |
|
|
|
couponPassword.setSendedPhone(phone); |
|
|
|
tempList.add(couponPassword); |
|
|
|
@@ -126,14 +126,14 @@ public class WxCouponPresentServiceImpl implements WxCouponPresentService { |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
private void sendMsg(String tenantId, String phone, String money, String appName, String password, String id) { |
|
|
|
private void sendMsg(String tenantId, String phone, String title, String appName, String password, String id) { |
|
|
|
logger.info("》》》》》》》》》》》"); |
|
|
|
logger.info("系统发卡发送短信开始"); |
|
|
|
logger.info("》》》》》》》》》》》"); |
|
|
|
Map<String, String> msgReplaceMap = new HashMap(); |
|
|
|
msgReplaceMap.put("id", id); |
|
|
|
msgReplaceMap.put("app", appName); |
|
|
|
msgReplaceMap.put("money", money); |
|
|
|
msgReplaceMap.put("title", title); |
|
|
|
msgReplaceMap.put("pw", password); |
|
|
|
WxMsgRecord wxMsgRecord = new WxMsgRecord(); |
|
|
|
wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); |
|
|
|
|