From 3cd5a88ce846894d82f83daf967b424d0bf841db Mon Sep 17 00:00:00 2001
From: zyy <zyy@email.com>
Date: Mon, 20 Oct 2025 16:05:50 +0800
Subject: [PATCH] C2C

---
 trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cOrderServiceImpl.java |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cOrderServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cOrderServiceImpl.java
index d92be26..b5b3c01 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cOrderServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cOrderServiceImpl.java
@@ -310,9 +310,9 @@
         if ("3".equals(c2cOrder.getState())) {
             throw new YamiShopBindException("该订单已完成");
         }
-        if ("recharge".equals(c2cOrder.getDirection())) {
+        if ("buy".equals(c2cOrder.getDirection())) {
             // 充值
-        } else if ("withdraw".equals(c2cOrder.getDirection())) {
+        } else if ("sell".equals(c2cOrder.getDirection())) {
             // 提现
             // 用户钱包退还
             Wallet wallet = this.walletService.saveWalletByPartyId(c2cOrder.getPartyId());
@@ -321,11 +321,11 @@
             this.walletService.update(c2cOrder.getPartyId().toString(), c2cOrder.getCoinAmount());
             // 保存 资金日志
             MoneyLog moneyLog = new MoneyLog();
-            moneyLog.setCategory(Constants.MONEYLOG_CATEGORY_BANK_CARD);
+            moneyLog.setCategory(Constants.MONEYLOG_CATEGORY_C2C);
             moneyLog.setAmountBefore(new BigDecimal(amountBefore));
             moneyLog.setAmount(new BigDecimal(c2cOrder.getCoinAmount()));
             moneyLog.setAmountAfter(new BigDecimal(amountAfter));
-            moneyLog.setLog("银行卡订单取消,订单号[" + c2cOrder.getOrderNo() + "]");
+            moneyLog.setLog("C2C订单取消,订单号[" + c2cOrder.getOrderNo() + "]");
             moneyLog.setUserId(c2cOrder.getPartyId());
             moneyLog.setWalletType(c2cOrder.getSymbol());
             moneyLog.setSymbol(c2cOrder.getSymbol());
@@ -333,7 +333,7 @@
             this.moneyLogService.save(moneyLog);
             // 保存 充提记录
             WalletLog walletLog = new WalletLog();
-            walletLog.setCategory(Constants.MONEYLOG_CATEGORY_BANK_CARD_WITHDRAW);
+            walletLog.setCategory(Constants.MONEYLOG_CATEGORY_C2C);
             walletLog.setPartyId(c2cOrder.getPartyId());
             walletLog.setOrderNo(c2cOrder.getOrderNo());
             walletLog.setStatus(Integer.valueOf(c2cOrder.getState()).intValue());
@@ -638,14 +638,14 @@
         RealNameAuthRecord party_kyc = realNameAuthRecordService.getByUserId(partyId);
         Object objKyc = this.sysparaService.find("c2c_sell_by_kyc");
         if (null != objKyc) {
-            if (!(party_kyc.getStatus() == 2) && "true".equals(this.sysparaService.find("c2c_sell_by_kyc").getSvalue())) {
+            if ("true".equals(this.sysparaService.find("c2c_sell_by_kyc").getSvalue()) && !(party_kyc.getStatus() == 2)) {
                 throw new BusinessException(401, "无权限");
             }
         }
         HighLevelAuthRecord  party_kycHighLevel = highLevelAuthRecordService.findByUserId(partyId);
         Object objKycHigh = this.sysparaService.find("c2c_sell_by_high_kyc");
         if (null != objKycHigh) {
-            if (!(party_kycHighLevel.getStatus() == 2) && "true".equals(this.sysparaService.find("c2c_sell_by_high_kyc").getSvalue())) {
+            if ("true".equals(this.sysparaService.find("c2c_sell_by_high_kyc").getSvalue()) && !(party_kycHighLevel.getStatus() == 2)) {
                 throw new BusinessException(1, "请先通过高级认证");
             }
         }

--
Gitblit v1.9.3