package com.yuchen.saas.park.service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuchen.saas.park.api.entity.park.PmgBatParkCompany;
import org.nest.springwrap.core.datascope.annotation.DataAuth;
import org.nest.springwrap.core.datascope.enums.DataScopeEnum;

import java.util.List;

/**
 * @author 吕海泉
 * @create 2020/12/7 15:08
 */
public interface CompanyMapper extends BaseMapper<PmgBatParkCompany> {

    /**
     * 根据设备信息 查询关联的企业信息
     * @param productKey 设备的 productKey
     * @param deviceName 设备的 deviceName
     * @return
     */
    @DataAuth(type = DataScopeEnum.OWN_DEPT_CHILD)
    List<PmgBatParkCompany> getCompanyByPKAndDN(String productKey, String deviceName);
}
