@Aop("redis") public String accessToken(UserProfile profile) { String loginname = profile.getLoginname(); String at = jedis().hget(RKEY_USER_ACCESSTOKEN, loginname); if (at == null) { // 双向绑定 at = R.UU32(); jedis().hset(RKEY_USER_ACCESSTOKEN, loginname, at); jedis().hset(RKEY_USER_ACCESSTOKEN2, at, loginname); jedis().hset(RKEY_USER_ACCESSTOKEN3, at, "" + profile.getUserId()); } return at; }
public NutMap _author(UserProfile profile) { NutMap author = new NutMap(); author.setv("loginname", profile.getLoginname()); author.setv("avatar_url", _avatar_url(profile.getLoginname())); return author; }