package com.foreverwin.mesnac.anomaly.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.mesnac.anomaly.mapper.UploadPicturesMapper;
import com.foreverwin.mesnac.anomaly.model.UploadPictures;
import com.foreverwin.mesnac.anomaly.service.UploadPicturesService;
import com.foreverwin.modular.core.util.FrontPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zjw
 * @since 2021-09-09
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UploadPicturesServiceImpl extends ServiceImpl<UploadPicturesMapper, UploadPictures> implements UploadPicturesService {


    @Autowired
    private UploadPicturesMapper uploadPicturesMapper;

    @Override
    public IPage<UploadPictures> selectPage(FrontPage<UploadPictures> frontPage, UploadPictures uploadPictures) {
        QueryWrapper<UploadPictures> queryWrapper = new QueryWrapper<>();
        queryWrapper.setEntity(uploadPictures);
        return super.page(frontPage.getPagePlus(), queryWrapper);
    }

    @Override
    public List<UploadPictures> selectList(UploadPictures uploadPictures) {
        QueryWrapper<UploadPictures> queryWrapper = new QueryWrapper<>();
        queryWrapper.setEntity(uploadPictures);
        return super.list(queryWrapper);
    }


}