Commit 853e1b27 by wangli

完善

1 parent d36e3961
package com.dituhui.pea.order.controller; package com.dituhui.pea.order.controller;
import com.dituhui.pea.common.BusinessException;
import com.dituhui.pea.common.Result; import com.dituhui.pea.common.Result;
import com.dituhui.pea.order.dto.BusinessCustomLayerAddReqDTO; import com.dituhui.pea.order.dto.BusinessCustomLayerAddReqDTO;
import com.dituhui.pea.order.dto.BusinessCustomLayerUpdateReqDTO; import com.dituhui.pea.order.dto.BusinessCustomLayerUpdateReqDTO;
import com.dituhui.pea.order.service.BusinessLayerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -13,6 +16,9 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -13,6 +16,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
@RequestMapping("/pea-order") @RequestMapping("/pea-order")
public class BusinessLayerController { public class BusinessLayerController {
@Autowired
private BusinessLayerService businessLayerService;
/** /**
* 获取通用图层 * 获取通用图层
* *
...@@ -21,7 +27,13 @@ public class BusinessLayerController { ...@@ -21,7 +27,13 @@ public class BusinessLayerController {
@GetMapping("/business/layer/universal") @GetMapping("/business/layer/universal")
public Result<?> businessLayerUniversal() { public Result<?> businessLayerUniversal() {
// 通用图层 // 通用图层
return null; Result res = null;
try {
res = businessLayerService.businessLayerUniversal();
} catch (BusinessException e) {
return Result.failed(e.getMessage());
}
return res;
} }
/** /**
...@@ -36,7 +48,13 @@ public class BusinessLayerController { ...@@ -36,7 +48,13 @@ public class BusinessLayerController {
@GetMapping("/business/layer/custom/list") @GetMapping("/business/layer/custom/list")
public Result<?> businessCustomLayers(String levelType, String levelValue, long page, long size) { public Result<?> businessCustomLayers(String levelType, String levelValue, long page, long size) {
// 自定义图层列表 // 自定义图层列表
return null; Result res = null;
try {
res = businessLayerService.businessCustomLayers(levelType, levelValue, page, size);
} catch (BusinessException e) {
return Result.failed(e.getMessage());
}
return res;
} }
/** /**
...@@ -47,8 +65,13 @@ public class BusinessLayerController { ...@@ -47,8 +65,13 @@ public class BusinessLayerController {
*/ */
@GetMapping("/business/layer/custom/detail") @GetMapping("/business/layer/custom/detail")
public Result<?> businessCustomLayer(String layerId) { public Result<?> businessCustomLayer(String layerId) {
// 自定义图层详情 Result res = null;
return null; try {
res = businessLayerService.businessCustomLayer(layerId);
} catch (BusinessException e) {
return Result.failed(e.getMessage());
}
return res;
} }
/** /**
...@@ -63,7 +86,14 @@ public class BusinessLayerController { ...@@ -63,7 +86,14 @@ public class BusinessLayerController {
@PostMapping("/business/layer/custom/add") @PostMapping("/business/layer/custom/add")
public Result<?> businessCustomLayerAdd(@RequestBody BusinessCustomLayerAddReqDTO reqDTO) { public Result<?> businessCustomLayerAdd(@RequestBody BusinessCustomLayerAddReqDTO reqDTO) {
// 自定义图层新增 // 自定义图层新增
return null; Result res = null;
try {
res = businessLayerService.businessCustomLayerAdd(
reqDTO.getBranchId(), reqDTO.getLayerName(), reqDTO.getLayerDesc(), reqDTO.getSkills());
} catch (BusinessException e) {
return Result.failed(e.getMessage());
}
return res;
} }
/** /**
...@@ -77,7 +107,13 @@ public class BusinessLayerController { ...@@ -77,7 +107,13 @@ public class BusinessLayerController {
@PostMapping("/business/layer/custom/update") @PostMapping("/business/layer/custom/update")
public Result<?> businessCustomLayerUpdate(@RequestBody BusinessCustomLayerUpdateReqDTO reqDTO) { public Result<?> businessCustomLayerUpdate(@RequestBody BusinessCustomLayerUpdateReqDTO reqDTO) {
// 自定义图层修改 // 自定义图层修改
return null; Result res = null;
try {
res = businessLayerService.businessCustomLayerUpdate(reqDTO.getLayerId(), reqDTO.getLayerDesc(), reqDTO.getSkills());
} catch (BusinessException e) {
return Result.failed(e.getMessage());
}
return res;
} }
/** /**
...@@ -89,6 +125,12 @@ public class BusinessLayerController { ...@@ -89,6 +125,12 @@ public class BusinessLayerController {
@GetMapping("/business/layer/custom/remove") @GetMapping("/business/layer/custom/remove")
public Result<?> businessCustomLayerRemove(String layerId) { public Result<?> businessCustomLayerRemove(String layerId) {
// 自定义图层删除 // 自定义图层删除
return null; Result res = null;
try {
res = businessLayerService.businessCustomLayerRemove(layerId);
} catch (BusinessException e) {
return Result.failed(e.getMessage());
}
return res;
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!