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/partner/FlowerMarkupSpCgController.java |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/mzl/flower/web/partner/FlowerMarkupSpCgController.java b/src/main/java/com/mzl/flower/web/partner/FlowerMarkupSpCgController.java
index 194943a..051019a 100644
--- a/src/main/java/com/mzl/flower/web/partner/FlowerMarkupSpCgController.java
+++ b/src/main/java/com/mzl/flower/web/partner/FlowerMarkupSpCgController.java
@@ -5,6 +5,7 @@
 import com.mzl.flower.base.R;
 import com.mzl.flower.base.ReturnDataDTO;
 import com.mzl.flower.config.exception.ValidationException;
+import com.mzl.flower.dto.request.flower.FlowerMarkupSpCgBatchSaveDTO;
 import com.mzl.flower.dto.request.flower.FlowerMarkupSpCgQueryDTO;
 import com.mzl.flower.dto.request.flower.FlowerMarkupSpCgSaveDTO;
 import com.mzl.flower.dto.response.flower.FlowerMarkupSpCgDTO;
@@ -21,6 +22,9 @@
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+
 @RestController
 @RequestMapping("/api/flower/markup/spcg")
 @Api(value = "合伙人商品分类加价管理", tags = "合伙人商品分类加价管理")
@@ -33,23 +37,35 @@
 
     @PostMapping("/list/save")
     @ApiOperation(value = "新增商品分类加价")
-    public ResponseEntity<ReturnDataDTO> saveMarkupSpCg(@RequestBody FlowerMarkupSpCgSaveDTO dto) {
+    public ResponseEntity<ReturnDataDTO> saveMarkupSpCg(@RequestBody FlowerMarkupSpCgSaveDTO dto,HttpServletRequest request) throws IOException {
         Partner s = spCgService.getCurrentPartner();
         if(s == null){
             throw new ValidationException("未找到当前合伙人信息");
         }
         dto.setPartnerId(s.getId());
-        spCgService.saveMarkupSpCg(dto);
+        spCgService.saveMarkupSpCg(dto,request);
+        return returnData(R.SUCCESS.getCode(), null);
+    }
+
+    @PostMapping("/list/save/batch")
+    @ApiOperation(value = "批量新增商品分类加价")
+    public ResponseEntity<ReturnDataDTO> saveMarkupSpCgBatch(@RequestBody FlowerMarkupSpCgBatchSaveDTO dto,HttpServletRequest request) throws IOException {
+        Partner s = spCgService.getCurrentPartner();
+        if(s == null){
+            throw new ValidationException("未找到当前合伙人信息");
+        }
+        dto.setPartnerId(s.getId());
+        spCgService.saveMarkupSpCgBatch(dto,request);
         return returnData(R.SUCCESS.getCode(), null);
     }
 
     @PostMapping("/list/save/platform")
     @ApiOperation(value = "运营平台新增商品分类加价")
-    public ResponseEntity<ReturnDataDTO> saveMarkupSpCgPlatform(@RequestBody FlowerMarkupSpCgSaveDTO dto) {
+    public ResponseEntity<ReturnDataDTO> saveMarkupSpCgPlatform(@RequestBody FlowerMarkupSpCgSaveDTO dto, HttpServletRequest request) throws IOException {
         if(dto.getPartnerId()== null || dto.getPartnerId() == 0){
             throw new ValidationException("合伙人id不能为空");
         }
-        spCgService.saveMarkupSpCg(dto);
+        spCgService.saveMarkupSpCg(dto,request);
         return returnData(R.SUCCESS.getCode(), null);
     }
     

--
Gitblit v1.9.3