use of com.moxi.mogublog.xo.vo.PictureVO in project mogu_blog_v2 by moxi624.
the class PictureServiceImpl method addPicture.
@Override
public String addPicture(List<PictureVO> pictureVOList) {
List<Picture> pictureList = new ArrayList<>();
if (pictureVOList.size() > 0) {
for (PictureVO pictureVO : pictureVOList) {
Picture picture = new Picture();
picture.setFileUid(pictureVO.getFileUid());
picture.setPictureSortUid(pictureVO.getPictureSortUid());
picture.setPicName(pictureVO.getPicName());
picture.setStatus(EStatus.ENABLE);
pictureList.add(picture);
}
pictureService.saveBatch(pictureList);
} else {
return ResultUtil.errorWithMessage(MessageConf.INSERT_FAIL);
}
return ResultUtil.successWithMessage(MessageConf.INSERT_SUCCESS);
}