改价格包时,不用事务

This commit is contained in:
gazebo
2019-11-01 21:02:00 +08:00
parent 5457f1d2be
commit 7a1972680b
2 changed files with 2 additions and 3 deletions

View File

@@ -336,15 +336,14 @@ func UpdateConfig(ctx *jxcontext.Context, key, configType, value string) (hint s
dao.Rollback(db)
return "", err
}
dao.Commit(db)
for _, v := range storeMapList {
if _, err = dao.UpdateEntityLogicallyAndUpdateSyncStatus(db, &model.StoreSkuBind{}, nil, ctx.GetUserName(), map[string]interface{}{
model.FieldStoreID: v.StoreID,
}, dao.GetSyncStatusStructField(model.VendorNames[v.VendorID]), model.SyncFlagPriceMask); err != nil {
dao.Rollback(db)
return "", err
}
}
dao.Commit(db)
case model.ConfigTypeFreightPack:
dao.Commit(db)
storeMapList, err := dao.GetStoresMapList(db, nil, nil, model.StoreStatusAll, model.StoreIsSyncYes, "")

View File

@@ -13,7 +13,7 @@ import (
const (
useGetRowsWhenGetRow = true
transactionWarningSeconds = 2 * 60 // 5分钟
transactionWarningSeconds = 10 * 60 // 5分钟
)
type DaoDB struct {