xiatian 2 жил өмнө
parent
commit
19a94a99f4

+ 4 - 1
src/main/java/cn/com/qmth/mps/service/impl/SchoolServiceImpl.java

@@ -95,6 +95,9 @@ public class SchoolServiceImpl extends ServiceImpl<SchoolDao, SchoolEntity> impl
 		if (StringUtils.isBlank(domain.getName())) {
 			throw new StatusException("学校名称不能为空");
 		}
+		if (domain.getEnable()==null) {
+			throw new StatusException("启用禁用不能为空");
+		}
 		SchoolEntity ue = null;
 		if (domain.getId() != null) {
 			ue = this.getById(domain.getId());
@@ -107,8 +110,8 @@ public class SchoolServiceImpl extends ServiceImpl<SchoolDao, SchoolEntity> impl
 			}
 			ue = new SchoolEntity();
 			ue.setCode(domain.getCode());
-			ue.setEnable(true);
 		}
+		ue.setEnable(domain.getEnable());
 		ue.setName(domain.getName());
 		ue.setContacts(domain.getContacts());
 		ue.setTelephone(domain.getTelephone());

+ 10 - 0
src/main/java/cn/com/qmth/mps/vo/school/SchoolDomain.java

@@ -15,6 +15,8 @@ public class SchoolDomain {
 	private String contacts;
 	@ApiModelProperty("区域")
 	private String region;
+	@ApiModelProperty("启用禁用")
+	private Boolean enable;
 	
 
 	public String getName() {
@@ -64,5 +66,13 @@ public class SchoolDomain {
 	public void setCode(String code) {
 		this.code = code;
 	}
+
+	public Boolean getEnable() {
+		return enable;
+	}
+
+	public void setEnable(Boolean enable) {
+		this.enable = enable;
+	}
 	
 }