Commit 0b7ec32d authored by hanfeng's avatar hanfeng

Merge remote-tracking branch 'origin/base-modify' into base-modify

parents ead5c9ca 22693ca9
......@@ -149,10 +149,7 @@ public class BackStageOrderController extends CommonBaseController implements Us
}
if (StringUtils.isNotBlank(orderPageVO.getOrderRentVehicleDetail().getMyDriverIds())) {
try {
QueryMultiDTO queryMultiDTO = new QueryMultiDTO();
queryMultiDTO.setIds(orderPageVO.getOrderRentVehicleDetail().getMyDriverIds());
List<VehicleUserLicense> orderUserLicenses = vehicleFeign.multi(queryMultiDTO).getData();
List<VehicleUserLicense> orderUserLicenses = vehicleFeign.getVehicleLicenseList(orderPageVO.getOrderRentVehicleDetail().getMyDriverIds()).getData();
if (orderUserLicenses != null && orderUserLicenses.size() > 0) {
OrderVehicleCrosstownDto orderVehicleCrosstownDto = new OrderVehicleCrosstownDto();
orderVehicleCrosstownDto.setLicenseIdCard(orderUserLicenses.get(0).getIdCard());
......@@ -163,6 +160,7 @@ public class BackStageOrderController extends CommonBaseController implements Us
}
} catch (Exception e) {
log.info("获取驾驶人信息失败!");
e.printStackTrace();
}
}
......
......@@ -119,7 +119,7 @@ public interface TourFeign {
ObjectRestResponse getOne(@PathVariable Integer id);
//首页旅游列表
@GetMapping(value = "/gw/app/shopList")
@GetMapping(value = "/gw/shopList")
List<GoodDataVO> goodListAll(@RequestParam(value = "page", defaultValue = "1") Integer page,
@RequestParam(value = "limit",defaultValue = "4") Integer limit);
......
......@@ -83,8 +83,12 @@ public interface VehicleFeign {
@RequestMapping(value = "/user/license/company/getOne", method = RequestMethod.GET)
public RestResponse<VehicleUserLicense> getOne(
@RequestParam(value="id",defaultValue="0")Integer id) throws Exception ;
@RequestMapping(value = "/user/license/multi", method = RequestMethod.GET)
public ObjectRestResponse<List<VehicleUserLicense>> multi(QueryMultiDTO dto) throws Exception;
public ObjectRestResponse<List<VehicleUserLicense>> multi(@RequestBody QueryMultiDTO dto) throws Exception;
@GetMapping("/user/license/getVehicleLicenseList")
public ObjectRestResponse<List<VehicleUserLicense>> getVehicleLicenseList(@RequestParam(value="ids") String ids);
/**
* 获取优质车型接口
......
......@@ -15,10 +15,12 @@ import com.xxfc.platform.vehicle.pojo.VehicleUserLicenseVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.*;
import tk.mybatis.mapper.entity.Example;
import tk.mybatis.mapper.weekend.WeekendSqls;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
......@@ -70,12 +72,32 @@ public class VehicleLicenseController extends VehicleBaseController<VehicleLicen
@RequestMapping(value = "/license/multi", method = RequestMethod.GET)
public ObjectRestResponse<List<VehicleUserLicense>> multi(QueryMultiDTO dto) throws Exception {
// BaseContextHandler.getUserID()
log.info("获取驾驶人信息:", dto.toString());
List<VehicleUserLicense> list = baseBiz.selectByExample(new Example.Builder(VehicleUserLicense.class)
.where(WeekendSqls.<VehicleUserLicense>custom()
.andIn(VehicleUserLicense::getId, Arrays.asList(dto.getIds().split(",")))).build());
return ObjectRestResponse.succ().data(list);
}
@GetMapping("/license/getVehicleLicenseList")
public ObjectRestResponse<List<VehicleUserLicense>> getVehicleLicenseList(String ids){
// BaseContextHandler.getUserID()
log.info("获取驾驶人信息:", ids);
List<VehicleUserLicense> list = new ArrayList<>();
if(StringUtils.isNotBlank(ids)) {
List<String> idList = Arrays.asList(ids.split(","));
for(String id : idList) {
VehicleUserLicense vehicleUserLicense = baseBiz.selectById(id);
if(vehicleUserLicense != null) {
list.add(vehicleUserLicense);
}
}
}
return ObjectRestResponse.succ().data(list);
}
@RequestMapping(value = "/license/del", method = RequestMethod.GET)
public RestResponse del(
@RequestParam(value="id",defaultValue="0")Integer id) throws Exception {
......
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