1
This commit is contained in:
@@ -53,7 +53,7 @@ func (a *API) UpdateSkuStock(param *sku_syncStock_request.SkuSyncStockParam) err
|
||||
return err
|
||||
}
|
||||
if resp.Code != RequestSuccessCode {
|
||||
return errors.New(resp.SubMsg)
|
||||
return errors.New(resp.SubMsg + ":" + resp.LogId)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -74,7 +74,7 @@ func (a *API) GetShopCategory(cid int64) ([]*RetailCategoryInfo, error) {
|
||||
return nil, err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return nil, errors.New(result.SubMsg)
|
||||
return nil, errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
|
||||
categoryAll := make([]*RetailCategoryInfo, 0, 0)
|
||||
@@ -112,7 +112,7 @@ func (a *API) GetCatePropertyV2(categoryLeftId int64) (*product_getCatePropertyV
|
||||
return nil, err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return nil, errors.New(result.SubMsg)
|
||||
return nil, errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
@@ -182,7 +182,7 @@ func (a *API) QualityList(categoryId int64) ([]*product_qualificationConfig_resp
|
||||
return nil, err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return nil, errors.New(result.SubMsg)
|
||||
return nil, errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
|
||||
configListRequired := make([]*product_qualificationConfig_response.ConfigListItem, 0)
|
||||
@@ -205,7 +205,7 @@ func (a *API) SyncStockBatch(param *sku_syncStockBatch_request.SkuSyncStockBatch
|
||||
return err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return errors.New(result.SubMsg)
|
||||
return errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -220,7 +220,7 @@ func (a *API) EditStoreCommodity(sku *product_editV2_request.ProductEditV2Param)
|
||||
return err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return errors.New(result.SubMsg)
|
||||
return errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -235,16 +235,13 @@ func (a *API) EditStoreCommodityCommit(sku *product_editV2_commit_request.Produc
|
||||
return err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return errors.New(result.SubMsg)
|
||||
return errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeleteStoreCommodity 删除商品
|
||||
func (a *API) DeleteStoreCommodity(productId int64) error {
|
||||
globals.SugarLogger.Debugf("----打印看看是否是定时任务删除:%d", productId)
|
||||
return nil
|
||||
|
||||
request := product_del_request.New()
|
||||
param := request.GetParams()
|
||||
param.ProductId = productId
|
||||
@@ -255,7 +252,7 @@ func (a *API) DeleteStoreCommodity(productId int64) error {
|
||||
return err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return errors.New(result.SubMsg)
|
||||
return errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -272,7 +269,7 @@ func (a *API) ProductSetOffline(productId int64) error {
|
||||
return err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return errors.New(result.SubMsg)
|
||||
return errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -294,7 +291,7 @@ func (a *API) GetSkuDetail(productId, outProductId string) (*product_detail_resp
|
||||
return nil, nil
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return nil, errors.New(result.SubMsg)
|
||||
return nil, errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
if result.Data.Status == 2 {
|
||||
return nil, nil
|
||||
@@ -320,7 +317,7 @@ func (a *API) GetSkuDetailLocalID(productId, outProductId string) (*product_deta
|
||||
return nil, err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return nil, errors.New(result.SubMsg)
|
||||
return nil, errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
if result.Data.Status == 2 {
|
||||
return nil, nil
|
||||
@@ -339,7 +336,7 @@ func (a *API) GetSkuDetailList(param *product_listV2_request.ProductListV2Param)
|
||||
return nil, err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return nil, errors.New(result.SubMsg)
|
||||
return nil, errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
|
||||
return result.Data, nil
|
||||
@@ -355,7 +352,7 @@ func (a *API) EditPrice(skuPrice *sku_editPrice_request.SkuEditPriceParam) error
|
||||
return err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return errors.New(result.SubMsg)
|
||||
return errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -567,7 +564,7 @@ func (a *API) GetProductAuditList(page, pageSize, status int64) ([]product_audit
|
||||
return nil, 0, err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return nil, 0, errors.New(result.SubMsg)
|
||||
return nil, 0, errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
|
||||
return result.Data.Records, result.Data.Total, nil
|
||||
@@ -591,7 +588,7 @@ func (a *API) GetRecommendCategory(picParams []string) (int64, error) {
|
||||
return 0, err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return 0, errors.New(result.SubMsg)
|
||||
return 0, errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
|
||||
if len(result.Data.CategoryDetails) == 0 {
|
||||
@@ -660,7 +657,7 @@ func (a *API) BatchRedistributeStoreProduct(param *superm_product_batchRedistrib
|
||||
return 0, err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return 0, err
|
||||
return 0, errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
|
||||
return result.Data.RootTaskId, nil
|
||||
@@ -676,7 +673,7 @@ func (a *API) BatchApplyStoreProductPrice(mainProductId int64) (int64, error) {
|
||||
return 0, err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return 0, errors.New(result.SubMsg)
|
||||
return 0, errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
|
||||
return result.Data.RootTaskId, nil
|
||||
@@ -691,7 +688,7 @@ func (a *API) LaunchProduct(productId int64) error {
|
||||
return err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
return errors.New(result.SubMsg)
|
||||
return errors.New(result.SubMsg + ":" + result.LogId)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user