- 在创建快递门店时,处理PayeeName为空的情况
This commit is contained in:
@@ -131,7 +131,8 @@ func StoreDetail2ShopInfo(storeDetail *dao.StoreDetail2) (shopInfo *dadaapi.Shop
|
||||
}
|
||||
shopInfo = &dadaapi.ShopInfo{
|
||||
OriginShopID: storeDetail.VendorStoreID,
|
||||
StationName: storeDetail.CourierStoreName,
|
||||
StationName: storeDetail.Name,
|
||||
Business: dadaapi.BusinessTypeConvStore, // 故意设置成这个的
|
||||
CityName: cityName,
|
||||
AreaName: districtName,
|
||||
StationAddress: storeDetail.Address,
|
||||
@@ -165,17 +166,17 @@ func (c *DeliveryHandler) GetStore(ctx *jxcontext.Context, storeID int, vendorSt
|
||||
if err == nil {
|
||||
storeDetail = &dao.StoreDetail2{
|
||||
Store: model.Store{
|
||||
Name: shopInfo.StationName,
|
||||
Address: shopInfo.StationAddress,
|
||||
Lng: jxutils.StandardCoordinate2Int(shopInfo.Lng),
|
||||
Lat: jxutils.StandardCoordinate2Int(shopInfo.Lat),
|
||||
PayeeName: shopInfo.ContactName,
|
||||
Tel1: shopInfo.Phone,
|
||||
},
|
||||
VendorID: model.VendorIDDada,
|
||||
VendorStoreID: shopInfo.OriginShopID,
|
||||
CourierStoreName: shopInfo.StationName,
|
||||
CityName: shopInfo.CityName,
|
||||
DistrictName: shopInfo.AreaName,
|
||||
VendorID: model.VendorIDDada,
|
||||
VendorStoreID: shopInfo.OriginShopID,
|
||||
CityName: shopInfo.CityName,
|
||||
DistrictName: shopInfo.AreaName,
|
||||
}
|
||||
}
|
||||
return storeDetail, err
|
||||
|
||||
@@ -41,7 +41,7 @@ func (c *DeliveryHandler) CreateStore(ctx *jxcontext.Context, storeDetail *dao.S
|
||||
}
|
||||
shopInfo := &mtpsapi.ShopInfo{
|
||||
ShopID: storeDetail.VendorStoreID,
|
||||
ShopName: storeDetail.CourierStoreName,
|
||||
ShopName: storeDetail.Name,
|
||||
Category: mtpsapi.ShopCategoryFruit,
|
||||
SecondCategory: mtpsapi.ShopCategoryFruitFruit,
|
||||
ContactName: storeDetail.PayeeName,
|
||||
@@ -67,6 +67,7 @@ func (c *DeliveryHandler) GetStore(ctx *jxcontext.Context, storeID int, vendorSt
|
||||
if err == nil {
|
||||
storeDetail = &dao.StoreDetail2{
|
||||
Store: model.Store{
|
||||
Name: shopInfo.ShopName,
|
||||
CityCode: shopInfo.City,
|
||||
PayeeName: shopInfo.ContactName,
|
||||
Tel1: shopInfo.ContactPhone,
|
||||
@@ -74,9 +75,8 @@ func (c *DeliveryHandler) GetStore(ctx *jxcontext.Context, storeID int, vendorSt
|
||||
Lng: shopInfo.ShopLng,
|
||||
Lat: shopInfo.ShopLat,
|
||||
},
|
||||
VendorID: model.VendorIDMTPS,
|
||||
VendorStoreID: shopInfo.ShopID,
|
||||
CourierStoreName: shopInfo.ShopName,
|
||||
VendorID: model.VendorIDMTPS,
|
||||
VendorStoreID: shopInfo.ShopID,
|
||||
}
|
||||
}
|
||||
return storeDetail, err
|
||||
|
||||
Reference in New Issue
Block a user