Browse Source

1.干线通过车次号获取 车辆配载信息

dist.1.3.0
zhenghaoyu 9 months ago
parent
commit
f9a487907b
  1. 19
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineCarsLoadClient.java
  2. 23
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineCarsLoadClient.java

19
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineCarsLoadClient.java

@ -0,0 +1,19 @@
package com.logpm.trunkline.feign;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
import org.springblade.common.constant.ModuleNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(
value = ModuleNameConstant.APPLICATION_TRUNKLINE_NAME
)
public interface ITrunklineCarsLoadClient {
String API_PREFIX = "trunklineCarsLoad/client";
@GetMapping(API_PREFIX+"/findEntityByCarsNo")
TrunklineCarsLoadEntity findEntityByCarsNo(@RequestParam String carsNo);
}

23
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineCarsLoadClient.java

@ -0,0 +1,23 @@
package com.logpm.trunkline.feign;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
import com.logpm.trunkline.service.ITrunklineCarsLoadService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@AllArgsConstructor
public class TrunklineCarsLoadClient implements ITrunklineCarsLoadClient{
private final ITrunklineCarsLoadService carsLoadService;
@Override
public TrunklineCarsLoadEntity findEntityByCarsNo(String carsNo) {
QueryWrapper<TrunklineCarsLoadEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("cars_no",carsNo);
return carsLoadService.getOne(queryWrapper);
}
}
Loading…
Cancel
Save