From 7a1972680bc3db037384d3e6f59e538e5932d9c9 Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 1 Nov 2019 21:02:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=94=B9=E4=BB=B7=E6=A0=BC=E5=8C=85?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E4=B8=8D=E7=94=A8=E4=BA=8B=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/cms.go | 3 +-- business/model/dao/dao.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/business/jxstore/cms/cms.go b/business/jxstore/cms/cms.go index 8d6dc1eae..9aa2f3da6 100644 --- a/business/jxstore/cms/cms.go +++ b/business/jxstore/cms/cms.go @@ -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, "") diff --git a/business/model/dao/dao.go b/business/model/dao/dao.go index 45f76a448..f3c3803f8 100644 --- a/business/model/dao/dao.go +++ b/business/model/dao/dao.go @@ -13,7 +13,7 @@ import ( const ( useGetRowsWhenGetRow = true - transactionWarningSeconds = 2 * 60 // 5分钟 + transactionWarningSeconds = 10 * 60 // 5分钟 ) type DaoDB struct { From 5230fa664d526725116db321cd7ee68f58a8a2ff Mon Sep 17 00:00:00 2001 From: gazebo Date: Sat, 2 Nov 2019 11:42:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=BF=90=E5=8D=95?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E4=B8=8D=E5=86=8D=E6=8A=A5=E8=AD=A6BaseSched?= =?UTF-8?q?uler.CancelWaybill?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/scheduler/basesch/basesch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxcallback/scheduler/basesch/basesch.go b/business/jxcallback/scheduler/basesch/basesch.go index 7b7fb4f33..0d7716a12 100644 --- a/business/jxcallback/scheduler/basesch/basesch.go +++ b/business/jxcallback/scheduler/basesch/basesch.go @@ -179,7 +179,7 @@ func (c *BaseScheduler) CancelWaybill(bill *model.Waybill, cancelReasonID int, c // 部分快递平台在取消成功后有时会不发运单取消消息过来(比如达达,904200512000442),为避免二次取消报错,添加状态判断 if c.IsReallyCallPlatformAPI && bill.OrderVendorID != bill.WaybillVendorID && bill.Status != model.WaybillStatusCanceled { if handlerInfo := partner.GetDeliveryPlatformFromVendorID(bill.WaybillVendorID); handlerInfo != nil { - if err = utils.CallFuncLogError(func() error { + if err = utils.CallFuncLogErrorWithInfo(func() error { return handlerInfo.Handler.CancelWaybill(bill, cancelReasonID, cancelReason) }, "CancelWaybill bill:%v", bill); err == nil { bill.Status = model.WaybillStatusCanceled