1
This commit is contained in:
@@ -188,12 +188,6 @@ func (c *DeliveryHandler) callbackMsg2Waybill(msg *dadaapi.CallbackMsg) (retVal
|
||||
}
|
||||
|
||||
func StoreDetail2ShopInfo(storeDetail *dao.StoreDetail2) (shopInfo *dadaapi.ShopInfo) {
|
||||
// 获取品牌名称
|
||||
brandInfo, err := dao.GetBrands(dao.GetDB(), "", storeDetail.BrandID, "", false, "")
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
lng := jxutils.IntCoordinate2Standard(storeDetail.Lng)
|
||||
lat := jxutils.IntCoordinate2Standard(storeDetail.Lat)
|
||||
cityName := storeDetail.CityName
|
||||
@@ -209,7 +203,7 @@ func StoreDetail2ShopInfo(storeDetail *dao.StoreDetail2) (shopInfo *dadaapi.Shop
|
||||
}
|
||||
shopInfo = &dadaapi.ShopInfo{
|
||||
OriginShopID: storeDetail.VendorStoreID,
|
||||
StationName: brandInfo[0].Name + "-" + storeDetail.Name,
|
||||
StationName: storeDetail.Name,
|
||||
Business: dadaapi.BusinessTypeConvStore, // 故意设置成这个的
|
||||
CityName: cityName,
|
||||
AreaName: districtName,
|
||||
@@ -624,10 +618,3 @@ func (c *DeliveryHandler) GetDeliverLiquidatedDamages(orderId string, deliverId
|
||||
}
|
||||
return vendorPrice, nil
|
||||
}
|
||||
|
||||
func (c *DeliveryHandler) UpdateStoreName(storeId, name string) (err error) {
|
||||
return api.DadaAPI.ShopUpdate(&dadaapi.ShopInfo{
|
||||
StationName: name,
|
||||
OriginShopID: storeId,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -109,12 +109,6 @@ func (c *DeliveryHandler) IsErrStoreNotExist(err error) bool {
|
||||
}
|
||||
|
||||
func (c *DeliveryHandler) UpdateStore(ctx *jxcontext.Context, storeDetail *dao.StoreDetail2) (err error) {
|
||||
// 获取品牌名称
|
||||
brandInfo, err := dao.GetBrands(dao.GetDB(), "", storeDetail.BrandID, "", false, "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// 获取蜂鸟门店id
|
||||
fnStore, err := api.FnAPI.GetStore(storeDetail.VendorStoreID)
|
||||
if err != nil {
|
||||
@@ -139,7 +133,7 @@ func (c *DeliveryHandler) UpdateStore(ctx *jxcontext.Context, storeDetail *dao.S
|
||||
BusinessLicencePicHash: storeDetail.Licence,
|
||||
}
|
||||
if storeDetail.Name != fnStore.Name {
|
||||
updateStore.HeadShopName = brandInfo[0].Name + "-" + storeDetail.Name
|
||||
updateStore.HeadShopName = storeDetail.Name
|
||||
updateStore.BranchShopName = storeDetail.Name
|
||||
}
|
||||
if updateStore.OwnerName == "" {
|
||||
|
||||
@@ -473,38 +473,3 @@ func (c *DeliveryHandler) GetDeliverLiquidatedDamages(orderId string, deliverId
|
||||
}
|
||||
return vendorPrice, nil
|
||||
}
|
||||
|
||||
func (c *DeliveryHandler) UpdateStoreName(storeId, name string) (err error) {
|
||||
// 获取蜂鸟门店id
|
||||
fnStore, err := api.FnAPI.GetStore(storeId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
updateStore := &fnpsapi.UpdateStoreParam{
|
||||
ChainStoreID: fnStore.ChainStoreID,
|
||||
ContactPhone: fnStore.ContactPhone,
|
||||
Address: fnStore.Address,
|
||||
Longitude: fnStore.Longitude,
|
||||
Latitude: fnStore.Latitude,
|
||||
PositionSource: 3,
|
||||
OutShopCode: fnStore.OutShopCode,
|
||||
CategoryID: utils.Int2Str(fnStore.CategoryID),
|
||||
OwnerName: fnStore.OwnerName,
|
||||
OwnerIDNum: fnStore.OwnerIDNum,
|
||||
HandheldLicencePicHash: "暂不需要(手持身份证、营业执照图片)",
|
||||
OwnerIDPicFrontHash: "暂不需要(省份证正)",
|
||||
OwnerIDPicBackHash: "暂不需要(身份证反)",
|
||||
CreditCode: fnStore.CreditCode,
|
||||
}
|
||||
updateStore.HeadShopName = name
|
||||
updateStore.BranchShopName = name
|
||||
if updateStore.OwnerName == "" {
|
||||
updateStore.OwnerName = "石锋"
|
||||
}
|
||||
if updateStore.OwnerIDNum == "" {
|
||||
updateStore.OwnerIDNum = "610126198012230014"
|
||||
}
|
||||
|
||||
return api.FnAPI.UpdateStore(updateStore)
|
||||
}
|
||||
|
||||
@@ -169,7 +169,6 @@ func (c *DeliveryHandler) IsErrStoreExist(err error) bool {
|
||||
|
||||
func (c *DeliveryHandler) UpdateStore(ctx *jxcontext.Context, storeDetail *dao.StoreDetail2) (err error) {
|
||||
if globals.EnableStoreWrite {
|
||||
// err = api.MtpsAPI.PagePoiUpdate(storeDetail.VendorStoreID, storeDetail.PayeeName, storeDetail.Tel1, fakeContactEmail)
|
||||
shopInfo := &mtpsapi.ShopInfo{
|
||||
ShopID: utils.Int2Str(storeDetail.ID),
|
||||
ContactName: storeDetail.PayeeName,
|
||||
@@ -177,18 +176,9 @@ func (c *DeliveryHandler) UpdateStore(ctx *jxcontext.Context, storeDetail *dao.S
|
||||
ShopAddress: storeDetail.Address,
|
||||
ShopLat: storeDetail.Lat,
|
||||
ShopLng: storeDetail.Lng,
|
||||
ShopName: storeDetail.Name,
|
||||
}
|
||||
_, err = api.MtpsAPI.ShopUpdate(shopInfo)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// 美团配送,修改门店名称
|
||||
func (c *DeliveryHandler) UpdateStoreName(storeId, name string) (err error) {
|
||||
shopInfo := &mtpsapi.ShopInfo{
|
||||
ShopID: storeId,
|
||||
ShopName: name,
|
||||
}
|
||||
_, err = api.MtpsAPI.ShopUpdate(shopInfo)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -54,7 +54,6 @@ type IDeliveryPlatformHandler interface {
|
||||
|
||||
type IDeliveryUpdateStoreHandler interface {
|
||||
UpdateStore(ctx *jxcontext.Context, storeDetail *dao.StoreDetail2) (err error)
|
||||
UpdateStoreName(storeId, name string) (err error)
|
||||
}
|
||||
|
||||
type DeliveryPlatformHandlerInfo struct {
|
||||
|
||||
@@ -71,8 +71,8 @@ func pay4OrderByKs(ctx *jxcontext.Context, order *model.GoodsOrder, vendorPayTyp
|
||||
VendorID: order.VendorID,
|
||||
Status: 0,
|
||||
PayCreatedAt: time.Now(),
|
||||
PrepayID: prePayInfo.OrderInfoToken,
|
||||
CodeURL: prePayInfo.OrderNo, // 抖音支付token
|
||||
PrepayID: prePayInfo.OrderNo,
|
||||
CodeURL: prePayInfo.OrderInfoToken, // 抖音支付token
|
||||
TotalFee: int(order.ActualPayPrice),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user