From 71075ee8df687b6b9eaf684fefd6fca9029acf53 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Thu, 16 Nov 2023 10:55:44 +0800 Subject: [PATCH] update --- .../hdl_self_support_for_school.go | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go b/app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go index 520fc22..e4d7feb 100644 --- a/app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go +++ b/app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go @@ -916,6 +916,19 @@ func SelfSupportForSchoolImportTeacher(c *gin.Context) { e.OutErr(c, e.ERR_NO_DATA, "未查询到对应记录") return } + + selfSupportForSchoolInfoDb := db.SelfSupportForSchoolInfoDb{} + selfSupportForSchoolInfoDb.Set(enterpriseId) + selfSupportForSchoolInfo, err1 := selfSupportForSchoolInfoDb.GetSelfSupportForSchoolInfo() + if err1 != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + if selfSupportForSchoolInfo == nil { + e.OutErr(c, e.ERR, "当前学校暂未完成《一脸通行入驻》") + return + } + files, _ := c.FormFile("file") dst := "./static/upload/" + files.Filename err = c.SaveUploadedFile(files, dst) @@ -982,17 +995,6 @@ func SelfSupportForSchoolImportTeacher(c *gin.Context) { return } if info == nil { - selfSupportForSchoolInfoDb := db.SelfSupportForSchoolInfoDb{} - selfSupportForSchoolInfoDb.Set(enterpriseId) - selfSupportForSchoolInfo, err1 := selfSupportForSchoolInfoDb.GetSelfSupportForSchoolInfo() - if err1 != nil { - e.OutErr(c, e.ERR_DB_ORM, err.Error()) - return - } - if selfSupportForSchoolInfo == nil { - e.OutErr(c, e.ERR, "当前学校暂未完成《一脸通行入驻》") - return - } info = &model.SelfSupportForUserFaceInfo{ EnterpriseId: enterpriseId, UserIdentityId: insertAffected, @@ -1058,7 +1060,7 @@ func ImportV2(c *gin.Context) { } func SelfSupportForSchoolDownloadTemplateExcel(c *gin.Context) { - e.OutSuc(c, "/template/自营学校(教师信息导入模板).xls", nil) + e.OutSuc(c, "/template/自营学校(教师信息导入模板).xlsx", nil) return }