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
98ac325c
authored
Dec 12, 2018
by
chongli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
买券活动携程支付下单和回调
parent
0374a006
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
184 additions
and
0 deletions
src/main/java/com/ctrip/fun/golf/api/order/BuyVoucherOrderController.java
src/main/java/com/ctrip/fun/golf/api/payment/BuyVoucherOrderNotifyController.java
src/main/java/com/ctrip/fun/golf/service/order/BuyVoucherOrderService.java
src/main/java/com/ctrip/fun/golf/service/payment/BuyVoucherNotifyService.java
src/main/resources/debug/payment.properties
src/main/resources/development/payment.properties
src/main/resources/order.spring.xml
src/main/resources/production/payment.properties
src/main/resources/test/payment.properties
src/main/resources/uat/payment.properties
src/main/java/com/ctrip/fun/golf/api/order/BuyVoucherOrderController.java
0 → 100644
View file @
98ac325c
/**
* Copyright 2014 CTRIP Co.,Ltd. All rights reserved.
*/
package
com
.
ctrip
.
fun
.
golf
.
api
.
order
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
com.ctrip.fun.common.vo.order.CommuneOrderBean
;
import
com.ctrip.fun.common.vo.order.CommuneOrderListItemBean
;
import
com.ctrip.fun.common.vo.order.CommuneOrderResourceBean
;
import
com.ctrip.fun.golf.service.order.AbstractOrderService
;
import
com.ctrip.fun.golf.service.order.BuyVoucherOrderService
;
/**
* @content
* @author csleng
* @date
*/
@Controller
@RequestMapping
(
value
=
"/buyVoucherOrder"
)
public
class
BuyVoucherOrderController
extends
AbstractOrderController
<
CommuneOrderBean
,
CommuneOrderResourceBean
,
CommuneOrderListItemBean
>
{
@Autowired
private
BuyVoucherOrderService
buyVoucherOrderService
;
@Override
protected
AbstractOrderService
<
CommuneOrderBean
,
CommuneOrderResourceBean
>
getOrderService
()
{
return
buyVoucherOrderService
;
}
}
src/main/java/com/ctrip/fun/golf/api/payment/BuyVoucherOrderNotifyController.java
0 → 100644
View file @
98ac325c
/**
* Copyright 2014 CTRIP Co.,Ltd. All rights reserved.
*/
package
com
.
ctrip
.
fun
.
golf
.
api
.
payment
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
com.ctrip.fun.golf.service.payment.AbstractNotifyService
;
import
com.ctrip.fun.golf.service.payment.BuyVoucherNotifyService
;
/**
* @author zgsong
* @version 1.0.0
*/
@Controller
@RequestMapping
(
value
=
"/buyVoucherOrder"
)
public
class
BuyVoucherOrderNotifyController
extends
AbstractNotifyController
{
@Autowired
private
BuyVoucherNotifyService
buyVoucherNotifyService
=
null
;
@Override
protected
AbstractNotifyService
getNotifyService
()
{
return
buyVoucherNotifyService
;
}
}
src/main/java/com/ctrip/fun/golf/service/order/BuyVoucherOrderService.java
0 → 100644
View file @
98ac325c
This diff is collapsed.
Click to expand it.
src/main/java/com/ctrip/fun/golf/service/payment/BuyVoucherNotifyService.java
0 → 100644
View file @
98ac325c
/**
* Copyright 2014 CTRIP Co.,Ltd. All rights reserved.
*/
package
com
.
ctrip
.
fun
.
golf
.
service
.
payment
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
com.ctrip.fun.golf.dao.market.CommuneInviteActivityDao
;
import
com.ctrip.fun.golf.dao.order.CommuneOrderItemDao
;
import
com.ctrip.fun.golf.dao.product.BuyVoucherActivityDao
;
import
com.ctrip.fun.golf.domain.order.CommuneOrderItem
;
import
com.ctrip.fun.golf.domain.order.Order
;
import
com.ctrip.fun.golf.domain.product.BuyVoucherActivity
;
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.service.order.CommuneOrderService
;
public
class
BuyVoucherNotifyService
extends
AbstractNotifyService
{
private
CommuneOrderService
communeOrderService
=
null
;
private
OperationMessageService
operationMessageService
;
private
CommuneInviteActivityDao
communeInviteActivityDao
=
null
;
private
CommuneOrderItemDao
communeOrderItemDao
=
null
;
private
CommuneInviteActivityService
communeInviteActivityService
=
null
;
@Autowired
private
VoucherService
voucherService
=
null
;
@Autowired
private
BuyVoucherActivityDao
buyVoucherActivityDao
=
null
;
@Override
protected
void
doPaySuccess
(
Order
order
)
{
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
());
}
@Override
protected
void
doPayFail
(
Order
order
)
{
}
@Override
protected
void
sendMessage
(
Order
order
,
int
messageId
)
{
operationMessageService
.
executeSendMessageOfVipCommune
(
order
,
messageId
);
}
@Override
protected
void
doSuccessRefund
(
Order
order
)
{
// TODO Auto-generated method stub
}
@Override
protected
void
doFailRefund
(
Order
order
)
{
// TODO Auto-generated method stub
}
/**
* @param order
* @see com.ctrip.fun.golf.service.payment.AbstractNotifyService#failToSuccess(com.ctrip.fun.golf.domain.order.Order)
*/
@Override
protected
void
failToSuccess
(
Order
order
)
{
// TODO Auto-generated method stub
}
public
CommuneOrderService
getCommuneOrderService
()
{
return
communeOrderService
;
}
public
void
setCommuneOrderService
(
CommuneOrderService
communeOrderService
)
{
this
.
communeOrderService
=
communeOrderService
;
}
public
OperationMessageService
getOperationMessageService
()
{
return
operationMessageService
;
}
public
void
setOperationMessageService
(
OperationMessageService
operationMessageService
)
{
this
.
operationMessageService
=
operationMessageService
;
}
public
CommuneInviteActivityDao
getCommuneInviteActivityDao
()
{
return
communeInviteActivityDao
;
}
public
void
setCommuneInviteActivityDao
(
CommuneInviteActivityDao
communeInviteActivityDao
)
{
this
.
communeInviteActivityDao
=
communeInviteActivityDao
;
}
public
CommuneOrderItemDao
getCommuneOrderItemDao
()
{
return
communeOrderItemDao
;
}
public
void
setCommuneOrderItemDao
(
CommuneOrderItemDao
communeOrderItemDao
)
{
this
.
communeOrderItemDao
=
communeOrderItemDao
;
}
public
CommuneInviteActivityService
getCommuneInviteActivityService
()
{
return
communeInviteActivityService
;
}
public
void
setCommuneInviteActivityService
(
CommuneInviteActivityService
communeInviteActivityService
)
{
this
.
communeInviteActivityService
=
communeInviteActivityService
;
}
}
src/main/resources/debug/payment.properties
View file @
98ac325c
...
...
@@ -7,6 +7,7 @@ payment.merchantId=3000003
payment.courseBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/courseOrder
payment.tourBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/tourOrder
payment.rechargeBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/rechargeOrder
payment.buyVoucherBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/buyVoucherOrder
payment.communeBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/communeOrder
payment.communeBaseNotifyUrlForMiniApp
=
http://112.65.124.86:18081/fun-common-soa/notify/notifyForMiniApp
payment.voucherNotifyUrlForMiniApp
=
http://112.65.124.86:18081/fun-common-soa/notify/notifyForVoucherMiniApp
...
...
src/main/resources/development/payment.properties
View file @
98ac325c
...
...
@@ -7,6 +7,7 @@ payment.merchantId=3000003
payment.courseBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/courseOrder
payment.tourBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/tourOrder
payment.rechargeBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/rechargeOrder
payment.buyVoucherBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/buyVoucherOrder
payment.communeBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/communeOrder
payment.communeBaseNotifyUrlForMiniApp
=
http://112.65.124.86:18081/fun-common-soa/notify/notifyForMiniApp
payment.voucherNotifyUrlForMiniApp
=
http://112.65.124.86:18081/fun-common-soa/notify/notifyForVoucherMiniApp
...
...
src/main/resources/order.spring.xml
View file @
98ac325c
...
...
@@ -205,6 +205,15 @@
<property
name=
"COMMUNE_AMOUNT2"
value=
"${communeAmount2}"
></property>
</bean>
<bean
name=
"buyVoucherOrderService"
class=
"com.ctrip.fun.golf.service.order.BuyVoucherOrderService"
parent=
"abstractOrderService"
>
<property
name=
"communeOrderItemDao"
ref=
"communeOrderItemDao"
></property>
<property
name=
"operationMessageService"
ref=
"operationMessageService"
></property>
<property
name=
"communeInviteActivityService"
ref=
"communeInviteActivityService"
></property>
<property
name=
"jobUtil"
ref=
"jobUtil"
></property>
<property
name=
"overTimeMinute"
value=
"${payment.longOvertime}"
></property>
<property
name=
"buyVoucherBaseNotifyUrl"
value=
"${payment.buyVoucherBaseNotifyUrl}"
></property>
</bean>
<bean
name=
"vipmemberOrderService"
class=
"com.ctrip.fun.golf.service.order.VipMemberOrderService"
parent=
"abstractOrderService"
>
<property
name=
"vipmemberOrderItemDao"
ref=
"vipmemberOrderItemDao"
></property>
<property
name=
"clientConfigDao"
ref=
"clientConfigDao"
></property>
...
...
src/main/resources/production/payment.properties
View file @
98ac325c
...
...
@@ -9,6 +9,7 @@ payment.merchantId=3000004
payment.courseBaseNotifyUrl
=
http
\:
//api.iwanoutdoor.com/fun-common-soa/notify/courseOrder
payment.tourBaseNotifyUrl
=
http
\:
//api.iwanoutdoor.com/fun-common-soa/notify/tourOrder
payment.rechargeBaseNotifyUrl
=
http
\:
//api.iwanoutdoor.com/fun-common-soa/notify/rechargeOrder
payment.buyVoucherBaseNotifyUrl
=
http
\:
//api.iwanoutdoor.com/fun-common-soa/notify/buyVoucherOrder
payment.communeBaseNotifyUrl
=
http
\:
//api.iwanoutdoor.com/fun-common-soa/notify/communeOrder
payment.communeBaseNotifyUrlForMiniApp
=
http
\:
//api.iwanoutdoor.com/fun-common-soa/notify/notifyForMiniApp
payment.voucherNotifyUrlForMiniApp
=
http
\:
//api.iwanoutdoor.com/fun-common-soa/notify/notifyForVoucherMiniApp
...
...
src/main/resources/test/payment.properties
View file @
98ac325c
...
...
@@ -7,6 +7,7 @@ payment.merchantId=3000003
payment.courseBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/courseOrder
payment.tourBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/tourOrder
payment.rechargeBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/rechargeOrder
payment.buyVoucherBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/buyVoucherOrder
payment.communeBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/communeOrder
payment.communeBaseNotifyUrlForMiniApp
=
http://112.65.124.86:18081/fun-common-soa/notify/notifyForMiniApp
payment.voucherNotifyUrlForMiniApp
=
http://112.65.124.86:18081/fun-common-soa/notify/notifyForVoucherMiniApp
...
...
src/main/resources/uat/payment.properties
View file @
98ac325c
...
...
@@ -7,6 +7,7 @@ payment.merchantId=3000003
payment.courseBaseNotifyUrl
=
http://10.8.55.46:8080/fun-common-soa/notify/courseOrder
payment.tourBaseNotifyUrl
=
http://10.8.55.46:8080/fun-common-soa/notify/tourOrder
payment.rechargeBaseNotifyUrl
=
http://10.8.55.46:8080/fun-common-soa/notify/rechargeOrder
payment.buyVoucherBaseNotifyUrl
=
http://112.65.124.86:18081/fun-common-soa/notify/buyVoucherOrder
payment.communeBaseNotifyUrl
=
http://10.8.55.46:8080/fun-common-soa/notify/communeOrder
payment.communeBaseNotifyUrlForMiniApp
=
http://10.8.55.46:8080/fun-common-soa/notify/notifyForMiniApp
payment.voucherNotifyUrlForMiniApp
=
http://10.8.55.46:8080/fun-common-soa/notify/notifyForVoucherMiniApp
...
...
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