package com.scm.contract.service.purchase;

import com.scm.contract.dao.purchase.TagProviderDao;
import com.scm.contract.model.purchase.TagProvider;
import com.set.direwolf.core.mybatis.CrudService;
import com.set.direwolf.core.mybatis.Page;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

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

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

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

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