package com.springboot.cloud.sysadmin.organization.service.company.impl;

/*
 **********************************************
 *      DATE           PERSON       REASON
 *    2020-12-29          FXY        Created
 **********************************************
 */


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.springboot.cloud.sysadmin.organization.dao.company.CompanyApplicationLicenseMapper;
import com.springboot.cloud.sysadmin.organization.entity.po.company.CompanyApplicationLicense;
import com.springboot.cloud.sysadmin.organization.service.company.CompanyApplicationLicenseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class CompanyApplicationLicenseServiceImpl extends ServiceImpl<CompanyApplicationLicenseMapper, CompanyApplicationLicense> implements CompanyApplicationLicenseService {
    @Override
    public CompanyApplicationLicense license(String companyId, String applicationCode) {
        QueryWrapper<CompanyApplicationLicense> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("company_id",companyId).eq("application_code",applicationCode);
        return getOne(queryWrapper);
    }
}
