package controllers import ( "main/logic" "main/models" "main/utils" "github.com/gin-gonic/gin" "go.uber.org/zap" ) func WriteIntoExcelHandler(c *gin.Context) { s := new(models.SaveInfo) savePath, err := logic.WriteIntoExcelLogic() if err != nil { zap.L().Error("Write info error", zap.Error(err)) utils.ResponseError(c, utils.CodeWriteInfoError) return } s.SavePath = savePath s.Msg = "信息保存成功" utils.ResponseSuccess(c, s) }