package com.liangjian.dataplatform.member.dao.primary;

import com.liangjian.dataplatform.member.dao.JpaLifeCycleRepository;
import com.liangjian.dataplatform.member.entity.po.primary.TagRule;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @Author: 黄子奇
 * @Date: 2019/9/9 10:40
 */
public interface TagRuleRepository extends JpaLifeCycleRepository<TagRule,String> {

    /**
     * 根据名字查询标签规则
     * @param name
     * @return
     */
    Page<TagRule> queryByName(String name, Pageable pageable);

    /**
     * 根据面向的对象查询
     * @param object
     * @return
     */
    Page<TagRule> queryByObject(Integer object, Pageable pageable);

    /**
     * 根据作业id所在查询
     */
    Page<TagRule> queryByJobIdIn(List<String> jobIds, Pageable pageable);

    TagRule queryById(String id);
}
