| | |
| | | package com.iailab.module.model.mcs.pre.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.iailab.framework.common.service.impl.BaseServiceImpl; |
| | | import com.iailab.module.model.mcs.pre.dao.DmModuleItemDao; |
| | | import com.iailab.module.model.mcs.pre.dao.MmPredictMergeItemDao; |
| | | import com.iailab.module.model.mcs.pre.entity.MmPredictMergeItemEntity; |
| | | import com.iailab.module.model.mcs.pre.service.MmPredictMergeItemService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | * @author PanZhibao |
| | | * @date 2021年04月27日 9:27 |
| | | */ |
| | | @Service("mmPredictMergeItemService") |
| | | public class MmPredictMergeItemServiceImpl extends BaseServiceImpl<MmPredictMergeItemDao, MmPredictMergeItemEntity> implements MmPredictMergeItemService { |
| | | @Service |
| | | public class MmPredictMergeItemServiceImpl extends ServiceImpl<MmPredictMergeItemDao, MmPredictMergeItemEntity> implements MmPredictMergeItemService { |
| | | |
| | | @Autowired |
| | | private MmPredictMergeItemDao mmPredictMergeItemDao; |
| | | |
| | | @Override |
| | | public void savePredictMergeItem(MmPredictMergeItemEntity predictMergeItem) { |
| | | predictMergeItem.setId(UUID.randomUUID().toString()); |
| | | baseDao.insert(predictMergeItem); |
| | | mmPredictMergeItemDao.insert(predictMergeItem); |
| | | } |
| | | |
| | | @Override |
| | |
| | | public void deleteBatch(String[] itemIds) { |
| | | QueryWrapper queryWrapper = new QueryWrapper<MmPredictMergeItemEntity>(); |
| | | queryWrapper.in("itemid", itemIds); |
| | | baseDao.delete(queryWrapper); |
| | | mmPredictMergeItemDao.delete(queryWrapper); |
| | | } |
| | | |
| | | public MmPredictMergeItemEntity getByItemid(String itemid) { |
| | | QueryWrapper queryWrapper = new QueryWrapper<MmPredictMergeItemEntity>(); |
| | | queryWrapper.eq("itemid", itemid); |
| | | List<MmPredictMergeItemEntity> list = baseDao.selectList(queryWrapper); |
| | | List<MmPredictMergeItemEntity> list = mmPredictMergeItemDao.selectList(queryWrapper); |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | return new MmPredictMergeItemEntity(); |
| | | } |