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.CompanyApplicationPopedomMapper;
import com.springboot.cloud.sysadmin.organization.entity.po.application.ApplicationPopedom;
import com.springboot.cloud.sysadmin.organization.entity.po.company.CompanyApplicationPopedom;
import com.springboot.cloud.sysadmin.organization.service.company.CompanyApplicationPopedomService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

@Service
@Slf4j
public class CompanyApplicationPopedomServiceImpl extends ServiceImpl<CompanyApplicationPopedomMapper, CompanyApplicationPopedom> implements CompanyApplicationPopedomService {

    @Override
    public List<CompanyApplicationPopedom> getApplicationPopedom(String companyId) {
        QueryWrapper<CompanyApplicationPopedom> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("company_id",companyId);
        return list(queryWrapper);
    }

    @Override
    public List<CompanyApplicationPopedom> getApplicationPopedom() {
        return list();
    }
}
