package cn.superdesk.uniorder.common.mq.redis.service;

import java.util.Map;

/**
 * @Description: RedisService 是基础实现
 * RedisManager 是具体管理
 * @Author: linjinyu
 * @CreateDate: 2021/9/2 上午10:20
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021/9/2 上午10:20
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
public interface RedisManager {


	/****************************************** 业务类 简单锁 start ******************************************/

	String getAvoidRepeatableCommitLock(String key);

	void setAvoidRepeatableCommitLock(String key, long timeout);

	/****************************************** 业务类 简单锁   end ******************************************/

	/****************************************** 业务类 缓存 start ******************************************/

	String getHashTableRelationInvoiceBankInfoCompanyName(String field);

	String getHashTableRelationSysEnterpriseExtInvoiceCompanyName(String field);

	String getHashTableRelationSysEnterpriseExtInvoiceTaxpayersIDCode(String field);

	String getHashTableRelationInvoiceTypeTypeName(String field);

	/****************************************** 业务类 缓存   end ******************************************/


	/****************************************** 权限类 缓存 start ******************************************/


	String getTokenInfoOutOrgIdsCache(String userName);

	String getTokenInfoOutVirtIdsCache(String userName);

	String getTokenInfoSelectPermOrgCache(String userName);

	String getTokenInfoSelectPermVirtCache(String userName);

	String getTokenInfoRoleIdCache(String userName);

	String getTokenInfoOutSaleIdCache(String userName);

	String getTokenInfoOutSaleNameCache(String userName);


	void setTokenInfoCache(Map<String, String> mapValueForRedis, String userName);

	void setTokenInfoAdditionalOutSaleCache(Long saleId, String saleName, String userName);

	void clearPermissionOpenApiCache(String userName);

	void setPermissionOpenApiCache(Map<String, String> permMenuOpenApiMap, String userName);

	Map<String, String> getPermissionOpenApiCache(String userName);

	/****************************************** 权限类 缓存   end ******************************************/
}
