This commit is contained in:
苏尹岚
2021-04-08 13:51:49 +08:00
parent a11d5312be
commit 1f63dc8158

View File

@@ -29,6 +29,9 @@ func (s *StoreManager) OnStoreStatusChanged(vendorStoreID string, vendorID int,
db := dao.GetDB()
storeDetail, err := dao.GetStoreDetailByVendorStoreID(db, vendorStoreID, vendorID, "")
if err == nil {
if storeDetail.IsSync == model.NO {
return err
}
var storeKV, storeMapKV map[string]interface{}
if storeStatus == model.StoreStatusOpened {
if storeDetail.Status != model.StoreStatusOpened {
@@ -65,7 +68,7 @@ func (s *StoreManager) OnStoreStatusChanged(vendorStoreID string, vendorID int,
}
}
if err == nil && (storeKV != nil || storeMapKV != nil) {
txDB , _ := dao.Begin(db)
txDB, _ := dao.Begin(db)
defer func() {
if r := recover(); r != nil || err != nil {
dao.Rollback(db, txDB)