Search in sources :

Example 1 with PictureVO

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);
}
Also used : Picture(com.moxi.mogublog.commons.entity.Picture) PictureVO(com.moxi.mogublog.xo.vo.PictureVO)

Aggregations

Picture (com.moxi.mogublog.commons.entity.Picture)1 PictureVO (com.moxi.mogublog.xo.vo.PictureVO)1