This commit is contained in:
richboo111
2023-03-09 17:38:16 +08:00
parent a98c9517f1
commit 7d34670800
3 changed files with 23 additions and 11 deletions

View File

@@ -203,7 +203,7 @@ func CreateOrUpdateAll(vendorOrgCode string, storeID, vendorStoreID, deliveryFee
//(2)电子围栏
if len(bind[utils.Int64ToStr(storeID)][0].OutFenceIds) > 0 {
tempFenceID := bind[utils.Int64ToStr(storeID)][0].OutFenceIds[0]
if err1 := UpdateFenceByStore(vendorOrgCode, tempFenceID, int(vendorStoreID)); err1 != nil {
if err1 := UpdateFenceByStore(vendorOrgCode, tempFenceID, utils.Int64ToStr(storeID)); err1 != nil {
errList.AddErr(fmt.Errorf("平台门店(%d),门店(%d)更新电子围栏失败:%v", vendorStoreID, storeID, err1))
}
FreightTemplate.FenceID = bind[utils.Int64ToStr(storeID)][0].OutFenceIds[0] //保存一个就足够
@@ -369,7 +369,7 @@ func (P *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
} else if len(bind[storeInfo.VendorStoreID][0].OutFenceIds) > 0 {
//默认更新第一个电子围栏
outFenceID := bind[storeInfo.VendorStoreID][0].OutFenceIds[0]
if err = UpdateFenceByStore(storeInfo.VendorOrgCode, outFenceID, storeID); err != nil {
if err = UpdateFenceByStore(storeInfo.VendorOrgCode, outFenceID, utils.Int2Str(storeID)); err != nil {
errList.AddErr(errors.New(fmt.Sprintf("更新电子围栏失败,原因:%v", err)))
}
FreightTemplate.FenceID = outFenceID