liujie
2025-12-31 874eb8dfa0e9d7849bf87b1a0ade9c8777ccef0c
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package com.ruoyi.web.controller.api;
 
 
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.dto.TServiceGuideFileDTO;
import com.ruoyi.system.model.TServiceGuideFile;
import com.ruoyi.system.query.TServiceGuideFileQuery;
import com.ruoyi.system.service.TServiceGuideFileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
/**
 * <p>
 * 办事指南文件 前端控制器
 * </p>
 *
 * @author xiaochen
 * @since 2025-11-06
 */
@Api(tags = "办事指南文件管理")
@RestController
@RequestMapping("/t-service-guide-file")
public class TServiceGuideFileController {
 
    private final TServiceGuideFileService serviceGuideFileService;
    @Autowired
    public TServiceGuideFileController(TServiceGuideFileService serviceGuideFileService) {
        this.serviceGuideFileService = serviceGuideFileService;
    }
 
    /**
     * 获取办事指南文件管理管理列表
     */
    @ApiOperation(value = "获取办事指南文件管理分页列表")
    @PostMapping(value = "/pageList")
    public R<PageInfo<TServiceGuideFile>> pageList(@RequestBody TServiceGuideFileQuery query) {
        return R.ok(serviceGuideFileService.pageList(query));
    }
 
    /**
     * 获取办事指南文件管理管理列表
     */
    @ApiOperation(value = "获取办事指南文件管理列表")
    @PostMapping(value = "/list")
    public R<List<TServiceGuideFile>> list() {
        return R.ok(serviceGuideFileService.list(Wrappers.lambdaQuery(TServiceGuideFile.class).orderByDesc(TServiceGuideFile::getCreateTime)));
    }
 
    /**
     * 添加办事指南文件管理管理
     */
    @Log(title = "办事指南文件管理信息-新增办事指南文件管理", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加办事指南文件管理")
    @PostMapping(value = "/add")
    public R<Boolean> add(@Validated @RequestBody TServiceGuideFileDTO dto) {
        return R.ok(serviceGuideFileService.saveBatch(dto.getList()));
    }
 
    /**
     * 查看办事指南文件管理详情
     */
    @ApiOperation(value = "查看办事指南文件管理详情")
    @GetMapping(value = "/getDetailById")
    public R<TServiceGuideFile> getDetailById(@RequestParam String id) {
        return R.ok(serviceGuideFileService.getById(id));
    }
 
    /**
     * 删除办事指南文件管理
     */
    @Log(title = "办事指南文件管理信息-删除办事指南文件管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除办事指南文件管理")
    @DeleteMapping(value = "/deleteById")
    public R<Boolean> deleteById(@RequestParam String id) {
        return R.ok(serviceGuideFileService.removeById(id));
    }
 
    /**
     * 批量删除办事指南文件管理
     */
    @Log(title = "办事指南文件管理信息-删除办事指南文件管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "批量删除办事指南文件管理")
    @DeleteMapping(value = "/deleteByIds")
    public R<Boolean> deleteByIds(@RequestBody List<String> ids) {
        return R.ok(serviceGuideFileService.removeByIds(ids));
    }
    
}