Commit 5b8f0697 by wangli

修改

1 parent b19d56ed
...@@ -2,6 +2,8 @@ package com.dituhui.pea.order.controller; ...@@ -2,6 +2,8 @@ package com.dituhui.pea.order.controller;
import com.dituhui.pea.common.BusinessException; import com.dituhui.pea.common.BusinessException;
import com.dituhui.pea.common.Result; import com.dituhui.pea.common.Result;
import com.dituhui.pea.order.dto.BusinessServiceBlockAddReqDTO;
import com.dituhui.pea.order.dto.BusinessServiceBlockRemoveReqDTO;
import com.dituhui.pea.order.service.BusinessBlockService; import com.dituhui.pea.order.service.BusinessBlockService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -48,11 +50,11 @@ public class BusinessBlockController { ...@@ -48,11 +50,11 @@ public class BusinessBlockController {
* @return * @return
*/ */
@PostMapping("/business/service/block/add") @PostMapping("/business/service/block/add")
public Result<?> businessServiceBlockAdd(@RequestParam String layerId, @RequestParam String teamId) { public Result<?> businessServiceBlockAdd(@RequestBody BusinessServiceBlockAddReqDTO req) {
// 新增服务范围 // 新增服务范围
Result<?> res = null; Result<?> res = null;
try { try {
res = businessBlockService.businessServiceBlockAdd(layerId, teamId); res = businessBlockService.businessServiceBlockAdd(req.getLayerId(), req.getTeamId());
} catch (BusinessException e) { } catch (BusinessException e) {
return Result.failed(e.getMessage()); return Result.failed(e.getMessage());
} }
...@@ -66,11 +68,11 @@ public class BusinessBlockController { ...@@ -66,11 +68,11 @@ public class BusinessBlockController {
* @return * @return
*/ */
@PostMapping("/business/service/block/remove") @PostMapping("/business/service/block/remove")
public Result<?> businessServiceBlockRemove(@RequestParam String id) { public Result<?> businessServiceBlockRemove(@RequestBody BusinessServiceBlockRemoveReqDTO req) {
// 删除服务范围 // 删除服务范围
Result<?> res = null; Result<?> res = null;
try { try {
res = businessBlockService.businessServiceBlockRemove(id); res = businessBlockService.businessServiceBlockRemove(req.getId());
} catch (BusinessException e) { } catch (BusinessException e) {
return Result.failed(e.getMessage()); return Result.failed(e.getMessage());
} }
......
package com.dituhui.pea.order.dto;
import lombok.Data;
@Data
public class BusinessServiceBlockAddReqDTO {
private String layerId;
private String teamId;
}
package com.dituhui.pea.order.dto;
import lombok.Data;
@Data
public class BusinessServiceBlockRemoveReqDTO {
private String id;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!