From 3f2d4ba07ee9e1e0ddba97b43dc70af09f0e39a2 Mon Sep 17 00:00:00 2001
From: chenhj <1263187585@qq.com>
Date: 星期四, 30 四月 2026 17:40:30 +0800
Subject: [PATCH] 审核附件修改

---
 src/main/java/com/ruoyi/basic/controller/CustomerFollowUpController.java |   57 ++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 38 insertions(+), 19 deletions(-)

diff --git a/src/main/java/com/ruoyi/basic/controller/CustomerFollowUpController.java b/src/main/java/com/ruoyi/basic/controller/CustomerFollowUpController.java
index d863c8a..70b109e 100644
--- a/src/main/java/com/ruoyi/basic/controller/CustomerFollowUpController.java
+++ b/src/main/java/com/ruoyi/basic/controller/CustomerFollowUpController.java
@@ -3,6 +3,7 @@
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.basic.dto.CustomerFollowUpFileDto;
 import com.ruoyi.basic.pojo.CustomerFollowUp;
 import com.ruoyi.basic.pojo.CustomerReturnVisit;
 import com.ruoyi.basic.service.CustomerFollowUpService;
@@ -11,8 +12,8 @@
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
 import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
+import io.swagger.v3.oas.annotations.Operation;
+import lombok.AllArgsConstructor;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -29,22 +30,21 @@
  */
 @RestController
 @RequestMapping("/basic/customer-follow")
