DengBiao 11 månader sedan
förälder
incheckning
d0e7e0c5f1
1 ändrade filer med 37 tillägg och 4 borttagningar
  1. +37
    -4
      app/admin/svc/enterprise_manage/svc_self_support_for_school.go

+ 37
- 4
app/admin/svc/enterprise_manage/svc_self_support_for_school.go Visa fil

@@ -412,11 +412,44 @@ func SelfSupportForSchoolStudentUpdate(req md.SelfSupportForSchoolStudentUpdateR
_ = session.Rollback()
return
}
info.CollectFaceType = req.CollectFaceType
_, err = selfSupportForUserFaceInfoDb.SelfSupportForUserFaceInfoUpdate(info, "collect_face_type")
if err != nil {
_ = session.Rollback()
if info == nil {
now := time.Now()
selfSupportForSchoolInfoDb := db.SelfSupportForSchoolInfoDb{}
selfSupportForSchoolInfoDb.Set(req.EnterpriseId)
selfSupportForSchoolInfo, err := selfSupportForSchoolInfoDb.GetSelfSupportForSchoolInfo()
if err != nil {
return
}
if selfSupportForSchoolInfo == nil {
return errors.New("当前学校暂未完成《一脸通行入驻》")
}
info = &model.SelfSupportForUserFaceInfo{
EnterpriseId: req.EnterpriseId,
UserIdentityId: req.UserIdentityId,
CollectFaceType: req.CollectFaceType,
SchoolCode: selfSupportForSchoolInfo.SchoolCode,
SchoolStdCode: selfSupportForSchoolInfo.SchoolStdCode,
ParentUserId: "",
ParentLogonId: "",
UserId: "",
SchoolFacePassStatus: "CLOSE",
SchoolFacePaymentStatus: "CLOSE",
ConcentrateSchoolFacePassStatus: 1,
CreateAt: now.Format("2006-01-02 15:04:05"),
UpdateAt: now.Format("2006-01-02 15:04:05"),
}
_, err1 := selfSupportForUserFaceInfoDb.SelfSupportForUserFaceInfoInsert(info)
if err1 != nil {
return err1
}
} else {
info.CollectFaceType = req.CollectFaceType
_, err = selfSupportForUserFaceInfoDb.SelfSupportForUserFaceInfoUpdate(info, "collect_face_type")
if err != nil {
_ = session.Rollback()
}
}

return session.Commit()
}



Laddar…
Avbryt
Spara