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
0ec9e1a6
authored
Dec 11, 2020
by
caosy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
销售码
parent
64caf07d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
6 deletions
src/main/java/com/ctrip/fun/golf/domain/order/CommuneOrderItem.java
src/main/java/com/ctrip/fun/golf/domain/order/Order.java
src/main/java/com/ctrip/fun/golf/service/order/CommuneOrderService.java
src/main/java/com/ctrip/fun/golf/service/payment/CommuneNotifyService.java
src/main/java/com/ctrip/fun/golf/service/user/UserService.java
src/main/java/com/ctrip/fun/golf/domain/order/CommuneOrderItem.java
View file @
0ec9e1a6
...
...
@@ -93,6 +93,11 @@ public class CommuneOrderItem implements java.io.Serializable {
@Column
(
name
=
"userWorkerId"
)
private
Integer
userWorkerId
;
@Column
(
name
=
"isSend"
)
private
Integer
isSend
;
public
Integer
getId
()
{
return
id
;
}
...
...
@@ -197,5 +202,12 @@ public class CommuneOrderItem implements java.io.Serializable {
this
.
userWorkerId
=
userWorkerId
;
}
public
Integer
getIsSend
()
{
return
isSend
;
}
public
void
setIsSend
(
Integer
isSend
)
{
this
.
isSend
=
isSend
;
}
}
src/main/java/com/ctrip/fun/golf/domain/order/Order.java
View file @
0ec9e1a6
...
...
@@ -216,6 +216,9 @@ public class Order extends AbstractOrder implements java.io.Serializable {
private
String
mobilePhone
;
private
String
salesUid
;
public
Order
()
{
}
...
...
@@ -1483,6 +1486,13 @@ public class Order extends AbstractOrder implements java.io.Serializable {
this
.
mobilePhone
=
mobilePhone
;
}
public
String
getSalesUid
()
{
return
salesUid
;
}
public
void
setSalesUid
(
String
salesUid
)
{
this
.
salesUid
=
salesUid
;
}
}
src/main/java/com/ctrip/fun/golf/service/order/CommuneOrderService.java
View file @
0ec9e1a6
...
...
@@ -41,6 +41,7 @@ import com.ctrip.fun.common.vo.product.ProductPaymentTypeEnum;
import
com.ctrip.fun.golf.dao.client.ClientConfigDao
;
import
com.ctrip.fun.golf.dao.order.CommuneOrderItemDao
;
import
com.ctrip.fun.golf.dao.product.BuyVoucherActivityDao
;
import
com.ctrip.fun.golf.dao.user.UserWorkerDao
;
import
com.ctrip.fun.golf.domain.basic.Voucher
;
import
com.ctrip.fun.golf.domain.client.ClientConfig
;
import
com.ctrip.fun.golf.domain.order.CommuneOrderItem
;
...
...
@@ -48,6 +49,7 @@ import com.ctrip.fun.golf.domain.order.Order;
import
com.ctrip.fun.golf.domain.payment.WeiXinAtcion
;
import
com.ctrip.fun.golf.domain.product.BuyVoucherActivity
;
import
com.ctrip.fun.golf.domain.user.UserExt
;
import
com.ctrip.fun.golf.domain.user.UserWorker
;
import
com.ctrip.fun.golf.exceptions.OrderException
;
import
com.ctrip.fun.golf.service.basic.OperationMessageService
;
import
com.ctrip.fun.golf.service.market.CommuneInviteActivityService
;
...
...
@@ -87,7 +89,8 @@ public class CommuneOrderService extends AbstractOrderService<CommuneOrderBean,
@Autowired
private
BuyVoucherActivityDao
buyVoucherActivityDao
;
@Autowired
private
UserWorkerDao
userWorkerDao
;
...
...
@@ -167,6 +170,14 @@ public class CommuneOrderService extends AbstractOrderService<CommuneOrderBean,
if
(
count1
>=
buyoucherActivity
.
getBuyLimitTimes
()){
throw
new
OrderException
(-
6666
,
"限购一张"
);
}
// 体验卷活动
if
((
communeOrderBean
.
getSalesUid
()
!=
null
&&
!(
""
).
equals
(
communeOrderBean
.
getSalesUid
()))||(
communeOrderBean
.
getMobilePhone
()!=
null
&&
!(
""
).
equals
(
communeOrderBean
.
getMobilePhone
()))){
UserWorker
userWorker
=
userWorkerDao
.
getUserWorkerByUid
(
communeOrderBean
.
getSalesUid
());
if
(
userWorker
==
null
){
throw
new
OrderException
(-
66
,
"体验劵销售码错误!"
);
}
}
}
@Override
...
...
src/main/java/com/ctrip/fun/golf/service/payment/CommuneNotifyService.java
View file @
0ec9e1a6
...
...
@@ -116,9 +116,8 @@ public class CommuneNotifyService extends AbstractNotifyService {
//执行发券
String
uid
=
order
.
getUid
();
//下单人id
if
(!
""
.
equals
(
order
.
getRealName
())
&&
!
""
.
equals
(
order
.
getIdCard
())
&&
order
.
getIdCard
()!=
null
&&
order
.
getRealName
()!=
null
){
voucherService
.
sendVoucherForPlaceOrderByConfig
(
uid
,
order
.
getOrderId
()+
""
,
true
,
buyVoucherActivity
.
getVoucherConfig
(),
order
.
getRealName
(),
order
.
getIdCard
(),
order
.
getMobilePhone
());
//
voucherService.sendVoucherForPlaceOrderByConfig(uid, order.getOrderId()+"", true, buyVoucherActivity.getVoucherConfig(),order.getRealName(),order.getIdCard(),order.getMobilePhone());
}
else
{
voucherService
.
sendVoucherForPlaceOrderByConfig
(
uid
,
order
.
getOrderId
()+
""
,
true
,
buyVoucherActivity
.
getVoucherConfig
(),
""
,
""
,
""
);
}
...
...
src/main/java/com/ctrip/fun/golf/service/user/UserService.java
View file @
0ec9e1a6
...
...
@@ -1802,9 +1802,6 @@ public class UserService {
userBean
.
setConstellation
(
userExt
.
getConstellation
());
userBean
.
setOccupation
(
userExt
.
getOccupation
());
userBean
.
setHobby
(
userExt
.
getHobby
());
UserWorker
userWorker
=
userWorkerDao
.
getUserWorkerByUid
(
userExt
.
getUid
());
if
(
userWorker
!=
null
){
userBean
.
setUserWorkerId
(
userWorker
.
getId
());
...
...
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