main主干首次提交,包含用户认证模块
This commit is contained in:
44
src/main/java/com/labelsys/backend/mapper/SysUserMapper.java
Normal file
44
src/main/java/com/labelsys/backend/mapper/SysUserMapper.java
Normal file
@@ -0,0 +1,44 @@
|
||||
package com.labelsys.backend.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.labelsys.backend.entity.SysUser;
|
||||
import com.labelsys.backend.enums.UserPosition;
|
||||
import com.labelsys.backend.enums.UserRole;
|
||||
import com.labelsys.backend.enums.UserStatus;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface SysUserMapper extends BaseMapper<SysUser> {
|
||||
|
||||
int insert(SysUser user);
|
||||
|
||||
SysUser findById(@Param("id") Long id);
|
||||
|
||||
SysUser findByIdAndCompanyId(@Param("id") Long id, @Param("companyId") Long companyId);
|
||||
|
||||
SysUser findByCompanyIdAndPhone(@Param("companyId") Long companyId, @Param("phone") String phone);
|
||||
|
||||
List<SysUser> listByCompanyId(@Param("companyId") Long companyId);
|
||||
|
||||
List<SysUser> listCompanyAdmins(@Param("companyId") Long companyId);
|
||||
|
||||
int updatePassword(
|
||||
@Param("id") Long id,
|
||||
@Param("companyId") Long companyId,
|
||||
@Param("passwordHash") String passwordHash,
|
||||
@Param("mustChangePassword") boolean mustChangePassword
|
||||
);
|
||||
|
||||
int updateAssignment(
|
||||
@Param("id") Long id,
|
||||
@Param("companyId") Long companyId,
|
||||
@Param("role") UserRole role,
|
||||
@Param("position") UserPosition position
|
||||
);
|
||||
|
||||
int updateStatus(@Param("id") Long id, @Param("companyId") Long companyId, @Param("status") UserStatus status);
|
||||
|
||||
int bumpSessionVersion(@Param("id") Long id, @Param("companyId") Long companyId);
|
||||
|
||||
void deleteAll();
|
||||
}
|
||||
Reference in New Issue
Block a user