dev-discount
袁野 3 years ago
parent 2b5d7c4cf1
commit 85033e4831
  1. 4
      hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java
  2. 8
      hai-cweb/src/main/java/com/cweb/controller/pay/CzOrderController.java
  3. 6
      hai-cweb/src/main/java/com/cweb/controller/pay/UnionPayController.java
  4. 2
      hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java
  5. 6
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java
  6. 5
      hai-service/src/main/java/com/hai/service/pay/impl/RechargeOrderServiceImpl.java

@ -474,10 +474,6 @@ public class OutRechargeOrderController {
outRechargeOrderService.goldPayOrder(userInfoModel.getHighUser().getId(), order.getId()); outRechargeOrderService.goldPayOrder(userInfoModel.getHighUser().getId(), order.getId());
if (order.getRechargeType() == 1) {
outRechargeOrderService.getMobile(order.getRechargeContent() , order.getPayPrice().intValue() , order.getOrderNo());
}
return ResponseMsgUtil.success("支付成功"); return ResponseMsgUtil.success("支付成功");
} catch (Exception e) { } catch (Exception e) {
log.error("orderToPay error!", e); log.error("orderToPay error!", e);

@ -111,7 +111,6 @@ public class CzOrderController {
OutRechargeOrder order = outRechargeOrderService.findByOrderId(orderId); OutRechargeOrder order = outRechargeOrderService.findByOrderId(orderId);
HighRefundAudit highRefundAudit = highRefundAuditService.findByOrderNo(order.getOrderNo());
// 订单状态 : 1.待支付 2.已支付 3.已完成 4.已取消 5.已退款 6:退款中 // 订单状态 : 1.待支付 2.已支付 3.已完成 4.已取消 5.已退款 6:退款中
if (order.getStatus() != 2) { if (order.getStatus() != 2) {
@ -144,8 +143,6 @@ public class CzOrderController {
order.setRefundId(orderRefundModel.getRefund_id()); order.setRefundId(orderRefundModel.getRefund_id());
order.setRefundFee(new BigDecimal(orderRefundModel.getRefund_fee()).divide(new BigDecimal("100"))); order.setRefundFee(new BigDecimal(orderRefundModel.getRefund_fee()).divide(new BigDecimal("100")));
outRechargeOrderService.updateOrder(order); outRechargeOrderService.updateOrder(order);
highRefundAudit.setStatus(1);
highRefundAuditService.updateRefundAudit(highRefundAudit);
} else { } else {
log.error("orderToPay error!", "退款失败"); log.error("orderToPay error!", "退款失败");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败!错误代码:"+orderRefundModel.getErr_code()+",错误描述"+orderRefundModel.getErr_code_des()); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败!错误代码:"+orderRefundModel.getErr_code()+",错误描述"+orderRefundModel.getErr_code_des());
@ -169,9 +166,6 @@ public class CzOrderController {
order.setOutRefundNo("HFR"+new Date().getTime() ); order.setOutRefundNo("HFR"+new Date().getTime() );
order.setRefundFee(order.getPayRealPrice()); order.setRefundFee(order.getPayRealPrice());
order.setRefundId(dataObject.getString("orderId")); order.setRefundId(dataObject.getString("orderId"));
highRefundAudit.setStatus(1);
highRefundAuditService.updateRefundAudit(highRefundAudit);
outRechargeOrderService.updateOrder(order); outRechargeOrderService.updateOrder(order);
} else { } else {
@ -192,8 +186,6 @@ public class CzOrderController {
order.setRefundTime(new Date()); order.setRefundTime(new Date());
order.setOutRefundNo(refund.getString("oriwtorderid")); order.setOutRefundNo(refund.getString("oriwtorderid"));
order.setRefundFee(order.getPayRealPrice()); order.setRefundFee(order.getPayRealPrice());
highRefundAudit.setStatus(1);
highRefundAuditService.updateRefundAudit(highRefundAudit);
outRechargeOrderService.updateOrder(order); outRechargeOrderService.updateOrder(order);
} }
return true; return true;

@ -386,13 +386,13 @@ public class UnionPayController {
order.setPaySerialNo(body.getString("wtorderid")); // 支付流水号 order.setPaySerialNo(body.getString("wtorderid")); // 支付流水号
order.setPayRealPrice(order.getPayPrice()); // 实付金额 order.setPayRealPrice(order.getPayPrice()); // 实付金额
if (order.getRechargeType() == 1) {
outRechargeOrderService.getMobile(order.getRechargeContent() , order.getPayPrice().intValue() , order.getOrderNo());
}
order.setStatus(2); order.setStatus(2);
order.setPayType(4); order.setPayType(4);
order.setPayTime(new Date()); // 支付时间 order.setPayTime(new Date()); // 支付时间
outRechargeOrderService.updateOrder(order); outRechargeOrderService.updateOrder(order);
if (order.getRechargeType() == 1) {
outRechargeOrderService.getMobile(order.getRechargeContent() , order.getPayPrice().intValue() , order.getOrderNo());
}
} }
} }

@ -121,7 +121,7 @@ public interface OutRechargeOrderService {
* @param userId * @param userId
* @param orderId * @param orderId
*/ */
void goldPayOrder(Long userId, Long orderId); void goldPayOrder(Long userId, Long orderId) throws Exception;
/** /**
* @Author Sum1Dream * @Author Sum1Dream

@ -332,7 +332,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
@Override @Override
@Transactional(propagation= Propagation.REQUIRES_NEW) @Transactional(propagation= Propagation.REQUIRES_NEW)
public void goldPayOrder(Long userId, Long orderId) { public void goldPayOrder(Long userId, Long orderId) throws Exception {
OutRechargeOrder order = findByOrderId(orderId); OutRechargeOrder order = findByOrderId(orderId);
if(order == null) { if(order == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_ORDER, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_ORDER, "");
@ -343,9 +343,11 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
// 金币 1:100 // 金币 1:100
Integer goldNum = new BigDecimal(order.getPayPrice().toString()).multiply(new BigDecimal("100")).intValue(); Integer goldNum = new BigDecimal(order.getPayPrice().toString()).multiply(new BigDecimal("100")).intValue();
highUserService.goldHandle(userId, goldNum, 2, 2, order.getId()); highUserService.goldHandle(userId, goldNum, 2, 2, order.getId());
order.setPayRealPrice(order.getPayPrice()); // 实付金额 order.setPayRealPrice(order.getPayPrice()); // 实付金额
order.setStatus(2); order.setStatus(2);
if (order.getRechargeType() == 1) {
outRechargeOrderService.getMobile(order.getRechargeContent() , order.getPayPrice().intValue() , order.getOrderNo());
}
order.setPayType(3); order.setPayType(3);
order.setPayTime(new Date()); // 支付时间 order.setPayTime(new Date()); // 支付时间
} }

@ -74,12 +74,11 @@ public class RechargeOrderServiceImpl implements PayService {
order.setPaySerialNo(map.get("transaction_id")); // 支付流水号 order.setPaySerialNo(map.get("transaction_id")); // 支付流水号
order.setPayRealPrice(new BigDecimal(map.get("total_fee")).divide(new BigDecimal("100"))); // 实付金额 order.setPayRealPrice(new BigDecimal(map.get("total_fee")).divide(new BigDecimal("100"))); // 实付金额
order.setPayTime(new Date()); // 支付时间 order.setPayTime(new Date()); // 支付时间
order.setStatus(2); // 订单状态 : 1.待支付 2.已支付 3.已完成 4.已取消 5.已退款
outRechargeOrderService.updateOrder(order);
if (order.getRechargeType() == 1) { if (order.getRechargeType() == 1) {
outRechargeOrderService.getMobile(order.getRechargeContent() , order.getPayPrice().intValue() , order.getOrderNo()); outRechargeOrderService.getMobile(order.getRechargeContent() , order.getPayPrice().intValue() , order.getOrderNo());
} }
order.setStatus(2); // 订单状态 : 1.待支付 2.已支付 3.已完成 4.已取消 5.已退款
outRechargeOrderService.updateOrder(order);
// 推送订单记录 // 推送订单记录
HighGasOrderPush highGasOrderPush = new HighGasOrderPush(); HighGasOrderPush highGasOrderPush = new HighGasOrderPush();
highGasOrderPush.setType(OrderPushType.type2.getType()); highGasOrderPush.setType(OrderPushType.type2.getType());

Loading…
Cancel
Save