- 修改Rollback调用时机

- 创建三方运单判断EnableStoreWrite
This commit is contained in:
gazebo
2019-04-13 11:30:24 +08:00
parent 0055892cb2
commit 16725bf8f8
4 changed files with 53 additions and 39 deletions

View File

@@ -49,8 +49,11 @@ func (s *StoreManager) OnStoreStatusChanged(vendorStoreID string, vendorID int,
if err == nil && (storeKV != nil || storeMapKV != nil) {
dao.Begin(db)
defer func() {
if err != nil {
if r := recover(); r != nil || err != nil {
dao.Rollback(db)
if r != nil {
panic(r)
}
}
}()
if storeKV != nil {