5 changed files with 103 additions and 12 deletions
@ -0,0 +1,49 @@ |
|||||||
|
package com.logpm.datasharing.controller; |
||||||
|
|
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import org.springblade.core.boot.ctrl.BladeController; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
|
/** |
||||||
|
* 物流订单/运单信息查询接口 |
||||||
|
|
||||||
|
* <li>1.包含运单的运输作业节点信息</li> |
||||||
|
* <li>2.包含订单的运输作业节点信息</li> |
||||||
|
* <li>3.该接口需要对外开发查询</li> |
||||||
|
* <li>4.需要考虑该接口对同一IP的流量管控</li> |
||||||
|
* |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("/search") |
||||||
|
@Api(value = "运单/订单查询", tags = "运单/订单查询") |
||||||
|
public class LogpmDataSearchController extends BladeController { |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 订单/运单搜索 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@GetMapping("/data/${type}/${order}") |
||||||
|
public R data(@PathVariable("order") String order){ |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return null; |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
@ -0,0 +1,12 @@ |
|||||||
|
package com.logpm.datasharing.service; |
||||||
|
|
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
|
||||||
|
/** |
||||||
|
* 数据擦或许 |
||||||
|
*/ |
||||||
|
public interface ILogpmDataSearchService { |
||||||
|
|
||||||
|
R data(String type, String order); |
||||||
|
|
||||||
|
} |
@ -0,0 +1,42 @@ |
|||||||
|
package com.logpm.datasharing.service.impl; |
||||||
|
|
||||||
|
import com.logpm.datasharing.service.ILogpmDataSearchService; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
@Service |
||||||
|
public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { |
||||||
|
@Override |
||||||
|
public R data(String type, String order) { |
||||||
|
|
||||||
|
|
||||||
|
// 判断type类型
|
||||||
|
switch (type) { |
||||||
|
case "order": |
||||||
|
// 订单查询
|
||||||
|
return dataOrder(order); |
||||||
|
|
||||||
|
case "waybill": |
||||||
|
// 运单查询
|
||||||
|
break; |
||||||
|
default: |
||||||
|
// 需要没有参数的查询全部的情况
|
||||||
|
return R.fail("参数错误"); |
||||||
|
} |
||||||
|
|
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
private R dataOrder(String order) { |
||||||
|
|
||||||
|
// 通过订单查询站存单导入时间
|
||||||
|
|
||||||
|
|
||||||
|
// 导入
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
return null; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue