gongchunyi
7 小时以前 84746c6a1fe8fb6c0216495110895cb5d346563e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package com.ruoyi.aftersalesservice.controller;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.aftersalesservice.pojo.AfterSalesNearExpiry;
import com.ruoyi.aftersalesservice.service.AfterSalesNearExpiryService;
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 io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
/**
 * <br>
 * 临期售后管理控制层
 * </br>
 *
 * @author deslrey
 * @version 1.0
 * @since 2026/03/02 14:40
 */
@RestController
@Api(tags = "临期售后管理")
@RequestMapping("/afterSalesNearExpiryService")
public class AfterSalesNearExpiryController extends BaseController {
 
    @Autowired
    private AfterSalesNearExpiryService afterSalesNearExpiryService;
 
    /**
     * 新增临期售后
     */
    @PostMapping("/add")
    @ApiOperation("新增临期售后")
    @Log(title = "新增临期售后", businessType = BusinessType.INSERT)
    public AjaxResult add(@RequestBody AfterSalesNearExpiry entity) {
        afterSalesNearExpiryService.add(entity);
        return AjaxResult.success("添加成功");
    }
 
    /**
     * 更新临期售后
     */
    @PostMapping("/update")
    @ApiOperation("更新临期售后")
    @Log(title = "更新临期售后", businessType = BusinessType.UPDATE)
    public AjaxResult update(@RequestBody AfterSalesNearExpiry entity) {
        afterSalesNearExpiryService.update(entity);
        return AjaxResult.success("更新成功");
    }
 
    /**
     * 删除临期售后
     */
    @DeleteMapping("/delete")
    @ApiOperation("删除临期售后")
    @Log(title = "删除临期售后", businessType = BusinessType.DELETE)
    public AjaxResult delete(Long[] ids) {
        afterSalesNearExpiryService.delete(ids);
        return AjaxResult.success("删除成功");
    }
 
    /**
     * 分页查询临期售后
     */
    @GetMapping("/listPage")
    @ApiOperation("分页查询临期售后")
    @Log(title = "分页查询临期售后", businessType = BusinessType.OTHER)
    public AjaxResult listPage(Page<AfterSalesNearExpiry> page, AfterSalesNearExpiry entity) {
        IPage<AfterSalesNearExpiry> listPage = afterSalesNearExpiryService.listPage(page, entity);
        return AjaxResult.success(listPage);
    }
 
}