Commit 9798ecbc by Huang Linyu

multi voucher rule send messge words

parent 1dd5df2e
......@@ -49,6 +49,8 @@ public class VoucherDao extends GenericHibernateDao<Voucher, Integer> {
private static Logger logger = LoggerFactory.getLogger(VoucherDao.class);
private static final String SMS_MESSAGE_MODAL = "尊敬的用户,%d张共%.2f元%s现金券已到账,敬请登录APP个人中心查看。";
private static final String SMS_MESSAGE_MODAL_MULTIPLE = "尊敬的用户,%d张%s现金券已到账,敬请登录APP个人中心查看。";
// private static final String SMS_MESSAGE_MODAL =
// "亲爱的爱玩用户,您好!为庆祝高尔夫回归奥运会,爱玩特为您的账户赠送%d张共%.2f元%s现金券,此现金券可以抵扣本周三思格森、本周四乡村新场或本周五大宗的击球费用,请进入您的爱玩APP账户查看或咨询13810176863,祝您打球愉快!";
......@@ -625,9 +627,15 @@ public class VoucherDao extends GenericHibernateDao<Voucher, Integer> {
BigDecimal totalAmount = voucherRule.getAmount().multiply(
new BigDecimal(voucherRule.getQuantity()));
VoucherTypeEnum voucherTypeEnum = VoucherTypeEnum.valueOf(voucherRule.getVoucherType());
insertSmsSql.append("('"
+ String.format(SMS_MESSAGE_MODAL, new Object[] { voucherRule.getQuantity(),
totalAmount.floatValue(), voucherTypeEnum.getMsg() }) + "'");
if(voucherRule.getMultiple()==0){
insertSmsSql.append("('"
+ String.format(SMS_MESSAGE_MODAL, new Object[] { voucherRule.getQuantity(),
totalAmount.floatValue(), voucherTypeEnum.getMsg() }) + "'");
}else if(voucherRule.getMultiple()==1){
insertSmsSql.append("('"
+ String.format(SMS_MESSAGE_MODAL_MULTIPLE, new Object[] { voucherRule.getQuantity(),
voucherRule.getDescription(), voucherTypeEnum.getMsg() }) + "'");
}
if (sendMessage) {
insertSmsSql.append(",'" + SmsStatus.NO_SEND.getKey() + "'");
String mobileNo = (String) map.get("BindedMobilePhone");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment