fix delivery fee
This commit is contained in:
1 parent
88563423fa
commit
be9601ff91
7 files changed
+33
-51
No files matched your search
+3
@@ -16,6 +16,9 @@ public class DeliveryFeeRespVO {
|
||||
@Schema(description = "收货地址到门店的距离(千米)")
|
||||
private Double distanceKm;
|
||||
|
||||
@Schema(description = "门店配送范围(千米)")
|
||||
private Integer maxDistanceKm;
|
||||
|
||||
@Schema(description = "配送费(元),超出配送范围时为 0")
|
||||
private BigDecimal deliveryPrice;
|
||||
|
||||
|
||||
+1
@@ -46,6 +46,7 @@ public class AppStoreShopServiceImpl extends ServiceImpl<StoreShopMapper, StoreS
|
||||
if (shop == null) {
|
||||
return vo;
|
||||
}
|
||||
vo.setMaxDistanceKm(shop.getDistance());
|
||||
double distanceKm = DeliveryCalculator.calcDistanceKm(
|
||||
shop.getLng(), shop.getLat(), String.valueOf(lng), String.valueOf(lat));
|
||||
BigDecimal price = DeliveryCalculator.calcDeliveryPrice(shop, distanceKm);
|
||||
|
||||
Reference in new issue
Block a user