Browse Source

提交不能为空显示

夏文涛 1 year ago
parent
commit
9e13404730

+ 1 - 0
src/main/java/com/template/common/exception/EmsExceptionHandler.java

@@ -86,6 +86,7 @@ public class EmsExceptionHandler {
     @ResponseBody
     public CommonResult httpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException e) {
         e.printStackTrace();
+        logger.error("错误接口名:"+ e.getMethod());
         logger.error("错误信息",e.fillInStackTrace());
         //String error=e.getFieldError().getDefaultMessage();
         return CommonResult.resultValue(ResponseStatusEnum.SYSTEM_REQUEST_METHOD_ERROR);

+ 5 - 1
src/main/java/com/template/controller/LoginController.java

@@ -9,6 +9,7 @@ import com.template.common.utils.*;
 import com.template.config.WxAuthorConfig;
 import com.template.config.WxOpenidConfig;
 import com.template.model.enumModel.eIdentityTypeStatu;
+import com.template.model.enumModel.eSchool;
 import com.template.model.enumModel.eStatu;
 import com.template.model.pojo.WelcomeAccount;
 import com.template.model.pojo.WelcomeOrg;
@@ -230,6 +231,7 @@ public class LoginController implements LoginControllerAPI {
                 student.setName(user_name);
                 student.setPhone(phone);
                 student.setSchool(campus);
+                student.setSchoolId(campus == null ? 0 : eSchool.stringOf(campus));
                 student.setSex(gender == 1 ? "男" : "女");
                 student.setCollege(college);
                 student.setMajor(profession);
@@ -254,6 +256,7 @@ public class LoginController implements LoginControllerAPI {
             student.setName(user_name);
             student.setPhone(phone);
             student.setSchool(campus);
+            student.setSchoolId(campus == null ? 0 : eSchool.stringOf(campus));
             student.setSex(gender == 1 ? "男" : "女");
             student.setCollege(college);
             student.setMajor(profession);
@@ -295,6 +298,7 @@ public class LoginController implements LoginControllerAPI {
         wlv.setCardId(id_card);
         wlv.setSex(student.getSex());
         wlv.setSchool(campus);
+        wlv.setSchoolId(campus == null ? 0 : eSchool.stringOf(campus));
 
         wlv.setPhone(student.getPhone().replace("(+86)", ""));
         wlv.setCollege(college == null ? "微校获取不到院校" : college);
@@ -302,7 +306,7 @@ public class LoginController implements LoginControllerAPI {
         TokenDateVo token = JWTUtil.getToken(id_card, student.getId(), expired);
         wlv.setToken(token.getToken());
         System.out.println("微校授权成功:" + user_name + "" + card_number);
-        response.sendRedirect(wxOpenidConfig.getIp() + "/#/pages/index/index/?urlstr=" + urlstr + "&token=" + token + "&type=" + idenType);
+        response.sendRedirect(wxOpenidConfig.getIp() + "/#/pages/index/index/?urlstr=" + urlstr + "&token=" + token.getToken() + "&type=" + idenType);
         return CommonResult.ok(wlv);
     }
 

+ 3 - 3
src/main/java/com/template/controller/SystemSettingController.java

@@ -195,7 +195,7 @@ public class SystemSettingController implements SystemSettingControllerAPI {
                 int deleteAll = welcomePaySettingService.deleteAll();
 
                 boolean saveBatch = welcomePaySettingService.saveBatch(wpss);
-                if(saveBatch){
+                if(!saveBatch){
                     logger.error("添加缴费设置信息失败,参数:" + JSON.toJSON(wpss));
                     throw new Exception("添加失败!");
                 }
@@ -205,7 +205,7 @@ public class SystemSettingController implements SystemSettingControllerAPI {
                 int deleteAll = welcomeOpenSettingService.deleteAll();
 
                 boolean saveBatch = welcomeOpenSettingService.saveBatch(woss);
-                if(saveBatch){
+                if(!saveBatch){
                     logger.error("添加开放比例设置信息失败,参数:" + JSON.toJSON(woss));
                     throw new Exception("添加失败!");
                 }
@@ -215,7 +215,7 @@ public class SystemSettingController implements SystemSettingControllerAPI {
                 int deleteAll = welcomeArriveSettingService.deleteAll();
 
                 boolean saveBatch = welcomeArriveSettingService.saveBatch(wass);
-                if(saveBatch){
+                if(!saveBatch){
                     logger.error("添加抵达时间段设置信息失败,参数:" + JSON.toJSON(wass));
                     throw new Exception("添加失败!");
                 }

+ 33 - 1
src/main/java/com/template/controller/WelcomeStudentController.java

@@ -156,6 +156,10 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
         List<WelcomeFamily> wfs = new ArrayList<>();
         if (isr.getFamilys() != null && isr.getFamilys().size() > 0) {
             for (InsertFamilyRequest family : isr.getFamilys()) {
+                if(!(StringUtils.hasText(family.getFamilyShip()) && StringUtils.hasText(family.getName())
+                && StringUtils.hasText(family.getWorkUnit()) && StringUtils.hasText(family.getPhone()))){
+                    return CommonResult.fail("家庭成员信息不能为空!");
+                }
                 WelcomeFamily wf = new WelcomeFamily();
                 wf.setStudentCard(ws.getCardId());
                 wf.setFamilyShip(family.getFamilyShip());
@@ -171,6 +175,9 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
         List<WelcomeAccompany> was = new ArrayList<>();
         if (isr.getAccompanys() != null && isr.getAccompanys().size() > 0) {
             for (InsertAccompanyRequest accompany : isr.getAccompanys()) {
+                if(!(StringUtils.hasText(accompany.getName()) && StringUtils.hasText(accompany.getPhone()))){
+                    return CommonResult.fail("陪同人员信息不能为空!");
+                }
                 WelcomeAccompany wa = new WelcomeAccompany();
                 wa.setStudentCard(ws.getCardId());
                 wa.setName(accompany.getName());
@@ -251,7 +258,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
         student.setAdmissNum(usr.getAdmissNum());
         student.setName(usr.getName());
         student.setPicture(usr.getPicture());
-        student.setCardId(usr.getCardId());
+        //student.setCardId(usr.getCardId());
         student.setSex(usr.getSex());
         student.setBirthday(usr.getBirthday());
         student.setSchool(usr.getSchool());
@@ -292,6 +299,10 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
         List<WelcomeFamily> wfs = new ArrayList<>();
         if (usr.getFamilys() != null && usr.getFamilys().size() > 0) {
             for (InsertFamilyRequest family : usr.getFamilys()) {
+                if(!(StringUtils.hasText(family.getFamilyShip()) && StringUtils.hasText(family.getName())
+                        && StringUtils.hasText(family.getWorkUnit()) && StringUtils.hasText(family.getPhone()))){
+                    return CommonResult.fail("家庭成员信息不能为空!");
+                }
                 WelcomeFamily wf = new WelcomeFamily();
                 wf.setStudentCard(student.getCardId());
                 wf.setFamilyShip(family.getFamilyShip());
@@ -307,6 +318,9 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
         List<WelcomeAccompany> was = new ArrayList<>();
         if (usr.getAccompanys() != null && usr.getAccompanys().size() > 0) {
             for (InsertAccompanyRequest accompany : usr.getAccompanys()) {
+                if(!(StringUtils.hasText(accompany.getName()) && StringUtils.hasText(accompany.getPhone()))){
+                    return CommonResult.fail("陪同人员信息不能为空!");
+                }
                 WelcomeAccompany wa = new WelcomeAccompany();
                 wa.setStudentCard(student.getCardId());
                 wa.setName(accompany.getName());
@@ -580,6 +594,10 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
         List<WelcomeFamily> wfs = new ArrayList<>();
         if (icr.getFvs() != null && icr.getFvs().size() > 0) {
             for (FamilyVo fv : icr.getFvs()) {
+                if(!(StringUtils.hasText(fv.getName()) && StringUtils.hasText(fv.getPhone()) && StringUtils.hasText(fv.getWorkUnit()) && StringUtils.hasText(fv.getFamilyShip()))){
+                    return CommonResult.fail("家庭成员信息不能为空!");
+                }
+
                 WelcomeFamily wf = new WelcomeFamily();
                 wf.setName(fv.getName());
                 wf.setPhone(fv.getPhone());
@@ -594,6 +612,10 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
         List<WelcomeAccompany> was = new ArrayList<>();
         if (icr.getAvs() != null && icr.getAvs().size() > 0) {
             for (AccompanyVo av : icr.getAvs()) {
+                if(!(StringUtils.hasText(av.getName()) && StringUtils.hasText(av.getPhone()))){
+                    return CommonResult.fail("家庭成员信息不能为空!");
+                }
+
                 WelcomeAccompany wa = new WelcomeAccompany();
                 wa.setName(av.getName());
                 wa.setPhone(av.getPhone());
@@ -603,21 +625,31 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
         }
 
         try {
+            System.out.println("信息采集1");
             boolean resultWs = welcomeStudentService.saveOrUpdate(ws);
+            System.out.println("信息采集1.2");
             if (!resultWs) {
+                System.out.println("信息采集1.1");
                 logger.error("采集学生信息失败,ws参数:" + JSON.toJSON(ws));
                 throw new Exception("采集学生信息失败!");
             }
+            System.out.println("信息采集2");
             boolean resultWf = welcomeFamilyService.saveBatch(wfs);
+            System.out.println("信息采集1.3");
             if (!resultWf) {
+                System.out.println("信息采集1.4");
                 logger.error("采集学生信息失败,wfs参数:" + JSON.toJSON(wfs));
                 throw new Exception("采集学生信息失败!");
             }
+            System.out.println("信息采集3");
             boolean resultWa = welcomeAccompanyService.saveBatch(was);
+            System.out.println("信息采集1.5");
             if (!resultWa) {
+                System.out.println("信息采集1.6");
                 logger.error("采集学生信息失败,was参数:" + JSON.toJSON(was));
                 throw new Exception("采集学生信息失败!");
             }
+
         } catch (Exception e) {
             logger.error(e.getMessage());
             throw new Exception("采集失败!");

+ 52 - 0
src/main/java/com/template/model/enumModel/eSchool.java

@@ -0,0 +1,52 @@
+package com.template.model.enumModel;
+
+/**
+ * @Author: binguo
+ * @Date: 2023/7/26 星期三 14:55
+ * @Description: com.repair.model.enumModel
+ * @Version: 1.0
+ */
+public enum eSchool {
+    MXH(1),//墨轩湖
+    HJH(2);//黄家湖
+
+    private int value;
+
+    eSchool(int value){
+        this.value = value;
+    }
+
+    public int getValue() {
+        return value;
+    }
+    public static eSchool valueOf(int value) {
+        switch (value) {
+            case 1:
+                return eSchool.MXH;
+            case 2:
+                return eSchool.HJH;
+            default:
+                return null;
+        }
+    }
+    public static String stringOf(Integer value) {
+        switch (value) {
+            case 1:
+                return "墨轩湖校区";
+            case 2:
+                return "黄家湖校区";
+            default:
+                return null;
+        }
+    }
+    public static Integer stringOf(String value) {
+        switch (value) {
+            case "墨轩湖校区":
+                return 1;
+            case "黄家湖校区":
+                return 2;
+            default:
+                return null;
+        }
+    }
+}

+ 3 - 0
src/main/java/com/template/model/pojo/WelcomeStudent.java

@@ -59,6 +59,9 @@ public class WelcomeStudent implements Serializable {
     @ApiModelProperty(value = "校区")
     private String school;
 
+    @ApiModelProperty(value = "校区ID")
+    private Integer schoolId;
+
     @ApiModelProperty(value = "院系")
     private String college;
 

+ 47 - 6
src/main/java/com/template/model/request/InfoCollectionRequest.java

@@ -7,6 +7,9 @@ import com.template.model.vo.FamilyVo;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
@@ -19,127 +22,165 @@ import java.util.List;
  */
 @Data
 public class InfoCollectionRequest {
-    @ApiModelProperty(value = "数据ID")
-    private Integer id;
-
-    @ApiModelProperty(value = "录取号")
+    @NotBlank(message = "录取号不能为空")
     private String admissNum;
 
-    @ApiModelProperty(value = "姓名")
+    @NotBlank(message = "姓名不能为空")
     private String name;
 
     @ApiModelProperty(value = "照片")
     private String picture;
 
     @ApiModelProperty(value = "身份证号")
+    @NotBlank(message = "身份证号不能为空")
     private String cardId;
 
     @ApiModelProperty(value = "性别")
+    @NotBlank(message = "性别不能为空")
     private String sex;
 
     @ApiModelProperty(value = "出生年月")
+    @NotBlank(message = "出生年月不能为空")
     private String birthday;
 
     @ApiModelProperty(value = "校区")
+    @NotBlank(message = "校区不能为空")
     private String school;
 
+    @ApiModelProperty(value = "校区ID")
+    @NotNull(message = "校区ID不能为空")
+    private Integer schoolId;
+
     @ApiModelProperty(value = "院系")
+    @NotBlank(message = "院系不能为空")
     private String college;
 
     @ApiModelProperty(value = "专业")
+    @NotBlank(message = "专业不能为空")
     private String major;
 
     @ApiModelProperty(value = "班级")
+    @NotBlank(message = "班级不能为空")
     private String classstr;
 
     @ApiModelProperty(value = "院系ID")
+    @NotNull(message = "院系ID不能为空")
     private Integer collegeId;
 
     @ApiModelProperty(value = "专业ID")
+    @NotNull(message = "专业ID不能为空")
     private Integer majorId;
 
     @ApiModelProperty(value = "班级ID")
+    @NotNull(message = "班级ID不能为空")
     private Integer classstrId;
 
     @ApiModelProperty(value = "考生号")
+    @NotBlank(message = "考生号不能为空")
     private String examNum;
 
     @ApiModelProperty(value = "学制")
+    @NotBlank(message = "学制不能为空")
     private String eduSystem;
 
     @ApiModelProperty(value = "毕业中学")
+    @NotBlank(message = "毕业中学不能为空")
     private String graduationSchool;
 
     @ApiModelProperty(value = "批次")
+    @NotBlank(message = "批次不能为空")
     private String batchValue;
 
     @ApiModelProperty(value = "政治面貌")
+    @NotBlank(message = "政治面貌不能为空")
     private String politicalStatu;
 
     @ApiModelProperty(value = "民族")
+    @NotBlank(message = "民族不能为空")
     private String nationality;
 
     @ApiModelProperty(value = "手机号码")
+    @NotBlank(message = "手机号码不能为空")
     private String phone;
 
     @ApiModelProperty(value = "籍贯省ID")
+    @NotNull(message = "籍贯省ID不能为空")
     private Integer oprovinceId;
 
     @ApiModelProperty(value = "籍贯省")
+    @NotBlank(message = "籍贯省不能为空")
     private String oprovince;
 
     @ApiModelProperty(value = "籍贯市ID")
+    @NotNull(message = "籍贯市ID不能为空")
     private Integer ocityId;
 
     @ApiModelProperty(value = "籍贯市")
+    @NotBlank(message = "籍贯市不能为空")
     private String ocity;
 
     @ApiModelProperty(value = "籍贯区ID")
+    @NotNull(message = "籍贯区ID不能为空")
     private Integer odistrictId;
 
     @ApiModelProperty(value = "籍贯区")
+    @NotBlank(message = "籍贯区不能为空")
     private String odistrict;
 
     @ApiModelProperty(value = "省ID")
+    @NotNull(message = "省ID不能为空")
     private Integer provinceId;
 
     @ApiModelProperty(value = "省")
+    @NotBlank(message = "省不能为空")
     private String province;
 
     @ApiModelProperty(value = "市ID")
+    @NotNull(message = "市ID不能为空")
     private Integer cityId;
 
     @ApiModelProperty(value = "市")
+    @NotBlank(message = "市不能为空")
     private String city;
 
     @ApiModelProperty(value = "区ID")
+    @NotNull(message = "区ID不能为空")
     private Integer districtId;
 
     @ApiModelProperty(value = "区")
+    @NotBlank(message = "区不能为空")
     private String district;
 
     @ApiModelProperty(value = "家庭住址")
+    @NotBlank(message = "家庭住址不能为空")
     private String address;
 
     @ApiModelProperty(value = "是否按时报到")
+    @NotNull(message = "是否按时报到不能为空")
     private Integer registerOntime;
 
     @ApiModelProperty(value = "邮编")
+    @NotBlank(message = "邮编不能为空")
     private String zipCode;
 
     @ApiModelProperty(value = "交通方式")
+    @NotBlank(message = "交通方式不能为空")
     private String trafficMethod;
 
     @ApiModelProperty(value = "到站地点")
+    @NotBlank(message = "到站地点不能为空")
     private String arrive;
 
     @ApiModelProperty(value = "到站日期")
+    @NotNull(message = "到站日期不能为空")
     private Date arrvieDate;
 
     @ApiModelProperty(value = "到站时间")
+    @NotBlank(message = "到站时间不能为空")
     private String arriveTime;
 
-    @ApiModelProperty(value = "到站时间段")
+    @ApiModelProperty(value = "到站时间段ID")
+    @NotNull(message = "到站时间段ID不能为空")
     private Integer arriveTimeId;
 
     @ApiModelProperty(value = "家庭成员集合")

+ 35 - 0
src/main/java/com/template/model/request/InsertStudentRequest.java

@@ -7,6 +7,8 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
@@ -24,105 +26,138 @@ import java.util.List;
 public class InsertStudentRequest implements Serializable {
 
     @ApiModelProperty(value = "录取号")
+    @NotBlank(message = "录取号不能为空")
     private String admissNum;
 
     @ApiModelProperty(value = "姓名")
+    @NotBlank(message = "姓名不能为空")
     private String name;
 
     @ApiModelProperty(value = "照片")
     private String picture;
 
     @ApiModelProperty(value = "身份证号")
+	@NotBlank(message = "身份证号不能为空")
     private String cardId;
 
     @ApiModelProperty(value = "性别")
+    @NotBlank(message = "性别不能为空")
     private String sex;
 
     @ApiModelProperty(value = "出生年月")
+    @NotBlank(message = "出生年月不能为空")
     private String birthday;
 
     @ApiModelProperty(value = "校区Id")
+	@NotNull(message = "校区ID不能为空")
     private Integer schoolId;
 
     @ApiModelProperty(value = "校区")
+    @NotBlank(message = "校区不能为空")
     private String school;
 
     @ApiModelProperty(value = "院系")
+    @NotBlank(message = "院系不能为空")
     private String college;
 
     @ApiModelProperty(value = "专业")
+    @NotBlank(message = "专业不能为空")
     private String major;
 
     @ApiModelProperty(value = "班级")
+    @NotBlank(message = "班级不能为空")
     private String classstr;
 
     @ApiModelProperty(value = "院系ID")
+    @NotNull(message = "院系ID不能为空")
     private Integer collegeId;
 
     @ApiModelProperty(value = "专业ID")
+    @NotNull(message = "专业ID不能为空")
     private Integer majorId;
 
     @ApiModelProperty(value = "班级ID")
+    @NotNull(message = "班级ID不能为空")
     private Integer classstrId;
 
     @ApiModelProperty(value = "考生号")
+    @NotBlank(message = "考生号不能为空")
     private String examNum;
 
     @ApiModelProperty(value = "学制")
+    @NotBlank(message = "学制不能为空")
     private String eduSystem;
 
     @ApiModelProperty(value = "毕业中学")
+    @NotBlank(message = "毕业中学不能为空")
     private String graduationSchool;
 
     @ApiModelProperty(value = "批次")
+    @NotBlank(message = "批次不能为空")
     private String batchValue;
 
     @ApiModelProperty(value = "政治面貌")
+    @NotBlank(message = "政治面貌不能为空")
     private String politicalStatu;
 
     @ApiModelProperty(value = "民族")
+    @NotBlank(message = "民族不能为空")
     private String nationality;
 
     @ApiModelProperty(value = "手机号码")
+    @NotBlank(message = "手机号码不能为空")
     private String phone;
 
     @ApiModelProperty(value = "籍贯省")
+    @NotNull(message = "籍贯省ID不能为空")
     private Integer oprovinceId;
 
     @ApiModelProperty(value = "籍贯市")
+    @NotNull(message = "籍贯市ID不能为空")
     private Integer ocityId;
 
     @ApiModelProperty(value = "籍贯区")
+    @NotNull(message = "籍贯区ID不能为空")
     private Integer odistrictId;
 
     @ApiModelProperty(value = "省ID")
+    @NotNull(message = "省ID不能为空")
     private Integer provinceId;
 
     @ApiModelProperty(value = "市ID")
+    @NotNull(message = "市ID不能为空")
     private Integer cityId;
 
     @ApiModelProperty(value = "区ID")
+    @NotNull(message = "区ID不能为空")
     private Integer districtId;
 
     @ApiModelProperty(value = "家庭住址")
+    @NotBlank(message = "家庭住址不能为空")
     private String address;
 
     @ApiModelProperty(value = "交通方式")
+    @NotBlank(message = "交通方式不能为空")
     private String trafficMethod;
 
     @ApiModelProperty(value = "到站地点")
+    @NotBlank(message = "到站地点不能为空")
     private String arrive;
 
     @ApiModelProperty(value = "到站日期")
+    @NotNull(message = "到站日期不能为空")
     private Date arrvieDate;
 
     @ApiModelProperty(value = "到站时间")
+    @NotBlank(message = "到站时间不能为空")
     private String arriveTime;
 
     @ApiModelProperty(value = "邮编")
+    @NotBlank(message = "邮编不能为空")
     private String zipCode;
 
     @ApiModelProperty(value = "按时报到")
+    @NotNull(message = "按时报到不能为空")
     private Integer registerOntime;
 
 //    @ApiModelProperty(value = "应缴金额")

+ 42 - 3
src/main/java/com/template/model/request/updateStudentRequest.java

@@ -3,6 +3,9 @@ package com.template.model.request;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
 import java.io.Serializable;
 import java.util.Date;
 import java.util.List;
@@ -18,106 +21,142 @@ import java.util.List;
 @Data
 public class updateStudentRequest implements Serializable {
 
-    @ApiModelProperty(value = "数据ID")
+    @NotNull(message = "数据ID不能为空")
     private Integer id;
 
     @ApiModelProperty(value = "录取号")
+    @NotBlank(message = "录取号不能为空")
     private String admissNum;
 
     @ApiModelProperty(value = "姓名")
+    @NotBlank(message = "姓名不能为空")
     private String name;
 
     @ApiModelProperty(value = "照片")
     private String picture;
 
-    @ApiModelProperty(value = "身份证号")
-    private String cardId;
+    //学校服务器数据脱敏 身份证是星号
+//    @ApiModelProperty(value = "身份证号")
+//    private String cardId;
 
     @ApiModelProperty(value = "性别")
+    @NotBlank(message = "性别不能为空")
     private String sex;
 
     @ApiModelProperty(value = "出生年月")
+    @NotBlank(message = "出生年月不能为空")
     private String birthday;
 
     @ApiModelProperty(value = "校区")
+    @NotBlank(message = "校区不能为空")
     private String school;
 
+    @ApiModelProperty(value = "校区ID")
+    @NotNull(message = "校区ID不能为空")
+    private Integer schoolId;
+
     @ApiModelProperty(value = "院系")
+    @NotBlank(message = "院系不能为空")
     private String college;
 
     @ApiModelProperty(value = "专业")
+    @NotBlank(message = "专业不能为空")
     private String major;
 
     @ApiModelProperty(value = "班级")
+    @NotBlank(message = "班级不能为空")
     private String classstr;
 
     @ApiModelProperty(value = "院系ID")
+    @NotNull(message = "院系ID不能为空")
     private Integer collegeId;
 
     @ApiModelProperty(value = "专业ID")
+    @NotNull(message = "专业ID不能为空")
     private Integer majorId;
 
     @ApiModelProperty(value = "班级ID")
+    @NotNull(message = "班级ID不能为空")
     private Integer classstrId;
 
     @ApiModelProperty(value = "考生号")
+    @NotBlank(message = "考生号不能为空")
     private String examNum;
 
     @ApiModelProperty(value = "学制")
+    @NotBlank(message = "学制不能为空")
     private String eduSystem;
 
     @ApiModelProperty(value = "毕业中学")
+    @NotBlank(message = "毕业中学不能为空")
     private String graduationSchool;
 
     @ApiModelProperty(value = "批次")
+    @NotBlank(message = "批次不能为空")
     private String batchValue;
 
     @ApiModelProperty(value = "政治面貌")
+    @NotBlank(message = "政治面貌不能为空")
     private String politicalStatu;
 
     @ApiModelProperty(value = "民族")
+    @NotBlank(message = "民族不能为空")
     private String nationality;
 
     @ApiModelProperty(value = "手机号码")
+    @NotBlank(message = "手机号码不能为空")
     private String phone;
 
     @ApiModelProperty(value = "籍贯省")
+    @NotNull(message = "籍贯省ID不能为空")
     private Integer oprovinceId;
 
     @ApiModelProperty(value = "籍贯市")
+    @NotNull(message = "籍贯市ID不能为空")
     private Integer ocityId;
 
     @ApiModelProperty(value = "籍贯区")
+    @NotNull(message = "籍贯区ID不能为空")
     private Integer odistrictId;
 
     @ApiModelProperty(value = "省ID")
+    @NotNull(message = "省ID不能为空")
     private Integer provinceId;
 
     @ApiModelProperty(value = "市ID")
+    @NotNull(message = "市ID不能为空")
     private Integer cityId;
 
     @ApiModelProperty(value = "区ID")
+    @NotNull(message = "区ID不能为空")
     private Integer districtId;
 
     @ApiModelProperty(value = "家庭住址")
+    @NotBlank(message = "家庭住址不能为空")
     private String address;
 
     @ApiModelProperty(value = "交通方式")
+    @NotBlank(message = "交通方式不能为空")
     private String trafficMethod;
 
     @ApiModelProperty(value = "到站地点")
+    @NotBlank(message = "到站地点不能为空")
     private String arrive;
 
     @ApiModelProperty(value = "到站日期")
+    @NotNull(message = "到站日期不能为空")
     private Date arrvieDate;
 
     @ApiModelProperty(value = "到站时间")
+    @NotBlank(message = "到站时间不能为空")
     private String arriveTime;
 
     @ApiModelProperty(value = "邮编")
+    @NotBlank(message = "邮编不能为空")
     private String zipCode;
 
     @ApiModelProperty(value = "按时报到")
+    @NotNull(message = "按时报到不能为空")
     private Integer registerOntime;
 
 //    @ApiModelProperty(value = "应缴金额")

+ 3 - 0
src/main/java/com/template/model/vo/wxLoginVo.java

@@ -39,6 +39,9 @@ public class wxLoginVo {
     @ApiModelProperty(value = "校区")
     private String school;
 
+    @ApiModelProperty(value = "校区")
+    private Integer schoolId;
+
     @ApiModelProperty(value = "院系")
     private String college;
 

+ 5 - 5
src/main/resources/mapper/template/WelcomeStudentMapper.xml

@@ -26,19 +26,19 @@
         left join welcome_student_dormitory wsd on wsd.deleted =0 and wsd.student_card = ws.card_id
         where ws.deleted = 0
         <if test="collegeId != null and collegeId != ''">
-            ws.college_id = #{collegeId}
+            and ws.college_id = #{collegeId}
         </if>
         <if test="majorId != null and majorId != ''">
-            ws.major_id = #{majorId}
+            and ws.major_id = #{majorId}
         </if>
         <if test="classstrId != null and classstrId != ''">
-            ws.classstr_id = #{classstrId}
+            and ws.classstr_id = #{classstrId}
         </if>
         <if test="trafficMethod != null and trafficMethod != ''">
-            ws.trafficMethod = #{trafficMethod}
+            and ws.trafficMethod = #{trafficMethod}
         </if>
         <if test="name != null and name != ''">
-            ws.name like '%' #{name} '%'
+            and ws.name like '%' #{name} '%'
         </if>
         order by ws.update_time desc
     </select>