冲突
This commit is contained in:
@@ -2582,14 +2582,12 @@ func UpdateSkuExinfoMap(ctx *jxcontext.Context, nameIDs []int, imgWaterMark stri
|
||||
if len(skuList) > 0 {
|
||||
for _, v := range skuList {
|
||||
skuIDs = append(skuIDs, v.ID)
|
||||
retVal = []int{v.ID}
|
||||
}
|
||||
if partner.IsMultiStore(vendorID) {
|
||||
for _, v := range skuIDs {
|
||||
OnUpdateThing(ctx, db, nil, int64(v), model.ThingTypeSku)
|
||||
}
|
||||
CurVendorSync.SyncSkus(ctx, db, nil, skuIDs, isAsync, isContinueWhenError, ctx.GetUserName())
|
||||
} else {
|
||||
CurVendorSync.SyncStoresSkus2(ctx, nil, 0, db, []int{vendorID}, nil, false, skuIDs, nil, model.SyncFlagModifiedMask, isAsync, isContinueWhenError)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2600,7 +2598,19 @@ func UpdateSkuExinfoMap(ctx *jxcontext.Context, nameIDs []int, imgWaterMark stri
|
||||
if isAsync {
|
||||
hint = task.GetID()
|
||||
} else {
|
||||
_, err = task.GetResult(0)
|
||||
var skuIDs []int
|
||||
result, err2 := task.GetResult(0)
|
||||
err = err2
|
||||
if len(result) > 0 {
|
||||
for _, v := range result {
|
||||
skuIDs = append(skuIDs, int(utils.Interface2Int64WithDefault(v, 0)))
|
||||
}
|
||||
if partner.IsMultiStore(vendorID) {
|
||||
CurVendorSync.SyncSkus(ctx, db, nil, skuIDs, isAsync, isContinueWhenError, ctx.GetUserName())
|
||||
} else {
|
||||
CurVendorSync.SyncStoresSkus2(ctx, nil, 0, db, []int{vendorID}, nil, false, skuIDs, nil, model.SyncFlagModifiedMask, isAsync, isContinueWhenError)
|
||||
}
|
||||
}
|
||||
hint = "1"
|
||||
}
|
||||
return hint, err
|
||||
|
||||
@@ -4669,7 +4669,7 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto
|
||||
return true, err
|
||||
}
|
||||
|
||||
func StoreSkuPriceAudit(ctx *jxcontext.Context, storeSkuAudits []*model.StoreSkuAudit, status int, isAsync, isContinueWhenError bool) (storeSkuAudits2 []*model.StoreSkuAudit, hint string, err error) {
|
||||
func StoreSkuPriceAudit(ctx *jxcontext.Context, storeSkuAudits []*model.StoreSkuAudit, status int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
db := dao.GetDB()
|
||||
if status == model.StoreAuditStatusOnline {
|
||||
return nil, "", fmt.Errorf("审核标志不正确!")
|
||||
@@ -4763,5 +4763,5 @@ func StoreSkuPriceAudit(ctx *jxcontext.Context, storeSkuAudits []*model.StoreSku
|
||||
_, err = task.GetResult(0)
|
||||
hint = "1"
|
||||
}
|
||||
return nil, hint, err
|
||||
return hint, err
|
||||
}
|
||||
|
||||
@@ -117,7 +117,6 @@ func GetWeixinOpenIDsFromStoreID(storeID int) (retVal []string) {
|
||||
retVal = nil
|
||||
}
|
||||
}
|
||||
retVal = append(retVal, "oYN_usv1RPvrSxCvo1WsbwI8lZa0")
|
||||
return retVal
|
||||
}
|
||||
|
||||
|
||||
@@ -888,11 +888,7 @@ func (c *StoreSkuController) StoreSkuPriceAudit() {
|
||||
if err = jxutils.Strings2Objs(params.Payload, &storeSkuAudits); err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
retVal, hint, err := cms.StoreSkuPriceAudit(params.Ctx, storeSkuAudits, params.Status, params.IsAsync, params.IsContinueWhenError)
|
||||
if hint != "" {
|
||||
return hint, "", err
|
||||
} else {
|
||||
return retVal, "", err
|
||||
}
|
||||
retVal, err = cms.StoreSkuPriceAudit(params.Ctx, storeSkuAudits, params.Status, params.IsAsync, params.IsContinueWhenError)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user