From c7631c62aac9c97e80ed59ebb2eebd4a314e0784 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期五, 19 四月 2024 13:55:15 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/a1536384743/erp_-override
---
north-glass-erp/src/main/java/com/example/erp/controller/sd/CustomerController.java | 75 +++++++++++++++++++++++++++++++++++++
1 files changed, 75 insertions(+), 0 deletions(-)
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/sd/CustomerController.java b/north-glass-erp/src/main/java/com/example/erp/controller/sd/CustomerController.java
new file mode 100644
index 0000000..8c49ace
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/sd/CustomerController.java
@@ -0,0 +1,75 @@
+package com.example.erp.controller.sd;
+
+
+import com.example.erp.common.Constants;
+import com.example.erp.common.Result;
+import com.example.erp.entity.sd.Customer;
+import com.example.erp.entity.sd.Delivery;
+import com.example.erp.entity.sd.Order;
+import com.example.erp.entity.sd.OrderDetail;
+import com.example.erp.exception.ServiceException;
+import com.example.erp.service.sd.CustomerService;
+import com.example.erp.service.sd.DeliveryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@Api(value="瀹㈡埛controller",tags={"瀹㈡埛鎿嶄綔鎺ュ彛"})
+@RequestMapping("/customer")
+public class CustomerController {
+ @Autowired
+ CustomerService customerService;
+
+
+ /*鍙戣揣璁㈠崟鏌ヨ*/
+ @ApiOperation("瀹㈡埛鏌ヨ鎺ュ彛")
+ @PostMapping("/getSelectCustomer/{pageNum}/{pageSize}")
+ public Result getSelectShippingOrder(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody Customer customer){
+ return Result.seccess(customerService.getSelectCustomer(pageNum,pageSize,customer));
+ }
+
+ @ApiOperation("瀹㈡埛鏂板淇敼鎺ュ彛")
+ @PostMapping("/insertCustomer")
+ public Result insertCustomer( @RequestBody Map<String,Object> object){
+ if(customerService.insertCustomer(object)){
+
+ return Result.seccess();
+
+ }else {
+ throw new ServiceException(Constants.Code_500,"瀹㈡埛鏂板/淇敼澶辫触");
+
+ }
+ }
+
+ @ApiOperation("瀹㈡埛鍒犻櫎鎺ュ彛")
+ @PostMapping("/deleteCustomer")
+ public Result deleteCustomer( @RequestBody Map<String,Object> object){
+ if(customerService.deleteCustomer(object)){
+
+ return Result.seccess();
+
+ }else {
+ throw new ServiceException(Constants.Code_500,"瀹㈡埛鍒犻櫎澶辫触");
+
+ }
+ }
+
+ @ApiOperation("瀹㈡埛璁㈠崟鏌ヨ鎺ュ彛")
+ @PostMapping("/getSelectCustomerOderDate/{pageNum}/{pageSize}/{selectDate}")
+ public Result getSelectCustomerOderDate(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody OrderDetail orderDetail){
+ return Result.seccess(customerService.getSelectCustomerOderDate(pageNum,pageSize,selectDate,orderDetail));
+ }
+
+
+
+
+
+
+
+
+}
--
Gitblit v1.8.0