| | |
| | | }) |
| | | public R<BigDecimal> estimate(@RequestParam String orderId, String city) { |
| | | Order order = orderClient.detail(orderId).getData(); |
| | | RecoveryServe recoveryServe = recoveryServeService.lambdaQuery() |
| | | .eq(RecoveryServe::getId, order.getServeId()) |
| | | .eq(RecoveryServe::getIsDelete, 0).one(); |
| | | BigDecimal money = recoveryServe.getDefaultPrice(); |
| | | if (StringUtils.isNotBlank(city)) { |
| | | CityInfoVO info = GaoDeMapUtil.getAddressInfo(city).getDatas(); |
| | | RecoveryServePrice price = recoveryServePriceService.lambdaQuery() |
| | | .eq(RecoveryServePrice::getRecoveryServeId, recoveryServe.getId()) |
| | | .eq(RecoveryServePrice::getCityCode, info.getCode()) |
| | | .eq(RecoveryServePrice::getIsDelete, Constants.ZERO).one(); |
| | | if (null != price) { |
| | | money = price.getRecoveryPrice(); |
| | | } |
| | | } |
| | | return R.ok(money); |
| | | // RecoveryServe recoveryServe = recoveryServeService.lambdaQuery() |
| | | // .eq(RecoveryServe::getId, order.getServeId()) |
| | | // .eq(RecoveryServe::getIsDelete, 0).one(); |
| | | // BigDecimal money = recoveryServe.getDefaultPrice(); |
| | | // if (StringUtils.isNotBlank(city)) { |
| | | // CityInfoVO info = GaoDeMapUtil.getAddressInfo(city).getDatas(); |
| | | // RecoveryServePrice price = recoveryServePriceService.lambdaQuery() |
| | | // .eq(RecoveryServePrice::getRecoveryServeId, recoveryServe.getId()) |
| | | // .eq(RecoveryServePrice::getCity, info.getCode()) |
| | | // .eq(RecoveryServePrice::getIsDelete, Constants.ZERO).one(); |
| | | // if (null != price) { |
| | | // money = price.getRecoveryPrice(); |
| | | // } |
| | | // } |
| | | return R.ok(order.getServePrice()); |
| | | } |
| | | |
| | | @GetMapping("/detail") |