package org.jeecg.common.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.constant.CacheConstant;
import org.jeecg.common.system.entity.SysDict;
import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.system.vo.SysPermissionDataRuleModel;
import org.jeecg.common.system.vo.SysUserCacheInfo;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

/**
 * <p>
 * 字典表 服务类
 * </p>
 *
 * @Author zhangweijian
 * @since 2018-12-28
 */
public interface ICoreService extends IService<SysDict> {
	//2
    public String queryDictTextByKey(String code, String key,String extendsKey,String extendsValue);

    //1
	String queryTableDictTextByKey(String table, String text, String code, String key,String extendsKey,String extendsValue);
	//3
    List<SysPermissionDataRuleModel> queryPermissionDataRule(String component, String requestPath, String username);

    SysUserCacheInfo getCacheUser(String username);

    @Cacheable(cacheNames= CacheConstant.SYS_USERS_CACHE, key="#username")
    LoginUser getUserByName(String username);

    List<DictModel> queryDictItemsByCode(String dicCode);

    List<DictModel> queryTableDictItemsByCode(String dicTable, String dicText, String dicCode);
}
