package com.nbclass.szxgl.constant;

import java.util.Arrays;
import java.util.List;

import org.apache.commons.lang3.StringUtils;

/**
 * 项目常量
 * @author Leon
 * @datetime 2019年4月11日 上午11:22:59
 */
public class ActivityConstants {

	/**
	 * Cookie Key - Customer用户选择语言
	 */
	public static final String cookie_key_customer_lang = "userLanguage";
	
	/**
	 * Cookie Key - Customer用户ID
	 */
	public static final String cookie_key_customer_id = "ck_seedaward_uid";
	
	
	/**
	 * Session Key - 企业微信授权用户ID
	 */
	public static final String session_key_user_id = "sid_qywx_userid";

	/**
	 * 企业微信接口域名
	 */
	public static final String qywx_api_domain = "http://wx.szxgl.cn/qywx";
	
	/**
	 * 企业微信登录应用ID
	 */
	public static final int qywx_agentid = 1000019;
	
	
	private static final List<String> adminUserIds = Arrays.asList(new String[]{"admin", "pangtao"});
	
	/**
	 * 判断是否是超级管理员
	 * @param loginUserId
	 * @return
	 */
	public static boolean isAdmin(String loginUserId){
		boolean result = false;
		result = StringUtils.isNotBlank(loginUserId)&&adminUserIds.contains(loginUserId);
		return result;
	}
}
