|
|
@ -343,8 +343,8 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
} |
|
|
|
} |
|
|
|
order.setPaySerialNo(consumptionResult.getString("orderId")); // 支付流水号
|
|
|
|
order.setPaySerialNo(consumptionResult.getString("orderId")); // 支付流水号
|
|
|
|
order.setPayRealPrice(order.getPayPrice()); // 实付金额
|
|
|
|
order.setPayRealPrice(order.getPayPrice()); // 实付金额
|
|
|
|
if (order.getRechargeType() != null && order.getRechargeType() == 1) { |
|
|
|
if (order.getRechargeType() != null) { |
|
|
|
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo()); |
|
|
|
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo() ,order.getRechargeType()); |
|
|
|
if (object.getInteger("code") != 200) { |
|
|
|
if (object.getInteger("code") != 200) { |
|
|
|
order.setRechargeStatus(1); |
|
|
|
order.setRechargeStatus(1); |
|
|
|
order.setAbnormalMsg(object.getString("message")); |
|
|
|
order.setAbnormalMsg(object.getString("message")); |
|
|
@ -387,7 +387,11 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public JSONObject getMobile(String phone , Integer amount , String orderNo) throws Exception { |
|
|
|
public JSONObject getMobile(String phone , Integer amount , String orderNo , Integer isFast) throws Exception { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isFast == 2) { |
|
|
|
|
|
|
|
isFast = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String timestamp = String.valueOf(System.currentTimeMillis()); |
|
|
|
String timestamp = String.valueOf(System.currentTimeMillis()); |
|
|
|
|
|
|
|
|
|
|
@ -397,7 +401,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
map.put("out_order_id" , orderNo); |
|
|
|
map.put("out_order_id" , orderNo); |
|
|
|
map.put("app_key" , CommonSysConst.getSysConfig().getCzAppKey()); |
|
|
|
map.put("app_key" , CommonSysConst.getSysConfig().getCzAppKey()); |
|
|
|
map.put("timestamp" , timestamp.substring(0,timestamp.length()-3)); |
|
|
|
map.put("timestamp" , timestamp.substring(0,timestamp.length()-3)); |
|
|
|
map.put("is_fast" , "1"); |
|
|
|
map.put("is_fast" , isFast); |
|
|
|
map.put("notify_url" , CommonSysConst.getSysConfig().getCzNotifyUrl()); |
|
|
|
map.put("notify_url" , CommonSysConst.getSysConfig().getCzNotifyUrl()); |
|
|
|
|
|
|
|
|
|
|
|
String signStr = WxUtils.generateSignatureAppSecret(map, CommonSysConst.getSysConfig().getCzAppSecret() , WXPayConstants.SignType.MD5); |
|
|
|
String signStr = WxUtils.generateSignatureAppSecret(map, CommonSysConst.getSysConfig().getCzAppSecret() , WXPayConstants.SignType.MD5); |
|
|
@ -472,7 +476,11 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { |
|
|
|
|
|
|
|
|
|
|
|
// 金币退款
|
|
|
|
// 金币退款
|
|
|
|
if (order.getPayType() == 3) { |
|
|
|
if (order.getPayType() == 3) { |
|
|
|
highUserService.goldHandle(order.getUserId(), order.getPayRealPrice().intValue() * 100, 1, 3, order.getId()); |
|
|
|
if (!highUserService.findGoldRepeat(3 , order.getId())) { |
|
|
|
|
|
|
|
highUserService.goldHandle(order.getUserId(), order.getPayRealPrice().multiply(BigDecimal.valueOf(100)).intValue(), 1, 3, order.getId()); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "已有退款记录"); |
|
|
|
|
|
|
|
} |
|
|
|
order.setStatus(5); |
|
|
|
order.setStatus(5); |
|
|
|
order.setRefundTime(new Date()); |
|
|
|
order.setRefundTime(new Date()); |
|
|
|
order.setOutRefundNo("HFR"+new Date().getTime() ); |
|
|
|
order.setOutRefundNo("HFR"+new Date().getTime() ); |
|
|
|