|
@@ -5,9 +5,9 @@ import api.common.pojo.constants.DictConstants;
|
|
import api.common.util.CollectionUtil;
|
|
import api.common.util.CollectionUtil;
|
|
import api.common.util.JsonUtil;
|
|
import api.common.util.JsonUtil;
|
|
import com.css.simulation.resource.common.acl.entity.AlgorithmExpandAclEntity;
|
|
import com.css.simulation.resource.common.acl.entity.AlgorithmExpandAclEntity;
|
|
-import com.css.simulation.resource.common.infrastructure.mysql.entity.AlgorithmExpandInfrastructureEntity;
|
|
|
|
-import com.css.simulation.resource.common.infrastructure.mysql.mapper.AlgorithmExpandMapper;
|
|
|
|
-import com.css.simulation.resource.common.infrastructure.mysql.param.AlgorithmExpandInfrastructureParam;
|
|
|
|
|
|
+import com.css.simulation.resource.common.infra.mysql.entity.AlgorithmExpandEntity;
|
|
|
|
+import com.css.simulation.resource.common.infra.mysql.mapper.AlgorithmExpandMapper;
|
|
|
|
+import com.css.simulation.resource.common.infra.mysql.param.AlgorithmExpandInfrastructureParam;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -40,16 +40,16 @@ public class AlgorithmExpandDomainService {
|
|
final String algorithmId = algorithmExpandAclEntity.getAlgorithmId();
|
|
final String algorithmId = algorithmExpandAclEntity.getAlgorithmId();
|
|
if (infrastructureAlgorithmIds.contains(algorithmId)) {
|
|
if (infrastructureAlgorithmIds.contains(algorithmId)) {
|
|
log.info("更新算法平台算法。");
|
|
log.info("更新算法平台算法。");
|
|
- final List<AlgorithmExpandInfrastructureEntity> AlgorithmExpandInfrastructureEntities = algorithmExpandMapper.select(AlgorithmExpandInfrastructureParam.builder().algorithmId(algorithmId).build());
|
|
|
|
- final AlgorithmExpandInfrastructureEntity algorithmExpandInfrastructureEntity = AlgorithmExpandInfrastructureEntities.get(0);
|
|
|
|
- BeanUtils.copyProperties(algorithmExpandAclEntity, algorithmExpandInfrastructureEntity);
|
|
|
|
- algorithmExpandMapper.update(algorithmExpandInfrastructureEntity);
|
|
|
|
|
|
+ final List<AlgorithmExpandEntity> AlgorithmExpandInfrastructureEntities = algorithmExpandMapper.select(AlgorithmExpandInfrastructureParam.builder().algorithmId(algorithmId).build());
|
|
|
|
+ final AlgorithmExpandEntity algorithmExpandEntity = AlgorithmExpandInfrastructureEntities.get(0);
|
|
|
|
+ BeanUtils.copyProperties(algorithmExpandAclEntity, algorithmExpandEntity);
|
|
|
|
+ algorithmExpandMapper.update(algorithmExpandEntity);
|
|
}else {
|
|
}else {
|
|
log.info("插入算法平台算法。");
|
|
log.info("插入算法平台算法。");
|
|
- final AlgorithmExpandInfrastructureEntity algorithmExpandInfrastructureEntity = new AlgorithmExpandInfrastructureEntity();
|
|
|
|
- BeanUtils.copyProperties(algorithmExpandAclEntity, algorithmExpandInfrastructureEntity);
|
|
|
|
- algorithmExpandInfrastructureEntity.setStatus(DictConstants.ALGORITHM_EXPAND_STATUS_NOT_TESTED);
|
|
|
|
- algorithmExpandMapper.insert(algorithmExpandInfrastructureEntity);
|
|
|
|
|
|
+ final AlgorithmExpandEntity algorithmExpandEntity = new AlgorithmExpandEntity();
|
|
|
|
+ BeanUtils.copyProperties(algorithmExpandAclEntity, algorithmExpandEntity);
|
|
|
|
+ algorithmExpandEntity.setStatus(DictConstants.ALGORITHM_EXPAND_STATUS_NOT_TESTED);
|
|
|
|
+ algorithmExpandMapper.insert(algorithmExpandEntity);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|