@Mapper
public interface UserManuallyMapper
| 限定符和类型 | 方法和说明 |
|---|---|
int |
countUnreadMessage(Long userId)
查询未读消息数量
|
int |
updateLastLoginDate(long userId,
String ip)
更新最后登录时间
|
@Update(value="update tb_user set last_login_date=login_date, last_login_ip=login_ip, login_ip=#{ip}, login_date=now() where id = #{userId}")
int updateLastLoginDate(@Param(value="userId")
long userId,
@Param(value="ip")
String ip)
@Select(value="select count(*) from tb_user_message where user_id = #{userId} and state = \'unread\'")
int countUnreadMessage(@Param(value="userId")
Long userId)
userId - 用户idCopyright © 2020. All rights reserved.