夏文涛 1 год назад
Родитель
Сommit
3903266069

+ 2 - 2
src/main/java/com/template/controller/WelcomeStudentController.java

@@ -636,7 +636,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
                 if (!(StringUtils.hasText(fv.getName()) && StringUtils.hasText(fv.getPhone()) && StringUtils.hasText(fv.getWorkUnit()) && StringUtils.hasText(fv.getFamilyShip()))) {
                     return CommonResult.fail("家庭成员信息不能为空!");
                 }
-                if (fv.getId() != null && fv.getId().intValue() > 0) {
+                if (!(fv.getId() != null && fv.getId().intValue() > 0)) {
                     WelcomeFamily wf = new WelcomeFamily();
                     wf.setName(fv.getName());
                     wf.setPhone(fv.getPhone());
@@ -656,7 +656,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
                 if (!(StringUtils.hasText(av.getName()) && StringUtils.hasText(av.getPhone()))) {
                     return CommonResult.fail("家庭成员信息不能为空!");
                 }
-                if(av.getId()!= null && av.getId().intValue() > 0) {
+                if(!(av.getId()!= null && av.getId().intValue() > 0)) {
                     WelcomeAccompany wa = new WelcomeAccompany();
                     wa.setName(av.getName());
                     wa.setPhone(av.getPhone());