| @@ -1,6 +1,7 @@ | |||||
| package com.iformall.controller; | package com.iformall.controller; | ||||
| import com.alibaba.fastjson.JSON; | import com.alibaba.fastjson.JSON; | ||||
| import com.alibaba.fastjson.JSONArray; | |||||
| import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| @@ -263,6 +264,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||||
| public ResultData queryTemplateCount() { | public ResultData queryTemplateCount() { | ||||
| String userId = getUser().getId().toString(); | String userId = getUser().getId().toString(); | ||||
| Map entries = stringRedisTemplate.opsForHash().entries(userId); | Map entries = stringRedisTemplate.opsForHash().entries(userId); | ||||
| logger.info(JSONArray.toJSONString(entries) + ">>>>>>>>>>>>>>>>>>>>>1"); | |||||
| if (entries.size() < 4) { | if (entries.size() < 4) { | ||||
| entries.clear(); | entries.clear(); | ||||
| return new ResultData(Result.SUCCESS, "ok", entries); | return new ResultData(Result.SUCCESS, "ok", entries); | ||||
| @@ -273,6 +275,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||||
| String failCount = entries.get("failCount").toString(); | String failCount = entries.get("failCount").toString(); | ||||
| if (allCount.equals(failCount)) {//stringRedisTemplate.expire(userId,1,TimeUnit.SECONDS); | if (allCount.equals(failCount)) {//stringRedisTemplate.expire(userId,1,TimeUnit.SECONDS); | ||||
| logger.info(JSONArray.toJSONString(entries) + ">>>>>>>>>>>>>>>>>>>>>2"); | |||||
| //完全失败 | //完全失败 | ||||
| stringRedisTemplate.opsForHash().delete(userId, "allCount"); | stringRedisTemplate.opsForHash().delete(userId, "allCount"); | ||||
| stringRedisTemplate.opsForHash().delete(userId, "allSuccessCount"); | stringRedisTemplate.opsForHash().delete(userId, "allSuccessCount"); | ||||