日常bug
This commit is contained in:
@@ -263,22 +263,12 @@ func BeginSavePriceRefer(ctx *jxcontext.Context, cityCodes, skuIDs []int, isAsyn
|
||||
v := batchItemList[0].(*model.PriceReferSnapshot)
|
||||
for _, appOrg := range apimanager.CurAPIManager.GetAppOrgCodeList(model.VendorIDJD) {
|
||||
directPrice, _ := jd.GetAPI(appOrg).GetJdSkuDirectPrice(v.SkuID)
|
||||
dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil || err != nil {
|
||||
dao.Rollback(db)
|
||||
if r != nil {
|
||||
panic(r)
|
||||
}
|
||||
}
|
||||
}()
|
||||
if directPrice == 0 {
|
||||
continue
|
||||
} else {
|
||||
v.JdDirectPrice = int(directPrice)
|
||||
dao.UpdateEntity(db, v, "JdDirectPrice")
|
||||
}
|
||||
dao.Commit(db)
|
||||
}
|
||||
return retVal, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user