public static void main(String[] args) {

		if (args.length == 0) {
			log.info("请输入参数");
			return;
		}
		
		// 
		String type = args[0];
		
		if ("combination_num_by_length_firstnum".equals(type)) {
			
			for (int i = 1; i <= SSH.RED.getTOTAL(); i++) {
				
				for (int j = 1; j <= SSH.RED.getMAX(); j++) {
					
					String firstNum = String.format("%02d", j);
					
					String key = SSH.RED.getRedisKeyForCombinationNumByLengthAndFirstNum(i);
					String field = firstNum;
					int value = sshNewCombinationDao.getNumByLengthAndFirstNum(i, firstNum);
					
					log.info(key + " " + field + " " + value);
					
					redisDao.hset(key, field, value+"");
					
				}
				
			}
			
		} else if ("combination_size_by_num".equals(type)) {
			
			int length = 2;
			
			// 获取所有组合可能出现的个数, 只取list中每个SSHNewCombination对象的num字段
			List<SSHNewCombination> list = sshNewCombinationDao.listNumByLength(length);
			if (null != list) {
				
				for (SSHNewCombination item : list) {
					
					int num = item.getNum();
					log.info("处理出现" + num + "次的组合");
					int size = sshNewCombinationDao.getSizeByNumAndLength(num, length);
					log.info("出现" + num + "次的组合一共有" + size + "个");
					if (size != 0){
						// 将其保存到Redis
						String key = SSH.RED.getRedisKeyForCombinationSizeByNum();
						String field = num+"";
						String value = size+"";
						redisDao.hset(key, field, value);
					}
				}
			}
		}
		
	}