改InitVendorCategory为支持异步

This commit is contained in:
gazebo
2019-10-25 14:00:52 +08:00
parent 15a6fa09d4
commit d4dd333117
2 changed files with 47 additions and 30 deletions

View File

@@ -42,12 +42,13 @@ func (c *InitDataController) InitSkuName() {
// @Description 初始化vendor category当前只有美团外卖的通过这个设置
// @Param token header string true "认证token"
// @Param vendorID formData int true "厂商ID"
// @Param isAsync formData bool false "是否异步操作"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /InitVendorCategory [post]
func (c *InitDataController) InitVendorCategory() {
c.callInitVendorCategory(func(params *tInitdataInitVendorCategoryParams) (retVal interface{}, errCode string, err error) {
retVal, err = initdata.InitVendorCategory(params.Ctx, params.VendorID)
retVal, err = initdata.InitVendorCategory(params.Ctx, params.VendorID, params.IsAsync)
return retVal, "", err
})
}