Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
0ef9d263
Commit
0ef9d263
authored
Jun 10, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改价格
parent
62f17fe7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
7 deletions
+21
-7
TourSpePriceVo.java
...c/main/java/com/xxfc/platform/tour/vo/TourSpePriceVo.java
+11
-3
TourGoodSpeBiz.java
.../main/java/com/xxfc/platform/tour/biz/TourGoodSpeBiz.java
+10
-4
No files found.
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/vo/TourSpePriceVo.java
View file @
0ef9d263
...
@@ -26,8 +26,12 @@ public class TourSpePriceVo {
...
@@ -26,8 +26,12 @@ public class TourSpePriceVo {
@ApiModelProperty
(
value
=
"等级"
)
@ApiModelProperty
(
value
=
"等级"
)
private
Integer
level
;
private
Integer
level
;
//大人单价"
//大人原单价"
@ApiModelProperty
(
value
=
"大人单价"
)
@ApiModelProperty
(
value
=
"大人原单价"
)
private
BigDecimal
OriginalPrice
;
//大人优惠单价"
@ApiModelProperty
(
value
=
"大人优惠单价"
)
private
BigDecimal
price
;
private
BigDecimal
price
;
//大人总价
//大人总价
...
@@ -40,7 +44,11 @@ public class TourSpePriceVo {
...
@@ -40,7 +44,11 @@ public class TourSpePriceVo {
//儿童单价
//儿童单价
@ApiModelProperty
(
value
=
"儿童单价"
)
@ApiModelProperty
(
value
=
"儿童单价"
)
private
BigDecimal
childPrice
;
private
BigDecimal
childOriginalPrice
;
//儿童优惠单价
@ApiModelProperty
(
value
=
"儿童优惠单价"
)
private
BigDecimal
childPrice
;
//儿童总价
//儿童总价
@ApiModelProperty
(
value
=
"儿童总价"
)
@ApiModelProperty
(
value
=
"儿童总价"
)
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodSpeBiz.java
View file @
0ef9d263
...
@@ -45,6 +45,12 @@ public class TourGoodSpeBiz extends BaseBiz<TourGoodSpePriceMapper, TourGoodSpeP
...
@@ -45,6 +45,12 @@ public class TourGoodSpeBiz extends BaseBiz<TourGoodSpePriceMapper, TourGoodSpeP
priceVo
.
setStock
(
spePrice
.
getStock
());
priceVo
.
setStock
(
spePrice
.
getStock
());
BigDecimal
price
=
spePrice
.
getPrice
();
BigDecimal
price
=
spePrice
.
getPrice
();
BigDecimal
childPrice
=
spePrice
.
getChildPrice
();
BigDecimal
childPrice
=
spePrice
.
getChildPrice
();
priceVo
.
setOriginalPrice
(
price
);
priceVo
.
setChildOriginalPrice
(
childPrice
);
BigDecimal
totalPrice
=
price
.
multiply
(
new
BigDecimal
(
number
)).
setScale
(
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
totalChildPrice
=
childNumber
>
0
?
price
.
multiply
(
new
BigDecimal
(
childNumber
)).
setScale
(
2
,
RoundingMode
.
HALF_UP
):
new
BigDecimal
(
"0.00"
);
priceVo
.
setTotalPrice
(
totalPrice
);
priceVo
.
setTotalChildPrice
(
totalChildPrice
);
if
(
level
!=
null
&&
level
>
0
)
{
if
(
level
!=
null
&&
level
>
0
)
{
String
memberPrice
=
spePrice
.
getMemberPrice
();
String
memberPrice
=
spePrice
.
getMemberPrice
();
JSONArray
array
=
JSONArray
.
parseArray
(
memberPrice
);
JSONArray
array
=
JSONArray
.
parseArray
(
memberPrice
);
...
@@ -62,12 +68,12 @@ public class TourGoodSpeBiz extends BaseBiz<TourGoodSpePriceMapper, TourGoodSpeP
...
@@ -62,12 +68,12 @@ public class TourGoodSpeBiz extends BaseBiz<TourGoodSpePriceMapper, TourGoodSpeP
}
}
}
}
}
}
BigDecimal
totalPrice
=
price
.
multiply
(
new
BigDecimal
(
number
)).
setScale
(
2
,
RoundingMode
.
HALF_UP
);
totalPrice
=
price
.
multiply
(
new
BigDecimal
(
number
)).
setScale
(
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
totalChildPrice
=
childNumber
>
0
?
price
.
multiply
(
new
BigDecimal
(
childNumber
)).
setScale
(
2
,
RoundingMode
.
HALF_UP
):
new
BigDecimal
(
"0.00"
);
totalChildPrice
=
childNumber
>
0
?
price
.
multiply
(
new
BigDecimal
(
childNumber
)).
setScale
(
2
,
RoundingMode
.
HALF_UP
):
new
BigDecimal
(
"0.00"
);
priceVo
.
setPrice
(
price
);
priceVo
.
setPrice
(
price
);
priceVo
.
setChildPrice
(
childPrice
);
priceVo
.
setChildPrice
(
childPrice
);
priceVo
.
set
Tot
alPrice
(
totalPrice
);
priceVo
.
set
Re
alPrice
(
totalPrice
);
priceVo
.
set
Tot
alChildPrice
(
totalChildPrice
);
priceVo
.
set
Re
alChildPrice
(
totalChildPrice
);
return
ObjectRestResponse
.
succ
(
priceVo
);
return
ObjectRestResponse
.
succ
(
priceVo
);
}
}
}
}
...
...
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