iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/DmModuleItemServiceImpl.java
@@ -7,7 +7,6 @@ import com.iailab.module.model.mcs.pre.service.DmModuleItemService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.List; @@ -23,14 +22,12 @@ private DmModuleItemDao dmModuleItemDao; @Override @Transactional(rollbackFor = Exception.class) public void saveModuleItem(DmModuleItemEntity moduleItem) { moduleItem.setId(UUID.randomUUID().toString()); dmModuleItemDao.insert(moduleItem); } @Override @Transactional(rollbackFor = Exception.class) public void update(DmModuleItemEntity moduleItem) { dmModuleItemDao.updateById(moduleItem); } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java
@@ -9,7 +9,6 @@ import com.iailab.module.model.mdk.vo.MmItemOutputVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.List; @@ -27,14 +26,12 @@ private MmItemOutputDao mmItemOutputDao; @Override @Transactional(rollbackFor = Exception.class) public void saveMmItemOutput(MmItemOutputEntity mmItemOutput) { mmItemOutput.setId(UUID.randomUUID().toString()); mmItemOutputDao.insert(mmItemOutput); } @Override @Transactional(rollbackFor = Exception.class) public void update(MmItemOutputEntity mmItemOutput) { mmItemOutputDao.updateById(mmItemOutput); } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmModelArithSettingsServiceImpl.java
@@ -1,5 +1,6 @@ package com.iailab.module.model.mcs.pre.service.impl; import com.baomidou.dynamic.datasource.annotation.DSTransactional; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.iailab.framework.common.service.impl.BaseServiceImpl; @@ -23,7 +24,7 @@ @Autowired private MmModelArithSettingsDao mmModelArithSettingsDao; @Override public void saveList(List<MmModelArithSettingsEntity> list) { QueryWrapper<MmModelArithSettingsEntity> queryWrapper = new QueryWrapper(); iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java
@@ -1,5 +1,6 @@ package com.iailab.module.model.mcs.pre.service.impl; import com.baomidou.dynamic.datasource.annotation.DSTransactional; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -61,7 +62,7 @@ public PageResult<MmPredictItemRespVO> queryPage(MmPredictItemPageReqVO reqVO) { IPage<MmPredictItemRespVO> page = mmPredictItemDao.selectPage(reqVO); return new PageResult<MmPredictItemRespVO>(page.getRecords(), page.getTotal()); return new PageResult<MmPredictItemRespVO>(page.getRecords(), page.getTotal()); } @Override @@ -69,6 +70,7 @@ return mmPredictItemDao.queryList(params); } @DSTransactional(rollbackFor = Exception.class) @Override public void add(MmPredictItemDTO mmPredictItemDto) { MmPredictItemEntity predictItem = mmPredictItemDto.getMmPredictItem(); @@ -119,6 +121,7 @@ mmItemOutputService.saveMmItemOutput(mmItemOutput); } @DSTransactional(rollbackFor = Exception.class) @Override public void update(MmPredictItemDTO mmPredictItemDto) { MmPredictItemEntity predictItem = mmPredictItemDto.getMmPredictItem(); @@ -145,15 +148,16 @@ mmPredictMergeItemService.update(mMmPredictMergeItem); } DmModuleItemEntity dmModuleItem = mmPredictItemDto.getDmModuleItem(); if(!"".equals(dmModuleItem.getId()) && dmModuleItem.getId() != null){ if (!"".equals(dmModuleItem.getId()) && dmModuleItem.getId() != null) { dmModuleItemService.update(dmModuleItem); } MmItemOutputEntity mmItemOutput = mmPredictItemDto.getMmItemOutput(); if(!"".equals(mmItemOutput.getId()) && dmModuleItem.getId() != null){ if (!"".equals(mmItemOutput.getId()) && dmModuleItem.getId() != null) { mmItemOutputService.update(mmItemOutput); } } @DSTransactional(rollbackFor = Exception.class) @Override public void deleteBatch(String[] itemIds) { mmPredictItemDao.deleteBatchIds(Arrays.asList(itemIds)); @@ -175,6 +179,7 @@ mmPredictItemDto.setMmPredictModel(mmPredictModel); mmPredictItemDto.setMmModelArithSettingsList(mmModelArithSettingsService.getByModelid(mmPredictModel.getId())); mmPredictItemDto.setMmModelParamList(mmModelParamService.getByModelid(mmPredictModel.getId())); mmPredictItemDto.setMmPredictMergeItem(new MmPredictMergeItemEntity()); } else if (itemType != null && ItemTypeEnum.MERGE_ITEM.getName().equals(itemType.getItemtypename())) { mmPredictItemDto.setMmPredictMergeItem(mmPredictMergeItemService.getByItemid(id)); } iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/MmModelArithSettings.xml
对比新文件 @@ -0,0 +1,27 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.iailab.module.model.mcs.pre.dao.MmModelArithSettingsDao"> <select id="getMmModelArithSettings" resultType="com.iailab.module.model.mcs.pre.entity.MmModelArithSettingsEntity" parameterType="map"> SELECT id, modelid, `key`, `value`, name, valuetype FROM t_mm_model_arith_settings WHERE modelid = #{modelid} </select> <insert id="insertList" parameterType="list"> INSERT INTO t_mm_model_arith_settings ( id, modelid, `key`, `value`, name, valuetype ) VALUES <foreach collection="list" item="item" separator=","> (#{item.id}, #{item.modelid}, #{item.key}, #{item.value}, #{item.name}, #{item.valuetype}) </foreach> </insert> </mapper>