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
22a4a620
Commit
22a4a620
authored
Nov 18, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/holiday-price' into holiday-price
parents
1b30e2a9
c2cdd8e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
VehicleModelCalendarPriceBiz.java
...fc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
+2
-3
VehicleModelCalendarPriceAdminController.java
.../rest/admin/VehicleModelCalendarPriceAdminController.java
+3
-2
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleModelCalendarPriceBiz.java
View file @
22a4a620
...
...
@@ -71,7 +71,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
* @param userId
*/
public
void
addVehicleModelCalendarPrice
(
List
<
VehicleModelCalendarPriceSaveDTO
>
vehicleModelCalendarPrices
,
String
date
,
Integer
userId
)
{
if
(
CollectionUtils
.
isNotEmpty
(
vehicleModelCalendarPrices
))
{
vehicleModelCalendarPrices
=
vehicleModelCalendarPrices
==
null
?
Collections
.
EMPTY_LIST
:
vehicleModelCalendarPrices
;
List
<
VehicleModelCalendarPrice
>
vehicleModelCalendarPriceList
=
new
ArrayList
<>();
List
<
Date
>
dateList
=
vehicleModelCalendarPrices
.
stream
().
peek
(
x
->
{
VehicleModelCalendarPrice
calendarPrice
=
new
VehicleModelCalendarPrice
();
...
...
@@ -101,10 +101,9 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
mapper
.
updateByExampleSelective
(
vehicleModelCalendarPrice
,
example
);
//2.插入新的数据
if
(
!
CollectionUtils
.
isNotEmpty
(
dateList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
dateList
))
{
mapper
.
insertList
(
vehicleModelCalendarPriceList
);
}
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/admin/VehicleModelCalendarPriceAdminController.java
View file @
22a4a620
...
...
@@ -30,8 +30,9 @@ public class VehicleModelCalendarPriceAdminController {
private
final
VehicleModelCalendarPriceBiz
vehicleModelCalendarPriceBiz
;
@ApiOperation
(
"车型日历价格设置"
)
@PostMapping
(
"/add_edit"
)
public
ObjectRestResponse
<
Void
>
add
(
@RequestBody
List
<
VehicleModelCalendarPriceSaveDTO
>
vehicleModelCalendarPriceSaveDTO
,
@RequestParam
(
"date"
)
String
date
,
UserDTO
userDTO
){
@PostMapping
(
value
=
{
"/add_edit/{date}"
,
"/add_edit"
})
public
ObjectRestResponse
<
Void
>
add
(
@RequestBody
(
required
=
false
)
List
<
VehicleModelCalendarPriceSaveDTO
>
vehicleModelCalendarPriceSaveDTO
,
@PathVariable
(
name
=
"date"
,
required
=
false
)
String
date
,
UserDTO
userDTO
){
vehicleModelCalendarPriceBiz
.
addVehicleModelCalendarPrice
(
vehicleModelCalendarPriceSaveDTO
,
date
,
userDTO
.
getId
());
return
ObjectRestResponse
.
succ
();
}
...
...
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