diff --git a/src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java b/src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java index 71c47b8..8e66e13 100644 --- a/src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java +++ b/src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java @@ -1,6 +1,5 @@ package com.teaching.backend.controller.umsAdmin; -import com.teaching.backend.common.BaseResponse; import com.teaching.backend.common.CommonResult; import com.teaching.backend.model.dto.umsAdmin.UmsStudentPageQueryDTO; import com.teaching.backend.model.entity.umsAdmin.UmsStudentManage; @@ -11,7 +10,6 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/src/main/java/com/teaching/backend/mapper/umsAdmin/UmsStudentMapper.java b/src/main/java/com/teaching/backend/mapper/umsAdmin/UmsStudentMapper.java index bd3b04a..fb58d74 100644 --- a/src/main/java/com/teaching/backend/mapper/umsAdmin/UmsStudentMapper.java +++ b/src/main/java/com/teaching/backend/mapper/umsAdmin/UmsStudentMapper.java @@ -14,6 +14,6 @@ import com.teaching.backend.model.entity.umsAdmin.UmsStudent; public interface UmsStudentMapper extends BaseMapper { boolean updateStudentInfo(UmsStudent umsStudent); - UmsStudent selectByUserId(Integer userId); + UmsStudent selectByUserId(Long userId); } diff --git a/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudent.java b/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudent.java index ec40634..6608772 100644 --- a/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudent.java +++ b/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudent.java @@ -60,7 +60,7 @@ public class UmsStudent implements Serializable { private String className; //user_id - private Integer userId; + private Long userId; } diff --git a/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudentManage.java b/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudentManage.java index 9974bc2..d45e758 100644 --- a/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudentManage.java +++ b/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudentManage.java @@ -78,7 +78,7 @@ public class UmsStudentManage implements Serializable { private String className; //user_id - private Integer userId; + private Long userId; } diff --git a/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsStudentManageServiceImpl.java b/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsStudentManageServiceImpl.java index a81f5f0..12eb47d 100644 --- a/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsStudentManageServiceImpl.java +++ b/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsStudentManageServiceImpl.java @@ -91,7 +91,7 @@ public class UmsStudentManageServiceImpl extends ServiceImpl implements UmsUserService { @@ -90,7 +88,7 @@ public class UmsUserServiceImpl extends ServiceImpl impl UmsUser byUsername = lambdaQuery().eq(UmsUser::getUsername, umsUser.getUsername()) .one(); UmsStudent umsStudent = new UmsStudent(); - umsStudent.setUserId(Math.toIntExact(byUsername.getId())); + umsStudent.setUserId(byUsername.getId()); umsStudentMapper.insert(umsStudent); return umsUser; @@ -311,7 +309,7 @@ public class UmsUserServiceImpl extends ServiceImpl impl UmsUser byUsername = lambdaQuery().eq(UmsUser::getPhone, umsUser.getPhone()) .one(); UmsStudent umsStudent = new UmsStudent(); - umsStudent.setUserId(Math.toIntExact(byUsername.getId())); + umsStudent.setUserId(byUsername.getId()); umsStudentMapper.insert(umsStudent); return umsUser;