提交代码

dev-discount
胡锐 2 years ago
parent 5cf5ccb760
commit be6beb508d
  1. 42
      hai-bweb/src/main/java/com/bweb/controller/HighGasController.java
  2. 2
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  3. 6
      hai-service/src/main/java/com/hai/config/ShellGroupService.java

@ -812,8 +812,28 @@ public class HighGasController {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败,未找到加油站信息"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败,未找到加油站信息");
} }
if (store.getSourceType().equals(MerchantStoreSourceType.type2.getNumber())) {
JSONObject object = TuanYouConfig.refuelingOrderRefund(order.getMemPhone(), order.getOrderNo(), body.getString("refundContent"));
if (object == null || !object.getString("code").equals("200")) {
log.error("HighOrderController --> refuelingOrderRefund() error!", "提交退款审核失败," + object.getString("message"));
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "提交退款审核失败," + object.getString("message"));
}
order.setOrderStatus(6);
highOrderService.updateOrderDetail(order);
}
if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) {
JSONObject object = shellGroupService.gasSyncRefund(order.getPayTime(), order.getOrderNo());
if (!object.getString("status").equals("SUCCESS")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败,原因:" + object.getString("message"));
}
order.setOrderStatus(6);
highOrderService.updateOrderDetail(order);
}
// 来源类型 1:平台自建 2:团油 // 来源类型 1:平台自建 2:团油
if (store.getSourceType().equals(MerchantStoreSourceType.type1.getNumber())) { if (store.getSourceType().equals(MerchantStoreSourceType.type1.getNumber())
|| store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) {
if (order.getPayType() == 2) { if (order.getPayType() == 2) {
OrderRefundModel orderRefundModel = WxOrderConfig.orderToRefund(order.getPaySerialNo(), order.getPayRealPrice(), order.getAccountMerchantNum(), order.getPayRealPrice()); OrderRefundModel orderRefundModel = WxOrderConfig.orderToRefund(order.getPaySerialNo(), order.getPayRealPrice(), order.getAccountMerchantNum(), order.getPayRealPrice());
@ -850,6 +870,8 @@ public class HighGasController {
oilCardService.refund(order.getOrderNo()); oilCardService.refund(order.getOrderNo());
} }
// 预存类型 0:非预存 1:预存门店
if (store.getPrestoreType().equals(1)) {
Map<String, Object> pushParam = new HashMap<>(); Map<String, Object> pushParam = new HashMap<>();
pushParam.put("businessType", MerStoreAmountTypeEnum.type1.getType()); pushParam.put("businessType", MerStoreAmountTypeEnum.type1.getType());
pushParam.put("storeId", store.getId()); pushParam.put("storeId", store.getId());
@ -861,28 +883,12 @@ public class HighGasController {
pushParam.put("opUserName", userInfoModel.getSecUser().getUserName()); pushParam.put("opUserName", userInfoModel.getSecUser().getUserName());
// 退款到预存余额 // 退款到预存余额
this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam); this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam);
}
order.setOrderStatus(4); order.setOrderStatus(4);
order.setRefundTime(new Date()); order.setRefundTime(new Date());
order.setRefundContent(body.getString("refundContent")); order.setRefundContent(body.getString("refundContent"));
highOrderService.updateOrderDetail(order); highOrderService.updateOrderDetail(order);
} else if (store.getSourceType().equals(MerchantStoreSourceType.type2.getNumber())) {
JSONObject object = TuanYouConfig.refuelingOrderRefund(order.getMemPhone(), order.getOrderNo(), body.getString("refundContent"));
if (object == null || !object.getString("code").equals("200")) {
log.error("HighOrderController --> refuelingOrderRefund() error!", "提交退款审核失败," + object.getString("message"));
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "提交退款审核失败," + object.getString("message"));
}
order.setOrderStatus(6);
highOrderService.updateOrderDetail(order);
} else if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) {
JSONObject object = shellGroupService.gasSyncRefund(order.getPayTime(), order.getOrderNo());
if (!object.getString("status").equals("SUCCESS")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败,原因:" + object.getString("message"));
}
order.setOrderStatus(6);
highOrderService.updateOrderDetail(order);
} }
} }
return ResponseMsgUtil.success("操作成功"); return ResponseMsgUtil.success("操作成功");

File diff suppressed because one or more lines are too long

@ -93,7 +93,7 @@ public class ShellGroupService {
tradeOilOrder.put("oilGun", oilGun); tradeOilOrder.put("oilGun", oilGun);
tradeOilOrder.put("channelSettlementAmount", channelSettlementAmount); tradeOilOrder.put("channelSettlementAmount", channelSettlementAmount);
param.put("tradeOilOrder", JSONObject.toJSONString(tradeOilOrder)); param.put("tradeOilOrder", JSONObject.toJSONString(tradeOilOrder));
return request(orderNo, "gas_sync_payment_notify", param); return request(orderNo.replace("HF",""), "gas_sync_payment_notify", param);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
@ -110,9 +110,9 @@ public class ShellGroupService {
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
param.put("platMerchantId", CommonSysConst.getSysConfig().getShellPlatMerchantId()); param.put("platMerchantId", CommonSysConst.getSysConfig().getShellPlatMerchantId());
param.put("finishTime", DateUtil.date2String(finishTime, "yyyy-MM-dd HH:mm:ss")); param.put("finishTime", DateUtil.date2String(finishTime, "yyyy-MM-dd HH:mm:ss"));
param.put("tradeNo", tradeNo); param.put("tradeNo", tradeNo.replace("HF",""));
// 请求接口 // 请求接口
return request(tradeNo,"gas_sync_refund_notify", param); return request(System.currentTimeMillis()+"" ,"gas_sync_refund_notify", param);
} }
/** /**

Loading…
Cancel
Save