iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/DmModuleController.java
@@ -70,7 +70,7 @@ @PostMapping("/create") @PreAuthorize("@ss.hasPermission('model:pre-module:create')") @DSTransactional(rollbackFor= Exception.class) public CommonResult<Boolean> save(@RequestBody DmModuleEntity module){ public CommonResult<Boolean> create(@RequestBody DmModuleEntity module){ int count = dmModuleService.check(module); if (count > 0) { ErrorCode errorCode = new ErrorCode(999, "名称重复"); iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmItemTypeController.java
@@ -35,7 +35,7 @@ * 预测项类型列表 */ @GetMapping("/page") @PreAuthorize("@ss.hasPermission('model:pre-item:query')") @PreAuthorize("@ss.hasPermission('model:pre-type:query')") public CommonResult<PageResult<MmItemTypeRespVO>> page(@Validated MmItemTypePageReqVO reqVO) { PageResult<MmItemTypeEntity> page = mmItemTypeService.page(reqVO); @@ -43,7 +43,7 @@ } @GetMapping("/list") @PreAuthorize("@ss.hasPermission('model:pre-item:query')") @PreAuthorize("@ss.hasPermission('model:pre-type:query')") public CommonResult<List<MmItemTypeEntity>> list(@RequestParam Map<String, Object> params) { List<MmItemTypeEntity> list = mmItemTypeService.list(params); @@ -54,7 +54,7 @@ * 预测项类型信息 */ @GetMapping("/get/{id}") @PreAuthorize("@ss.hasPermission('model:pre-item:query')") @PreAuthorize("@ss.hasPermission('model:pre-type:query')") public CommonResult<MmItemTypeEntity> info(@PathVariable("id") String id) { MmItemTypeEntity itemType = mmItemTypeService.info(id); @@ -65,7 +65,7 @@ * 保存预测项类型 */ @PostMapping("/create") @PreAuthorize("@ss.hasPermission('model:pre-item:create')") @PreAuthorize("@ss.hasPermission('model:pre-type:create')") @DSTransactional(rollbackFor= Exception.class) public CommonResult<Boolean> save(@RequestBody MmItemTypeEntity itemType) { int count = mmItemTypeService.check(itemType); @@ -80,7 +80,7 @@ * 修改预测项类型 */ @PutMapping("/update") @PreAuthorize("@ss.hasPermission('model:pre-item:update')") @PreAuthorize("@ss.hasPermission('model:pre-type:update')") @DSTransactional(rollbackFor= Exception.class) public CommonResult<Boolean> update(@RequestBody MmItemTypeEntity itemType) { int count = mmItemTypeService.check(itemType); @@ -95,7 +95,7 @@ * 删除预测项类型 */ @DeleteMapping("/delete") @PreAuthorize("@ss.hasPermission('model:pre-item:delete')") @PreAuthorize("@ss.hasPermission('model:pre-type:delete')") @DSTransactional(rollbackFor= Exception.class) public CommonResult<Boolean> delete(@RequestParam("id") String id) { mmItemTypeService.deleteBatch(new String[]{id}); iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java
@@ -51,7 +51,7 @@ * 预测项列表 */ @GetMapping("/page") @PreAuthorize("@ss.hasPermission('model:pre-predict:query')") @PreAuthorize("@ss.hasPermission('model:pre-item:query')") public CommonResult<PageResult<MmPredictItemRespVO>> page(@Validated MmPredictItemPageReqVO reqVO) { PageResult<MmPredictItemEntity> page = mmPredictItemService.queryPage(reqVO); PageResult<MmPredictItemRespVO> result = BeanUtils.toBean(page, MmPredictItemRespVO.class); @@ -79,7 +79,7 @@ * 预测项信息 */ @GetMapping("/get/{id}") @PreAuthorize("@ss.hasPermission('model:pre-predict:query')") @PreAuthorize("@ss.hasPermission('model:pre-item:query')") public CommonResult<MmPredictItemDTO> info(@PathVariable("id") String id){ MmPredictItemDTO predictItem = mmPredictItemService.info(id); return success(predictItem); @@ -89,7 +89,7 @@ * 保存预测项 */ @PostMapping("/create") @PreAuthorize("@ss.hasPermission('model:pre-predict:create')") @PreAuthorize("@ss.hasPermission('model:pre-item:create')") @DSTransactional(rollbackFor= Exception.class) public CommonResult<Boolean> save(@RequestBody MmPredictItemDTO mmPredictItemDto){ mmPredictItemService.add(mmPredictItemDto); @@ -100,7 +100,7 @@ * 修改预测项 */ @PutMapping("/update") @PreAuthorize("@ss.hasPermission('model:pre-predict:update')") @PreAuthorize("@ss.hasPermission('model:pre-item:update')") @DSTransactional(rollbackFor= Exception.class) public CommonResult<Boolean> update(@RequestBody MmPredictItemDTO mmPredictItemDTO){ mmPredictItemService.update(mmPredictItemDTO); @@ -111,7 +111,7 @@ * 删除预测项 */ @DeleteMapping("/delete") @PreAuthorize("@ss.hasPermission('model:pre-predict:delete')") @PreAuthorize("@ss.hasPermission('model:pre-item:delete')") @DSTransactional(rollbackFor= Exception.class) public CommonResult<Boolean> delete(@RequestParam("id") String id) { mmPredictItemService.deleteBatch(new String[]{id}); iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmResultTableController.java
@@ -38,7 +38,6 @@ * 结果存放列表 */ @GetMapping("/page") @PreAuthorize("@ss.hasPermission('model:pre-result:query')") public CommonResult<PageResult<MmResultTableRespVO>> page(@Validated MmResultTablePageReqVO reqVO) { PageResult<MmResultTableEntity> page = mmResultTableService.page(reqVO); @@ -47,7 +46,6 @@ @GetMapping("/list") @PreAuthorize("@ss.hasPermission('model:pre-result:query')") public CommonResult<List<MmResultTableEntity>> list(@Valid @RequestParam Map<String, Object> params) { List<MmResultTableEntity> list = mmResultTableService.list(params); return success(list); iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/app/app.java
文件已删除 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/package-info.java
对比新文件 @@ -0,0 +1 @@ package com.iailab.module.model.mcs.pre.controller; iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/DmModuleServiceImpl.java
@@ -1,11 +1,8 @@ package com.iailab.module.model.mcs.pre.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.iailab.framework.common.page.PageData; import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.service.impl.BaseServiceImpl; import com.iailab.module.model.mcs.pre.dao.DmModuleDao; import com.iailab.module.model.mcs.pre.entity.DmModuleEntity; import com.iailab.module.model.mcs.pre.service.DmModuleService; @@ -13,9 +10,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.*; /** @@ -36,7 +31,7 @@ @Override public List<DmModuleEntity> list(Map<String, Object> params) { QueryWrapper<DmModuleEntity> wrapper = getWrapper(params); wrapper.orderByDesc("CREATE_TIME"); wrapper.orderByDesc("create_time"); return dmModuleDao.selectList(wrapper); } @@ -57,21 +52,17 @@ } @Override public void saveModule(DmModuleEntity module) { module.setId(UUID.randomUUID().toString()); Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); module.setPredicttime(calendar.getTime()); module.setCollecttime(calendar.getTime()); module.setUpdateTime(new Date()); dmModuleDao.insert(module); public void saveModule(DmModuleEntity entity) { entity.setId(UUID.randomUUID().toString()); entity.setCreateTime(new Date()); entity.setUpdateTime(new Date()); dmModuleDao.insert(entity); } @Override public void update(DmModuleEntity module) { module.setUpdateTime(new Date()); dmModuleDao.updateById(module); public void update(DmModuleEntity entity) { entity.setUpdateTime(new Date()); dmModuleDao.updateById(entity); } @Override iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/vo/MmItemTypeRespVO.java
@@ -13,7 +13,7 @@ * @Description * @createTime 2024年09月04日 */ @Schema(description = "模型平台 - MmItemType Response VO") @Schema(description = "模型平台 - 预测项类型 Response VO") @Data @ExcelIgnoreUnannotated public class MmItemTypeRespVO {