This commit is contained in:
suyl
2021-06-10 18:02:04 +08:00
parent 02f40a608a
commit 8f6f185a30

View File

@@ -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
} }