From d61840f8cf23015f9d2012d7231e21cdf062cd54 Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期四, 27 十一月 2025 15:01:55 +0800
Subject: [PATCH] 用户端退款修改
---
UserJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/account/controller/AppOrderController.java | 115 +++++++++++++++++++++++++++++++++++----------------------
1 files changed, 71 insertions(+), 44 deletions(-)
diff --git a/UserJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/account/controller/AppOrderController.java b/UserJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/account/controller/AppOrderController.java
index fe148c4..3b8baa3 100644
--- a/UserJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/account/controller/AppOrderController.java
+++ b/UserJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/account/controller/AppOrderController.java
@@ -2,8 +2,10 @@
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.stylefeng.guns.core.util.DateUtil;
import com.stylefeng.guns.core.util.GetOpenBodySig;
import com.stylefeng.guns.core.util.NotifyDemo;
+import com.stylefeng.guns.core.util.RequestSeqUtil;
import com.stylefeng.guns.core.util.ToolUtil;
import com.stylefeng.guns.modular.CharteredCar.model.OrderCharteredCar;
import com.stylefeng.guns.modular.CharteredCar.server.IOrderCharteredCarService;
@@ -20,6 +22,7 @@
import com.stylefeng.guns.modular.crossCity.model.OrderCrossCity;
import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService;
import com.stylefeng.guns.modular.enums.PaymentTypeEnum;
+import com.stylefeng.guns.modular.huifu.biz.FenZhangUtil;
import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService;
import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService;
import com.stylefeng.guns.modular.system.dao.UserInfoMapper;
@@ -432,30 +435,42 @@
AllocationReq allocationReq= new AllocationReq();
allocationReq.setOutOrderNo(ToolUtil.getRandomString(32));
- if(type==1){
- allocationReq.setPayBalanceAcctId(tEnterpriseWithdrawals.get(0).getBalanceAcctId());
- allocationReq.setRecvBalanceAcctId(userWithdrawals.get(0).getBalanceAcctId());
-
- allocationReq.setPassword(Base64Util.decode(tEnterpriseWithdrawals.get(0).getTransactionAuthorizationCode()));
- }else {
- allocationReq.setRecvBalanceAcctId(tEnterpriseWithdrawals.get(0).getBalanceAcctId());
- allocationReq.setPayBalanceAcctId(userWithdrawals.get(0).getBalanceAcctId());
- allocationReq.setPassword(Base64Util.decode(userWithdrawals.get(0).getTransactionAuthorizationCode()));
- }
- money=money*100;
- allocationReq.setAmount((int)money);
- allocationReq.setProductName("分账");
- allocationReq.setProductCount(1);
- allocationReq.setOrderNo(ToolUtil.getRandomString(32));
- allocationReq.setOrderAmount(1l);
try {
- AllocationResp allocationResp = AllocationExample.create(allocationReq);
- System.out.println(allocationResp);
- return "ok";
- } catch (UpyztException e) {
- e.printStackTrace();
- return e.getMessage();
+ Map<String, Object> result;
+ if(type==1){
+ //allocationReq.setPayBalanceAcctId(tEnterpriseWithdrawals.get(0).getBalanceAcctId());
+ //allocationReq.setRecvBalanceAcctId(userWithdrawals.get(0).getBalanceAcctId());
+ //
+ //allocationReq.setPassword(Base64Util.decode(tEnterpriseWithdrawals.get(0).getTransactionAuthorizationCode()));
+ result = FenZhangUtil.fenzhang(RequestSeqUtil.generate("TK"), DateUtil.formatDate(new Date(), "yyyyMMdd"), String.valueOf(money), userWithdrawals.get(0).getHuifuId());
+ }else {
+ //allocationReq.setRecvBalanceAcctId(tEnterpriseWithdrawals.get(0).getBalanceAcctId());
+ //allocationReq.setPayBalanceAcctId(userWithdrawals.get(0).getBalanceAcctId());
+ //allocationReq.setPassword(Base64Util.decode(userWithdrawals.get(0).getTransactionAuthorizationCode()));
+ result = FenZhangUtil.payFromUser(RequestSeqUtil.generate("TK"), DateUtil.formatDate(new Date(), "yyyyMMdd"), String.valueOf(money), userWithdrawals.get(0).getHuifuId());
+ }
+ if ("00000000".equals(result.get("respCode").toString())) {
+ return "ok";
+ } else {
+ return result.get("respDesc").toString();
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
}
+ //money=money*100;
+ //allocationReq.setAmount((int)money);
+ //allocationReq.setProductName("分账");
+ //allocationReq.setProductCount(1);
+ //allocationReq.setOrderNo(ToolUtil.getRandomString(32));
+ //allocationReq.setOrderAmount(1l);
+ //try {
+ // AllocationResp allocationResp = AllocationExample.create(allocationReq);
+ // System.out.println(allocationResp);
+ // return "ok";
+ //} catch (UpyztException e) {
+ // e.printStackTrace();
+ // return e.getMessage();
+ //}
}
@@ -471,30 +486,42 @@
AllocationReq allocationReq= new AllocationReq();
allocationReq.setOutOrderNo(ToolUtil.getRandomString(32));
- if(type==1){
- allocationReq.setPayBalanceAcctId(tEnterpriseWithdrawals.get(0).getBalanceAcctId());
- allocationReq.setRecvBalanceAcctId(userWithdrawals.get(0).getBalanceAcctId());
-
- allocationReq.setPassword(Base64Util.decode(tEnterpriseWithdrawals.get(0).getTransactionAuthorizationCode()));
- }else {
- allocationReq.setRecvBalanceAcctId(tEnterpriseWithdrawals.get(0).getBalanceAcctId());
- allocationReq.setPayBalanceAcctId(userWithdrawals.get(0).getBalanceAcctId());
- allocationReq.setPassword(Base64Util.decode(userWithdrawals.get(0).getTransactionAuthorizationCode()));
- }
- money=money*100;
- allocationReq.setAmount((int)money);
- allocationReq.setProductName("分账");
- allocationReq.setProductCount(1);
- allocationReq.setOrderNo(ToolUtil.getRandomString(32));
- allocationReq.setOrderAmount(1l);
+ Map<String, Object> result;
try {
- AllocationResp allocationResp = AllocationExample.create(allocationReq);
- System.out.println(allocationResp);
- return "ok";
- } catch (UpyztException e) {
- e.printStackTrace();
- return e.getMessage();
+ if(type==1){
+ //allocationReq.setPayBalanceAcctId(tEnterpriseWithdrawals.get(0).getBalanceAcctId());
+ //allocationReq.setRecvBalanceAcctId(userWithdrawals.get(0).getBalanceAcctId());
+ //
+ //allocationReq.setPassword(Base64Util.decode(tEnterpriseWithdrawals.get(0).getTransactionAuthorizationCode()));
+ result = FenZhangUtil.fenzhang(RequestSeqUtil.generate("TK"), DateUtil.formatDate(new Date(), "yyyyMMdd"), String.valueOf(money), userWithdrawals.get(0).getHuifuId());
+ }else {
+ //allocationReq.setRecvBalanceAcctId(tEnterpriseWithdrawals.get(0).getBalanceAcctId());
+ //allocationReq.setPayBalanceAcctId(userWithdrawals.get(0).getBalanceAcctId());
+ //allocationReq.setPassword(Base64Util.decode(userWithdrawals.get(0).getTransactionAuthorizationCode()));
+ result = FenZhangUtil.payFromUser(RequestSeqUtil.generate("TK"), DateUtil.formatDate(new Date(), "yyyyMMdd"), String.valueOf(money), userWithdrawals.get(0).getHuifuId());
+ }
+ if ("00000000".equals(result.get("respCode").toString())) {
+ return "ok";
+ } else {
+ return result.get("respDesc").toString();
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
}
+ //money=money*100;
+ //allocationReq.setAmount((int)money);
+ //allocationReq.setProductName("分账");
+ //allocationReq.setProductCount(1);
+ //allocationReq.setOrderNo(ToolUtil.getRandomString(32));
+ //allocationReq.setOrderAmount(1l);
+ //try {
+ // AllocationResp allocationResp = AllocationExample.create(allocationReq);
+ // System.out.println(allocationResp);
+ // return "ok";
+ //} catch (UpyztException e) {
+ // e.printStackTrace();
+ // return e.getMessage();
+ //}
}
}
--
Gitblit v1.7.1