Merge branch 'jdshop' of e.coding.net:rosydev/jx-callback into jdshop

This commit is contained in:
邹宗楠
2023-10-08 10:08:11 +08:00

View File

@@ -107,9 +107,10 @@ func (P *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
ShopBatchCreateStoreParam = &shop_batchCreateStore_request.ShopBatchCreateStoreParam{
StoreList: []shop_batchCreateStore_request.StoreListItem{
{
RowId: 1,
Name: "京西菜市(" + storeDetail.Name + ")",
StoreCode: utils.Int2Str(storeDetail.Store.ID),
RowId: 1,
Name: "京西菜市(" + storeDetail.Name + ")",
//StoreCode: utils.Int2Str(storeDetail.Store.ID),
StoreCode: utils.Int2Str(storeID),
Longitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(storeDetail.Lng)),
Latitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(storeDetail.Lat)),
Province: storeDetail.ProvinceName,
@@ -124,11 +125,13 @@ func (P *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
},
}
if resp, err := a.BatchCreateStore(ShopBatchCreateStoreParam); err != nil {
globals.SugarLogger.Debugf("BatchCreateStore err=%v", err)
return "", err
} else {
globals.SugarLogger.Debugf("BatchCreateStore resp=%s", utils.Format4Output(resp, false))
//必须先存进数据库
storeMap := &model.StoreMap{
VendorStoreID: vendorStoreID,
VendorStoreID: utils.Int64ToStr(resp.ResultList[0].Store.StoreId),
StoreID: storeID,
VendorID: model.VendorIDDD,
VendorOrgCode: storeDetail.VendorOrgCode,
@@ -145,7 +148,7 @@ func (P *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
errList.AddErr(dao.CreateEntity(db, storeMap))
}
vendorStoreIDs = utils.Int64ToStr(resp.ResultList[0].Store.StoreId)
if err := CreateOrUpdateAll(storeDetail.VendorOrgCode, int64(storeDetail.Store.ID), resp.ResultList[0].Store.StoreId, int64(storeDetail.DeliveryFeeDeductionFee), int64(storeMap.DeliveryFeeDeductionSill), utils.Str2Int64(storeDetail.YbStorePrefix), storeDetail.YbAppID); err != nil {
if err := CreateOrUpdateAll(storeDetail.VendorOrgCode, int64(storeID), resp.ResultList[0].Store.StoreId, int64(storeDetail.DeliveryFeeDeductionFee), int64(storeMap.DeliveryFeeDeductionSill), utils.Str2Int64(storeDetail.YbStorePrefix), storeDetail.YbAppID); err != nil {
errList.AddErr(err)
}
}