Commit fb35e713 authored by jiaorz's avatar jiaorz

修改租車訂單地址,修改车辆预定时添加订单号

parent 72630d9f
...@@ -2,9 +2,9 @@ package com.xxfc.platform.vehicle.biz; ...@@ -2,9 +2,9 @@ package com.xxfc.platform.vehicle.biz;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.exception.BaseException;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.xxfc.platform.vehicle.common.CustomIllegalParamException;
import com.xxfc.platform.vehicle.constant.ConstantType; import com.xxfc.platform.vehicle.constant.ConstantType;
import com.xxfc.platform.vehicle.constant.RedisKey; import com.xxfc.platform.vehicle.constant.RedisKey;
import com.xxfc.platform.vehicle.entity.Constant; import com.xxfc.platform.vehicle.entity.Constant;
...@@ -242,12 +242,12 @@ public class ConstantBiz extends BaseBiz<ConstantMapper,Constant> { ...@@ -242,12 +242,12 @@ public class ConstantBiz extends BaseBiz<ConstantMapper,Constant> {
*/ */
public Boolean checkIfExists(Integer type,Integer code){ public Boolean checkIfExists(Integer type,Integer code){
if(!ConstantType.exists(type)){ if(!ConstantType.exists(type)){
throw new CustomIllegalParamException(" no such type of constant"); throw new BaseException(" no such type of constant");
} }
List<ConstantVo> constantVoList = getAllConstantByType(type); List<ConstantVo> constantVoList = getAllConstantByType(type);
if(CollectionUtils.isEmpty(constantVoList)){ if(CollectionUtils.isEmpty(constantVoList)){
throw new CustomIllegalParamException(" no such code of constant in relative type"); throw new BaseException(" no such code of constant in relative type");
} }
for(ConstantVo constantVo:constantVoList){ for(ConstantVo constantVo:constantVoList){
...@@ -255,7 +255,7 @@ public class ConstantBiz extends BaseBiz<ConstantMapper,Constant> { ...@@ -255,7 +255,7 @@ public class ConstantBiz extends BaseBiz<ConstantMapper,Constant> {
return Boolean.TRUE; return Boolean.TRUE;
} }
} }
throw new CustomIllegalParamException(" no such code of constant in relative type"); throw new BaseException(" no such code of constant in relative type");
} }
} }
...@@ -3,8 +3,8 @@ package com.xxfc.platform.vehicle.biz; ...@@ -3,8 +3,8 @@ package com.xxfc.platform.vehicle.biz;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.exception.BaseException;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.xxfc.platform.vehicle.common.CustomIllegalParamException;
import com.xxfc.platform.vehicle.constant.RedisKey; import com.xxfc.platform.vehicle.constant.RedisKey;
import com.xxfc.platform.vehicle.constant.RegionType; import com.xxfc.platform.vehicle.constant.RegionType;
import com.xxfc.platform.vehicle.entity.SysRegion; import com.xxfc.platform.vehicle.entity.SysRegion;
...@@ -42,7 +42,7 @@ public class SysRegionBiz extends BaseBiz<SysRegionMapper, SysRegion> { ...@@ -42,7 +42,7 @@ public class SysRegionBiz extends BaseBiz<SysRegionMapper, SysRegion> {
public List<SysRegion> getRegionsByCodes(List<Long> ids){ public List<SysRegion> getRegionsByCodes(List<Long> ids){
List<String> redisCacheKeys = Lists.newArrayList(); List<String> redisCacheKeys = Lists.newArrayList();
if(CollectionUtils.isEmpty(ids)){ if(CollectionUtils.isEmpty(ids)){
throw new CustomIllegalParamException("empty id list"); throw new BaseException("empty id list");
} }
for(Long id:ids){ for(Long id:ids){
redisCacheKeys.add(RedisKey.SYS_REGION_CACHE_PREFIX+id); redisCacheKeys.add(RedisKey.SYS_REGION_CACHE_PREFIX+id);
......
...@@ -3,10 +3,10 @@ package com.xxfc.platform.vehicle.biz; ...@@ -3,10 +3,10 @@ package com.xxfc.platform.vehicle.biz;
import com.ace.cache.annotation.Cache; import com.ace.cache.annotation.Cache;
import com.ace.cache.annotation.CacheClear; import com.ace.cache.annotation.CacheClear;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.xxfc.platform.vehicle.common.CustomIllegalParamException;
import com.xxfc.platform.vehicle.constant.ResCode.ResCode; import com.xxfc.platform.vehicle.constant.ResCode.ResCode;
import com.xxfc.platform.vehicle.entity.VehicleBookHourInfo; import com.xxfc.platform.vehicle.entity.VehicleBookHourInfo;
import com.xxfc.platform.vehicle.mapper.VehicleBookHourInfoMapper; import com.xxfc.platform.vehicle.mapper.VehicleBookHourInfoMapper;
...@@ -44,10 +44,10 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V ...@@ -44,10 +44,10 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V
//判定时间是否合法 //判定时间是否合法
if (bookStartDate.compareTo(DateTime.now().toString(DEFAULT_DATE_TIME_FORMATTER)) < 0) { if (bookStartDate.compareTo(DateTime.now().toString(DEFAULT_DATE_TIME_FORMATTER)) < 0) {
throw new CustomIllegalParamException(ResultCode.getMsg(ResultCode.ONLY_BOOK_FROM_TODAY)); throw new BaseException(ResultCode.getMsg(ResultCode.ONLY_BOOK_FROM_TODAY));
} }
if (bookStartDate.compareTo(bookEndDate) > 0) { if (bookStartDate.compareTo(bookEndDate) > 0) {
throw new CustomIllegalParamException("预定开始日期不能大于结束日期!"); throw new BaseException("预定开始日期不能大于结束日期!");
} }
Map<String, Integer> predictableHours = Maps.newHashMap(); Map<String, Integer> predictableHours = Maps.newHashMap();
//预定开始小时 //预定开始小时
......
...@@ -12,7 +12,6 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO; ...@@ -12,7 +12,6 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.xxfc.platform.vehicle.common.CustomIllegalParamException;
import com.xxfc.platform.vehicle.common.RestResponse; import com.xxfc.platform.vehicle.common.RestResponse;
import com.xxfc.platform.vehicle.constant.BookType; import com.xxfc.platform.vehicle.constant.BookType;
import com.xxfc.platform.vehicle.constant.RedisKey; import com.xxfc.platform.vehicle.constant.RedisKey;
...@@ -273,7 +272,7 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic ...@@ -273,7 +272,7 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic
if(params.get("selectedMonth") != null) { if(params.get("selectedMonth") != null) {
String selectedMonth = (String)params.get("selectedMonth"); String selectedMonth = (String)params.get("selectedMonth");
if(StringUtils.isBlank(selectedMonth)){ if(StringUtils.isBlank(selectedMonth)){
throw new CustomIllegalParamException(" no month selected "); throw new BaseException(" no month selected ");
} }
DateTime selectedMonthDate = DateTime.parse(selectedMonth,YEARMONTH_DATE_TIME_FORMATTER); DateTime selectedMonthDate = DateTime.parse(selectedMonth,YEARMONTH_DATE_TIME_FORMATTER);
if(selectedMonthDate.compareTo(DateTime.now().plusMonths(-1).withDayOfMonth(1).withMillisOfDay(0)) < 0){ if(selectedMonthDate.compareTo(DateTime.now().plusMonths(-1).withDayOfMonth(1).withMillisOfDay(0)) < 0){
......
...@@ -9,16 +9,12 @@ import com.xxfc.platform.vehicle.biz.VehiclePlatCataBiz; ...@@ -9,16 +9,12 @@ import com.xxfc.platform.vehicle.biz.VehiclePlatCataBiz;
import com.xxfc.platform.vehicle.common.RestResponse; import com.xxfc.platform.vehicle.common.RestResponse;
import com.xxfc.platform.vehicle.common.VehicleBaseController; import com.xxfc.platform.vehicle.common.VehicleBaseController;
import com.xxfc.platform.vehicle.entity.VehiclePlatCata; import com.xxfc.platform.vehicle.entity.VehiclePlatCata;
import com.xxfc.platform.vehicle.pojo.*; import com.xxfc.platform.vehicle.pojo.Cascade;
import lombok.Data; import com.xxfc.platform.vehicle.pojo.CataVo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Update;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import sun.java2d.pipe.AATextRenderer;
import java.util.Arrays;
@RestController @RestController
@RequestMapping("/cata") @RequestMapping("/cata")
...@@ -225,7 +221,7 @@ public class VehicleCataController extends VehicleBaseController<VehiclePlatCata ...@@ -225,7 +221,7 @@ public class VehicleCataController extends VehicleBaseController<VehiclePlatCata
return RestResponse.data(baseBiz.getByPage(vehiclePageQueryVo)); return RestResponse.data(baseBiz.getByPage(vehiclePageQueryVo));
} catch (JSONException ex) { } catch (JSONException ex) {
return RestResponse.code(ResCode.INVALID_REST_REQ_PARAM.getCode()); return RestResponse.code(ResCode.INVALID_REST_REQ_PARAM.getCode());
} catch (CustomIllegalParamException ex) { } catch (BaseException ex) {
return RestResponse.code(ResCode.INVALID_REST_REQ_PARAM.getCode()); return RestResponse.code(ResCode.INVALID_REST_REQ_PARAM.getCode());
} }
}*/ }*/
......
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