优化mybatis方法去掉冗余方法
This commit is contained in:
@@ -10,35 +10,21 @@ 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 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 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