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
630fa234
authored
Jan 05, 2018
by
Huang Linyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IWAN-160 社员身份识别-赛事分组导出的社员和嘉宾不一致
parent
962488df
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
1 deletions
src/main/java/com/ctrip/fun/golf/service/order/AbstractOrderService.java
src/main/java/com/ctrip/fun/golf/service/order/AbstractOrderService.java
View file @
630fa234
...
...
@@ -5,6 +5,7 @@ package com.ctrip.fun.golf.service.order;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.UUID
;
...
...
@@ -25,6 +26,7 @@ import com.ctrip.fun.common.vo.ResponseStatusEnum;
import
com.ctrip.fun.common.vo.basic.AbstractRuleConditionBean
;
import
com.ctrip.fun.common.vo.basic.CourseRuleConditionBaseBean
;
import
com.ctrip.fun.common.vo.basic.MultipleCourseConditionBean
;
import
com.ctrip.fun.common.vo.basic.VipGradeEnum
;
import
com.ctrip.fun.common.vo.order.AbstractOrderBean
;
import
com.ctrip.fun.common.vo.order.AbstractOrderListItemBean
;
import
com.ctrip.fun.common.vo.order.CourseOrderResourceBean
;
...
...
@@ -1134,7 +1136,21 @@ public abstract class AbstractOrderService<H extends AbstractOrderBean<T>, T> ex
customerInfo
.
setGender
(
customerInfoBean
.
getGender
()
==
null
?
""
:
customerInfoBean
.
getGender
());
customerInfo
.
setMobileNo
(
customerInfoBean
.
getMobileNo
()
==
null
?
""
:
customerInfoBean
.
getMobileNo
());
customerInfo
.
setBaby
(
customerInfoBean
.
getBaby
()
==
null
?
false
:
customerInfoBean
.
getBaby
());
customerInfo
.
setCommuneFlag
(
customerInfoBean
.
getCommuneFlag
()
==
null
?
false
:
customerInfoBean
.
getCommuneFlag
());
//TODO 社员标记应
//customerInfo.setCommuneFlag(customerInfoBean.getCommuneFlag() == null ? false : customerInfoBean.getCommuneFlag());
UserExt
user
=
this
.
getUserExtDao
().
GetUserExtInfoByPhone
(
customerInfoBean
.
getMobileNo
());
if
(
user
!=
null
){
if
(
checkIfCommuneUser
(
user
)){
customerInfo
.
setCommuneFlag
(
true
);
}
else
{
customerInfo
.
setCommuneFlag
(
false
);
}
}
else
{
customerInfo
.
setCommuneFlag
(
false
);
}
customerInfo
.
setHandicap
(
customerInfoBean
.
getHandicap
());
customerInfo
.
setOneselfFlag
(
customerInfoBean
.
getOneselfFlag
()
==
null
?
true
:
customerInfoBean
.
getOneselfFlag
());
Integer
customerId
=
customerInfoDao
.
save
(
customerInfo
);
...
...
@@ -1142,6 +1158,26 @@ public abstract class AbstractOrderService<H extends AbstractOrderBean<T>, T> ex
}
}
private
boolean
checkIfCommuneUser
(
UserExt
userExt
)
{
boolean
isCommuneUser
=
(
userExt
.
getVipGrade
()
&
VipGradeEnum
.
VIP2
.
getKey
())
==
VipGradeEnum
.
VIP2
.
getKey
();
//社员续费 add by caosy
Date
startTime
=
(
userExt
.
getCommuneAgainTime
()
==
null
?
userExt
.
getCommuneTime
():
userExt
.
getCommuneAgainTime
());
if
(
startTime
!=
null
){
Date
outDate
=
DateUtil
.
addDateField
(
startTime
,
Calendar
.
YEAR
,
1
);
long
dayFromOutDate
=
DateUtil
.
getDistinceDay
(
new
Date
(),
outDate
);
long
a
=
dayFromOutDate
;
if
(
dayFromOutDate
<
0
)
{
// 代表已经过期
isCommuneUser
=
false
;
}
}
else
{
logger
.
error
(
"get commune time fail:"
+
userExt
.
getUid
());
}
return
isCommuneUser
;
}
private
void
saveInsuranceInfo
(
H
abstractOrderBean
,
Integer
orderId
,
Long
orderNo
)
{
if
(!
CollectionUtils
.
isEmpty
(
abstractOrderBean
.
getInsuranceInfoVoList
()))
{
insuranceInfoDao
.
save
(
orderId
,
abstractOrderBean
.
getInsuranceInfoVoList
());
...
...
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