修复预交金bug,充值失败会补偿处理
This commit is contained in:
@@ -185,6 +185,10 @@ public class WxPayService {
|
||||
UserVo userVo = userService.queryUserInfoDetails(uo.getUser_id());
|
||||
String openid = userVo.getOpenid();
|
||||
txSendMsg.SendNotifyYJJ(uo,openid);
|
||||
}else {
|
||||
//写入his失败,执行退款处理
|
||||
refundOrder(uo.getCode(),AmountUtil.doubleToStr(uo.getMoney()));
|
||||
|
||||
}
|
||||
}
|
||||
}else if (wxResult.getOut_trade_no().startsWith("BA")){
|
||||
|
||||
@@ -68,4 +68,8 @@ public final class AmountUtil {
|
||||
BigDecimal amountB = parseAmount(b, BigDecimal.ZERO);
|
||||
return amountA.compareTo(amountB);
|
||||
}
|
||||
// Double金额转为String金额
|
||||
public static String doubleToStr(Double amount) {
|
||||
return String.format("%.2f", amount);
|
||||
}
|
||||
}
|
||||
@@ -509,7 +509,7 @@ public class UserOrderService {
|
||||
str.append("</PatientId>");
|
||||
|
||||
str.append("<PayType>");
|
||||
str.append("wx");
|
||||
str.append("微信");
|
||||
str.append("</PayType>");
|
||||
|
||||
str.append("<PayAmount>");
|
||||
|
||||
Reference in New Issue
Block a user