| | |
| | | package com.kidgrow.oprationcenter.service.impl; |
| | | |
| | | import com.kidgrow.oprationcenter.vo.DataNeedExcel; |
| | | import org.springframework.cglib.beans.BeanCopier; |
| | | import org.springframework.stereotype.Service; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import org.apache.commons.collections4.MapUtils; |
| | |
| | | public DataNeed findByObject(DataNeed dataNeed){ |
| | | return baseMapper.findByObject(dataNeed); |
| | | } |
| | | |
| | | @Override |
| | | public List<DataNeedExcel> findListExportByParam(Map<String, Object> params) { |
| | | List<DataNeed> dataNeeds = baseMapper.selectByMap(params); |
| | | List<DataNeedExcel> voList=new ArrayList<>(); |
| | | dataNeeds.forEach(e ->{ |
| | | DataNeedExcel vo=new DataNeedExcel(); |
| | | BeanCopier beanCopier = BeanCopier.create(DataNeed.class, DataNeedExcel.class, false); |
| | | beanCopier.copy(e,vo,null); |
| | | voList.add(vo); |
| | | }); |
| | | return voList; |
| | | } |
| | | } |