- bug fix for many sync operation.
This commit is contained in:
@@ -111,6 +111,22 @@ func (c *SkuController) DeleteCategory() {
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 同步商家SKU类别
|
||||
// @Description 同步商家SKU类别
|
||||
// @Param token header string true "认证token"
|
||||
// @Param categoryID query int true "SKU类别ID, -1表示所有"
|
||||
// @Param isAsync query bool false "是否异步"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /SyncCategory [put]
|
||||
func (c *SkuController) SyncCategory() {
|
||||
c.callSyncCategory(func(params *tSkuSyncCategoryParams) (retVal interface{}, errCode string, err error) {
|
||||
db := dao.GetDB()
|
||||
retVal, err = cms.CurVendorSync.SyncCategory(db, params.CategoryID, params.IsAsync, GetUserNameFromToken(params.Token))
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 得到商品信息
|
||||
// @Description 得到商品信息,如下条件之间是与的关系
|
||||
// @Param token header string true "认证token"
|
||||
@@ -288,13 +304,14 @@ func (c *SkuController) GetVendorSku() {
|
||||
// @Param token header string true "认证token"
|
||||
// @Param nameID query int true "name ID, -1表示所有"
|
||||
// @Param skuID query int true "sku ID, -1表示所有"
|
||||
// @Param isAsync query bool false "是否异步"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /SyncSkus [put]
|
||||
func (c *SkuController) SyncSkus() {
|
||||
c.callSyncSkus(func(params *tSkuSyncSkusParams) (retVal interface{}, errCode string, err error) {
|
||||
// @router /SyncSku [put]
|
||||
func (c *SkuController) SyncSku() {
|
||||
c.callSyncSku(func(params *tSkuSyncSkuParams) (retVal interface{}, errCode string, err error) {
|
||||
db := dao.GetDB()
|
||||
err = cms.CurVendorSync.SyncSku(db, params.NameID, params.SkuID, GetUserNameFromToken(params.Token))
|
||||
retVal, err = cms.CurVendorSync.SyncSku(db, params.NameID, params.SkuID, params.IsAsync, GetUserNameFromToken(params.Token))
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user