|
|
@@ -3,6 +3,7 @@ package com.aoyang.tms.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.aoyang.tms.common.ErrCodeEnum;
|
|
|
+import com.aoyang.tms.entity.WorkSpot;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
@@ -98,4 +99,24 @@ public class ShipperController {
|
|
|
|
|
|
return new Result<>(shipperService.save(param));
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "删除托运方", notes = "根据id删除,参数:id")
|
|
|
+ @PostMapping("/delete")
|
|
|
+ public Result delete(@RequestBody Shipper param) {
|
|
|
+ log.info("删除托运方,调用/tms/shipper/delete,参数:{}", JSON.toJSONString(param));
|
|
|
+ if (param == null || param.getShipperId() == null) {
|
|
|
+ return new Result<>(ErrCodeEnum.BAD_PARAM.getCode(), ErrCodeEnum.BAD_PARAM.getMessage());
|
|
|
+ }
|
|
|
+ return new Result<>(shipperService.removeById(param));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "根据id获取托运方详情", notes = "必传参数:id")
|
|
|
+ @PostMapping("/get_one")
|
|
|
+ public Result getOne(@RequestBody Shipper param) {
|
|
|
+ log.info("根据id获取托运方详情,调用/tms/shipper/get_one,参数:{}", JSON.toJSONString(param));
|
|
|
+ if (param == null || param.getShipperId() == null) {
|
|
|
+ return new Result<>(ErrCodeEnum.BAD_PARAM.getCode(), ErrCodeEnum.BAD_PARAM.getMessage());
|
|
|
+ }
|
|
|
+ return new Result<>(shipperService.getById(param));
|
|
|
+ }
|
|
|
}
|