From f61dc2d33639010a7b9505fad0cfbe9d36e1f83b Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期二, 24 九月 2024 11:19:44 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java index c84413b..bf58c85 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java @@ -7,7 +7,9 @@ import com.iailab.module.model.mcs.pre.dto.MmPredictItemDTO; import com.iailab.module.model.mcs.pre.entity.MmPredictItemEntity; import com.iailab.module.model.mcs.pre.service.MmPredictItemService; -import com.iailab.module.model.mcs.pre.vo.*; +import com.iailab.module.model.mcs.pre.vo.CountItemtypeVO; +import com.iailab.module.model.mcs.pre.vo.MmPredictItemPageReqVO; +import com.iailab.module.model.mcs.pre.vo.MmPredictItemRespVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; @@ -19,7 +21,6 @@ import java.util.Map; import java.util.UUID; -import static com.iailab.framework.common.pojo.CommonResult.error; import static com.iailab.framework.common.pojo.CommonResult.success; /** @@ -43,6 +44,14 @@ return success(BeanUtils.toBean(page, MmPredictItemRespVO.class)); } + @GetMapping("/list") + @PreAuthorize("@ss.hasPermission('model:pre-predict:query')") + public CommonResult<List<MmPredictItemEntity>> list(@RequestParam Map<String, Object> params) { + List<MmPredictItemEntity> list = mmPredictItemService.list(params); + + return success(list); + } + /** * 预测项信息 */ @@ -59,10 +68,8 @@ @PostMapping("/create") @PreAuthorize("@ss.hasPermission('model:pre-predict:create')") @DSTransactional(rollbackFor= Exception.class) - public CommonResult<Boolean> save(@RequestBody MmPredictItemEntity mmPredictItemEntity){ - String id = UUID.randomUUID().toString(); - mmPredictItemEntity.setId(id); - mmPredictItemService.add(mmPredictItemEntity); + public CommonResult<Boolean> save(@RequestBody MmPredictItemDTO mmPredictItemDto){ + mmPredictItemService.add(mmPredictItemDto); return success(true); } @@ -72,8 +79,8 @@ @PutMapping("/update") @PreAuthorize("@ss.hasPermission('model:pre-predict:update')") @DSTransactional(rollbackFor= Exception.class) - public CommonResult<Boolean> update(@RequestBody MmPredictItemEntity mmPredictItemEntity){ - mmPredictItemService.update(mmPredictItemEntity); + public CommonResult<Boolean> update(@RequestBody MmPredictItemDTO mmPredictItemDTO){ + mmPredictItemService.update(mmPredictItemDTO); return success(true); } -- Gitblit v1.9.3