diff --git a/StarClass/53d8bb430cf223f173deea9c.png b/StarClass/53d8bb430cf223f173deea9c.png new file mode 100644 index 0000000..89c8cd2 Binary files /dev/null and b/StarClass/53d8bb430cf223f173deea9c.png differ diff --git a/StarClass/design.md b/StarClass/design.md new file mode 100644 index 0000000..d633e74 --- /dev/null +++ b/StarClass/design.md @@ -0,0 +1,12 @@ +## 签到流程 + +### Redis设计 + +1.记录用户连续签到的时间 +KV: `KEY: userId, Value: checked_days` , 例如 `10623456-->6` #记录用户连续签到的天数,key过期时间是当天时间到第二天零点,例如,设置时间为 `2016-04-01 17:48`, 则失效时间为`2016-04-03 00:01` + +2.记录用户当天是否签到 +KV: `KEY: userId, Value: Y or N` , 例如 `10623456-->Y` # 记录用户当天是否签到,key过期时间:当天时间到今晚零点, 例如,设置时间为 `2016-04-01 17:48`, 则失效时间为`2016-04-02 00:01` + +流程如下: +