package com.jpsoft.shinestar.modules.base.service;

import com.github.pagehelper.Page;
import com.jpsoft.shinestar.modules.base.entity.IconInfo;
import com.jpsoft.shinestar.modules.base.entity.PersonRoleIcon;
import com.jpsoft.shinestar.modules.common.dto.Sort;

import java.util.List;
import java.util.Map;

public interface PersonRoleIconService {
	PersonRoleIcon get(String id);
	boolean exist(String id);
	int insert(PersonRoleIcon model);
	int update(PersonRoleIcon model);
	int delete(String id);
	List<PersonRoleIcon> list();
	Page<PersonRoleIcon> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);

    List<PersonRoleIcon> findByPersonRoleId(String personRoleId);
    String getDefaultIcon(String personRoleId);

    List<PersonRoleIcon> findByPersonRoleIdAndCommonStatus(String personRoleId, boolean b);

    List<IconInfo> findCommonByPersonRoleId(String personRoleId);
	List<IconInfo> findDefaultIconByPersonRoleId(String personRoleId);

    int deleteCommonByPersonRoleId(String personRoleId);
	int deleteDefaultIconByPersonRoleId(String personRoleId);

    PersonRoleIcon findByPersonRoleIdAndIconId(String personRoleId, String iconId);

    List<PersonRoleIcon> findByIconName(String iconName);
}