yuhaitao14 6 years ago
parent
commit
1076dd286d

+ 13 - 3
shop/src/main/java/com/zskk/shop/controller/pc/AppointmentController.java

@@ -147,9 +147,19 @@ public class AppointmentController extends AbstractController {
 			throw new ZSKKException(ErrorConstant.PARAM_ERROR);
 		}
 		
-		FamilyPeople people = this.familyPeopleService.queryMyPeople(fid);
-		if (people == null){
-			throw new ZSKKException(ErrorConstant.PARAM_ERROR);
+		FamilyPeople people = null;
+		if (fid.equals(0)){ //新建
+			people = new FamilyPeople();
+			people.setId(0);
+			people.setAddress("");
+			people.setCtime(ToolUtils.getNow());
+			people.setIsDel(0);
+			people.setUid(userBean.getUserid());
+		}else{
+			people = familyPeopleService.queryMyPeople(fid);
+			if (people == null){
+				throw new ZSKKException(ErrorConstant.PARAM_ERROR);
+			}
 		}
 		
 		appointment.setFid(fid);