Ver código fonte

fix key过期时间

zoujiajian 3 anos atrás
pai
commit
eaec2f5890

+ 1 - 1
netflix-web/src/main/java/com/cyksj/web/controller/coupon/CouponFrontController.java

@@ -168,7 +168,7 @@ public class CouponFrontController {
 		String zero = DateUtil.beginOfDay(DateTime.now()).toString();
 		Object exists = redisService.get(RedisService.key.RECOMMEND_COUPON_DAY.getNameFormat(String.format("%s-%s", zero, userId)));
 		if (exists == null) {
-			redisService.set(RedisService.key.RECOMMEND_COUPON_DAY.getNameFormat(String.format("%s-%s", zero, userId)), userId);
+			redisService.set(RedisService.key.RECOMMEND_COUPON_DAY.getNameFormat(String.format("%s-%s", zero, userId)), userId, RedisService.key.RECOMMEND_COUPON_DAY.getTimeout());
 		}
 		return GatewayResponse.SUCCESS.newBuilder().toResult(exists == null ? false : true);
 	}