liriming
2024-09-23 5c60072c51928a5c8a0732191b1df17a88c68b99
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/DmModuleController.java
@@ -1,5 +1,6 @@
package com.iailab.module.model.mcs.pre.controller.admin;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.iailab.framework.common.exception.ErrorCode;
import com.iailab.framework.common.pojo.CommonResult;
import com.iailab.framework.common.pojo.PageResult;
@@ -58,7 +59,7 @@
    @GetMapping("/get/{id}")
    @PreAuthorize("@ss.hasPermission('model:pre-module:query')")
    public CommonResult<DmModuleEntity> info(@PathVariable("id") String id){
        DmModuleEntity info = dmModuleService.selectById(id);
        DmModuleEntity info = dmModuleService.info(id);
        return success(info);
    }
@@ -68,6 +69,7 @@
     */
    @PostMapping("/create")
    @PreAuthorize("@ss.hasPermission('model:pre-module:create')")
    @DSTransactional(rollbackFor= Exception.class)
    public CommonResult<Boolean> save(@RequestBody DmModuleEntity module){
        int count = dmModuleService.check(module);
        if (count > 0) {
@@ -83,6 +85,7 @@
     */
    @PutMapping("/update")
    @PreAuthorize("@ss.hasPermission('model:pre-module:update')")
    @DSTransactional(rollbackFor= Exception.class)
    public CommonResult<Boolean> update(@RequestBody DmModuleEntity module){
        dmModuleService.update(module);
        return success(true);
@@ -93,6 +96,7 @@
     */
    @DeleteMapping("/delete")
    @PreAuthorize("@ss.hasPermission('model:pre-module:delete')")
    @DSTransactional(rollbackFor= Exception.class)
    public CommonResult<Boolean> delete(@RequestParam("id") String id){
        dmModuleService.deleteBatch(new String[]{id});
        return success(true);