| @@ -4,9 +4,9 @@ package com.iformall.aop; | |||||
| import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
| import com.iformall.annotation.RedisCache; | import com.iformall.annotation.RedisCache; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.domain.po.WxCUser; | |||||
| import com.iformall.domain.po.WxBuser; | |||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.service.WxCUserTokenService; | |||||
| import com.iformall.service.WxBuserTokenService; | |||||
| import com.iformall.utils.HashUtil; | import com.iformall.utils.HashUtil; | ||||
| import com.iformall.utils.RedisLock; | import com.iformall.utils.RedisLock; | ||||
| import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
| @@ -49,7 +49,7 @@ public class RedisCacheAspect { | |||||
| RedisLock redisLock; | RedisLock redisLock; | ||||
| @Autowired | @Autowired | ||||
| private WxCUserTokenService userTokenService; | |||||
| private WxBuserTokenService userTokenService; | |||||
| @Pointcut("@annotation(com.iformall.annotation.RedisCache)") | @Pointcut("@annotation(com.iformall.annotation.RedisCache)") | ||||
| public void cacheAspect() { | public void cacheAspect() { | ||||
| @@ -66,11 +66,11 @@ public class RedisCacheAspect { | |||||
| token = request.getParameter("token"); | token = request.getParameter("token"); | ||||
| } | } | ||||
| String tenantId; | String tenantId; | ||||
| WxCUser wxCUser = userTokenService.getByToken(token); | |||||
| if (wxCUser == null || wxCUser.getExpireTime().getTime() < System.currentTimeMillis()) { | |||||
| WxBuser wxBuser = userTokenService.getByToken(token); | |||||
| if (wxBuser == null || wxBuser.getExpireTime().getTime() < System.currentTimeMillis()) { | |||||
| tenantId = "0"; | tenantId = "0"; | ||||
| } else { | } else { | ||||
| tenantId = wxCUser.getTenantId(); | |||||
| tenantId = wxBuser.getTenantId(); | |||||
| } | } | ||||
| // 请求参数 | // 请求参数 | ||||