chenhj
2026-04-24 ffe4413db421aabb7446007ff76d4e9943c6fc84
src/main/java/com/ruoyi/aftersalesservice/controller/AfterSalesServiceController.java
@@ -15,8 +15,8 @@
import com.ruoyi.project.system.mapper.SysUserMapper;
import com.ruoyi.sales.dto.SalesLedgerDto;
import com.ruoyi.sales.service.ISalesLedgerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.servlet.http.HttpServletResponse;
import lombok.AllArgsConstructor;
import org.springframework.beans.BeanUtils;
@@ -32,7 +32,7 @@
 * @date : 2025/7/30 9:27
 */
@RestController
@Api(tags = "售后服务")
@Tag(name = "售后服务")
@RequestMapping("/afterSalesService")
@AllArgsConstructor
public class AfterSalesServiceController extends BaseController {
@@ -43,7 +43,7 @@
    private ISalesLedgerService salesLedgerService;
    @GetMapping("/listPage")
    @ApiOperation("售后服务-分页查询")
    @Operation(summary = "售后服务-分页查询")
    @Log(title = "售后服务-分页查询", businessType = BusinessType.OTHER)
    public AjaxResult listPage(Page page, AfterSalesServiceNewDto afterSalesService) {
        IPage<AfterSalesServiceNewDto> listPage = afterSalesServiceService.listPage(page, afterSalesService);
@@ -52,7 +52,7 @@
    @Log(title = "售后服务-反馈登记", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    @ApiOperation("售后服务-反馈登记")
    @Operation(summary = "售后服务-反馈登记")
    public void export(HttpServletResponse response) {
        Page page = new Page(-1,-1);
        AfterSalesServiceNewDto afterSalesService = new AfterSalesServiceNewDto();
@@ -70,7 +70,7 @@
    @Log(title = "售后服务-售后处理", businessType = BusinessType.EXPORT)
    @PostMapping("/exportTwo")
    @ApiOperation("售后服务-售后处理")
    @Operation(summary = "售后服务-售后处理")
    public void exportTwo(HttpServletResponse response) {
        Page page = new Page(-1,-1);
        AfterSalesServiceNewDto afterSalesService = new AfterSalesServiceNewDto();
@@ -83,14 +83,14 @@
    }
    @PostMapping("/add")
    @ApiOperation("售后服务-新增")
    @Operation(summary = "售后服务-新增")
    @Log(title = "售后服务-新增", businessType = BusinessType.INSERT)
    public AjaxResult add(@RequestBody AfterSalesServiceNewDto afterSalesServiceNewDto) {
        return afterSalesServiceService.addAfterSalesServiceDto(afterSalesServiceNewDto) ? AjaxResult.success() : AjaxResult.error();
    }
    @PostMapping("/update")
    @ApiOperation("售后服务-修改")
    @Operation(summary = "售后服务-修改")
    @Log(title = "售后服务-修改", businessType = BusinessType.UPDATE)
    public AjaxResult update(@RequestBody AfterSalesServiceNewDto afterSalesServiceNewDto) {
        if (afterSalesServiceNewDto.getProductModelIdList() != null && afterSalesServiceNewDto.getProductModelIdList().isEmpty() ) {
@@ -104,7 +104,7 @@
    }
    @DeleteMapping("/delete")
    @ApiOperation("售后服务-删除")
    @Operation(summary = "售后服务-删除")
    @Log(title = "售后服务-删除", businessType = BusinessType.DELETE)
    public AjaxResult delete(@RequestBody List<Long> ids) {
        if (CollectionUtils.isEmpty(ids)) {
@@ -115,7 +115,7 @@
    }
    @PostMapping("/dispose")
    @ApiOperation("售后服务-处理")
    @Operation(summary = "售后服务-处理")
    @Log(title = "售后服务-处理", businessType = BusinessType.UPDATE)
    public AjaxResult dispose(@RequestBody AfterSalesService afterSalesService) {
        AfterSalesService byId = afterSalesServiceService.getById(afterSalesService.getId());
@@ -131,7 +131,7 @@
    @GetMapping("listSalesLedger")
    @ApiOperation("售后服务-获取销售台账")
    @Operation(summary = "售后服务-获取销售台账")
    public AjaxResult listSalesLedger(SalesLedgerDto salesLedgerDto, Page page) {
        IPage<SalesLedgerDto> list = salesLedgerService.listSalesLedger(salesLedgerDto,page);
        return AjaxResult.success(list);
@@ -139,12 +139,12 @@
    @GetMapping("getById")
    @ApiOperation("售后服务-根据id获取详情")
    @Operation(summary = "售后服务-根据id获取详情")
    public AjaxResult getById(Long id) {
        return AjaxResult.success(afterSalesServiceService.getAfterSalesServiceNewDtoById(id));
    }
    @ApiOperation("售后服务-统计工单情况")
    @Operation(summary = "售后服务-统计工单情况")
    @GetMapping("count")
    public AjaxResult count() {
        return AjaxResult.success(afterSalesServiceService.countAfterSalesService());