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

import com.huyi.service.base.entity.ZcFinanceQuotaConRel;
import com.huyi.service.base.mapper.ZcFinanceQuotaConRelMapper;
import com.huyi.service.base.service.IZcFinanceQuotaConRelService;
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: ZcFinanceQuotaConRelServiceImpl<br>
 * Description: IZcFinanceQuotaConRelService实现 <br>
 * Company: keao
 *
 * @author xuefy
 * @version v1.0.0    2021-08-20  xuefy    由Generator自动创建
 */
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class ZcFinanceQuotaConRelServiceImpl extends ServiceImpl<ZcFinanceQuotaConRelMapper, ZcFinanceQuotaConRel> implements IZcFinanceQuotaConRelService {

    @Autowired
    private ZcFinanceQuotaConRelMapper zcFinanceQuotaConRelMapper;

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

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

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void createZcFinanceQuotaConRel(ZcFinanceQuotaConRel zcFinanceQuotaConRel) {
        this.save(zcFinanceQuotaConRel);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void updateZcFinanceQuotaConRel(ZcFinanceQuotaConRel zcFinanceQuotaConRel) {
        this.saveOrUpdate(zcFinanceQuotaConRel);
    }

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