提交 8026a771 authored 作者: aiqingguo's avatar aiqingguo

承运同步

上级 3a2c45ee
...@@ -9,10 +9,11 @@ public interface TransportService { ...@@ -9,10 +9,11 @@ public interface TransportService {
ThirdOrderChildBrokerResultVO orderChildSync(ThirdOrderChildBrokerParam param); ThirdOrderChildBrokerResultVO orderChildSync(ThirdOrderChildBrokerParam param);
void ownerLegalSync(OwnerLegalSyncParam param); Integer ownerLegalSync(OwnerLegalSyncParam param);
void ownerPersonalSync(OwnerPersonalSyncParam param); Integer ownerPersonalSync(OwnerPersonalSyncParam param);
boolean ownerExistCheck(String mobile); boolean ownerExistCheck(String mobile);
Integer getOwnerId(String mobile);
} }
...@@ -29,16 +29,16 @@ public class TransportServiceImpl implements TransportService { ...@@ -29,16 +29,16 @@ public class TransportServiceImpl implements TransportService {
} }
@Override @Override
public void ownerLegalSync(OwnerLegalSyncParam param) { public Integer ownerLegalSync(OwnerLegalSyncParam param) {
Optional.ofNullable(transportFeignService.ownerLegalSync(param)) return Optional.ofNullable(transportFeignService.ownerLegalSync(param))
.filter(Result::succeed).orElseThrow(ResultCodeEnum.FAIL); .filter(Result::succeed).orElseThrow(ResultCodeEnum.FAIL).getData();
} }
@Override @Override
public void ownerPersonalSync(OwnerPersonalSyncParam param) { public Integer ownerPersonalSync(OwnerPersonalSyncParam param) {
Optional.ofNullable(transportFeignService.ownerPersonalSync(param)) return Optional.ofNullable(transportFeignService.ownerPersonalSync(param))
.filter(Result::succeed).orElseThrow(ResultCodeEnum.FAIL); .filter(Result::succeed).orElseThrow(ResultCodeEnum.FAIL).getData();
} }
...@@ -49,4 +49,11 @@ public class TransportServiceImpl implements TransportService { ...@@ -49,4 +49,11 @@ public class TransportServiceImpl implements TransportService {
} }
@Override
public Integer getOwnerId(String mobile) {
return Optional.ofNullable(transportFeignService.getOwnerId(mobile))
.filter(Result::succeed).orElseThrow(ResultCodeEnum.FAIL).getData();
}
} }
...@@ -24,21 +24,30 @@ public interface TransportFeignService { ...@@ -24,21 +24,30 @@ public interface TransportFeignService {
/** /**
* 货主同步(法人模式) * 货主同步(法人模式)
* @return 货主用户id
*/ */
@RequestMapping(value = "/ownerLegalSync", method = RequestMethod.POST) @RequestMapping(value = "/ownerLegalSync", method = RequestMethod.POST)
Result ownerLegalSync(@RequestBody OwnerLegalSyncParam param); Result<Integer> ownerLegalSync(@RequestBody OwnerLegalSyncParam param);
/** /**
* 货主同步(自然人模式) * 货主同步(自然人模式)
* @return 货主用户id
*/ */
@RequestMapping(value = "/ownerPersonalSync", method = RequestMethod.POST) @RequestMapping(value = "/ownerPersonalSync", method = RequestMethod.POST)
Result ownerPersonalSync(@RequestBody OwnerPersonalSyncParam param); Result<Integer> ownerPersonalSync(@RequestBody OwnerPersonalSyncParam param);
/** /**
* 检测货主是否注册 * 检测货主是否注册
* @return 1存在 2不存在 * @return 0不存在 1存在
*/ */
@RequestMapping(value = "/ownerExistCheck", method = RequestMethod.POST) @RequestMapping(value = "/ownerExistCheck", method = RequestMethod.POST)
Result<Integer> ownerExistCheck(@Validated @NotBlank(message = "手机不能为空") String mobile); Result<Integer> ownerExistCheck(@Validated @NotBlank(message = "手机不能为空") String mobile);
/**
* 获取货主用户id
* @Return null未注册
*/
@RequestMapping(value = "/getOwnerId", method = RequestMethod.POST)
Result<Integer> getOwnerId(@Validated @NotBlank(message = "手机不能为空") String mobile);
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论