package com.github.wxiaoqi.security.admin.mapper;

import com.github.wxiaoqi.security.admin.entity.AppUserLogin;
import com.github.wxiaoqi.security.admin.entity.AppUserManage;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

public interface AppUserLoginMapper extends Mapper<AppUserLogin> {


    /**
     * 登录信息更改 ip 登录时间
     * @param userId
     * @param ip
     * @param lastTime
     */
    @Update("update `app_user_login` set `last_host`=#{ip},`last_time`=#{lastTime} where `id`=#{userId}")
    void updateLoginUserInfoById(@Param("userId") Integer userId,@Param("ip") String ip, @Param("lastTime") long lastTime);
}