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
a88b6d8e
authored
Dec 13, 2018
by
chongli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app买券考虑余额支付情况和修复支付回调问题
parent
4451737a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
src/main/java/com/ctrip/fun/golf/service/order/BuyVoucherOrderService.java
src/main/resources/payment.spring.xml
src/main/java/com/ctrip/fun/golf/service/order/BuyVoucherOrderService.java
View file @
a88b6d8e
...
...
@@ -11,6 +11,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
com.ctrip.fun.common.core.util.BeanConverter
;
import
com.ctrip.fun.common.core.util.DateUtil
;
import
com.ctrip.fun.common.core.util.StringUtils
;
...
...
@@ -40,6 +41,7 @@ import com.ctrip.fun.golf.domain.product.BuyVoucherActivity;
import
com.ctrip.fun.golf.domain.user.UserExt
;
import
com.ctrip.fun.golf.exceptions.OrderException
;
import
com.ctrip.fun.golf.service.basic.OperationMessageService
;
import
com.ctrip.fun.golf.service.basic.VoucherService
;
import
com.ctrip.fun.golf.service.market.CommuneInviteActivityService
;
import
com.ctrip.fun.golf.utils.JobUtil
;
import
com.ctrip.fun.golf.vo.PagedEntityBean
;
...
...
@@ -70,6 +72,8 @@ public class BuyVoucherOrderService extends AbstractOrderService<CommuneOrderBea
@Autowired
private
BuyVoucherActivityDao
buyVoucherActivityDao
;
@Autowired
private
VoucherService
voucherService
=
null
;
...
...
@@ -224,20 +228,12 @@ public class BuyVoucherOrderService extends AbstractOrderService<CommuneOrderBea
if
(
ProductPaymentTypeEnum
.
PREPAY
.
getName
().
equalsIgnoreCase
(
order
.
getPayMode
().
toLowerCase
()))
{
// 不走支付时,则直接成为公社会员
if
(
order
.
getPrePayAmount
().
compareTo
(
order
.
getPrePayCardAmount
())
<=
0
)
{
if
(
getCommuneYears
(
order
.
getOrderId
())
<=
0
){
getUserExtDao
().
setUserExtVipGradeCommune
(
order
.
getUid
());
operationMessageService
.
executeSendMessageOfVipCommune
(
order
,
91
);
communeInviteActivityService
.
updateCommuneInviteActivityData
(
order
.
getOrderId
());
}
else
{
try
{
this
.
getVoucherService
().
sendVoucherFor360PlaceOrder
(
order
.
getUid
(),
order
.
getOrderId
()+
""
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
getUserExtDao
().
setUserExtVipGradeRenewCommune
(
order
.
getUid
());
operationMessageService
.
executeSendMessageOfVipCommune
(
order
,
110
);
}
CommuneOrderItem
communeOrderItem
=
communeOrderItemDao
.
getByOrderId
(
order
.
getOrderId
()).
get
(
0
);
BuyVoucherActivity
buyVoucherActivity
=
buyVoucherActivityDao
.
findById
(
communeOrderItem
.
getActivityId
());
//执行发券
String
uid
=
order
.
getUid
();
//下单人id
voucherService
.
sendVoucherForPlaceOrderByConfig
(
uid
,
order
.
getOrderId
()+
""
,
true
,
buyVoucherActivity
.
getVoucherConfig
());
}
}
startCancelOrderJob
(
order
);
...
...
src/main/resources/payment.spring.xml
View file @
a88b6d8e
...
...
@@ -114,6 +114,8 @@
<property
name=
"orderDao"
ref=
"orderDao"
></property>
<property
name=
"paymentService"
ref=
"paymentService"
></property>
<property
name=
"paymentResponseDao"
ref=
"paymentResponseDao"
></property>
<property
name=
"privateKey"
value=
"${payment.privateKey}"
></property>
<property
name=
"publicKey"
value=
"${payment.publicKey}"
></property>
<property
name=
"userExtDao"
ref=
"userExtDao"
></property>
<property
name=
"userService"
ref=
"userService"
></property>
<property
name=
"voucherService"
ref=
"voucherService"
></property>
...
...
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