From d9bd2f5f801347744f27b33536c13039a52fc789 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 07 五月 2025 15:31:09 +0800
Subject: [PATCH] 1.MapperScan 2.代码生成器
---
src/main/java/com/ruoyi/basic/controller/CustomerController.java | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/ruoyi/basic/controller/CustomerController.java b/src/main/java/com/ruoyi/basic/controller/CustomerController.java
index c671b72..1a81652 100644
--- a/src/main/java/com/ruoyi/basic/controller/CustomerController.java
+++ b/src/main/java/com/ruoyi/basic/controller/CustomerController.java
@@ -5,8 +5,7 @@
import com.ruoyi.basic.pojo.Customer;
import com.ruoyi.basic.service.ICustomerService;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
+import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
@@ -30,15 +29,14 @@
*/
@RestController
@RequestMapping("/system/customer")
+@AllArgsConstructor
public class CustomerController extends BaseController
{
- @Autowired
private ICustomerService customerService;
/**
* 鏌ヨ瀹㈡埛妗f鍒楄〃
*/
- @PreAuthorize("@ss.hasPermi('system:customer:list')")
@GetMapping("/list")
public TableDataInfo list(Customer customer)
{
@@ -50,7 +48,6 @@
/**
* 瀵煎嚭瀹㈡埛妗f鍒楄〃
*/
- @PreAuthorize("@ss.hasPermi('system:customer:export')")
@Log(title = "瀹㈡埛妗f", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Customer customer)
@@ -63,7 +60,6 @@
/**
* 鑾峰彇瀹㈡埛妗f璇︾粏淇℃伅
*/
- @PreAuthorize("@ss.hasPermi('system:customer:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
@@ -73,9 +69,8 @@
/**
* 鏂板瀹㈡埛妗f
*/
- @PreAuthorize("@ss.hasPermi('system:customer:add')")
@Log(title = "瀹㈡埛妗f", businessType = BusinessType.INSERT)
- @PostMapping
+ @PostMapping ("/addCustomer")
public AjaxResult add(@RequestBody Customer customer)
{
return toAjax(customerService.insertCustomer(customer));
@@ -84,7 +79,6 @@
/**
* 淇敼瀹㈡埛妗f
*/
- @PreAuthorize("@ss.hasPermi('system:customer:edit')")
@Log(title = "瀹㈡埛妗f", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Customer customer)
@@ -95,7 +89,6 @@
/**
* 鍒犻櫎瀹㈡埛妗f
*/
- @PreAuthorize("@ss.hasPermi('system:customer:remove')")
@Log(title = "瀹㈡埛妗f", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
--
Gitblit v1.9.3