修复预交金bug,充值失败会补偿处理
This commit is contained in:
6
.idea/CoolRequestCommonStatePersistent.xml
generated
6
.idea/CoolRequestCommonStatePersistent.xml
generated
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="CoolRequestCommonStatePersistent">
|
|
||||||
<option name="searchCache" value="bu" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@@ -185,6 +185,10 @@ public class WxPayService {
|
|||||||
UserVo userVo = userService.queryUserInfoDetails(uo.getUser_id());
|
UserVo userVo = userService.queryUserInfoDetails(uo.getUser_id());
|
||||||
String openid = userVo.getOpenid();
|
String openid = userVo.getOpenid();
|
||||||
txSendMsg.SendNotifyYJJ(uo,openid);
|
txSendMsg.SendNotifyYJJ(uo,openid);
|
||||||
|
}else {
|
||||||
|
//写入his失败,执行退款处理
|
||||||
|
refundOrder(uo.getCode(),AmountUtil.doubleToStr(uo.getMoney()));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else if (wxResult.getOut_trade_no().startsWith("BA")){
|
}else if (wxResult.getOut_trade_no().startsWith("BA")){
|
||||||
|
|||||||
@@ -68,4 +68,8 @@ public final class AmountUtil {
|
|||||||
BigDecimal amountB = parseAmount(b, BigDecimal.ZERO);
|
BigDecimal amountB = parseAmount(b, BigDecimal.ZERO);
|
||||||
return amountA.compareTo(amountB);
|
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("</PatientId>");
|
||||||
|
|
||||||
str.append("<PayType>");
|
str.append("<PayType>");
|
||||||
str.append("wx");
|
str.append("微信");
|
||||||
str.append("</PayType>");
|
str.append("</PayType>");
|
||||||
|
|
||||||
str.append("<PayAmount>");
|
str.append("<PayAmount>");
|
||||||
|
|||||||
Reference in New Issue
Block a user