Commit eb94c37b authored by hezhen's avatar hezhen

123

parent f0edb061
...@@ -63,6 +63,17 @@ public class VehicleDaysPriceBiz extends BaseBiz<VehicleDaysPriceMapper, Vehicle ...@@ -63,6 +63,17 @@ public class VehicleDaysPriceBiz extends BaseBiz<VehicleDaysPriceMapper, Vehicle
} }
public VehicleDaysPrice getInfoV2(String vehicleId){
Example example = new Example(VehicleDaysPrice.class);
example.createCriteria().andEqualTo("vehicleId",vehicleId).andEqualTo("isDel",0);
List<VehicleDaysPrice> list = selectByExample(example);
if (list.size() > 0){
return list.get(0);
}
return null;
}
public List<VehicleDaysPriceVo> getListByVehicleId(String vehicleId){ public List<VehicleDaysPriceVo> getListByVehicleId(String vehicleId){
VehicleDaysPrice vehicleDaysPrice = getInfo(vehicleId); VehicleDaysPrice vehicleDaysPrice = getInfo(vehicleId);
List<VehicleDaysPriceVo> priceVos = null; List<VehicleDaysPriceVo> priceVos = null;
......
...@@ -6,12 +6,15 @@ import com.github.wxiaoqi.security.common.util.process.ResultCode; ...@@ -6,12 +6,15 @@ import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.vehicle.aop.GlobalLog; import com.xxfc.platform.vehicle.aop.GlobalLog;
import com.xxfc.platform.vehicle.biz.VehicleApplyBiz; import com.xxfc.platform.vehicle.biz.VehicleApplyBiz;
import com.xxfc.platform.vehicle.biz.VehicleBiz; import com.xxfc.platform.vehicle.biz.VehicleBiz;
import com.xxfc.platform.vehicle.biz.VehicleDaysPriceBiz;
import com.xxfc.platform.vehicle.entity.Vehicle; import com.xxfc.platform.vehicle.entity.Vehicle;
import com.xxfc.platform.vehicle.entity.VehicleApply;
import com.xxfc.platform.vehicle.pojo.dto.VehicleFindDTO; import com.xxfc.platform.vehicle.pojo.dto.VehicleFindDTO;
import com.xxfc.platform.vehicle.pojo.vo.VehicleVO; import com.xxfc.platform.vehicle.pojo.vo.VehicleVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
...@@ -26,6 +29,10 @@ import java.util.List; ...@@ -26,6 +29,10 @@ import java.util.List;
public class AppVehicleController extends BaseController<VehicleBiz> { public class AppVehicleController extends BaseController<VehicleBiz> {
@Autowired
VehicleDaysPriceBiz vehicleDaysPriceBiz;
...@@ -81,6 +88,23 @@ public class AppVehicleController extends BaseController<VehicleBiz> { ...@@ -81,6 +88,23 @@ public class AppVehicleController extends BaseController<VehicleBiz> {
@PostMapping("setDaysPrice")
@ApiModelProperty("设置价格")
public ObjectRestResponse setDaysPrice(@RequestBody VehicleApply vehicle) {
baseBiz.addOrUpd(vehicle);
return ObjectRestResponse.succ();
}
@GetMapping("daysPriceInfo")
@ApiModelProperty("商品详情")
public ObjectRestResponse info(@RequestParam(value = "vehicleId")String vehicleId) {
return ObjectRestResponse.succ(vehicleDaysPriceBiz.getInfoV2(vehicleId));
}
......
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