Merge branch '2.0-master' into 2.0-dev

# Conflicts:
#	hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
#	hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java
new-dev
袁野 1 year ago
commit 5f83a7d2e5
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  2. 3
      hai-service/src/main/java/com/hai/order/utils/OrderUtil.java
  3. 19
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java

File diff suppressed because one or more lines are too long

@ -51,7 +51,7 @@ public class OrderUtil {
* @return * @return
* @throws Exception * @throws Exception
*/ */
public static String generateOrderNo() { public static String generateOrderNo(){
try { try {
// 5位随机数 + 1位线程生成数 // 5位随机数 + 1位线程生成数
String randomNum = (new Random().nextInt(8999) + 1000) + IDGenerator.nextId(1); String randomNum = (new Random().nextInt(8999) + 1000) + IDGenerator.nextId(1);
@ -60,7 +60,6 @@ public class OrderUtil {
} catch (Exception e) { } catch (Exception e) {
return null; return null;
} }
} }
/** /**

@ -1001,11 +1001,13 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
return childOrder; return childOrder;
} }
@Override @Override
public boolean rechargeOrderAbnormal(OutRechargeOrder order) { public boolean rechargeOrderAbnormal(OutRechargeOrder order) {
HighOrder highOrder = highOrderService.getOrderByOrderNo(order.getOrderNo()); HighOrder highOrder = highOrderService.getOrderByOrderNo(order.getOrderNo());
if (secConfigService.isConfig("RECHARGE_ORDER" , order.getRechargeContent())) { if (secConfigService.isConfig("RECHARGE_ORDER" , order.getRechargeContent())) {
highOrder.setExceptionStatus(true); highOrder.setExceptionStatus(true);
highOrder.setExceptionContent("当前订单存在以前多充值!"); highOrder.setExceptionContent("当前订单存在以前多充值!");
@ -1014,13 +1016,16 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
outRechargeOrderMapper.updateByPrimaryKey(order); outRechargeOrderMapper.updateByPrimaryKey(order);
return true; return true;
} }
if (secConfigService.isConfig("RECHARGE_ORDER" , order.getLaborUnionCard())) { if (highOrder.getPayType() == 4) {
highOrder.setExceptionStatus(true);
highOrder.setExceptionContent("当前订单存在以前多充值!"); if (secConfigService.isConfig("RECHARGE_ORDER" , order.getLaborUnionCard())) {
order.setRechargeStatus(204); highOrder.setExceptionStatus(true);
orderService.updateOrderData(highOrder); highOrder.setExceptionContent("当前订单存在以前多充值!");
outRechargeOrderMapper.updateByPrimaryKey(order); order.setRechargeStatus(204);
return true; orderService.updateOrderData(highOrder);
outRechargeOrderMapper.updateByPrimaryKey(order);
return true;
}
} }
return false; return false;

Loading…
Cancel
Save