|
|
@ -42,8 +42,6 @@ import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.UUID; |
|
|
|
import java.util.UUID; |
|
|
|
|
|
|
|
|
|
|
|
import static com.teaching.backend.constant.RoleConstants.TEACHER_ROLE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Service |
|
|
|
@Service |
|
|
|
@Slf4j |
|
|
|
@Slf4j |
|
|
|
public class UmsUserServiceImpl extends ServiceImpl<UmsUserMapper, UmsUser> implements UmsUserService { |
|
|
|
public class UmsUserServiceImpl extends ServiceImpl<UmsUserMapper, UmsUser> implements UmsUserService { |
|
|
@ -90,7 +88,7 @@ public class UmsUserServiceImpl extends ServiceImpl<UmsUserMapper, UmsUser> impl |
|
|
|
UmsUser byUsername = lambdaQuery().eq(UmsUser::getUsername, umsUser.getUsername()) |
|
|
|
UmsUser byUsername = lambdaQuery().eq(UmsUser::getUsername, umsUser.getUsername()) |
|
|
|
.one(); |
|
|
|
.one(); |
|
|
|
UmsStudent umsStudent = new UmsStudent(); |
|
|
|
UmsStudent umsStudent = new UmsStudent(); |
|
|
|
umsStudent.setUserId(Math.toIntExact(byUsername.getId())); |
|
|
|
umsStudent.setUserId(byUsername.getId()); |
|
|
|
umsStudentMapper.insert(umsStudent); |
|
|
|
umsStudentMapper.insert(umsStudent); |
|
|
|
|
|
|
|
|
|
|
|
return umsUser; |
|
|
|
return umsUser; |
|
|
@ -311,7 +309,7 @@ public class UmsUserServiceImpl extends ServiceImpl<UmsUserMapper, UmsUser> impl |
|
|
|
UmsUser byUsername = lambdaQuery().eq(UmsUser::getPhone, umsUser.getPhone()) |
|
|
|
UmsUser byUsername = lambdaQuery().eq(UmsUser::getPhone, umsUser.getPhone()) |
|
|
|
.one(); |
|
|
|
.one(); |
|
|
|
UmsStudent umsStudent = new UmsStudent(); |
|
|
|
UmsStudent umsStudent = new UmsStudent(); |
|
|
|
umsStudent.setUserId(Math.toIntExact(byUsername.getId())); |
|
|
|
umsStudent.setUserId(byUsername.getId()); |
|
|
|
umsStudentMapper.insert(umsStudent); |
|
|
|
umsStudentMapper.insert(umsStudent); |
|
|
|
|
|
|
|
|
|
|
|
return umsUser; |
|
|
|
return umsUser; |
|
|
|