Merge branch 'mark' of e.coding.net:rosydev/jx-callback into mark

This commit is contained in:
gazebo
2019-11-20 16:04:29 +08:00
10 changed files with 91 additions and 40 deletions

View File

@@ -46,7 +46,7 @@ func (c *FinancialController) SendFilesToStores() {
if params.Title != "永辉" {
retVal, err = financial.SendFilesToStores(params.Ctx, files, params.Title, params.ShopName, params.IsAsync, params.Ctx.GetUserName())
} else {
retVal, err = yonghui.LoadExcelByYongHui(params.Ctx, files, params.IsAsync)
retVal, err = yonghui.LoadExcelByYongHui(params.Ctx, files, params.IsAsync, true)
}
return retVal, "", err
})

View File

@@ -14,8 +14,9 @@ type YongHuiController struct {
// @Title 读取永辉excel文件
// @Description 读取永辉excel文件
// @Param token header string false "认证token"
// @Param isAsync query bool false "是否异步,缺省是同步"
// @Param token header string false "认证token"
// @Param isAsync query bool true "是否异步,缺省是同步"
// @Param isContinueWhenError query bool true "单个同步失败是否继续缺省false"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /LoadExcelByYongHui [post,get]
@@ -36,7 +37,7 @@ 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.LoadExcelByYongHui(params.Ctx, files, params.IsAsync)
retVal, err = yonghui.LoadExcelByYongHui(params.Ctx, files, params.IsAsync, params.IsContinueWhenError)
return retVal, "", err
})
}