发表于: 2017-09-03 11:38:15
2 929
今天完成的事情:
1、一个可扩展的登录系统
https://www.liaoxuefeng.com/article/001437480923144e567335658cc4015b38a595bb006aa51000
2、
####当前会员状态 GET /a/u/user/status/current
select id from user where status = 1
取出会员状态,“非会员”、“过期会员”、“年度会员”
select id from user_member_relation where user_id = ? and status = 1
计算当前会员剩余天数。
如果查出1条以上的记录,说明该用户续费了多个套餐。根据 create_by 的排序,取第一个的开始时间和最后一个结束时间。
####往期充值记录 GET /a/u/user/order/list/{userId}
select id from user_oder where user_id = ? and status = ?
select id from user_member_relation where status = ?
####最近登录记录 GET /a/u/user/login/list/{userId}
select id from user_login where user_id = ? limit 0,20
####最近学习记录 GET /a/u/user/study/history
select id from user_dlesoon_relation where user_id=? limit 0,20
3、伟江记得你以前说过上下架接口应当这么写:
比如上下架一个任务:
/a/u/task/status (你当时说不必把具体哪个status、1或0 写在路径里、后端 根据数据库原有的记录来判断 前端的意图是上架还是下架。)
但现在我知道规范的写法应当是这样的,是必须要跟上一个具体的 status:
/a/u/task/status/{status}
明日计划:
1、后端评审延迟一天。定在9月5日上午开始。
遇到的问题:
收获:
评论