- 如果得到的京东平台活动没有有效的sku,则忽略

This commit is contained in:
gazebo
2019-07-09 16:43:40 +08:00
parent b54acdf39c
commit bd645fb164
2 changed files with 5 additions and 1 deletions

View File

@@ -402,6 +402,10 @@ func GetStoresSkusInfo(db *DaoDB, storeIDs, skuIDs []int) (storeSkuList []*model
// vendorID, vendorStoreIDs和vendorSkuIDs都是必须参数
func GetStoresSkusInfoByVendorInfo(db *DaoDB, vendorID int, vendorStoreIDs, vendorSkuIDs []string) (storeSkuList []*StoreSkuBindWithVendorInfo, err error) {
if len(vendorStoreIDs) == 0 || len(vendorSkuIDs) == 0 {
return nil, nil
}
sql := `
SELECT t1.*,
%s.%s_id vendor_sku_id, t2.vendor_store_id

View File

@@ -307,7 +307,7 @@ func (c *PurchaseHandler) onActMsg(msg *jdapi.CallbackOrderMsg) (retVal *jdapi.C
promotionID := msg.BillID
if !partner.CurActManager.IsVendorActExist(jxcontext.AdminCtx, promotionID, model.VendorIDJD) {
act, actStoreSkuList, err := getActFromJD(promotionID)
if err == nil {
if err == nil && len(actStoreSkuList) > 0 {
_, err = partner.CurActManager.CreateActFromVendor(jxcontext.AdminCtx, act, actStoreSkuList)
}
if err != nil {