增加规则配置

This commit is contained in:
wuweihua
2026-10-16 13:40:03 +08:00
parent b3f79ffc4c
commit b54cb1b018
16 changed files with 1376 additions and 7 deletions
@@ -0,0 +1,73 @@
package com.bms.web.controller.data;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bms.common.annotation.Log;
import com.bms.common.core.controller.BaseController;
import com.bms.common.core.domain.AjaxResult;
import com.bms.common.core.page.TableDataInfo;
import com.bms.common.enums.BusinessType;
import com.bms.system.domain.BmsBizRule;
import com.bms.system.service.IBmsBizRuleService;
/**
* 规则配置
*/
@RestController
@RequestMapping("/data/bizRule")
public class BmsBizRuleController extends BaseController
{
@Autowired
private IBmsBizRuleService bizRuleService;
@PreAuthorize("@ss.hasPermi('data:bizRule:list')")
@GetMapping("/list")
public TableDataInfo list(BmsBizRule query)
{
startPage();
List<BmsBizRule> list = bizRuleService.selectList(query);
return getDataTable(list);
}
@PreAuthorize("@ss.hasPermi('data:bizRule:query')")
@GetMapping("/{ruleId}")
public AjaxResult getInfo(@PathVariable Long ruleId)
{
return success(bizRuleService.selectById(ruleId));
}
@PreAuthorize("@ss.hasPermi('data:bizRule:add')")
@Log(title = "biz rule", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BmsBizRule row)
{
row.setCreateBy(getUsername());
return toAjax(bizRuleService.insert(row));
}
@PreAuthorize("@ss.hasPermi('data:bizRule:edit')")
@Log(title = "biz rule", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BmsBizRule row)
{
row.setUpdateBy(getUsername());
return toAjax(bizRuleService.update(row));
}
@PreAuthorize("@ss.hasPermi('data:bizRule:remove')")
@Log(title = "biz rule", businessType = BusinessType.DELETE)
@DeleteMapping("/{ruleIds}")
public AjaxResult remove(@PathVariable Long[] ruleIds)
{
return toAjax(bizRuleService.deleteByIds(ruleIds));
}
}