解决冲突

dev-discount
袁野 3 years ago
commit 89428ed33b
  1. 8
      hai-cweb/src/main/java/com/cweb/controller/pay/CzOrderController.java
  2. 4
      hai-cweb/src/main/java/com/cweb/controller/pay/UnionPayController.java
  3. 2
      hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java
  4. 7
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java
  5. 5
      hai-service/src/main/java/com/hai/service/pay/impl/RechargeOrderServiceImpl.java

@ -111,7 +111,6 @@ public class CzOrderController {
OutRechargeOrder order = outRechargeOrderService.findByOrderId(orderId);
HighRefundAudit highRefundAudit = highRefundAuditService.findByOrderNo(order.getOrderNo());
// 订单状态 : 1.待支付 2.已支付 3.已完成 4.已取消 5.已退款 6:退款中
if (order.getStatus() != 2) {
@ -144,8 +143,6 @@ public class CzOrderController {
order.setRefundId(orderRefundModel.getRefund_id());
order.setRefundFee(new BigDecimal(orderRefundModel.getRefund_fee()).divide(new BigDecimal("100")));
outRechargeOrderService.updateOrder(order);
highRefundAudit.setStatus(1);
highRefundAuditService.updateRefundAudit(highRefundAudit);
} else {
log.error("orderToPay error!", "退款失败");
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.setRefundFee(order.getPayRealPrice());
order.setRefundId(dataObject.getString("orderId"));
highRefundAudit.setStatus(1);
highRefundAuditService.updateRefundAudit(highRefundAudit);
outRechargeOrderService.updateOrder(order);
} else {
@ -192,8 +186,6 @@ public class CzOrderController {
order.setRefundTime(new Date());
order.setOutRefundNo(refund.getString("oriwtorderid"));
order.setRefundFee(order.getPayRealPrice());
highRefundAudit.setStatus(1);
highRefundAuditService.updateRefundAudit(highRefundAudit);
outRechargeOrderService.updateOrder(order);
}
return true;

@ -389,10 +389,14 @@ public class UnionPayController {
if (order.getRechargeType() == 1) {
outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo());
}
order.setStatus(2);
order.setPayType(4);
order.setPayTime(new Date()); // 支付时间
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 orderId
*/
void goldPayOrder(Long userId, Long orderId);
void goldPayOrder(Long userId, Long orderId) throws Exception;
/**
* @Author Sum1Dream

@ -332,7 +332,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
@Override
@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);
if(order == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_ORDER, "");
@ -343,11 +343,14 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
// 金币 1:100
Integer goldNum = new BigDecimal(order.getPayPrice().toString()).multiply(new BigDecimal("100")).intValue();
highUserService.goldHandle(userId, goldNum, 2, 2, order.getId());
order.setPayRealPrice(order.getPayPrice()); // 实付金额
order.setStatus(2);
if (order.getRechargeType() == 1) {
outRechargeOrderService.getMobile(order.getRechargeContent() , order.getPayPrice().intValue() , order.getOrderNo());
}
order.setPayType(3);
order.setPayTime(new Date()); // 支付时间
outRechargeOrderService.updateOrder(order);
}
@Override

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

Loading…
Cancel
Save