导入Excel更新京西价,推荐商品

This commit is contained in:
苏尹岚
2019-12-10 11:47:52 +08:00
parent 3229e3db25
commit 62569dfe55
7 changed files with 244 additions and 69 deletions

View File

@@ -498,3 +498,24 @@ func (c *StoreSkuController) RefershStoreSkusMidPrice() {
return retVal, "", err
})
}
// @Title 根据Excel刷新京西门店商品价
// @Description 根据Excel刷新京西门店商品价
// @Param token header string true "认证token"
// @Param storeIDs query string true "门店列表"
// @Param isAsync query bool true "是否异步,缺省是同步"
// @Param isContinueWhenError query bool true "单个同步失败是否继续缺省false"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /RefreshJxPriceByExcel [post]
func (c *StoreSkuController) RefreshJxPriceByExcel() {
var storeIDList []int
c.callRefreshJxPriceByExcel(func(params *tStoreSkuRefreshJxPriceByExcelParams) (retVal interface{}, errCode string, err error) {
if jxutils.Strings2Objs(params.StoreIDs, &storeIDList); err == nil {
r := c.Ctx.Request
files := r.MultipartForm.File["userfiles"]
retVal, err = cms.RefreshJxPriceByExcel(params.Ctx, storeIDList, files, params.IsAsync, params.IsContinueWhenError)
}
return retVal, "", err
})
}