aa
This commit is contained in:
@@ -29,6 +29,9 @@ func (s *StoreManager) OnStoreStatusChanged(vendorStoreID string, vendorID int,
|
|||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
storeDetail, err := dao.GetStoreDetailByVendorStoreID(db, vendorStoreID, vendorID, "")
|
storeDetail, err := dao.GetStoreDetailByVendorStoreID(db, vendorStoreID, vendorID, "")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
if storeDetail.IsSync == model.NO {
|
||||||
|
return err
|
||||||
|
}
|
||||||
var storeKV, storeMapKV map[string]interface{}
|
var storeKV, storeMapKV map[string]interface{}
|
||||||
if storeStatus == model.StoreStatusOpened {
|
if storeStatus == model.StoreStatusOpened {
|
||||||
if storeDetail.Status != 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) {
|
if err == nil && (storeKV != nil || storeMapKV != nil) {
|
||||||
txDB , _ := dao.Begin(db)
|
txDB, _ := dao.Begin(db)
|
||||||
defer func() {
|
defer func() {
|
||||||
if r := recover(); r != nil || err != nil {
|
if r := recover(); r != nil || err != nil {
|
||||||
dao.Rollback(db, txDB)
|
dao.Rollback(db, txDB)
|
||||||
|
|||||||
Reference in New Issue
Block a user