Commit 692b1cc8 authored by 周健威's avatar 周健威

修改提示语

parent 30d598f3
...@@ -22,6 +22,7 @@ import com.xxfc.platform.vehicle.feign.VehicleFeign; ...@@ -22,6 +22,7 @@ import com.xxfc.platform.vehicle.feign.VehicleFeign;
import com.xxfc.platform.vehicle.pojo.BookVehicleVO; import com.xxfc.platform.vehicle.pojo.BookVehicleVO;
import com.xxfc.platform.vehicle.pojo.CompanyDetail; import com.xxfc.platform.vehicle.pojo.CompanyDetail;
import com.xxfc.platform.vehicle.pojo.vo.VehicleVO; import com.xxfc.platform.vehicle.pojo.vo.VehicleVO;
import lombok.extern.slf4j.Slf4j;
import org.mockito.internal.util.collections.Sets; import org.mockito.internal.util.collections.Sets;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -46,6 +47,7 @@ import static com.xxfc.platform.vehicle.entity.Vehicle.STATE_DOWN; ...@@ -46,6 +47,7 @@ import static com.xxfc.platform.vehicle.entity.Vehicle.STATE_DOWN;
* @date 2020-10-31 11:02:42 * @date 2020-10-31 11:02:42
*/ */
@Service @Service
@Slf4j
public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> { public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> {
...@@ -104,8 +106,12 @@ public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> { ...@@ -104,8 +106,12 @@ public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> {
} }
//判断车辆是否下架、是否已经存在一个特惠租车 //判断车辆是否下架、是否已经存在一个特惠租车
if(STATE_DOWN == vehicle.getStatus() || checkHasSpecialRent(vehicle.getId())) { if(STATE_DOWN == vehicle.getStatus() ) {
throw new BaseException(ResultCode.PARAM_ILLEGAL_CODE); throw new BaseException("车辆已下架", ResultCode.PARAM_ILLEGAL_CODE);
}
if(checkHasSpecialRent(vehicle.getId()) ) {
throw new BaseException("车辆已被占用", ResultCode.PARAM_ILLEGAL_CODE);
} }
//设置当前经营门店为停靠门店、品牌id、型号id //设置当前经营门店为停靠门店、品牌id、型号id
...@@ -124,7 +130,7 @@ public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> { ...@@ -124,7 +130,7 @@ public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> {
DateTime afterDateTime = DateUtil.offsetHour(DateUtil.date(), 1); DateTime afterDateTime = DateUtil.offsetHour(DateUtil.date(), 1);
if(!startDateTime.isAfterOrEquals(afterDateTime)) { if(!startDateTime.isAfterOrEquals(afterDateTime)) {
throw new BaseException(ResultCode.FAILED_CODE, Sets.newSet("请提前一小时特惠租车发布")); throw new BaseException("请提前一小时特惠租车发布", ResultCode.FAILED_CODE);
} }
if(null != specialRent.getStartCompanyId()) { if(null != specialRent.getStartCompanyId()) {
...@@ -191,6 +197,7 @@ public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> { ...@@ -191,6 +197,7 @@ public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> {
setId(vehicle.getId()); setId(vehicle.getId());
setState(STATE_DOWN); setState(STATE_DOWN);
}}); }});
log.info("设置车辆下架: {} restResponse: {}", vehicle.getId(), JSONUtil.toJsonStr(restResponse));
} }
Date endDateTime = DateUtil.date(specialRent.getEndTime()); Date endDateTime = DateUtil.date(specialRent.getEndTime());
......
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