|
|
@@ -0,0 +1,84 @@
|
|
|
+package cn.iocoder.yudao.module.iscs.controller.admin.notifyconfig;
|
|
|
+
|
|
|
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
|
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
|
+import cn.iocoder.yudao.module.iscs.controller.admin.notifyconfig.vo.NotifyConfigDetailPageReqVO;
|
|
|
+import cn.iocoder.yudao.module.iscs.controller.admin.notifyconfig.vo.NotifyConfigDetailRespVO;
|
|
|
+import cn.iocoder.yudao.module.iscs.controller.admin.notifyconfig.vo.NotifyConfigDetailSaveReqVO;
|
|
|
+import cn.iocoder.yudao.module.iscs.dal.dataobject.notifyconfig.NotifyConfigDetailDO;
|
|
|
+import cn.iocoder.yudao.module.iscs.service.notifyconfig.NotifyConfigDetailService;
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.Parameter;
|
|
|
+import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import jakarta.annotation.Resource;
|
|
|
+import jakarta.validation.Valid;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
|
+
|
|
|
+@Tag(name = "管理后台 - 通知规则角色和模板设置关联")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/iscs/notify-config-detail")
|
|
|
+@Validated
|
|
|
+public class NotifyConfigDetailController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private NotifyConfigDetailService notifyConfigDetailService;
|
|
|
+
|
|
|
+ @PostMapping("/insertNotifyConfigDetail")
|
|
|
+ @Operation(summary = "创建通知规则角色和模板设置关联")
|
|
|
+ @PreAuthorize("@ss.hasPermission('iscs:notify-config-detail:create')")
|
|
|
+ public CommonResult<Long> insertNotifyConfigDetail(@Valid @RequestBody NotifyConfigDetailSaveReqVO createReqVO) {
|
|
|
+ return success(notifyConfigDetailService.createNotifyConfigDetail(createReqVO));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PutMapping("/updateNotifyConfigDetail")
|
|
|
+ @Operation(summary = "更新通知规则角色和模板设置关联")
|
|
|
+ @PreAuthorize("@ss.hasPermission('iscs:notify-config-detail:update')")
|
|
|
+ public CommonResult<Boolean> updateNotifyConfigDetail(@Valid @RequestBody NotifyConfigDetailSaveReqVO updateReqVO) {
|
|
|
+ notifyConfigDetailService.updateNotifyConfigDetail(updateReqVO);
|
|
|
+ return success(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @DeleteMapping("/deleteNotifyConfigDetailList")
|
|
|
+ @Parameter(name = "ids", description = "编号", required = true)
|
|
|
+ @Operation(summary = "批量删除通知规则角色和模板设置关联")
|
|
|
+ @PreAuthorize("@ss.hasPermission('iscs:notify-config-detail:delete')")
|
|
|
+ public CommonResult<Boolean> deleteNotifyConfigDetailList(@RequestParam("ids") List<Long> ids) {
|
|
|
+ notifyConfigDetailService.deleteNotifyConfigDetailListByIds(ids);
|
|
|
+ return success(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/selectNotifyConfigDetailById")
|
|
|
+ @Operation(summary = "获得通知规则角色和模板设置关联")
|
|
|
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
+ @PreAuthorize("@ss.hasPermission('iscs:notify-config-detail:query')")
|
|
|
+ public CommonResult<NotifyConfigDetailRespVO> selectNotifyConfigDetailById(@RequestParam("id") Long id) {
|
|
|
+ NotifyConfigDetailDO notifyConfigDetail = notifyConfigDetailService.getNotifyConfigDetail(id);
|
|
|
+ return success(BeanUtils.toBean(notifyConfigDetail, NotifyConfigDetailRespVO.class));
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/selectNotifyConfigDetailByConfigId")
|
|
|
+ @Operation(summary = "获得通知规则角色和模板设置关联ByConfigId")
|
|
|
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
+ @PreAuthorize("@ss.hasPermission('iscs:notify-config-detail:query')")
|
|
|
+ public CommonResult<List<NotifyConfigDetailRespVO>> selectNotifyConfigDetailByConfigId(@RequestParam("configId") Long configId) {
|
|
|
+ List<NotifyConfigDetailRespVO> notifyConfigDetail = notifyConfigDetailService.selectNotifyConfigDetailByConfigId(configId);
|
|
|
+ return success(notifyConfigDetail);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/getNotifyConfigDetailPage")
|
|
|
+ @Operation(summary = "获得通知规则角色和模板设置关联分页")
|
|
|
+ @PreAuthorize("@ss.hasPermission('iscs:notify-config-detail:query')")
|
|
|
+ public CommonResult<PageResult<NotifyConfigDetailRespVO>> getNotifyConfigDetailPage(@Valid NotifyConfigDetailPageReqVO pageReqVO) {
|
|
|
+ PageResult<NotifyConfigDetailDO> pageResult = notifyConfigDetailService.getNotifyConfigDetailPage(pageReqVO);
|
|
|
+ return success(BeanUtils.toBean(pageResult, NotifyConfigDetailRespVO.class));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|