BjNotifyModelConfigController.java 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. package com.ruoyi.business.controller;
  2. import com.ruoyi.business.domain.bo.BjNotifyModelConfigBo;
  3. import com.ruoyi.business.service.IBjNotifyModelConfigService;
  4. import com.ruoyi.common.core.web.controller.BaseController;
  5. import com.ruoyi.common.core.web.domain.AjaxResult;
  6. import com.ruoyi.common.core.web.page.TableDataInfo;
  7. import com.ruoyi.common.log.annotation.Log;
  8. import com.ruoyi.common.log.enums.BusinessType;
  9. import io.swagger.v3.oas.annotations.Operation;
  10. import io.swagger.v3.oas.annotations.tags.Tag;
  11. import lombok.RequiredArgsConstructor;
  12. import org.springframework.validation.annotation.Validated;
  13. import org.springframework.web.bind.annotation.*;
  14. import javax.annotation.Resource;
  15. import java.text.ParseException;
  16. import java.util.List;
  17. /**
  18. * 通报模型配置查询
  19. * 前端访问路由地址为:/business/notifyModelConfig
  20. *
  21. * @author libai
  22. * @date 2025-11-03
  23. */
  24. @Tag(name = "通报模型配置查询")
  25. @Validated
  26. @RequiredArgsConstructor
  27. @RestController
  28. @RequestMapping("/notifyModelConfig")
  29. public class BjNotifyModelConfigController extends BaseController {
  30. @Resource
  31. private IBjNotifyModelConfigService bjNotifyModelConfigService;
  32. /**
  33. * 通报模型配置查询列表
  34. */
  35. @Operation(summary = "查询通报模型配置查询列表")
  36. // @SaCheckPermission("business:notifyModelConfig:list")
  37. @GetMapping("/list")
  38. public TableDataInfo list(BjNotifyModelConfigBo bo) {
  39. return getDataTable(bjNotifyModelConfigService.queryPageList(bo));
  40. }
  41. /**
  42. * 获取通报模型配置查询详细信息
  43. *
  44. * @param notifyModelConfigId 主键
  45. */
  46. @Operation(summary = "获取通报模型配置查询详细信息")
  47. // @SaCheckPermission("business:notifyModelConfig:query")
  48. @GetMapping("/{notifyModelConfigId}")
  49. public AjaxResult getInfo(@PathVariable("notifyModelConfigId") String notifyModelConfigId) {
  50. return success(bjNotifyModelConfigService.queryById(notifyModelConfigId));
  51. }
  52. /**
  53. * 根据模型名称获取通报模型配置查询详细信息
  54. */
  55. @Operation(summary = "根据模型名称获取通报模型配置查询详细信息")
  56. // @SaCheckPermission("business:notifyModelConfig:query")
  57. @PostMapping("/getInfoByModelName")
  58. public AjaxResult getInfoByModelName(@RequestBody BjNotifyModelConfigBo bo) {
  59. return success(bjNotifyModelConfigService.queryByModelName(bo));
  60. }
  61. /**
  62. * 新增通报模型配置
  63. */
  64. @Operation(summary = "新增通报模型配置")
  65. // @RequiresPermissions("business:notifyModelConfig:add")
  66. @Log(title = "通报模型配置", businessType = BusinessType.INSERT)
  67. @PostMapping()
  68. public AjaxResult add(@RequestBody BjNotifyModelConfigBo bo) throws ParseException {
  69. return toAjax(bjNotifyModelConfigService.insertByBo(bo));
  70. }
  71. /**
  72. * 修改通报模型配置
  73. */
  74. @Operation(summary = "修改通报模型配置")
  75. // @RequiresPermissions("business:notifyModelConfig:edit")
  76. @Log(title = "通报模型配置", businessType = BusinessType.UPDATE)
  77. @PutMapping()
  78. public AjaxResult edit(@RequestBody BjNotifyModelConfigBo bo) throws ParseException {
  79. return toAjax(bjNotifyModelConfigService.updateByBo(bo));
  80. }
  81. /**
  82. * 删除通报模型配置
  83. *
  84. * @param notifyModelConfigId 主键串
  85. */
  86. @Operation(summary = "删除通报模型配置")
  87. // @RequiresPermissions("business:notifyModelConfig:remove")
  88. @Log(title = "通报模型配置", businessType = BusinessType.DELETE)
  89. @DeleteMapping("/{notifyModelConfigId}")
  90. public AjaxResult remove(@PathVariable("notifyModelConfigId") String[] notifyModelConfigId) {
  91. return toAjax(bjNotifyModelConfigService.deleteWithValidByIds(List.of(notifyModelConfigId), true));
  92. }
  93. }