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
e79c514d
authored
Nov 06, 2017
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the commnuneguest price condition
parent
f64ee4f5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
src/main/java/com/ctrip/fun/golf/dao/product/CourseResourceDao.java
src/main/java/com/ctrip/fun/golf/service/order/OpEventActivityOrderService.java
src/main/java/com/ctrip/fun/golf/service/product/CourseResourceService.java
src/main/java/com/ctrip/fun/golf/dao/product/CourseResourceDao.java
View file @
e79c514d
...
...
@@ -195,13 +195,13 @@ public class CourseResourceDao extends GenericHibernateDao<CourseResource, Integ
return
false
;
return
true
;
}
public
List
<
Integer
>
checkEventActivityValidResource
(
int
productId
,
int
teetime
,
Date
playDate
,
Double
communePrice
)
{
public
List
<
Integer
>
checkEventActivityValidResource
(
int
productId
,
int
teetime
,
Date
playDate
,
Double
communePrice
,
Double
guestPrice
)
{
String
dateStr
=
DateUtil
.
getDateStr
(
playDate
);
String
sql
=
"select cr.ID from prd_courseResource as cr, prd_resourceprice as rp where cr.productId = "
+
productId
+
" and cr.teeTime="
+
teetime
+
" and cr.status != "
+
CourseResourceStatusEnum
.
INVALID
.
getValue
()
+
" and cr.id = rp.ResourceID "
+
" and rp.priceDate = \""
+
dateStr
+
"\""
+
" and rp.communePrice="
+
communePrice
;
+
" and cr.id = rp.ResourceID "
+
" and rp.priceDate = \""
+
dateStr
+
"\""
+
" and rp.communePrice="
+
communePrice
+
" and rp.communeGuestPrice="
+
guestPrice
;
List
<
Integer
>
list
=
this
.
getSession
().
createSQLQuery
(
sql
).
list
();
return
list
;
}
...
...
src/main/java/com/ctrip/fun/golf/service/order/OpEventActivityOrderService.java
View file @
e79c514d
...
...
@@ -1060,7 +1060,7 @@ public class OpEventActivityOrderService
String
[]
teetimes
=
newTeeTime
.
split
(
":"
);
if
(
teetimes
!=
null
&&
teetimes
.
length
==
2
){
int
groupNum
=
Integer
.
valueOf
(
teetimes
[
0
])*
60
+
Integer
.
valueOf
(
teetimes
[
1
]);
List
<
Integer
>
resourceIds
=
this
.
courseResourceService
.
getResourceByTeeTimeAndDate
(
orderProcessBean
.
getProductId
(),
groupNum
,
orderItem
.
getPlayDate
(),
orderItem
.
getCommunePrice
());
List
<
Integer
>
resourceIds
=
this
.
courseResourceService
.
getResourceByTeeTimeAndDate
(
orderProcessBean
.
getProductId
(),
groupNum
,
orderItem
.
getPlayDate
(),
orderItem
.
getCommunePrice
()
,
orderItem
.
getCommuneGuestPrice
()
);
if
(
resourceIds
!=
null
&&
resourceIds
.
size
()
>
0
){
orderProcessBean
.
setProcessDesc
(
desc
.
toString
());
Integer
oldResourceId
=
orderItem
.
getResourceId
();
...
...
src/main/java/com/ctrip/fun/golf/service/product/CourseResourceService.java
View file @
e79c514d
...
...
@@ -1311,8 +1311,8 @@ public class CourseResourceService extends
*add by caosy: get the resource by teetime
*
* */
public
List
<
Integer
>
getResourceByTeeTimeAndDate
(
int
productId
,
int
teetime
,
Date
playDate
,
Double
communePrice
){
return
this
.
courseResourceDao
.
checkEventActivityValidResource
(
productId
,
teetime
,
playDate
,
communePrice
);
public
List
<
Integer
>
getResourceByTeeTimeAndDate
(
int
productId
,
int
teetime
,
Date
playDate
,
Double
communePrice
,
Double
guestPrice
){
return
this
.
courseResourceDao
.
checkEventActivityValidResource
(
productId
,
teetime
,
playDate
,
communePrice
,
guestPrice
);
}
/**
...
...
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