| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设备是否允许一键登录 |
| | | * |
| | | * @param acceptData |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "allowOneKeyLogin", method = RequestMethod.POST) |
| | | public void allowOneKeyLogin(AcceptData acceptData, PrintWriter out) { |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.oneKeyLoginCount, StringUtil.Md5(StringUtil.isNullOrEmpty(acceptData.getUtdid()) ? acceptData.getDevice() : acceptData.getUtdid())); |
| | | //每天只能用10次 |
| | | String value = redisManager.getCommonString(key); |
| | | if (!StringUtil.isNullOrEmpty(value) && Integer.parseInt(value) >= 10) { |
| | | out.print(JsonUtil.loadFalseResult("一键登录每日只能用10次")); |
| | | return; |
| | | } |
| | | out.print(JsonUtil.loadTrueResult("")); |
| | | } |
| | | |
| | | } |