| @@ -93,7 +93,7 @@ public class WxCouponController extends BaseController { | |||||
| wxCouponCVo.setStatus(couponCVo.getStatus()); | wxCouponCVo.setStatus(couponCVo.getStatus()); | ||||
| } else { | } else { | ||||
| // 更新状态 | // 更新状态 | ||||
| //WxCouponCVo couponCVo = wxCouponChannelService.findVoStatusDetail(couponChannelIdL); | |||||
| // WxCouponCVo couponCVo = wxCouponChannelService.findVoStatusDetail(couponChannelIdL); | |||||
| WxCouponCVo couponCVo = generateWxCouponCVo(couponChannelIdL); | WxCouponCVo couponCVo = generateWxCouponCVo(couponChannelIdL); | ||||
| if (wxCouponCVo == null) { | if (wxCouponCVo == null) { | ||||
| return new ResultData(ErrorCode.COUPON_IS_EMPTY); | return new ResultData(ErrorCode.COUPON_IS_EMPTY); | ||||
| @@ -30,7 +30,7 @@ public class WxBuserTokenServiceImpl implements WxBuserTokenService { | |||||
| @Override | @Override | ||||
| public WxBuser getByToken(String token) { | public WxBuser getByToken(String token) { | ||||
| logger.info("获取用户信息start ..."); | |||||
| logger.info("获取B用户信息start ..." + token); | |||||
| String key = tokenPrev + token; | String key = tokenPrev + token; | ||||
| ValueOperations<String, WxBuser> operations = bUserTokenRedisTemplate.opsForValue(); | ValueOperations<String, WxBuser> operations = bUserTokenRedisTemplate.opsForValue(); | ||||
| @@ -39,12 +39,13 @@ public class WxBuserTokenServiceImpl implements WxBuserTokenService { | |||||
| if (hasKey) { | if (hasKey) { | ||||
| // 从缓存获取用户信息 | // 从缓存获取用户信息 | ||||
| WxBuser user = operations.get(key); | WxBuser user = operations.get(key); | ||||
| logger.info("缓存中获取B用户信息End ..." + token); | |||||
| return user; | return user; | ||||
| } | } | ||||
| WxBuser user = wxBuserMapper.findByToken(token); | WxBuser user = wxBuserMapper.findByToken(token); | ||||
| // 插入缓存 | // 插入缓存 | ||||
| operations.set(key, user, 3600, TimeUnit.SECONDS); | operations.set(key, user, 3600, TimeUnit.SECONDS); | ||||
| logger.info("DB中获取B用户信息End ..." + token); | |||||
| return user; | return user; | ||||
| } | } | ||||
| @@ -34,7 +34,7 @@ public class WxCUserTokenServiceImpl implements WxCUserTokenService { | |||||
| @Override | @Override | ||||
| public WxCUser getByToken(String token) { | public WxCUser getByToken(String token) { | ||||
| logger.info("获取用户信息start ..."); | |||||
| logger.info("获取用户信息start ..." + token); | |||||
| String key = tokenPrev + token; | String key = tokenPrev + token; | ||||
| ValueOperations<String, WxCUser> operations = cUserTokenRedisTemplate.opsForValue(); | ValueOperations<String, WxCUser> operations = cUserTokenRedisTemplate.opsForValue(); | ||||
| @@ -43,12 +43,13 @@ public class WxCUserTokenServiceImpl implements WxCUserTokenService { | |||||
| if(hasKey) { | if(hasKey) { | ||||
| // 从缓存获取用户信息 | // 从缓存获取用户信息 | ||||
| WxCUser user = operations.get(key); | WxCUser user = operations.get(key); | ||||
| logger.info("缓存中获取用户信息End-" + token); | |||||
| return user; | return user; | ||||
| } | } | ||||
| WxCUser user = wxCUserMapper.findByToken(token); | WxCUser user = wxCUserMapper.findByToken(token); | ||||
| // 插入缓存 | // 插入缓存 | ||||
| operations.set(key, user, 3600, TimeUnit.SECONDS); | operations.set(key, user, 3600, TimeUnit.SECONDS); | ||||
| logger.info("DB中获取用户信息End-" + token); | |||||
| return user; | return user; | ||||
| } | } | ||||