mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-22 18:29:51 +08:00
管理登录次数+登录时间的记录
This commit is contained in:
@@ -5,6 +5,8 @@ import xyz.playedu.api.domain.AdminUser;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import xyz.playedu.api.types.PaginationResult;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author tengteng
|
||||
* @description 针对表【admin_users】的数据库操作Service
|
||||
@@ -16,4 +18,6 @@ public interface AdminUserService extends IService<AdminUser> {
|
||||
AdminUser findByEmail(String email);
|
||||
|
||||
AdminUser findById(Integer id);
|
||||
|
||||
Integer updateLoginTimesAndLoginAt(Integer id, Date loginAt, Integer loginTimes);
|
||||
}
|
||||
|
||||
@@ -11,14 +11,10 @@ import xyz.playedu.api.mapper.AdminUserMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import xyz.playedu.api.types.PaginationResult;
|
||||
|
||||
/**
|
||||
* @author tengteng
|
||||
* @description 针对表【admin_users】的数据库操作Service实现
|
||||
* @createDate 2023-02-11 10:58:52
|
||||
*/
|
||||
import java.util.Date;
|
||||
|
||||
@Service
|
||||
public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser>
|
||||
implements AdminUserService {
|
||||
public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser> implements AdminUserService {
|
||||
|
||||
public PaginationResult<AdminUser> paginate(int page, int size, Wrapper<AdminUser> queryWrapper) {
|
||||
IPage<AdminUser> userPage = new Page<>(page, size);
|
||||
@@ -43,6 +39,11 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
||||
queryWrapper.eq("id", id);
|
||||
return this.getBaseMapper().selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer updateLoginTimesAndLoginAt(Integer id, Date loginAt, Integer loginTimes) {
|
||||
return this.getBaseMapper().updateLoginAtAndLoginTimes(id, loginAt, loginTimes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user