不用补改价

This commit is contained in:
苏尹岚
2020-06-05 09:48:16 +08:00
parent dd60689009
commit eb71787c70
5 changed files with 72 additions and 4 deletions

View File

@@ -1630,6 +1630,7 @@ func RefreshJXPriceChange(ctx *jxcontext.Context, storeID int) (hint string, err
SELECT *
FROM store
WHERE deleted_at = ? AND status <> ?
AND id <> 100118 AND id <> 100274 AND id <> 100205
`
sqlParams := []interface{}{utils.DefaultTimeValue, model.StoreStatusDisabled}
if storeID != 0 {
@@ -1668,13 +1669,14 @@ func RefreshJXPriceChange(ctx *jxcontext.Context, storeID int) (hint string, err
for _, v := range storeSkus {
skuAndName, _ := dao.GetSkus(db, []int{v.SkuID}, nil, nil, nil, nil)
skuBindInfo := &cms.StoreSkuBindInfo{
StoreID: store.ID,
// StoreID: store.ID,
NameID: skuAndName[0].NameID,
UnitPrice: v.UnitPrice * store.PayPercentage / 100,
}
skuBindInfos = append(skuBindInfos, skuBindInfo)
}
cms.UpdateStoresSkusByBind(ctx, task, skuBindInfos, isAsync, isContinueWhenError, false)
// cms.UpdateStoresSkusByBind(ctx, task, skuBindInfos, isAsync, isContinueWhenError, false)
cms.UpdateStoresSkusWithoutSync(ctx, []int{store.ID}, skuBindInfos)
store.PayPercentage = 100
dao.UpdateEntity(db, store, "PayPercentage")
return retVal, err