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
1141ccff
Commit
1141ccff
authored
Aug 28, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-tiande' of
http://113.105.137.151:22280/youjj/cloud-platform
into dev-tiande
parents
9aa20fb4
ce20f0d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
17 deletions
+16
-17
VehicleHolidayPriceInfoController.java
...tform/vehicle/rest/VehicleHolidayPriceInfoController.java
+12
-15
VehicleHolidayPriceInfoMapper.xml
...c/main/resources/mapper/VehicleHolidayPriceInfoMapper.xml
+4
-2
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleHolidayPriceInfoController.java
View file @
1141ccff
package
com
.
xxfc
.
platform
.
vehicle
.
rest
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.vehicle.biz.VehicleBiz
;
import
com.xxfc.platform.vehicle.biz.VehicleHolidayPriceInfoBiz
;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
import
com.xxfc.platform.vehicle.entity.VehicleHolidayPriceInfo
;
import
com.xxfc.platform.vehicle.pojo.dto.VehicleModelCalendarPriceDTO
;
import
com.xxfc.platform.vehicle.pojo.vo.VehicleVO
;
...
...
@@ -53,18 +50,18 @@ public class VehicleHolidayPriceInfoController extends BaseController<VehicleHol
Integer
userId
=
Integer
.
valueOf
(
getCurrentUserId
());
List
<
VehicleVO
>
vehicleVOS
=
CollUtil
.
newArrayList
();
if
(
StrUtil
.
isNotBlank
(
vehicleIds
))
{
String
[]
strs
=
StrUtil
.
split
(
vehicleIds
,
","
);
List
<
Vehicle
>
vehicleList
=
vehicleBiz
.
selectByWeekend
(
w
->
{
w
.
andIn
(
Vehicle:
:
getId
,
CollUtil
.
toList
(
strs
));
return
w
;
});
for
(
Vehicle
vehicle
:
vehicleList
)
{
VehicleVO
vehicleVO
=
BeanUtil
.
toBean
(
vehicle
,
VehicleVO
.
class
);
vehicleVO
.
setPriceDTOS
(
baseBiz
.
getSynthesizePrice
(
vehicle
.
getId
(),
startDate
,
endDate
,
userId
,
companyId
));
vehicleVOS
.
add
(
vehicleVO
);
}
}
//
if(StrUtil.isNotBlank(vehicleIds)) {
//
String[] strs = StrUtil.split(vehicleIds, ",");
//
List<Vehicle> vehicleList = vehicleBiz.selectByWeekend(w -> {
//
w.andIn(Vehicle::getId, CollUtil.toList(strs));
//
return w;
//
});
//
for (Vehicle vehicle : vehicleList) {
//
VehicleVO vehicleVO = BeanUtil.toBean(vehicle, VehicleVO.class);
//
vehicleVO.setPriceDTOS(baseBiz.getSynthesizePrice(vehicle.getId(), startDate, endDate, userId, companyId));
//
vehicleVOS.add(vehicleVO);
//
}
//
}
return
ObjectRestResponse
.
succ
(
vehicleVOS
);
}
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleHolidayPriceInfoMapper.xml
View file @
1141ccff
...
...
@@ -3,10 +3,12 @@
<mapper
namespace=
"com.xxfc.platform.vehicle.mapper.VehicleHolidayPriceInfoMapper"
>
<select
id=
"getAll"
resultType=
"
com.xxfc.platform.vehicle.pojo.vo.VehicleHolidayPriceInfoVo"
>
<select
id=
"getAll"
resultType=
"com.xxfc.platform.vehicle.pojo.vo.VehicleHolidayPriceInfoVo"
>
select festival_id, festival_day, MIN(festival_date) as startTime, MAX(festival_date) as endTime, rent_price, rent_free_day from vehicle_holiday_price_info
GROUP BY festival_id,festival_day,rent_price, rent_free_day
HAVING festival_id = #{festivalId}
<if
test=
"festivalId != null"
>
HAVING festival_id = #{festivalId}
</if>
</select>
</mapper>
\ No newline at end of file
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