package com.huyi.service.rel.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huyi.service.base.entity.SysCompanyRel;
import com.huyi.service.rel.mapper.OwnCompanyRelMapper;
import com.huyi.service.rel.service.IOwnCompanyRelService;
import com.keao.tianhu.starter.mybatis.plus.entity.QueryRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * ClassName: SysCompanyRelServiceImpl<br>
 * Description: ISysCompanyRelService实现 <br>
 * Company: keao
 *
 * @author songqg
 * @version v1.0.0    2021-08-16  songqg    由Generator自动创建
 */
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class OwnCompanyRelServiceImpl extends ServiceImpl<OwnCompanyRelMapper, SysCompanyRel> implements IOwnCompanyRelService {

    @Autowired
    private OwnCompanyRelMapper ownCompanyRelMapper;

    @Override
    public IPage<Map> selectCompanyRelList(QueryRequest request, Map map) {
        Page page = new Page<>(request.getPageNum(), request.getPageSize());
        return ownCompanyRelMapper.selectCompanyRelList(page,map);
    }
}
