修改bug

This commit is contained in:
yangjun 2024-07-16 17:46:54 +08:00
parent 851442e803
commit afa9424f2e
2 changed files with 19 additions and 16 deletions

View File

@ -2673,27 +2673,27 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
UserMoneyDetails userMoneyDetails = new UserMoneyDetails(); UserMoneyDetails userMoneyDetails = new UserMoneyDetails();
if (orders.getPayWay() == 1 || orders.getPayWay() == 2 || orders.getPayWay() == 3 || orders.getPayWay() == 4) { if (orders.getPayWay() == 1 || orders.getPayWay() == 2 || orders.getPayWay() == 3 || orders.getPayWay() == 4) {
if(userMoney.compareTo(BigDecimal.ZERO) > 0){ if(userMoney.compareTo(BigDecimal.ZERO) > 0){
boolean refund = wxService.refund(orders.getOrdersNo(), orders.getPayMoney(), userMoney, orders.getPayWay()); // boolean refund = wxService.refund(orders.getOrdersNo(), orders.getPayMoney(), userMoney, orders.getPayWay());
if (!refund) { // if (!refund) {
return Result.error("退款失败,请联系客服!"); // return Result.error("退款失败,请联系客服!");
} // }
} }
userMoneyDetails.setManipulateType(1); userMoneyDetails.setManipulateType(1);
userMoneyDetails.setBlFlag(2); userMoneyDetails.setBlFlag(2);
} else if (orders.getPayWay() == 6) { } else if (orders.getPayWay() == 6) {
if(userMoney.compareTo(BigDecimal.ZERO) > 0) { if(userMoney.compareTo(BigDecimal.ZERO) > 0) {
String data = aliPayController.alipayRefund(orders.getOrdersNo(), userMoney); // String data = aliPayController.alipayRefund(orders.getOrdersNo(), userMoney);
if (StringUtils.isNotBlank(data)) { // if (StringUtils.isNotBlank(data)) {
log.error(data); // log.error(data);
JSONObject jsonObject = JSON.parseObject(data); // JSONObject jsonObject = JSON.parseObject(data);
JSONObject alipay_trade_refund_response = jsonObject.getJSONObject("alipay_trade_refund_response"); // JSONObject alipay_trade_refund_response = jsonObject.getJSONObject("alipay_trade_refund_response");
String code1 = alipay_trade_refund_response.getString("code"); // String code1 = alipay_trade_refund_response.getString("code");
if (!"10000".equals(code1)) { // if (!"10000".equals(code1)) {
return Result.error("退款失败!" + alipay_trade_refund_response.getString("sub_msg")); // return Result.error("退款失败!" + alipay_trade_refund_response.getString("sub_msg"));
} // }
} else { // } else {
return Result.error("退款失败!"); // return Result.error("退款失败!");
} // }
} }
userMoneyDetails.setManipulateType(1); userMoneyDetails.setManipulateType(1);
userMoneyDetails.setBlFlag(2); userMoneyDetails.setBlFlag(2);

View File

@ -225,6 +225,9 @@ public class TravelConfServiceImpl extends ServiceImpl<TravelConfDao, TravelConf
public TravelPriceVo calcTravelPrice(Long artificerId, String toLongitude, String toLatitude, String serveTime, Integer tripWay){ public TravelPriceVo calcTravelPrice(Long artificerId, String toLongitude, String toLatitude, String serveTime, Integer tripWay){
Artificer artificerInfo = artificerService.getById(artificerId); Artificer artificerInfo = artificerService.getById(artificerId);
Integer mfgls = artificerInfo.getTripWayNum();//免费公里数 Integer mfgls = artificerInfo.getTripWayNum();//免费公里数
if(mfgls == null){
mfgls = 0;
}
BigDecimal freeKilometers = new BigDecimal(mfgls); BigDecimal freeKilometers = new BigDecimal(mfgls);
String longitude = artificerInfo.getLongitude(); String longitude = artificerInfo.getLongitude();
String latitude = artificerInfo.getLatitude(); String latitude = artificerInfo.getLatitude();