|
|
@ -39,6 +39,7 @@ import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
@ -132,4 +133,18 @@ public class InformationServiceImpl extends BaseServiceImpl<InformationDao, Info |
|
|
|
public Result<EpdcInformationFristResultDTO> selectOneFristByUserId(String userId) { |
|
|
|
return new Result<EpdcInformationFristResultDTO>().ok(baseDao.selectOneFristByUserId(userId)); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result saveInformationList(List<EpdcInformationFormDTO> epdcInformationFormDTOList) { |
|
|
|
if(epdcInformationFormDTOList != null && !epdcInformationFormDTOList.isEmpty()){ |
|
|
|
List<InformationEntity> addData = new ArrayList<>(epdcInformationFormDTOList.size()); |
|
|
|
for(EpdcInformationFormDTO epdcInformationFormDTO : epdcInformationFormDTOList){ |
|
|
|
InformationEntity entity = ConvertUtils.sourceToTarget(epdcInformationFormDTO, InformationEntity.class); |
|
|
|
entity.setReadFlag(YesOrNoEnum.NO.value()); |
|
|
|
addData.add(entity); |
|
|
|
} |
|
|
|
this.insertBatch(addData); |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
} |