+@AllArgsConstructor
 public class CustomerFollowUpController extends BaseController {
 
-    @Autowired
-    private CustomerFollowUpService customerFollowUpService;
+    private final CustomerFollowUpService customerFollowUpService;
 
-    @Autowired
-    private CustomerReturnVisitService customerReturnVisitService;
+    private final CustomerReturnVisitService customerReturnVisitService;
 
     /**
      * 鏌ヨ瀹㈡埛璺熻繘鍒楄〃
      */
     @GetMapping("/list")
-    @ApiOperation("鏌ヨ瀹㈡埛璺熻繘鍒楄〃")
+    @Operation(summary = "鏌ヨ瀹㈡埛璺熻繘鍒楄〃")
     public IPage<CustomerFollowUp> list(Page<CustomerFollowUp> page, CustomerFollowUp customerFollowUp) {
         LambdaQueryWrapper<CustomerFollowUp> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.eq(customerFollowUp.getCustomerId() != null, CustomerFollowUp::getCustomerId, customerFollowUp.getCustomerId())
+        queryWrapper.eq(customerFollowUp.getCustomerPrivatePoolId() != null, CustomerFollowUp::getCustomerPrivatePoolId, customerFollowUp.getCustomerPrivatePoolId())
                 .like(customerFollowUp.getFollowerUserName() != null, CustomerFollowUp::getFollowerUserName, customerFollowUp.getFollowerUserName())
                 .orderByDesc(CustomerFollowUp::getFollowUpTime);
         return customerFollowUpService.page(page, queryWrapper);
@@ -53,7 +53,7 @@
     /**
      * 鑾峰彇瀹㈡埛璺熻繘璇︾粏淇℃伅
      */
-    @ApiOperation("鑾峰彇瀹㈡埛璺熻繘璇︾粏淇℃伅")
+    @Operation(summary = "鑾峰彇瀹㈡埛璺熻繘璇︾粏淇℃伅")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Integer id) {
         return AjaxResult.success(customerFollowUpService.getFollowUpWithFiles(id));
@@ -63,7 +63,7 @@
      * 鏂板瀹㈡埛璺熻繘
      */
     @PostMapping("/add")
-    @ApiOperation("鏂板瀹㈡埛璺熻繘")
+    @Operation(summary = "鏂板瀹㈡埛璺熻繘")
     @Log(title = "瀹㈡埛璺熻繘-鏂板", businessType = BusinessType.INSERT)
     public AjaxResult add(@RequestBody CustomerFollowUp customerFollowUp) {
         return toAjax(customerFollowUpService.insertCustomerFollowUp(customerFollowUp));
@@ -73,7 +73,7 @@
      * 淇敼瀹㈡埛璺熻繘
      */
     @PutMapping("/edit")
-    @ApiOperation("淇敼瀹㈡埛璺熻繘")
+    @Operation(summary = "淇敼瀹㈡埛璺熻繘")
     @Log(title = "瀹㈡埛璺熻繘-淇敼", businessType = BusinessType.UPDATE)
     public AjaxResult edit(@RequestBody CustomerFollowUp customerFollowUp) {
         return toAjax(customerFollowUpService.updateCustomerFollowUp(customerFollowUp));
@@ -82,18 +82,37 @@
     /**
      * 涓婁紶璺熻繘闄勪欢
      */
-    @ApiOperation("涓婁紶璺熻繘闄勪欢")
+    @Operation(summary = "涓婁紶璺熻繘闄勪欢")
     @PostMapping("/upload/{followUpId}")
     @Log(title = "瀹㈡埛璺熻繘-涓婁紶闄勪欢", businessType = BusinessType.INSERT)
     public AjaxResult uploadFiles(@RequestParam("files") List<MultipartFile> files, @PathVariable Integer followUpId) {
-        customerFollowUpService.addFollowUpFiles(files, followUpId);
-        return AjaxResult.success();
+        return AjaxResult.success(customerFollowUpService.addFollowUpFiles(files, followUpId));
+    }
+
+    /**
+     * 涓婁紶璺熻繘闄勪欢锛堝鐢紝鏃營D锛�
+     */
+    @Operation(summary = "涓婁紶闄勪欢(澶嶇敤)")
+    @PostMapping("/upload")
+    @Log(title = "涓婁紶闄勪欢(澶嶇敤)", businessType = BusinessType.INSERT)
+    public AjaxResult uploadFiles(@RequestParam("files") List<MultipartFile> files, @RequestParam(required = false) String name) {
+        List<CustomerFollowUpFileDto> uploadedFiles = customerFollowUpService.addFollowUpFiles(files, null);
+        return AjaxResult.success(uploadedFiles);
+    }
+
+    /**
+     * 鎵归噺鏌ヨ闄勪欢鍒楄〃
+     */
+    @Operation(summary = "鎵归噺鏌ヨ闄勪欢鍒楄〃")
+    @PostMapping("/file/list")
+    public AjaxResult getFileList(@RequestBody List<Long> ids) {
+        return AjaxResult.success(customerFollowUpService.getFollowUpFilesByIds(ids));
     }
 
     /**
      * 鍒犻櫎璺熻繘闄勪欢
      */
-    @ApiOperation("鍒犻櫎璺熻繘闄勪欢")
+    @Operation(summary = "鍒犻櫎璺熻繘闄勪欢")
     @DeleteMapping("/file/{fileId}")
     @Log(title = "瀹㈡埛璺熻繘-鍒犻櫎闄勪欢", businessType = BusinessType.DELETE)
     public AjaxResult deleteFile(@PathVariable Integer fileId) {
@@ -104,7 +123,7 @@
     /**
      * 鍒犻櫎瀹㈡埛璺熻繘
      */
-    @ApiOperation("鍒犻櫎瀹㈡埛璺熻繘")
+    @Operation(summary = "鍒犻櫎瀹㈡埛璺熻繘")
     @DeleteMapping("/{id}")
     @Log(title = "瀹㈡埛璺熻繘-鍒犻櫎", businessType = BusinessType.DELETE)
     public AjaxResult remove(@PathVariable Integer id) {
@@ -114,7 +133,7 @@
     /**
      * 鏂板/鏇存柊鍥炶鎻愰啋
      */
-    @ApiOperation("鏂板/鏇存柊鍥炶鎻愰啋")
+    @Operation(summary = "鏂板/鏇存柊鍥炶鎻愰啋")
     @PostMapping("/return-visit")
     @Log(title = "鍥炶鎻愰啋-鏂板/鏇存柊", businessType = BusinessType.UPDATE)
     public AjaxResult saveReturnVisit(@RequestBody CustomerReturnVisit customerReturnVisit) {
@@ -124,7 +143,7 @@
     /**
      * 鑾峰彇鍥炶鎻愰啋璇︽儏
      */
-    @ApiOperation("鑾峰彇鍥炶鎻愰啋璇︽儏")
+    @Operation(summary = "鑾峰彇鍥炶鎻愰啋璇︽儏")
     @GetMapping("/return-visit/{customerId}")
     public AjaxResult getReturnVisit(@PathVariable Integer customerId) {
         return AjaxResult.success(customerReturnVisitService.getByCustomerId(customerId));
@@ -133,7 +152,7 @@
     /**
      * 鏍囪鍥炶鎻愰啋宸茶
      */
-    @ApiOperation("鏍囪鍥炶鎻愰啋宸茶")
+    @Operation(summary = "鏍囪鍥炶鎻愰啋宸茶")
     @PutMapping("/return-visit/read/{id}")
     @Log(title = "鍥炶鎻愰啋-鏍囪宸茶", businessType = BusinessType.UPDATE)
     public AjaxResult markAsRead(@PathVariable Long id) {

--
Gitblit v1.9.3