From 34a716e48e49743083953113bfc2e8011d52444f Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期一, 15 九月 2025 19:08:05 +0800
Subject: [PATCH] 日志修改
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/BaseTravelcityController.java | 60 ++++++++++++++++++++++++++++++++----------------------------
1 files changed, 32 insertions(+), 28 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/BaseTravelcityController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/BaseTravelcityController.java
index c81e15b..6fd9937 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/BaseTravelcityController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/BaseTravelcityController.java
@@ -11,6 +11,8 @@
import com.ruoyi.project.service.IBaseTravelcityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.aspectj.weaver.loadtime.Aj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@@ -20,15 +22,15 @@
/**
* 宸梾鍩庡競鍜岃ˉ璐存爣鍑咰ontroller
- *
+ *
* @author ruoyi
* @date 2023-04-23
*/
+@Slf4j
@Api("宸梾鍩庡競鍜岃ˉ璐存爣鍑�")
@RestController
@RequestMapping("/project/travelcity")
-public class BaseTravelcityController extends BaseController
-{
+public class BaseTravelcityController extends BaseController {
@Autowired
private IBaseTravelcityService baseTravelcityService;
@@ -36,10 +38,10 @@
* 鏌ヨ宸梾鍩庡競鍜岃ˉ璐存爣鍑嗗垪琛�
*/
@ApiOperation("鏌ヨ宸梾鍩庡競鍜岃ˉ璐存爣鍑嗗垪琛�")
- @PreAuthorize("@ss.hasPermi('project:travelcity:list')")
+ // @PreAuthorize("@ss.hasPermi('project:travelcity:list')")
@GetMapping("/list")
- public TableDataInfo list(BaseTravelcity baseTravelcity)
- {
+ public TableDataInfo list(BaseTravelcity baseTravelcity) {
+ log.info("鏌ヨ宸梾鍩庡競鍜岃ˉ璐存爣鍑嗗垪琛▄}锛�", baseTravelcity);
startPage();
List<BaseTravelcity> list = baseTravelcityService.queryList(baseTravelcity);
return getDataTable(list);
@@ -49,11 +51,11 @@
* 瀵煎嚭宸梾鍩庡競鍜岃ˉ璐存爣鍑嗗垪琛�
*/
@ApiOperation("瀵煎嚭宸梾鍩庡競鍜岃ˉ璐存爣鍑嗗垪琛�")
- @PreAuthorize("@ss.hasPermi('project:travelcity:export')")
+ // @PreAuthorize("@ss.hasPermi('project:travelcity:export')")
@Log(title = "宸梾鍩庡競鍜岃ˉ璐存爣鍑�", businessType = BusinessType.EXPORT)
@GetMapping("/export")
- public AjaxResult export(BaseTravelcity baseTravelcity)
- {
+ public AjaxResult export(BaseTravelcity baseTravelcity) {
+ log.info("瀵煎嚭宸梾鍩庡競鍜岃ˉ璐存爣鍑嗗垪琛▄}锛�", baseTravelcity);
List<BaseTravelcity> list = baseTravelcityService.queryList(baseTravelcity);
ExcelUtil<BaseTravelcity> util = new ExcelUtil<BaseTravelcity>(BaseTravelcity.class);
return util.exportExcel(list, "宸梾鍩庡競鍜岃ˉ璐存爣鍑嗘暟鎹�");
@@ -63,10 +65,10 @@
* 鑾峰彇宸梾鍩庡競鍜岃ˉ璐存爣鍑嗚缁嗕俊鎭�
*/
@ApiOperation("鑾峰彇宸梾鍩庡競鍜岃ˉ璐存爣鍑嗚缁嗕俊鎭�")
- @PreAuthorize("@ss.hasPermi('project:travelcity:query')")
+ // @PreAuthorize("@ss.hasPermi('project:travelcity:query')")
@GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") Long id)
- {
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
+ log.info("鑾峰彇宸梾鍩庡競鍜岃ˉ璐存爣鍑嗚缁嗕俊鎭瘂}锛�", id);
return AjaxResult.success(baseTravelcityService.getById(id));
}
@@ -74,25 +76,27 @@
* 鏂板宸梾鍩庡競鍜岃ˉ璐存爣鍑�
*/
@ApiOperation("鏂板宸梾鍩庡競鍜岃ˉ璐存爣鍑�")
- @PreAuthorize("@ss.hasPermi('project:travelcity:add')")
+ // @PreAuthorize("@ss.hasPermi('project:travelcity:add')")
@Log(title = "宸梾鍩庡競鍜岃ˉ璐存爣鍑�", businessType = BusinessType.INSERT)
- @PostMapping
+ @PostMapping("/add")
@RepeatSubmit
- public AjaxResult add(@RequestBody BaseTravelcity baseTravelcity)
- {
- return toAjax(baseTravelcityService.save(baseTravelcity));
+ public AjaxResult add(@RequestBody BaseTravelcity baseTravelcity) {
+ log.info("鏂板宸梾鍩庡競鍜岃ˉ璐存爣鍑唟}锛�", baseTravelcity);
+ boolean save = baseTravelcityService.save(baseTravelcity);
+ log.info("鏂板宸梾鍩庡競鍜岃ˉ璐存爣鍑哹aseTravelcity鐨刬d{}锛�", baseTravelcity.getId());
+ return AjaxResult.success(baseTravelcity);
}
/**
* 淇敼宸梾鍩庡競鍜岃ˉ璐存爣鍑�
*/
@ApiOperation("淇敼宸梾鍩庡競鍜岃ˉ璐存爣鍑�")
- @PreAuthorize("@ss.hasPermi('project:travelcity:edit')")
+ // @PreAuthorize("@ss.hasPermi('project:travelcity:edit')")
@Log(title = "宸梾鍩庡競鍜岃ˉ璐存爣鍑�", businessType = BusinessType.UPDATE)
@PutMapping
- @RepeatSubmit
- public AjaxResult edit(@RequestBody BaseTravelcity baseTravelcity)
- {
+ @RepeatSubmit
+ public AjaxResult edit(@RequestBody BaseTravelcity baseTravelcity) {
+ log.info("淇敼宸梾鍩庡競鍜岃ˉ璐存爣鍑唟}锛�", baseTravelcity);
return toAjax(baseTravelcityService.updateById(baseTravelcity));
}
@@ -100,11 +104,11 @@
* 鍒犻櫎宸梾鍩庡競鍜岃ˉ璐存爣鍑�
*/
@ApiOperation("鍒犻櫎宸梾鍩庡競鍜岃ˉ璐存爣鍑�")
- @PreAuthorize("@ss.hasPermi('project:travelcity:remove')")
+ // @PreAuthorize("@ss.hasPermi('project:travelcity:remove')")
@Log(title = "宸梾鍩庡競鍜岃ˉ璐存爣鍑�", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
- public AjaxResult remove(@PathVariable Long[] ids)
- {
+ public AjaxResult remove(@PathVariable Long[] ids) {
+ log.info("鍒犻櫎宸梾鍩庡競鍜岃ˉ璐存爣鍑唟}锛�", ids);
return toAjax(baseTravelcityService.removeByIds(Arrays.asList(ids)));
}
@@ -113,11 +117,11 @@
* 鏍规嵁鍖哄煙鑾峰彇浼欓琛ュ姪銆佸叕鏉傝琛ュ姪
*/
@ApiOperation("鏍规嵁鍖哄煙鑾峰彇琛ュ姪")
- // @PreAuthorize("@ss.hasPermi('project:travelcity:list')")
+ // // @PreAuthorize("@ss.hasPermi('project:travelcity:list')")
@GetMapping("/getSubsidy/{cityCode}")
- public AjaxResult getSubsidy(@PathVariable String cityCode)
- {
- BaseTravelcity baseTravelcity=baseTravelcityService.getSubsidy(cityCode);
+ public AjaxResult getSubsidy(@PathVariable String cityCode) {
+ log.info("鏍规嵁鍖哄煙鑾峰彇浼欓琛ュ姪銆佸叕鏉傝琛ュ姪{}锛�", cityCode);
+ BaseTravelcity baseTravelcity = baseTravelcityService.getSubsidy(cityCode);
return AjaxResult.success(baseTravelcity);
}
}
--
Gitblit v1.9.3