From ae1471f378f399f76518539ec8992e64a3673436 Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期三, 08 一月 2025 15:26:06 +0800
Subject: [PATCH] 1.订单提交:订单最小金额配置

---
 src/main/java/com/mzl/flower/web/flower/FlowerTagController.java |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/mzl/flower/web/flower/FlowerTagController.java b/src/main/java/com/mzl/flower/web/flower/FlowerTagController.java
index 3a92fa7..1c7c68f 100644
--- a/src/main/java/com/mzl/flower/web/flower/FlowerTagController.java
+++ b/src/main/java/com/mzl/flower/web/flower/FlowerTagController.java
@@ -4,10 +4,13 @@
 import com.mzl.flower.base.BaseController;
 import com.mzl.flower.base.R;
 import com.mzl.flower.base.ReturnDataDTO;
+import com.mzl.flower.base.annotation.OperationLog;
 import com.mzl.flower.dto.request.flower.FlowerTagCreateDTO;
 import com.mzl.flower.dto.request.flower.FlowerTagQueryDTO;
 import com.mzl.flower.dto.request.flower.FlowerTagUpdateDTO;
 import com.mzl.flower.dto.response.flower.FlowerTagDTO;
+import com.mzl.flower.entity.flower.FlowerTag;
+import com.mzl.flower.entity.log.OperationRecord;
 import com.mzl.flower.service.flower.FlowerTagService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
@@ -33,15 +36,21 @@
     private FlowerTagService tagService;
 
     @PostMapping("/list/new")
+    @OperationLog(value = "新增商品标签", type = "tag_list")
     @ApiOperation(value = "新增商品标签")
     public ResponseEntity<ReturnDataDTO> addTag(@RequestBody FlowerTagCreateDTO dto) {
-        return returnData(R.SUCCESS.getCode(), tagService.addTag(dto));
+        String content = "新增商品标签标签名称:【" + dto.getName() + "】,标签说明:【" + dto.getRemarks() + "】";
+        OperationRecord operationRecord = getOperationRecord(content);
+        return returnData(R.SUCCESS.getCode(), tagService.addTag(dto), operationRecord);
     }
 
     @PostMapping("/list/edit")
+    @OperationLog(value = "编辑商品标签", type = "tag_list")
     @ApiOperation(value = "编辑商品标签")
     public ResponseEntity<ReturnDataDTO> updateTag(@RequestBody FlowerTagUpdateDTO dto) {
-        return returnData(R.SUCCESS.getCode(), tagService.updateTag(dto));
+        String content = "编辑商品标签id:【" + dto.getId() + "】标签名称:【" + dto.getName() + "】,标签说明:【" + dto.getRemarks() + "】";
+        OperationRecord operationRecord = getOperationRecord(content);
+        return returnData(R.SUCCESS.getCode(), tagService.updateTag(dto), operationRecord);
     }
 
     @GetMapping("/list/view")
@@ -60,13 +69,17 @@
     }
 
     @GetMapping("/list/delete")
+    @OperationLog(value = "删除商品标签", type = "tag_list")
     @ApiOperation(value = "删除商品标签")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "id", value = "商品标签id", required = true, dataType = "String", paramType = "query")
     })
     public ResponseEntity<ReturnDataDTO<?>> deleteTag(Long id){
+        FlowerTag flowerTag = tagService.selectFlowerTagById(id);
         tagService.deleteTag(id);
-        return returnData(R.SUCCESS.getCode(), null);
+        String content = "删除商品标签id:【" + id + "】标签名称:【" + flowerTag.getName() + "】,标签说明:【" + flowerTag.getRemarks() + "】";
+        OperationRecord operationRecord = getOperationRecord(content);
+        return returnData(R.SUCCESS.getCode(), null, operationRecord);
     }
 
 }

--
Gitblit v1.9.3