提交 3b912581 authored 作者: aiqingguo's avatar aiqingguo

承运同步

上级 4320d4cf
package com.clx.performance.vo.feign.transport;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import java.util.List;
@Getter
@Setter
@ToString
@NoArgsConstructor
public class ThirdOrderChildBrokerResultVO {
@ApiModelProperty(value = "风控结果列表,空未风控")
private List<RiskItem> riskList;
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public static class RiskItem {
@ApiModelProperty(value = "类型", example = "PRICE_LOW")
private String type;
@ApiModelProperty(value = "风控原因", example = "运费单价过低")
private String msg;
}
}
...@@ -3,10 +3,11 @@ package com.clx.performance.extranal.transport; ...@@ -3,10 +3,11 @@ package com.clx.performance.extranal.transport;
import com.clx.performance.param.feign.transport.OwnerLegalSyncParam; import com.clx.performance.param.feign.transport.OwnerLegalSyncParam;
import com.clx.performance.param.feign.transport.OwnerPersonalSyncParam; import com.clx.performance.param.feign.transport.OwnerPersonalSyncParam;
import com.clx.performance.param.feign.transport.ThirdOrderChildBrokerParam; import com.clx.performance.param.feign.transport.ThirdOrderChildBrokerParam;
import com.clx.performance.vo.feign.transport.ThirdOrderChildBrokerResultVO;
public interface TransportService { public interface TransportService {
void orderChildSync(ThirdOrderChildBrokerParam param); ThirdOrderChildBrokerResultVO orderChildSync(ThirdOrderChildBrokerParam param);
void ownerLegalSync(OwnerLegalSyncParam param); void ownerLegalSync(OwnerLegalSyncParam param);
......
...@@ -5,6 +5,7 @@ import com.clx.performance.feign.TransportFeignService; ...@@ -5,6 +5,7 @@ import com.clx.performance.feign.TransportFeignService;
import com.clx.performance.param.feign.transport.OwnerLegalSyncParam; import com.clx.performance.param.feign.transport.OwnerLegalSyncParam;
import com.clx.performance.param.feign.transport.OwnerPersonalSyncParam; import com.clx.performance.param.feign.transport.OwnerPersonalSyncParam;
import com.clx.performance.param.feign.transport.ThirdOrderChildBrokerParam; import com.clx.performance.param.feign.transport.ThirdOrderChildBrokerParam;
import com.clx.performance.vo.feign.transport.ThirdOrderChildBrokerResultVO;
import com.msl.common.base.Optional; import com.msl.common.base.Optional;
import com.msl.common.enums.ResultCodeEnum; import com.msl.common.enums.ResultCodeEnum;
import com.msl.common.result.Result; import com.msl.common.result.Result;
...@@ -21,9 +22,9 @@ public class TransportServiceImpl implements TransportService { ...@@ -21,9 +22,9 @@ public class TransportServiceImpl implements TransportService {
@Override @Override
public void orderChildSync(ThirdOrderChildBrokerParam param) { public ThirdOrderChildBrokerResultVO orderChildSync(ThirdOrderChildBrokerParam param) {
Optional.ofNullable(transportFeignService.orderChildSync(param)) return Optional.ofNullable(transportFeignService.orderChildSync(param))
.filter(Result::succeed).orElseThrow(ResultCodeEnum.FAIL); .filter(Result::succeed).orElseThrow(ResultCodeEnum.FAIL).getData();
} }
......
...@@ -3,6 +3,7 @@ package com.clx.performance.feign; ...@@ -3,6 +3,7 @@ package com.clx.performance.feign;
import com.clx.performance.param.feign.transport.OwnerLegalSyncParam; import com.clx.performance.param.feign.transport.OwnerLegalSyncParam;
import com.clx.performance.param.feign.transport.OwnerPersonalSyncParam; import com.clx.performance.param.feign.transport.OwnerPersonalSyncParam;
import com.clx.performance.param.feign.transport.ThirdOrderChildBrokerParam; import com.clx.performance.param.feign.transport.ThirdOrderChildBrokerParam;
import com.clx.performance.vo.feign.transport.ThirdOrderChildBrokerResultVO;
import com.msl.common.result.Result; import com.msl.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
...@@ -19,7 +20,7 @@ public interface TransportFeignService { ...@@ -19,7 +20,7 @@ public interface TransportFeignService {
* 运单同步 * 运单同步
*/ */
@RequestMapping(value = "/transport-service/feign/order/orderChildSync", method = RequestMethod.POST) @RequestMapping(value = "/transport-service/feign/order/orderChildSync", method = RequestMethod.POST)
Result orderChildSync(@RequestBody ThirdOrderChildBrokerParam param); Result<ThirdOrderChildBrokerResultVO> orderChildSync(@RequestBody ThirdOrderChildBrokerParam param);
/** /**
* 货主同步(法人模式) * 货主同步(法人模式)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论