package com.ruoyi.business.controller; import com.ruoyi.business.domain.bo.BjNotifyModelConfigBo; import com.ruoyi.business.service.IBjNotifyModelConfigService; import com.ruoyi.common.core.web.controller.BaseController; import com.ruoyi.common.core.web.domain.AjaxResult; import com.ruoyi.common.core.web.page.TableDataInfo; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.text.ParseException; import java.util.List; /** * 通报模型配置查询 * 前端访问路由地址为:/business/notifyModelConfig * * @author libai * @date 2025-11-03 */ @Tag(name = "通报模型配置查询") @Validated @RequiredArgsConstructor @RestController @RequestMapping("/notifyModelConfig") public class BjNotifyModelConfigController extends BaseController { @Resource private IBjNotifyModelConfigService bjNotifyModelConfigService; /** * 通报模型配置查询列表 */ @Operation(summary = "查询通报模型配置查询列表") // @SaCheckPermission("business:notifyModelConfig:list") @GetMapping("/list") public TableDataInfo list(BjNotifyModelConfigBo bo) { return getDataTable(bjNotifyModelConfigService.queryPageList(bo)); } /** * 获取通报模型配置查询详细信息 * * @param notifyModelConfigId 主键 */ @Operation(summary = "获取通报模型配置查询详细信息") // @SaCheckPermission("business:notifyModelConfig:query") @GetMapping("/{notifyModelConfigId}") public AjaxResult getInfo(@PathVariable("notifyModelConfigId") String notifyModelConfigId) { return success(bjNotifyModelConfigService.queryById(notifyModelConfigId)); } /** * 根据模型名称获取通报模型配置查询详细信息 */ @Operation(summary = "根据模型名称获取通报模型配置查询详细信息") // @SaCheckPermission("business:notifyModelConfig:query") @PostMapping("/getInfoByModelName") public AjaxResult getInfoByModelName(@RequestBody BjNotifyModelConfigBo bo) { return success(bjNotifyModelConfigService.queryByModelName(bo)); } /** * 新增通报模型配置 */ @Operation(summary = "新增通报模型配置") // @RequiresPermissions("business:notifyModelConfig:add") @Log(title = "通报模型配置", businessType = BusinessType.INSERT) @PostMapping() public AjaxResult add(@RequestBody BjNotifyModelConfigBo bo) throws ParseException { return toAjax(bjNotifyModelConfigService.insertByBo(bo)); } /** * 修改通报模型配置 */ @Operation(summary = "修改通报模型配置") // @RequiresPermissions("business:notifyModelConfig:edit") @Log(title = "通报模型配置", businessType = BusinessType.UPDATE) @PutMapping() public AjaxResult edit(@RequestBody BjNotifyModelConfigBo bo) throws ParseException { return toAjax(bjNotifyModelConfigService.updateByBo(bo)); } /** * 删除通报模型配置 * * @param notifyModelConfigId 主键串 */ @Operation(summary = "删除通报模型配置") // @RequiresPermissions("business:notifyModelConfig:remove") @Log(title = "通报模型配置", businessType = BusinessType.DELETE) @DeleteMapping("/{notifyModelConfigId}") public AjaxResult remove(@PathVariable("notifyModelConfigId") String[] notifyModelConfigId) { return toAjax(bjNotifyModelConfigService.deleteWithValidByIds(List.of(notifyModelConfigId), true)); } }