Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
caosy
/
fun-golf-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9798ecbc
authored
Dec 21, 2017
by
Huang Linyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
multi voucher rule send messge words
parent
1dd5df2e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
src/main/java/com/ctrip/fun/golf/dao/basic/VoucherDao.java
src/main/java/com/ctrip/fun/golf/dao/basic/VoucherDao.java
View file @
9798ecbc
...
@@ -50,6 +50,8 @@ public class VoucherDao extends GenericHibernateDao<Voucher, Integer> {
...
@@ -50,6 +50,8 @@ public class VoucherDao extends GenericHibernateDao<Voucher, Integer> {
private
static
final
String
SMS_MESSAGE_MODAL
=
"尊敬的用户,%d张共%.2f元%s现金券已到账,敬请登录APP个人中心查看。"
;
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 =
// private static final String SMS_MESSAGE_MODAL =
// "亲爱的爱玩用户,您好!为庆祝高尔夫回归奥运会,爱玩特为您的账户赠送%d张共%.2f元%s现金券,此现金券可以抵扣本周三思格森、本周四乡村新场或本周五大宗的击球费用,请进入您的爱玩APP账户查看或咨询13810176863,祝您打球愉快!";
// "亲爱的爱玩用户,您好!为庆祝高尔夫回归奥运会,爱玩特为您的账户赠送%d张共%.2f元%s现金券,此现金券可以抵扣本周三思格森、本周四乡村新场或本周五大宗的击球费用,请进入您的爱玩APP账户查看或咨询13810176863,祝您打球愉快!";
...
@@ -625,9 +627,15 @@ public class VoucherDao extends GenericHibernateDao<Voucher, Integer> {
...
@@ -625,9 +627,15 @@ public class VoucherDao extends GenericHibernateDao<Voucher, Integer> {
BigDecimal
totalAmount
=
voucherRule
.
getAmount
().
multiply
(
BigDecimal
totalAmount
=
voucherRule
.
getAmount
().
multiply
(
new
BigDecimal
(
voucherRule
.
getQuantity
()));
new
BigDecimal
(
voucherRule
.
getQuantity
()));
VoucherTypeEnum
voucherTypeEnum
=
VoucherTypeEnum
.
valueOf
(
voucherRule
.
getVoucherType
());
VoucherTypeEnum
voucherTypeEnum
=
VoucherTypeEnum
.
valueOf
(
voucherRule
.
getVoucherType
());
if
(
voucherRule
.
getMultiple
()==
0
){
insertSmsSql
.
append
(
"('"
insertSmsSql
.
append
(
"('"
+
String
.
format
(
SMS_MESSAGE_MODAL
,
new
Object
[]
{
voucherRule
.
getQuantity
(),
+
String
.
format
(
SMS_MESSAGE_MODAL
,
new
Object
[]
{
voucherRule
.
getQuantity
(),
totalAmount
.
floatValue
(),
voucherTypeEnum
.
getMsg
()
})
+
"'"
);
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
)
{
if
(
sendMessage
)
{
insertSmsSql
.
append
(
",'"
+
SmsStatus
.
NO_SEND
.
getKey
()
+
"'"
);
insertSmsSql
.
append
(
",'"
+
SmsStatus
.
NO_SEND
.
getKey
()
+
"'"
);
String
mobileNo
=
(
String
)
map
.
get
(
"BindedMobilePhone"
);
String
mobileNo
=
(
String
)
map
.
get
(
"BindedMobilePhone"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment