潘志宝
2024-09-23 0a2f6f78683ba1c4e07f1359c1e7bf105a4bd507
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmItemTypeController.java
@@ -8,6 +8,7 @@
import com.iailab.module.model.mcs.pre.vo.MmItemTypePageReqVO;
import com.iailab.module.model.mcs.pre.vo.MmItemTypeRespVO;
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/item-type")
@RequestMapping("/model/pre/item-type")
public class MmItemTypeController {
    @Autowired
@@ -29,6 +30,7 @@
     * 预测项类型列表
     */
    @GetMapping("/page")
    @PreAuthorize("@ss.hasPermission('model:pre-item:query')")
    public CommonResult<PageResult<MmItemTypeRespVO>> page(@Validated MmItemTypePageReqVO reqVO) {
        PageResult<MmItemTypeEntity> page = mmItemTypeService.page(reqVO);
@@ -39,6 +41,7 @@
     * 预测项类型信息
     */
    @GetMapping("/get/{id}")
    @PreAuthorize("@ss.hasPermission('model:pre-item:query')")
    public CommonResult<MmItemTypeEntity> info(@PathVariable("id") String id) {
        MmItemTypeEntity itemType = mmItemTypeService.selectById(id);
@@ -49,6 +52,7 @@
     * 保存预测项类型
     */
    @PostMapping("/create")
    @PreAuthorize("@ss.hasPermission('model:pre-item:create')")
    public CommonResult<Boolean> save(@RequestBody MmItemTypeEntity itemType) {
        int count = mmItemTypeService.check(itemType);
        if (count > 0) {
@@ -62,6 +66,7 @@
     * 修改预测项类型
     */
    @PutMapping("/update")
    @PreAuthorize("@ss.hasPermission('model:pre-item:update')")
    public CommonResult<Boolean> update(@RequestBody MmItemTypeEntity itemType) {
        int count = mmItemTypeService.check(itemType);
        if (count > 0) {
@@ -75,6 +80,7 @@
     * 删除预测项类型
     */
    @DeleteMapping("/delete")
    @PreAuthorize("@ss.hasPermission('model:pre-item:delete')")
    public CommonResult<Boolean> delete(@RequestParam("id") String id) {
        mmItemTypeService.deleteBatch(new String[]{id});
        return success(true);