wlzboy
5 天以前 7de1396e315896dbc72a9d54e44f77434ea90f18
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.web.controller.system;
 
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.NotifyChannelConfig;
import com.ruoyi.system.service.INotifyChannelConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
/**
 * 通知渠道配置Controller
 * 
 * @author ruoyi
 * @date 2025-12-07
 */
@RestController
@RequestMapping("/system/notify/channel/config")
public class NotifyChannelConfigController extends BaseController {
    @Autowired
    private INotifyChannelConfigService notifyChannelConfigService;
 
    /**
     * 查询通知渠道配置列表
     */
    @PreAuthorize("@ss.hasPermi('system:notify:channel:config:list')")
    @GetMapping("/list")
    public TableDataInfo list(NotifyChannelConfig notifyChannelConfig) {
        startPage();
        List<NotifyChannelConfig> list = notifyChannelConfigService.selectNotifyChannelConfigList(notifyChannelConfig);
        return getDataTable(list);
    }
 
    /**
     * 获取通知渠道配置详细信息
     */
    @PreAuthorize("@ss.hasPermi('system:notify:channel:config:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return AjaxResult.success(notifyChannelConfigService.selectNotifyChannelConfigById(id));
    }
 
    /**
     * 新增通知渠道配置
     */
    @PreAuthorize("@ss.hasPermi('system:notify:channel:config:add')")
    @Log(title = "通知渠道配置", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody NotifyChannelConfig notifyChannelConfig) {
        return toAjax(notifyChannelConfigService.insertNotifyChannelConfig(notifyChannelConfig));
    }
 
    /**
     * 修改通知渠道配置
     */
    @PreAuthorize("@ss.hasPermi('system:notify:channel:config:edit')")
    @Log(title = "通知渠道配置", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody NotifyChannelConfig notifyChannelConfig) {
        return toAjax(notifyChannelConfigService.updateNotifyChannelConfig(notifyChannelConfig));
    }
 
    /**
     * 删除通知渠道配置
     */
    @PreAuthorize("@ss.hasPermi('system:notify:channel:config:remove')")
    @Log(title = "通知渠道配置", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(notifyChannelConfigService.deleteNotifyChannelConfigByIds(ids));
    }
}