|
|
@@ -1,18 +1,22 @@
|
|
|
package com.dk.mdm.controller.sale;
|
|
|
|
|
|
+import com.dk.common.model.pojo.PageList;
|
|
|
+import com.dk.common.response.ResponseResultVO;
|
|
|
import com.dk.mdm.model.pojo.sale.Order;
|
|
|
-import com.dk.common.controller.BaseController;
|
|
|
import com.dk.common.service.BaseService;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import com.dk.mdm.model.query.sale.OrderQuery;
|
|
|
+import com.dk.mdm.model.response.sale.OrderResponse;
|
|
|
+import com.dk.mdm.model.vo.sale.OrderVO;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import com.dk.mdm.service.sale.OrderService;
|
|
|
|
|
|
@Api(tags = "销售订单API接口")
|
|
|
@RestController
|
|
|
-@RequestMapping("/order")
|
|
|
-public class OrderController{
|
|
|
+@RequestMapping("/sale/order")
|
|
|
+public class OrderController {
|
|
|
|
|
|
public BaseService<Order> getService() {
|
|
|
return orderService;
|
|
|
@@ -21,4 +25,47 @@ public class OrderController{
|
|
|
@Autowired
|
|
|
private OrderService orderService;
|
|
|
|
|
|
+ /**
|
|
|
+ * @desc : 条件查询
|
|
|
+ * @author : 付斌
|
|
|
+ * @date : 2023/1/9 10:36
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
|
|
|
+ @PostMapping({"list_by"})
|
|
|
+ public ResponseResultVO<PageList<OrderResponse>> selectByCond(@RequestBody OrderQuery orderQuery) {
|
|
|
+ return orderService.selectByCond(orderQuery);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 通过ID查询
|
|
|
+ * @author : 付斌
|
|
|
+ * @date : 2023/1/9 10:41
|
|
|
+ */
|
|
|
+ @PostMapping({"/{id}"})
|
|
|
+ public ResponseResultVO selectById(@PathVariable String id) {
|
|
|
+ return orderService.selectById(id);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 新建员工
|
|
|
+ * @author : 付斌
|
|
|
+ * @date : 2023/1/9 10:48
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "新建员工", notes = "新建员工")
|
|
|
+ @PostMapping({"insert"})
|
|
|
+ public ResponseResultVO<?> insert(@RequestBody OrderVO orderVO) {
|
|
|
+ return orderService.insert(orderVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 编辑员工
|
|
|
+ * @author : 付斌
|
|
|
+ * @date : 2023/1/9 10:49
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "编辑员工", notes = "编辑员工")
|
|
|
+ @PostMapping({"update"})
|
|
|
+ public ResponseResultVO<Boolean> update(@RequestBody OrderVO orderVO) {
|
|
|
+ return orderService.update(orderVO);
|
|
|
+ }
|
|
|
}
|