5 天以前 0d7d874912d0147376826b55667a1deb6547ed91
src/main/java/com/ruoyi/basic/controller/CustomerFollowUpController.java
@@ -11,7 +11,7 @@
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.domain.R;
import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
@@ -55,8 +55,8 @@
     */
    @Operation(summary = "获取客户跟进详细信息")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Integer id) {
        return AjaxResult.success(customerFollowUpService.getFollowUpWithFiles(id));
    public R getInfo(@PathVariable("id") Integer id) {
        return R.ok(customerFollowUpService.getFollowUpWithFiles(id));
    }
    /**
@@ -65,8 +65,8 @@
    @PostMapping("/add")
    @Operation(summary = "新增客户跟进")
    @Log(title = "客户跟进-新增", businessType = BusinessType.INSERT)
    public AjaxResult add(@RequestBody CustomerFollowUp customerFollowUp) {
        return toAjax(customerFollowUpService.insertCustomerFollowUp(customerFollowUp));
    public R<?> add(@RequestBody CustomerFollowUp customerFollowUp) {
        return R.ok();
    }
    /**
@@ -75,8 +75,8 @@
    @PutMapping("/edit")
    @Operation(summary = "修改客户跟进")
    @Log(title = "客户跟进-修改", businessType = BusinessType.UPDATE)
    public AjaxResult edit(@RequestBody CustomerFollowUp customerFollowUp) {
        return toAjax(customerFollowUpService.updateCustomerFollowUp(customerFollowUp));
    public R<?> edit(@RequestBody CustomerFollowUp customerFollowUp) {
        return R.ok();
    }
    /**
@@ -85,8 +85,8 @@
    @Operation(summary = "上传跟进附件")
    @PostMapping("/upload/{followUpId}")
    @Log(title = "客户跟进-上传附件", businessType = BusinessType.INSERT)
    public AjaxResult uploadFiles(@RequestParam("files") List<MultipartFile> files, @PathVariable Integer followUpId) {
        return AjaxResult.success(customerFollowUpService.addFollowUpFiles(files, followUpId));
    public R uploadFiles(@RequestParam("files") List<MultipartFile> files, @PathVariable Integer followUpId) {
        return R.ok(customerFollowUpService.addFollowUpFiles(files, followUpId));
    }
    /**
@@ -95,9 +95,9 @@
    @Operation(summary = "上传附件(复用)")
    @PostMapping("/upload")
    @Log(title = "上传附件(复用)", businessType = BusinessType.INSERT)
    public AjaxResult uploadFiles(@RequestParam("files") List<MultipartFile> files, @RequestParam(required = false) String name) {
    public R uploadFiles(@RequestParam("files") List<MultipartFile> files, @RequestParam(required = false) String name) {
        List<CustomerFollowUpFileDto> uploadedFiles = customerFollowUpService.addFollowUpFiles(files, null);
        return AjaxResult.success(uploadedFiles);
        return R.ok(uploadedFiles);
    }
    /**
@@ -105,8 +105,8 @@
     */
    @Operation(summary = "批量查询附件列表")
    @PostMapping("/file/list")
    public AjaxResult getFileList(@RequestBody List<Long> ids) {
        return AjaxResult.success(customerFollowUpService.getFollowUpFilesByIds(ids));
    public R getFileList(@RequestBody List<Long> ids) {
        return R.ok(customerFollowUpService.getFollowUpFilesByIds(ids));
    }
    /**
@@ -115,9 +115,9 @@
    @Operation(summary = "删除跟进附件")
    @DeleteMapping("/file/{fileId}")
    @Log(title = "客户跟进-删除附件", businessType = BusinessType.DELETE)
    public AjaxResult deleteFile(@PathVariable Integer fileId) {
    public R deleteFile(@PathVariable Integer fileId) {
        customerFollowUpService.deleteFollowUpFile(fileId);
        return AjaxResult.success();
        return R.ok();
    }
    /**
@@ -126,8 +126,8 @@
    @Operation(summary = "删除客户跟进")
    @DeleteMapping("/{id}")
    @Log(title = "客户跟进-删除", businessType = BusinessType.DELETE)
    public AjaxResult remove(@PathVariable Integer id) {
        return toAjax(customerFollowUpService.deleteCustomerFollowUpById(id));
    public R remove(@PathVariable Integer id) {
        return R.ok(customerFollowUpService.deleteCustomerFollowUpById(id));
    }
    /**
@@ -136,8 +136,8 @@
    @Operation(summary = "新增/更新回访提醒")
    @PostMapping("/return-visit")
    @Log(title = "回访提醒-新增/更新", businessType = BusinessType.UPDATE)
    public AjaxResult saveReturnVisit(@RequestBody CustomerReturnVisit customerReturnVisit) {
        return toAjax(customerReturnVisitService.saveOrUpdateReturnVisit(customerReturnVisit));
    public R saveReturnVisit(@RequestBody CustomerReturnVisit customerReturnVisit) {
        return  R.ok(customerReturnVisitService.saveOrUpdateReturnVisit(customerReturnVisit));
    }
    /**
@@ -145,8 +145,8 @@
     */
    @Operation(summary = "获取回访提醒详情")
    @GetMapping("/return-visit/{customerId}")
    public AjaxResult getReturnVisit(@PathVariable Integer customerId) {
        return AjaxResult.success(customerReturnVisitService.getByCustomerId(customerId));
    public R getReturnVisit(@PathVariable Integer customerId) {
        return R.ok(customerReturnVisitService.getByCustomerId(customerId));
    }
    /**
@@ -155,9 +155,9 @@
    @Operation(summary = "标记回访提醒已读")
    @PutMapping("/return-visit/read/{id}")
    @Log(title = "回访提醒-标记已读", businessType = BusinessType.UPDATE)
    public AjaxResult markAsRead(@PathVariable Long id) {
    public R markAsRead(@PathVariable Long id) {
        customerReturnVisitService.markAsRead(id);
        return AjaxResult.success();
        return R.ok();
    }
}