You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
804 B
Java
31 lines
804 B
Java
package com.supervision.service.impl;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.supervision.domain.SysUser;
|
|
import com.supervision.service.SysUserService;
|
|
import com.supervision.mapper.SysUserMapper;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
/**
|
|
* @author Administrator
|
|
* @description 针对表【sys_user】的数据库操作Service实现
|
|
* @createDate 2025-07-09 15:19:45
|
|
*/
|
|
@Service
|
|
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser>
|
|
implements SysUserService{
|
|
|
|
@Override
|
|
public SysUser getByUsername(String username) {
|
|
if (StrUtil.isEmpty(username)) {
|
|
return null;
|
|
}
|
|
return this.lambdaQuery().eq(SysUser::getUserName, username).one();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|