提交代码

dev-discount
胡锐 3 years ago
parent 858f47c7bf
commit 7c3207e6b2
  1. 2
      hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java
  2. 2
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  3. 8
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java

@ -112,7 +112,7 @@ public interface OutRechargeOrderService {
* 汇联通支付 * 汇联通支付
* @param orderId * @param orderId
*/ */
void hltUnionCardPay(Long userCardId, Long orderId); void hltUnionCardPay(Long userCardId, Long orderId) throws Exception;
/** /**
* 积分支付 * 积分支付

@ -450,7 +450,7 @@ public class HighOrderServiceImpl implements HighOrderService {
} }
JSONObject consumptionResult = HuiLianTongUnionCardConfig.resolveResponse(consumption.getString("data")); JSONObject consumptionResult = HuiLianTongUnionCardConfig.resolveResponse(consumption.getString("data"));
if (consumptionResult.getBoolean("success") != true) { if (consumptionResult.getBoolean("success") != true) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "交易失败!"+consumptionResult.getString("message")); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, consumptionResult.getString("message"));
} }
// 查询用户 // 查询用户

@ -262,8 +262,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
} }
@Override @Override
public void hltUnionCardPay(Long userCardId, Long orderId) { public void hltUnionCardPay(Long userCardId, Long orderId) throws Exception {
try {
HighUserCard userCard = highUserCardService.getDetailById(userCardId); HighUserCard userCard = highUserCardService.getDetailById(userCardId);
if(userCard == null) { if(userCard == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到用户绑定的卡号信息"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到用户绑定的卡号信息");
@ -307,7 +306,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
} }
JSONObject consumptionResult = HuiLianTongUnionCardConfig.resolveResponse(consumption.getString("data")); JSONObject consumptionResult = HuiLianTongUnionCardConfig.resolveResponse(consumption.getString("data"));
if (consumptionResult.getBoolean("success") != true) { if (consumptionResult.getBoolean("success") != true) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "交易失败!"+consumptionResult.getString("message")); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, consumptionResult.getString("message"));
} }
order.setPaySerialNo(consumptionResult.getString("orderId")); // 支付流水号 order.setPaySerialNo(consumptionResult.getString("orderId")); // 支付流水号
order.setPayRealPrice(order.getPayPrice()); // 实付金额 order.setPayRealPrice(order.getPayPrice()); // 实付金额
@ -315,9 +314,6 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
order.setPayType(2); order.setPayType(2);
order.setPayTime(new Date()); // 支付时间 order.setPayTime(new Date()); // 支付时间
updateOrder(order); updateOrder(order);
} catch (Exception e) {
e.printStackTrace();
}
} }
@Override @Override

Loading…
Cancel
Save