潘志宝
2024-09-23 0a2f6f78683ba1c4e07f1359c1e7bf105a4bd507
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmResultTableController.java
@@ -8,6 +8,7 @@
import com.iailab.module.model.mcs.pre.vo.MmItemTypeRespVO;
import com.iailab.module.model.mcs.pre.vo.MmResultTablePageReqVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -19,7 +20,7 @@
 * @date 2021年04月22日 9:57
 */
@RestController
@RequestMapping("/pre/result-table")
@RequestMapping("/model/pre/result-table")
public class MmResultTableController {
    @Autowired
@@ -29,13 +30,15 @@
     * 结果存放列表
     */
    @GetMapping("/page")
    @PreAuthorize("@ss.hasPermission('model:pre-result:query')")
    public CommonResult<PageResult<MmItemTypeRespVO>> page(@Validated MmResultTablePageReqVO reqVO) {
        PageResult<MmResultTableEntity> page = mmResultTableService.page(reqVO);
        return success(BeanUtils.toBean(page, MmItemTypeRespVO.class));
    }
    @GetMapping("/info/{id}")
    @GetMapping("/get/{id}")
    @PreAuthorize("@ss.hasPermission('model:pre-result:query')")
    public CommonResult<MmResultTableEntity> info(@PathVariable("id") String id){
        MmResultTableEntity resultTable = mmResultTableService.selectById(id);
@@ -45,7 +48,8 @@
    /**
     * 保存结果存放
     */
    @PostMapping
    @PostMapping("/create")
    @PreAuthorize("@ss.hasPermission('model:pre-result:create')")
    public CommonResult<Boolean> save(@RequestBody MmResultTableEntity resultTable){
        int count = mmResultTableService.check(resultTable);
        if (count > 0) {
@@ -58,7 +62,8 @@
    /**
     * 修改结果存放
     */
    @PutMapping
    @PutMapping("/update")
    @PreAuthorize("@ss.hasPermission('model:pre-result:update')")
    public CommonResult<Boolean> update(@RequestBody MmResultTableEntity resultTable){
        int count = mmResultTableService.check(resultTable);
        if (count > 0) {
@@ -71,9 +76,10 @@
    /**
     * 删除结果存放
     */
    @DeleteMapping("{id}")
    public CommonResult<Boolean> delete(@RequestBody String[] ids){
        mmResultTableService.deleteBatch(ids);
    @DeleteMapping("/delete")
    @PreAuthorize("@ss.hasPermission('model:pre-result:delete')")
    public CommonResult<Boolean> delete(@RequestParam("id") String id) {
        mmResultTableService.deleteBatch(new String[]{id});
        return success(true);
    }
}