package com.scm.contract.service.management;

import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.scm.contract.dao.apply.LabelApplicationDao;
import com.scm.contract.dao.management.ProviderDao;
import com.scm.contract.model.apply.DictionaryLabelApplicationStatus;
import com.scm.contract.model.apply.DictionaryTagType;
import com.scm.contract.model.apply.LabelApplication;
import com.scm.contract.model.management.Provider;
import com.scm.contract.service.apply.DictionaryLabelApplicationStatusService;
import com.scm.contract.service.apply.DictionaryTagTypeService;
import com.set.direwolf.core.mybatis.CrudService;
import com.set.direwolf.core.mybatis.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.*;

/**
 * @author zuo
 * @date 2024/6/4 17:46
 */
@Service
@Transactional(readOnly = true, rollbackFor = Exception.class)
public class ProviderService extends CrudService<ProviderDao, Provider, String> {

    public List<Provider> list(){
        return this.dao.list();
    }

    @Override
    public Page<Provider> findPage(Page<Provider> page, Provider entity) {
        entity.setPage(page);
        return page.setList(this.dao.findList(entity));
    }

    public List<Provider> listByIds(List<String> ids) {
        return this.dao.listByIds(ids);
    }
}
