...
|
...
|
@@ -47,6 +47,11 @@ public class FamilyServiceImpl extends ServicePlusImpl<CFamilyRelationStudentMap |
|
|
@Override
|
|
|
public AjaxResult bindingFamily(MyAuthentication myAuthentication ,Long userId) {
|
|
|
|
|
|
if(myAuthentication.getParentName() ==null){
|
|
|
return AjaxResult.error("父母名字必填");
|
|
|
}
|
|
|
|
|
|
//查看是否绑定过孩子
|
|
|
List<CPersonalInformation> cPersonalInformations = cPersonalInformationMapper.selectList(Wrappers.lambdaQuery(CPersonalInformation.class)
|
|
|
.eq(CPersonalInformation::getIdentityCard, myAuthentication.getIdentityCard()).eq(CPersonalInformation::getName, myAuthentication.getName())
|
|
|
.eq(CPersonalInformation::getPhonenumber,myAuthentication.getUserPhonenumber()));
|
...
|
...
|
@@ -64,8 +69,11 @@ public class FamilyServiceImpl extends ServicePlusImpl<CFamilyRelationStudentMap |
|
|
CFamilyRelationStudent cFamilyRelationStudent = new CFamilyRelationStudent();
|
|
|
cFamilyRelationStudent.setUserId(userId);
|
|
|
cFamilyRelationStudent.setSubclassId(cPersonalInformations.get(0).getUserId());
|
|
|
cFamilyRelationStudent.setCreatorTime(LocalDateTime.now());
|
|
|
cFamilyRelationStudent.setCreatorTime(LocalDateTime.now()).setName(myAuthentication.getParentName());
|
|
|
getBaseMapper().insert(cFamilyRelationStudent);
|
|
|
|
|
|
|
|
|
|
|
|
//修改当前绑定孩子
|
|
|
CUser cUser = new CUser();
|
|
|
cUser.setUserId(userId);
|
...
|
...
|
|