package controllers import ( "main/logic" "main/utils" "github.com/gin-gonic/gin" "go.uber.org/zap" ) func ImportStudentInfoHandler(c *gin.Context) { file, err := c.FormFile("file") if err != nil { zap.L().Error("upload file failed", zap.Error(err)) utils.ResponseError(c, utils.CodeUpLoadError) return } if err = logic.ImportStudentInfoLogic(file); err != nil { zap.L().Error("import file failed", zap.Error(err)) utils.ResponseError(c, utils.CodeUpLoadError) return } utils.ResponseSuccess(c, nil) }