From ad65726388fc99ff95db91b4a8a716362cccedd7 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期一, 25 五月 2026 04:32:19 +0800
Subject: [PATCH] feat: 操纵添加LOG注解记录日志
---
src/main/java/com/ruoyi/device/controller/DeviceLedgerController.java | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/ruoyi/device/controller/DeviceLedgerController.java b/src/main/java/com/ruoyi/device/controller/DeviceLedgerController.java
index 298980e..824ef6b 100644
--- a/src/main/java/com/ruoyi/device/controller/DeviceLedgerController.java
+++ b/src/main/java/com/ruoyi/device/controller/DeviceLedgerController.java
@@ -12,6 +12,8 @@
import com.ruoyi.device.pojo.DeviceMaintenance;
import com.ruoyi.device.service.IDeviceLedgerService;
import com.ruoyi.framework.aspectj.lang.annotation.Anonymous;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.domain.AjaxResult;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
@@ -41,6 +43,7 @@
return AjaxResult.success(deviceLedgerService.queryPage(page, deviceLedger));
}
+ @Log(title = "鏂板璁惧鍙拌处", businessType = BusinessType.INSERT)
@PostMapping()
@Operation(summary = "娣诲姞璁惧鍙拌处")
public AjaxResult add(@RequestBody DeviceLedgerDto deviceLedgerDto) {
@@ -54,12 +57,14 @@
return AjaxResult.success(deviceLedgerDto);
}
+ @Log(title = "淇敼璁惧鍙拌处", businessType = BusinessType.UPDATE)
@PutMapping()
@Operation(summary = "淇敼璁惧鍙拌处")
public AjaxResult update(@RequestBody DeviceLedgerDto deviceLedgerDto) {
return deviceLedgerService.updateDeviceLedger(deviceLedgerDto);
}
+ @Log(title = "鍒犻櫎璁惧鍙拌处", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
@Operation(summary = "鍒犻櫎璁惧鍙拌处")
public AjaxResult delete(@PathVariable("ids") ArrayList<Long> ids) {
@@ -70,12 +75,14 @@
return AjaxResult.success();
}
+ @Log(title = "瀵煎嚭璁惧鍙拌处", businessType = BusinessType.EXPORT)
@PostMapping("export")
@Operation(summary = "瀵煎嚭璁惧鍙拌处")
public void export(HttpServletResponse response, Long[] ids) {
deviceLedgerService.export(response, ids);
}
+ @Log(title = "涓嬭浇璁惧鍙拌处妯℃澘", businessType = BusinessType.EXPORT)
@Operation(summary = "涓嬭浇妯℃澘")
@PostMapping("/downloadTemplate")
public void downloadTemplate(HttpServletResponse response) {
@@ -83,6 +90,7 @@
util.importTemplateExcel(response, "璁惧瀵煎叆妯℃澘");
}
+ @Log(title = "瀵煎叆璁惧鍙拌处", businessType = BusinessType.IMPORT)
@PostMapping("/import")
@Operation(summary = "瀵煎叆璁惧鍙拌处")
public AjaxResult importData(MultipartFile file) throws IOException {
--
Gitblit v1.9.3