diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index fdf5c12cc..1f470d6a1 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -279,17 +279,17 @@ func (c *OrderManager) OnOrderStatusChanged(vendorOrgCode string, orderStatus *m dao.UpdateEntity(db, order2, "OrderFinishedAt") } if orderStatus.Status == model.OrderStatusCanceled && orderStatus.VendorID == model.VendorIDMTWM { - num, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", utils.Int64ToFloat64(order.TotalShopMoney)/float64(100)), 64) - applyErr := mtwm.GetAPI(order.VendorOrgCode, order.StoreID, order.VendorStoreID).ApplyCompensation(&mtwmapi.ApplyCompensationRes{ - OrderId: utils.Str2Int64(order.VendorOrderID), + num, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", utils.Int64ToFloat64(order2.TotalShopMoney)/float64(100)), 64) + applyErr := mtwm.GetAPI(order2.VendorOrgCode, order2.StoreID, order2.VendorStoreID).ApplyCompensation(&mtwmapi.ApplyCompensationRes{ + OrderId: utils.Str2Int64(order2.VendorOrderID), Reason: "商户申请", ApplyStatus: mtwmapi.ApplyCompensationStatusOne, Amount: num, }) if applyErr != nil { - partner.CurOrderManager.OnOrderMsg(order, utils.Int2Str(order.Status), fmt.Sprintf("取消订单申请赔付失败:%s", applyErr.Error())) + partner.CurOrderManager.OnOrderMsg(order2, utils.Int2Str(order2.Status), fmt.Sprintf("取消订单申请赔付失败:%s", applyErr.Error())) } else { - partner.CurOrderManager.OnOrderMsg(order, utils.Int2Str(order.Status), fmt.Sprintf("取消订单申请赔付:%s", "成功")) + partner.CurOrderManager.OnOrderMsg(order2, utils.Int2Str(order2.Status), fmt.Sprintf("取消订单申请赔付:%s", "成功")) } } diff --git a/business/jxstore/cms/user2.go b/business/jxstore/cms/user2.go index aabc2de84..5c53a48e1 100644 --- a/business/jxstore/cms/user2.go +++ b/business/jxstore/cms/user2.go @@ -668,6 +668,7 @@ func getAddressInfoFromCoord(db *dao.DaoDB, lng, lat float64) (formattedAddress cityCode = districtInfo.ParentCode } } + // 地址 // 行政区划code return formattedAddress, districtCode, cityCode, err } diff --git a/business/jxutils/ditu/ditu.go b/business/jxutils/ditu/ditu.go index 4e16783ce..0ee3a8907 100644 --- a/business/jxutils/ditu/ditu.go +++ b/business/jxutils/ditu/ditu.go @@ -58,24 +58,29 @@ func GetGridsFromCoordinate(lng, lat float64, radius int, roundLng, roundLat int } func GetDistrictCoordinateList(districtCode int, radius, gridWith int) (coordList []*Coordinate) { - districts, err := api.AutonaviAPI.GetDistricts(1, utils.Int2Str(districtCode)) - if err == nil { - if len(districts) > 0 { - roundLng, roundLat := GetRound4Radius(districts[0].Lng, districts[0].Lat, gridWith) - tmpCoordList := getDistrictCoordinateList(districts, radius, gridWith, roundLng, roundLat) - if len(tmpCoordList) > 0 { - coordList = append(coordList, &Coordinate{ - Lng: districts[0].Lng, - Lat: districts[0].Lat, - }) - coordList = append(coordList, tmpCoordList...) - } - } - } + //districts, err := api.AutonaviAPI.GetDistricts(1, utils.Int2Str(districtCode)) + //if err == nil { + // if len(districts) > 0 { + // roundLng, roundLat := GetRound4Radius(districts[0].Lng, districts[0].Lat, gridWith) + // tmpCoordList := getDistrictCoordinateList(districts, radius, gridWith, roundLng, roundLat) + // if len(tmpCoordList) > 0 { + // coordList = append(coordList, &Coordinate{ + // Lng: districts[0].Lng, + // Lat: districts[0].Lat, + // }) + // coordList = append(coordList, tmpCoordList...) + // } + // } + //} return coordList } func GetCityCoordinateList(cityCode int, radius, gridWith int) (coordList []*Coordinate) { + //place, err := dao.GetPlaces(dao.GetDB(), []int{cityCode}) + //if err != nil { + // return nil + //} + //level+1 districts, err := api.AutonaviAPI.GetDistricts(2, utils.Int2Str(cityCode)) if err == nil { if len(districts) > 0 { diff --git a/business/partner/purchase/mtwm/order_afs.go b/business/partner/purchase/mtwm/order_afs.go index 2c0e4a01a..f73c39367 100644 --- a/business/partner/purchase/mtwm/order_afs.go +++ b/business/partner/purchase/mtwm/order_afs.go @@ -47,9 +47,6 @@ func (c *PurchaseHandler) isAfsMsg(msg *mtwmapi.CallbackMsg) bool { // refundData := msg.Data.(*mtwmapi.CallbackRefundInfo) orderID := utils.Str2Int64(GetOrderIDFromMsg(msg)) order, _ := partner.CurOrderManager.LoadOrder(utils.Int64ToStr(orderID), model.VendorIDMTWM) - if orderID == 3801105140856800486 { - return true - } if order != nil { return true //TODO 有的美团订单售前退款,也当做售后处理试试 //}