Commit e9280203 authored by 周健威's avatar 周健威

一车一价前台接口、下单 修改bug

parent a3db44da
......@@ -150,7 +150,7 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
//Date currentDate = DateUtil.beginOfDay(DateUtil.parse(startDate));
for(cn.hutool.core.date.DateTime currentDate = DateUtil.beginOfDay(DateUtil.parse(startDate));
(currentDate.isAfterOrEquals(beginOfStartDate) || currentDate.isBeforeOrEquals(endOfStartDate));
(currentDate.isAfterOrEquals(beginOfStartDate) && currentDate.isBeforeOrEquals(endOfStartDate));
currentDate = DateUtil.offsetDay(currentDate, 1)) {
cn.hutool.core.date.DateTime finalCurrentDate = currentDate;
VehicleModelCalendarPriceDTO dto = new VehicleModelCalendarPriceDTO(){{
......
......@@ -74,7 +74,8 @@ public class WebConfiguration implements WebMvcConfigurer {
"/branchCompany/**",
"/vehicleModel/**",
"/departure/**",
"/company/**"
"/company/**",
"/vehicleHolidayPriceInfo/**"
};
Collections.addAll(list, urls);
return list;
......
......@@ -47,8 +47,7 @@ public class VehicleHolidayPriceInfoController extends BaseController<VehicleHol
return ObjectRestResponse.succ(baseBiz.getSynthesizePrice(vehicleId, startDate, endDate, userId, companyId));
}
@GetMapping(value = "multiCalendarPrice")
@IgnoreUserToken
@GetMapping(value = "/multiCalendarPrice")
public ObjectRestResponse<List<VehicleVO>> multiCalendarPrice(String vehicleIds, String startDate, String endDate, Integer companyId) {
Integer userId = Integer.valueOf(getCurrentUserId());
......
......@@ -850,7 +850,7 @@
<select id="searchUsableModel" parameterType="java.util.Map"
resultMap="searchUsableModelMap">
(select distinct vm.id as model_id, bc.id as company_id, group_concat(v.id) vehicle_ids
(select distinct vm.id as model_id, bc.id as company_id, group_concat(v.id) as vehicle_ids
<if test=" catas != null ">
,GROUP_CONCAT(vc.cata_id) as catas
</if>
......@@ -897,31 +897,32 @@
</if>
)
<!-- union 所有下架车型 -->
<if test="startCompanyId != null or parkBranchCompanyId != null ">
union
(select vm.id as model_id, bc.id as company_id
<if test=" catas != null ">
,null as catas
</if>
<if test=" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true">
,0 as hasVehicle
</if>
<if test="lon != null and lat != null">
<!-- 处理距离 -->
,st_distance_sphere(point(#{lon}, #{lat}), point(bc.longitude, bc.latitude)) as distance
</if>
from vehicle_model vm
left join branch_company bc on
<choose>
<when test="startCompanyId != null">
bc.id = #{startCompanyId}
</when>
<otherwise>
bc.id = #{parkBranchCompanyId}
</otherwise>
</choose>
where vm.isdel = 0 and vm.status = 0 and vm.app_show = 1)
</if>
<!-- -->
<!-- <if test="startCompanyId != null or parkBranchCompanyId != null ">-->
<!-- union-->
<!-- (select vm.id as model_id, bc.id as company_id-->
<!-- <if test=" catas != null ">-->
<!-- ,null as catas-->
<!-- </if>-->
<!-- <if test=" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true">-->
<!-- ,0 as hasVehicle-->
<!-- </if>-->
<!-- <if test="lon != null and lat != null">-->
<!-- &lt;!&ndash; 处理距离 &ndash;&gt;-->
<!-- ,st_distance_sphere(point(#{lon}, #{lat}), point(bc.longitude, bc.latitude)) as distance-->
<!-- </if>-->
<!-- from vehicle_model vm-->
<!-- left join branch_company bc on-->
<!-- <choose>-->
<!-- <when test="startCompanyId != null">-->
<!-- bc.id = #{startCompanyId}-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- bc.id = #{parkBranchCompanyId}-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- where vm.isdel = 0 and vm.status = 0 and vm.app_show = 1)-->
<!-- </if>-->
<if test="lon != null and lat != null">
order by
<if test=" yearMonthAndParam !=null and yearNo4Where != null and yearNo4Where == true">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment