aa
This commit is contained in:
@@ -1866,13 +1866,6 @@ func RefreshOrderSkuInfo(ctx *jxcontext.Context, vendorOrderID string, vendorID,
|
|||||||
dao.UpdateEntity(db, v, "ShopPrice", "EarningPrice")
|
dao.UpdateEntity(db, v, "ShopPrice", "EarningPrice")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
txDB, _ := dao.Begin(db)
|
|
||||||
defer func() {
|
|
||||||
if r := recover(); r != nil {
|
|
||||||
dao.Rollback(db, txDB)
|
|
||||||
panic(r)
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
for _, v := range order.Skus {
|
for _, v := range order.Skus {
|
||||||
if v.SkuID == 0 {
|
if v.SkuID == 0 {
|
||||||
if v.JxSkuID == skuID {
|
if v.JxSkuID == skuID {
|
||||||
@@ -1894,7 +1887,6 @@ func RefreshOrderSkuInfo(ctx *jxcontext.Context, vendorOrderID string, vendorID,
|
|||||||
order.ShopPrice = shopPrice
|
order.ShopPrice = shopPrice
|
||||||
order.EarningPrice = earningPrice
|
order.EarningPrice = earningPrice
|
||||||
num, err = dao.UpdateEntity(db, order, "ShopPrice", "EarningPrice")
|
num, err = dao.UpdateEntity(db, order, "ShopPrice", "EarningPrice")
|
||||||
dao.Commit(db, txDB)
|
|
||||||
return num, err
|
return num, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user