1
This commit is contained in:
@@ -583,3 +583,27 @@ func GetCityBankBranches(ctx *jxcontext.Context, cityCode int, bankCode string)
|
|||||||
}
|
}
|
||||||
return info, err
|
return info, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetSToUWalkingDistance 获取商家与用户间步行距离
|
||||||
|
//func GetSToUWalkingDistance(sLng, sLat, uLng, uLat float64) (distance float64, err error) {
|
||||||
|
// var (
|
||||||
|
// coords []*baidunavi.Coordinate
|
||||||
|
// sCoord *baidunavi.Coordinate
|
||||||
|
// uCoord *baidunavi.Coordinate
|
||||||
|
// )
|
||||||
|
// coords = append(coords, &baidunavi.Coordinate{
|
||||||
|
// Lng: sLng,
|
||||||
|
// Lat: sLat,
|
||||||
|
// }, &baidunavi.Coordinate{
|
||||||
|
// Lat: uLng,
|
||||||
|
// Lng: uLat,
|
||||||
|
// })
|
||||||
|
// if coords, err = api.BaiDuNaviAPI.BatchCoordinateConvert(coords, baidunavi.CoordSysGCJ02, baidunavi.CoordSysBaiDu); err == nil {
|
||||||
|
// if len(coords) > 0 {
|
||||||
|
// //distance=baidunavi.
|
||||||
|
// //todo 修改为百度地图
|
||||||
|
// return jxutils.WalkingDistance(sLng, sLat, uLng, uLat), nil
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return 0, err
|
||||||
|
//}
|
||||||
|
|||||||
@@ -87,9 +87,9 @@ func GetOrderRiderInfoToPlatform(orderId string, wayBillStatus int) {
|
|||||||
//3.当同一个订单已经上传了一次配送信息,如再次同步会更新配送信息,以最新的一次为准。
|
//3.当同一个订单已经上传了一次配送信息,如再次同步会更新配送信息,以最新的一次为准。
|
||||||
//4.如订单已完成、已取消等状态发货将失败。
|
//4.如订单已完成、已取消等状态发货将失败。
|
||||||
for _, v := range orders {
|
for _, v := range orders {
|
||||||
if v.Status >= model.OrderStatusFinished || v.Status < model.OrderStatusDelivering {
|
//if v.Status >= model.OrderStatusFinished || v.Status < model.OrderStatusDelivering {
|
||||||
continue
|
// continue
|
||||||
}
|
//}
|
||||||
if orderId == "" && v.VendorID == model.VendorIDDD { // 抖音门店订单除了三方配送回调时推送,不在主动推送配送消息
|
if orderId == "" && v.VendorID == model.VendorIDDD { // 抖音门店订单除了三方配送回调时推送,不在主动推送配送消息
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -359,3 +359,19 @@ func (c *CmsController) GetVendorOrgCodeInfo() {
|
|||||||
return retVal, "", err
|
return retVal, "", err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Title 得到商家与用户之间步行距离
|
||||||
|
// @Description 得到商家与用户之间步行距离
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Param sLng query int true "商家经度"
|
||||||
|
// @Param sLat query int true "商家纬度"
|
||||||
|
// @Param uLng query int true "用户经度"
|
||||||
|
// @Param uLat query int true "用户纬度"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /GetSToUWalkingDistance [get]
|
||||||
|
func (c *CmsController) GetSToUWalkingDistance() {
|
||||||
|
c.callGetSToUWalkingDistance(func(params *tCmsGetSToUWalkingDistanceParams) (interface{}, string, error) {
|
||||||
|
return nil, "", nil
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -448,6 +448,15 @@ func init() {
|
|||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
|
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:CmsController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:CmsController"],
|
||||||
|
web.ControllerComments{
|
||||||
|
Method: "GetSToUWalkingDistance",
|
||||||
|
Router: `/GetSToUWalkingDistance`,
|
||||||
|
AllowHTTPMethods: []string{"get"},
|
||||||
|
MethodParams: param.Make(),
|
||||||
|
Filters: nil,
|
||||||
|
Params: nil})
|
||||||
|
|
||||||
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:CmsController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:CmsController"],
|
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:CmsController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:CmsController"],
|
||||||
web.ControllerComments{
|
web.ControllerComments{
|
||||||
Method: "NewConfig",
|
Method: "NewConfig",
|
||||||
|
|||||||
Reference in New Issue
Block a user