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
453488e7
Commit
453488e7
authored
Oct 23, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日历价格
parent
f335e317
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
VehicleModelCalendarPriceBiz.java
...fc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
+4
-0
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
View file @
453488e7
...
@@ -12,6 +12,7 @@ import com.xxfc.platform.vehicle.pojo.dto.VehicleModelDTO;
...
@@ -12,6 +12,7 @@ import com.xxfc.platform.vehicle.pojo.dto.VehicleModelDTO;
import
com.xxfc.platform.vehicle.pojo.dto.VehicleModelHolidayPriceDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.VehicleModelHolidayPriceDTO
;
import
com.xxfc.platform.vehicle.pojo.vo.VehicleModelDayPriceVo
;
import
com.xxfc.platform.vehicle.pojo.vo.VehicleModelDayPriceVo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -38,6 +39,7 @@ import java.util.stream.Collectors;
...
@@ -38,6 +39,7 @@ import java.util.stream.Collectors;
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Service
@Service
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
@Slf4j
public
class
VehicleModelCalendarPriceBiz
extends
BaseBiz
<
VehicleModelCalendarPriceMapper
,
VehicleModelCalendarPrice
>
{
public
class
VehicleModelCalendarPriceBiz
extends
BaseBiz
<
VehicleModelCalendarPriceMapper
,
VehicleModelCalendarPrice
>
{
private
static
final
int
START_OF_WEEK
=
1
;
private
static
final
int
START_OF_WEEK
=
1
;
private
static
final
int
END_OF_WEEK
=
7
;
private
static
final
int
END_OF_WEEK
=
7
;
...
@@ -313,6 +315,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
...
@@ -313,6 +315,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
* @return
* @return
*/
*/
public
Map
<
String
,
Object
>
transfromPriceAndFreeDaysByDate
(
Map
<
Date
,
VehicleModelHolidayPriceDTO
>
festivalDayMap
,
Date
current_date
,
BigDecimal
vehicle_price
,
Integer
discount
)
{
public
Map
<
String
,
Object
>
transfromPriceAndFreeDaysByDate
(
Map
<
Date
,
VehicleModelHolidayPriceDTO
>
festivalDayMap
,
Date
current_date
,
BigDecimal
vehicle_price
,
Integer
discount
)
{
log
.
info
(
"参数:【{}=={}=={}=={}】"
,
festivalDayMap
,
current_date
,
vehicle_price
,
discount
);
Map
<
String
,
Object
>
vehicle_price_days_map
=
new
HashMap
<>(
3
);
Map
<
String
,
Object
>
vehicle_price_days_map
=
new
HashMap
<>(
3
);
Integer
free_days
=
DEFAULT_FREE_DAYS
;
Integer
free_days
=
DEFAULT_FREE_DAYS
;
vehicle_price_days_map
.
put
(
BASE_PRICE_VAL
,
vehicle_price
);
vehicle_price_days_map
.
put
(
BASE_PRICE_VAL
,
vehicle_price
);
...
@@ -326,6 +329,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
...
@@ -326,6 +329,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
vehicle_price
=
vehicle_price
.
multiply
(
new
BigDecimal
(
discount
/
100.00
));
vehicle_price
=
vehicle_price
.
multiply
(
new
BigDecimal
(
discount
/
100.00
));
vehicle_price_days_map
.
put
(
PRICE_VAL
,
vehicle_price
);
vehicle_price_days_map
.
put
(
PRICE_VAL
,
vehicle_price
);
vehicle_price_days_map
.
put
(
DAYS_VAL
,
free_days
);
vehicle_price_days_map
.
put
(
DAYS_VAL
,
free_days
);
log
.
info
(
"(节假日|非节假日未设置的)价格和免费天数 处理【{}】"
,
vehicle_price_days_map
);
return
vehicle_price_days_map
;
return
vehicle_price_days_map
;
}
}
...
...
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