You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
458 B
24 lines
458 B
2 months ago
|
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)
|
||
|
}
|