Browse Source

考生管理新增电话号码

wangliang 2 years ago
parent
commit
ec77929ef3

+ 5 - 3
themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamStudentController.java

@@ -285,9 +285,11 @@ public class TEExamStudentController {
                 }
                 }
             } else {
             } else {
                 UpdateWrapper<TEStudent> teStudentUpdateWrapper = new UpdateWrapper<>();
                 UpdateWrapper<TEStudent> teStudentUpdateWrapper = new UpdateWrapper<>();
-                teStudentUpdateWrapper.lambda().set(TEStudent::getName, s.getName())
-                        .set(TEStudent::getMobileNumber, s.getMobileNumber())
-                        .eq(TEStudent::getIdentity, s.getIdentity())
+                teStudentUpdateWrapper.lambda().set(TEStudent::getName, s.getName());
+                if (Objects.nonNull(s.getMobileNumber()) && !Objects.equals(s.getMobileNumber().trim(), "")) {
+                    teStudentUpdateWrapper.lambda().set(TEStudent::getMobileNumber, s.getMobileNumber());
+                }
+                teStudentUpdateWrapper.lambda().eq(TEStudent::getIdentity, s.getIdentity())
                         .eq(TEStudent::getOrgId, tbOrg.getId());
                         .eq(TEStudent::getOrgId, tbOrg.getId());
                 teStudentService.update(teStudentUpdateWrapper);
                 teStudentService.update(teStudentUpdateWrapper);
                 s.setUpdateId(tbUser.getId());
                 s.setUpdateId(tbUser.getId());