提交 233d2c4d authored 作者: liupengfei's avatar liupengfei

--no commit message

上级 cafa69af
......@@ -5,7 +5,6 @@ import java.util.Date;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -21,7 +20,7 @@ import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.audiolibrary.AudioLibrary;
import com.zrqx.core.model.resource.audiolibrary.AudioLibraryDiyType;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.bean.Copy;
import com.zrqx.core.util.bean.BeanUtils;
import com.zrqx.core.util.page.PageInfo;
import com.zrqx.core.util.page.PageParam;
import com.zrqx.core.vo.resource.audiolibrary.AudioLibraryListVO;
......@@ -70,8 +69,7 @@ public class AudioLibrarySerivceImpl extends BaseServiceImpl<AudioLibrary,Intege
}
@Override
public boolean batchInsert(List<SaveAudioLibraryForm> form) {
List<AudioLibrary> list = Copy.copyList(form, AudioLibrary.class);
list.forEach(li ->{
List<AudioLibrary> list = BeanUtils.copyList(form, AudioLibrary.class, li -> {
li.setStatus(LibraryStatusEnum.STATUS_0.getCode());
li.setUpdateTime(new Date());
});
......
......@@ -6,7 +6,6 @@ import java.util.Date;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -20,6 +19,7 @@ import com.zrqx.core.model.resource.label.LabelDataType;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.page.PageInfo;
import com.zrqx.core.util.page.PageParam;
import com.zrqx.core.util.bean.BeanUtils;
import com.zrqx.core.util.bean.Copy;
import com.zrqx.core.vo.resource.label.LabelListVO;
import com.zrqx.core.vo.resource.label.LabelOneVO;
......@@ -51,7 +51,7 @@ public class LabelSerivceImpl extends BaseServiceImpl<Label,Integer> implements
Label label = labelMapper.selectByPrimaryKey(oid);
BeanUtils.copyProperties(label, form);
List<LabelDataType> li = labelDataTypeMapper.queryBylabelId(oid);
form.setDataType(Copy.copyList(li,LabelDataTypeForm.class));
form.setDataType(BeanUtils.copyList(li,LabelDataTypeForm.class));
return form;
}
@Override
......
......@@ -5,7 +5,6 @@ import java.util.Date;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -21,6 +20,7 @@ import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.videolibrary.VideoLibrary;
import com.zrqx.core.model.resource.videolibrary.VideoLibraryDiyTypeRelation;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.bean.BeanUtils;
import com.zrqx.core.util.bean.Copy;
import com.zrqx.core.util.page.PageInfo;
import com.zrqx.core.util.page.PageParam;
......@@ -84,8 +84,7 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,Intege
*/
@Override
public boolean batchInsert(List<SaveVideoLibraryForm> form) {
List<VideoLibrary> list = Copy.copyList(form, VideoLibrary.class);
list.forEach(li ->{
List<VideoLibrary> list = BeanUtils.copyList(form, VideoLibrary.class, li -> {
li.setStatus(LibraryStatusEnum.STATUS_0.getCode());
li.setUpdateTime(new Date());
});
......
......@@ -7,7 +7,6 @@ import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -22,6 +21,7 @@ import com.zrqx.core.form.resource.fg.ebook.FgQueryEbookInfoForm;
import com.zrqx.core.form.resource.fg.ebook.FgQueryOtherEbookForm;
import com.zrqx.core.model.resource.ebook.Book;
import com.zrqx.core.model.resource.ebook.Ebook;
import com.zrqx.core.util.bean.BeanUtils;
import com.zrqx.core.util.bean.Copy;
import com.zrqx.core.util.page.PageInfo;
import com.zrqx.core.util.page.PageParam;
......@@ -110,8 +110,7 @@ public class FgEbookController {
public CallBack<List<FgEbookVO>> getListByIds(@RequestParam(value = "ids") List<Integer> ids) {
bookservice.createCriteria().andIn("id", ids);
List<Book> books = bookservice.selectByCriteria();
List<FgEbookVO> vos = Copy.copyList(books, FgEbookVO.class);
vos.forEach(vo ->{
List<FgEbookVO> vos = BeanUtils.copyList(books, FgEbookVO.class, vo -> {
Ebook ebook = ebookservice.selectByPrimaryKey(vo.getId());
BeanUtils.copyProperties(ebook, vo);
});
......
......@@ -8,7 +8,6 @@ import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -36,6 +35,7 @@ import com.zrqx.core.model.resource.articlelibrary.ArticleLibraryDiyType;
import com.zrqx.core.model.resource.ebook.Book;
import com.zrqx.core.model.resource.ebook.EbookDiyType;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.bean.BeanUtils;
import com.zrqx.core.util.bean.Copy;
import com.zrqx.core.util.page.PageParam;
import com.zrqx.core.util.response.CallBack;
......@@ -379,7 +379,7 @@ public class FgArticleLibrarySerivceImpl extends BaseServiceImpl<ArticleLibrary,
ArticleLibrary article = new ArticleLibrary();
article.setBookId(form.getBookId());
article.setStatus(StatusEnum.ENABLE.getCode());
List<FgArticleLibraryListVO> list = Copy.copyList(mapper.select(article),FgArticleLibraryListVO.class);
List<FgArticleLibraryListVO> list = BeanUtils.copyList(mapper.select(article),FgArticleLibraryListVO.class);
return list;
}
......
......@@ -14,6 +14,7 @@ import com.zrqx.core.model.resource.ebook.Book;
import com.zrqx.core.model.resource.ebook.Ebook;
import com.zrqx.core.model.resource.record.Record;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.bean.BeanUtils;
import com.zrqx.core.util.bean.Copy;
import com.zrqx.core.vo.resource.fg.record.FgMyRecordVO;
import com.zrqx.resource.commons.Redis;
......@@ -96,8 +97,7 @@ public class FgRecordServiceImpl extends BaseServiceImpl<Record, Integer>
record.setMemberId(123456);
List<Record> list = mapper.select(record);
if(list != null && list.size() > 0){
List<FgMyRecordVO> vos = Copy.copyList(list, FgMyRecordVO.class);
vos.forEach(vo ->{
List<FgMyRecordVO> vos = BeanUtils.copyList(list, FgMyRecordVO.class, vo -> {
//文章2-2
if(GoodsTypeEnum.ARTICLE.getCode().equals(vo.getGoodsType())){
ArticleLibrary article = articleLibraryMapper.selectByPrimaryKey(vo.getGoodsId());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论