Merge branch 'jdshop' of e.coding.net:rosydev/jx-callback into jdshop
This commit is contained in:
@@ -107,9 +107,10 @@ func (P *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
|
|||||||
ShopBatchCreateStoreParam = &shop_batchCreateStore_request.ShopBatchCreateStoreParam{
|
ShopBatchCreateStoreParam = &shop_batchCreateStore_request.ShopBatchCreateStoreParam{
|
||||||
StoreList: []shop_batchCreateStore_request.StoreListItem{
|
StoreList: []shop_batchCreateStore_request.StoreListItem{
|
||||||
{
|
{
|
||||||
RowId: 1,
|
RowId: 1,
|
||||||
Name: "京西菜市(" + storeDetail.Name + ")",
|
Name: "京西菜市(" + storeDetail.Name + ")",
|
||||||
StoreCode: utils.Int2Str(storeDetail.Store.ID),
|
//StoreCode: utils.Int2Str(storeDetail.Store.ID),
|
||||||
|
StoreCode: utils.Int2Str(storeID),
|
||||||
Longitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(storeDetail.Lng)),
|
Longitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(storeDetail.Lng)),
|
||||||
Latitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(storeDetail.Lat)),
|
Latitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(storeDetail.Lat)),
|
||||||
Province: storeDetail.ProvinceName,
|
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 {
|
if resp, err := a.BatchCreateStore(ShopBatchCreateStoreParam); err != nil {
|
||||||
|
globals.SugarLogger.Debugf("BatchCreateStore err=%v", err)
|
||||||
return "", err
|
return "", err
|
||||||
} else {
|
} else {
|
||||||
|
globals.SugarLogger.Debugf("BatchCreateStore resp=%s", utils.Format4Output(resp, false))
|
||||||
//必须先存进数据库
|
//必须先存进数据库
|
||||||
storeMap := &model.StoreMap{
|
storeMap := &model.StoreMap{
|
||||||
VendorStoreID: vendorStoreID,
|
VendorStoreID: utils.Int64ToStr(resp.ResultList[0].Store.StoreId),
|
||||||
StoreID: storeID,
|
StoreID: storeID,
|
||||||
VendorID: model.VendorIDDD,
|
VendorID: model.VendorIDDD,
|
||||||
VendorOrgCode: storeDetail.VendorOrgCode,
|
VendorOrgCode: storeDetail.VendorOrgCode,
|
||||||
@@ -145,7 +148,7 @@ func (P *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
|
|||||||
errList.AddErr(dao.CreateEntity(db, storeMap))
|
errList.AddErr(dao.CreateEntity(db, storeMap))
|
||||||
}
|
}
|
||||||
vendorStoreIDs = utils.Int64ToStr(resp.ResultList[0].Store.StoreId)
|
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)
|
errList.AddErr(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user