zss
2026-04-23 5033c375a3ee6a63bcb600d5b9f4b8d549d089e2
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,12 +12,10 @@
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;
import com.ruoyi.basic.dto.CustomerFollowUpFileDto;
import com.ruoyi.common.utils.SecurityUtils;
import java.util.List;
@@ -31,19 +30,18 @@
 */
@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.getCustomerPrivatePoolId() != null, CustomerFollowUp::getCustomerPrivatePoolId, customerFollowUp.getCustomerPrivatePoolId())
@@ -55,7 +53,7 @@
    /**
     * 获取客户跟进详细信息
     */
    @ApiOperation("获取客户跟进详细信息")
    @Operation(summary = "获取客户跟进详细信息")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Integer id) {
        return AjaxResult.success(customerFollowUpService.getFollowUpWithFiles(id));
@@ -65,7 +63,7 @@
     * 新增客户跟进
     */
    @PostMapping("/add")
    @ApiOperation("新增客户跟进")
    @Operation(summary = "新增客户跟进")
    @Log(title = "客户跟进-新增", businessType = BusinessType.INSERT)
    public AjaxResult add(@RequestBody CustomerFollowUp customerFollowUp) {
        return toAjax(customerFollowUpService.insertCustomerFollowUp(customerFollowUp));
@@ -75,7 +73,7 @@
     * 修改客户跟进
     */
    @PutMapping("/edit")
    @ApiOperation("修改客户跟进")
    @Operation(summary = "修改客户跟进")
    @Log(title = "客户跟进-修改", businessType = BusinessType.UPDATE)
    public AjaxResult edit(@RequestBody CustomerFollowUp customerFollowUp) {
        return toAjax(customerFollowUpService.updateCustomerFollowUp(customerFollowUp));
@@ -84,7 +82,7 @@
    /**
     * 上传跟进附件
     */
    @ApiOperation("上传跟进附件")
    @Operation(summary = "上传跟进附件")
    @PostMapping("/upload/{followUpId}")
    @Log(title = "客户跟进-上传附件", businessType = BusinessType.INSERT)
    public AjaxResult uploadFiles(@RequestParam("files") List<MultipartFile> files, @PathVariable Integer followUpId) {
@@ -94,7 +92,7 @@
    /**
     * 上传跟进附件(复用,无ID)
     */
    @ApiOperation("上传附件(复用)")
    @Operation(summary = "上传附件(复用)")
    @PostMapping("/upload")
    @Log(title = "上传附件(复用)", businessType = BusinessType.INSERT)
    public AjaxResult uploadFiles(@RequestParam("files") List<MultipartFile> files, @RequestParam(required = false) String name) {
@@ -105,7 +103,7 @@
    /**
     * 批量查询附件列表
     */
    @ApiOperation("批量查询附件列表")
    @Operation(summary = "批量查询附件列表")
    @PostMapping("/file/list")
    public AjaxResult getFileList(@RequestBody List<Long> ids) {
        return AjaxResult.success(customerFollowUpService.getFollowUpFilesByIds(ids));
@@ -114,7 +112,7 @@
    /**
     * 删除跟进附件
     */
    @ApiOperation("删除跟进附件")
    @Operation(summary = "删除跟进附件")
    @DeleteMapping("/file/{fileId}")
    @Log(title = "客户跟进-删除附件", businessType = BusinessType.DELETE)
    public AjaxResult deleteFile(@PathVariable Integer fileId) {
@@ -125,7 +123,7 @@
    /**
     * 删除客户跟进
     */
    @ApiOperation("删除客户跟进")
    @Operation(summary = "删除客户跟进")
    @DeleteMapping("/{id}")
    @Log(title = "客户跟进-删除", businessType = BusinessType.DELETE)
    public AjaxResult remove(@PathVariable Integer id) {
@@ -135,7 +133,7 @@
    /**
     * 新增/更新回访提醒
     */
    @ApiOperation("新增/更新回访提醒")
    @Operation(summary = "新增/更新回访提醒")
    @PostMapping("/return-visit")
    @Log(title = "回访提醒-新增/更新", businessType = BusinessType.UPDATE)
    public AjaxResult saveReturnVisit(@RequestBody CustomerReturnVisit customerReturnVisit) {
@@ -145,7 +143,7 @@
    /**
     * 获取回访提醒详情
     */
    @ApiOperation("获取回访提醒详情")
    @Operation(summary = "获取回访提醒详情")
    @GetMapping("/return-visit/{customerId}")
    public AjaxResult getReturnVisit(@PathVariable Integer customerId) {
        return AjaxResult.success(customerReturnVisitService.getByCustomerId(customerId));
@@ -154,7 +152,7 @@
    /**
     * 标记回访提醒已读
     */
    @ApiOperation("标记回访提醒已读")
    @Operation(summary = "标记回访提醒已读")
    @PutMapping("/return-visit/read/{id}")
    @Log(title = "回访提醒-标记已读", businessType = BusinessType.UPDATE)
    public AjaxResult markAsRead(@PathVariable Long id) {