package com.huyi.service.base.service.impl;

import com.huyi.service.base.entity.PubColumnSettingsInf;
import com.huyi.service.base.mapper.PubColumnSettingsInfMapper;
import com.huyi.service.base.service.IPubColumnSettingsInfService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.beans.factory.annotation.Autowired;
import com.keao.tianhu.starter.mybatis.plus.entity.QueryRequest;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;



import java.util.List;

/**
 * ClassName: PubColumnSettingsInfServiceImpl<br>
 * Description: IPubColumnSettingsInfService实现 <br>
 * Company: keao
 *
 * @author xuefy
 * @version v1.0.0    2021-08-16  xuefy    由Generator自动创建
 */
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class PubColumnSettingsInfServiceImpl extends ServiceImpl<PubColumnSettingsInfMapper, PubColumnSettingsInf> implements IPubColumnSettingsInfService {

    @Autowired
    private PubColumnSettingsInfMapper pubColumnSettingsInfMapper;

    @Override
    public IPage<PubColumnSettingsInf> findPubColumnSettingsInfs(QueryRequest request, LambdaQueryWrapper<PubColumnSettingsInf> wrapper) {
        Page<PubColumnSettingsInf> page = new Page<>(request.getPageNum(), request.getPageSize());
        return this.page(page, wrapper);
    }

    @Override
    public List<PubColumnSettingsInf> findPubColumnSettingsInfs(LambdaQueryWrapper<PubColumnSettingsInf> wrapper) {
		return this.list(wrapper);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void createPubColumnSettingsInf(PubColumnSettingsInf pubColumnSettingsInf) {
        this.save(pubColumnSettingsInf);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void updatePubColumnSettingsInf(PubColumnSettingsInf pubColumnSettingsInf) {
        this.saveOrUpdate(pubColumnSettingsInf);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deletePubColumnSettingsInf(LambdaQueryWrapper<PubColumnSettingsInf> wrapper) {
	    this.remove(wrapper);
	}
}
