肖海南数据库字段修改

master
wenyu441069198 5 months ago
parent 423afadb38
commit ab59e0069f
  1. 2
      src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsTeacher.java
  2. 2
      src/main/java/com/teaching/backend/model/vo/umsAdmin/UmsStudentVO.java
  3. 2
      src/main/java/com/teaching/backend/model/vo/umsAdmin/UmsTeacherVO.java
  4. 16
      src/main/java/com/teaching/backend/service/umsAdmin/impl/UmsUserServiceImpl.java
  5. 8
      src/main/resources/mapper/UmsUserMapper.xml

@ -44,7 +44,7 @@ public class UmsTeacher implements Serializable {
private String education;
//学位
private String degree;
private String academicDegree;
//职称
private String professionalTitle;

@ -84,7 +84,7 @@ public class UmsStudentVO implements Serializable {
/**
* user_id
*/
private Integer userId;
private Long userId;
/**
* role_id

@ -83,7 +83,7 @@ public class UmsTeacherVO implements Serializable {
/**
* user_id
*/
private Integer userId;
private Long userId;
/**
* role_id

@ -205,10 +205,20 @@ public class UmsUserServiceImpl extends ServiceImpl<UmsUserMapper, UmsUser> impl
@Override
public boolean updateUms(UmsUser umsUser) {
List<UmsUser> adminList = lambdaQuery().eq(UmsUser::getUsername, umsUser.getUsername())
List<UmsUser> userList = lambdaQuery().eq(UmsUser::getUsername, umsUser.getUsername())
.list();
if (adminList.size() > 0){
throw new BusinessException(400,"用户名已存在");
if (userList.size() == 0){
UmsUser user = lambdaQuery().eq(UmsUser::getId, umsUser.getId())
.one();
if (user == null){
throw new BusinessException(400,"用户不存在");
}
return umsUserMapper.updateUserInformation(umsUser);
}
for (UmsUser user : userList) {
if (user.getId() != umsUser.getId()){
throw new BusinessException(400,"用户名已存在");
}
}
if (!StrUtil.isEmpty(umsUser.getPassword())){
throw new BusinessException(400,"修改操作错误1");

@ -46,11 +46,12 @@
t.nationality nationality,
t.profession profession,
t.education education,
t.degree degree,
t.academic_degree academicDegree,
t.professional_title professionalTitle,
t.emergency_contact emergencyContact,
t.join_work_time joinWorkTime,
t.political_status politicalStatus
t.political_status politicalStatus,
t.user_id userId
FROM
ums_teacher t
WHERE
@ -68,7 +69,8 @@
s.faculty faculty,
s.major major,
s.year_age yearAge,
s.class_name className
s.class_name className,
S.user_id userId
FROM
ums_student s
WHERE

Loading…
Cancel
Save