package com.ningdatech.carapi.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ningdatech.carapi.datascope.aop.LambdaDataScope;
import com.ningdatech.carapi.datascope.contants.LambdaDataScopeTypeEnum;
import com.ningdatech.carapi.sys.entity.CompanyJoin;
import com.ningdatech.carapi.sys.mapper.CompanyJoinMapper;
import com.ningdatech.carapi.sys.service.CompanyJoinService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 业务实现类
 * 企业
 * </p>
 *
 * @author PoffyZhang
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class CompanyJoinServiceImpl extends ServiceImpl<CompanyJoinMapper, CompanyJoin> implements CompanyJoinService {

    private final CompanyJoinMapper companyJoinMapper;

    @Override
    @LambdaDataScope(wrapperIndex = 1,type = LambdaDataScopeTypeEnum.COMPANY_TABLE)
    public Page<CompanyJoin> pageJoin(Page<CompanyJoin> page, LambdaQueryWrapper<CompanyJoin> wrapper) {
        return companyJoinMapper.pageJoin(page,wrapper);
    }

    @Override
    public List<CompanyJoin> listJoin(LambdaQueryWrapper<CompanyJoin> wrapper){
        return companyJoinMapper.listJoin(wrapper);
    }

    @Override
    public CompanyJoin oneJoin(LambdaQueryWrapper<CompanyJoin> wrapper) {
        return companyJoinMapper.oneJoin(wrapper);
    }
}
