diff --git a/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/admins/AdminOrderReturnController.java b/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/admins/AdminOrderReturnController.java index fd4bd286a..625b341fe 100644 --- a/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/admins/AdminOrderReturnController.java +++ b/order/order-application/src/main/java/cn/iocoder/mall/order/application/controller/admins/AdminOrderReturnController.java @@ -10,10 +10,7 @@ import io.swagger.annotations.Api; import org.apache.dubbo.config.annotation.Reference; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; /** * 订单退货 @@ -35,4 +32,10 @@ public class AdminOrderReturnController { OrderReturnQueryDTO queryDTO = OrderReturnConvert.INSTANCE.convert(queryPO); return orderReturnService.orderReturnList(queryDTO); } + + @PostMapping("agree") + public CommonResult agree(@RequestParam("id") Integer id) { + CommonResult commonResult = orderReturnService.agree(id); + return commonResult; + } } diff --git a/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/exception/OrderReturnNonExistentException.java b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/exception/OrderReturnNonExistentException.java new file mode 100644 index 000000000..b07ff29e6 --- /dev/null +++ b/order/order-service-api/src/main/java/cn/iocoder/mall/order/api/exception/OrderReturnNonExistentException.java @@ -0,0 +1,10 @@ +package cn.iocoder.mall.order.api.exception; + +/** + * 订单退回 - 不存在 + * + * @author Sin + * @time 2019/5/8 6:17 PM + */ +public class OrderReturnNonExistentException { +} diff --git a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dao/OrderReturnMapper.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dao/OrderReturnMapper.java index 5efbf3c62..ea25d903e 100644 --- a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dao/OrderReturnMapper.java +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/dao/OrderReturnMapper.java @@ -57,4 +57,12 @@ public interface OrderReturnMapper { * @return */ List selectList(OrderReturnQueryDTO queryDTO); + + /** + * 查询 - 根据 id 查询 + * + * @param id + * @return + */ + OrderReturnDO selectById(Integer id); } diff --git a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderReturnServiceImpl.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderReturnServiceImpl.java index b723581fe..4e354e14c 100644 --- a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderReturnServiceImpl.java +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderReturnServiceImpl.java @@ -140,4 +140,13 @@ public class OrderReturnServiceImpl implements OrderReturnService { .setTotalCount(totalCount) ); } + + @Override + public CommonResult agree(Integer id) { + OrderReturnDO orderReturnDO = orderReturnMapper.selectById(id); + if (orderReturnDO == null) { + + } + return null; + } } diff --git a/order/order-service-impl/src/main/resources/mapper/OrderReturnMapper.xml b/order/order-service-impl/src/main/resources/mapper/OrderReturnMapper.xml index d7c92bb6b..d760bf025 100644 --- a/order/order-service-impl/src/main/resources/mapper/OrderReturnMapper.xml +++ b/order/order-service-impl/src/main/resources/mapper/OrderReturnMapper.xml @@ -145,4 +145,14 @@ LIMIT #{limitIndex}, #{pageSize} + + +