读取永辉excel文件
This commit is contained in:
27
controllers/yonghui.go
Normal file
27
controllers/yonghui.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/yonghui"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
//读取永辉excelAPI
|
||||
type YongHuiController struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
// @Title 读取永辉excel文件
|
||||
// @Description 读取永辉excel文件
|
||||
// @Param token header string true "认证token"
|
||||
// @Param isAsync query bool false "是否异步,缺省是同步"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /LoadExcelByYongHui [post]
|
||||
func (c *YongHuiController) LoadExcelByYongHui() {
|
||||
c.callLoadExcelByYongHui(func(params *tYonghuiLoadExcelByYongHuiParams) (retVal interface{}, errCode string, err error) {
|
||||
r := c.Ctx.Request
|
||||
files := r.MultipartForm.File["userfiles"]
|
||||
retVal, err = yonghui.SendFilesToStores(params.Ctx, files)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user