提交 532e775e 编写于 作者: haowen.chen's avatar haowen.chen

feat:生成token统一更新最后登录时间

上级 ff101e26
流水线 #53569 已取消 于阶段
......@@ -128,4 +128,6 @@ public interface DoctorMapper {
@Param("loginTime") Date loginTime);
String selectIdByOpenId(String openId);
int updateDoctorLastLoginTime(@Param("userId") Integer userId);
}
\ No newline at end of file
......@@ -177,6 +177,7 @@ public class TokenUtils {
//存储token:(token-doctor-1:用户数据)
cacheClient.hset(value, key, valueInfo);
}
doctorMapper.updateDoctorLastLoginTime(account.getId().intValue());
// } else {
// cacheClient.hset(value, "token", newToken);
// }
......
......@@ -1105,4 +1105,10 @@
where openid = #{openId} and delete_flag = 1
limit 1
</select>
<update id="updateDoctorLastLoginTime" parameterType="Object">
update p_doctor
SET last_login_time = now()
where id = #{userId}
</update>
</mapper>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册