From 579177ac64462d0fec885eb10af3097245134f80 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Tue, 02 Jun 2026 10:28:11 +0800
Subject: [PATCH] 1
---
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cOrderController.java | 54 +++++++++++++++++++++++++++---------------------------
1 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cOrderController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cOrderController.java
index b87c16c..779392e 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cOrderController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cOrderController.java
@@ -63,7 +63,7 @@
public Object order_open(HttpServletRequest request) throws IOException {
String currency = request.getParameter("currency");
if (StringUtils.isEmptyString(currency)) {
- throw new YamiShopBindException("支付币种不正确");
+ throw new YamiShopBindException("Invalid payment currency");
}
String partyId = SecurityUtils.getCurrentUserId();
String session_token = sessionTokenService.savePut(partyId);
@@ -111,7 +111,7 @@
party = userService.getById(partyId);
log.error("用户"+direction+"开始当前用户uid:"+party.getUserCode()+"当前用户名:"+party.getUserName()+"生成的订单号:"+orderNo);
if (Constants.SECURITY_ROLE_TEST.equals(party.getRoleName())) {
- throw new YamiShopBindException("无权限");
+ throw new YamiShopBindException("Permission denied");
}
if (!C2cLock.add(partyId)) {
@@ -122,7 +122,7 @@
Object object = this.sessionTokenService.cacheGet(session_token);
this.sessionTokenService.del(session_token);
if (null == object || !partyId.equals((String) object)) {
- throw new YamiShopBindException("请稍后再试");
+ throw new YamiShopBindException("Please try again later");
}
if (!party.isEnabled()) {
@@ -135,14 +135,14 @@
String c2c_sell_only_one = sysparaService.find("c2c_sell_only_one").getSvalue();
if(StringUtils.isNotEmpty(c2c_sell_only_one)&&"1".equals(c2c_sell_only_one)) {
if(nofinishOrderCount >= 1) {
- throw new YamiShopBindException("提交失败,当前有未处理订单");
+ throw new YamiShopBindException("Submission failed, pending order exists");
}
Long.valueOf(c2c_sell_only_one).longValue();
}
Object obj2 = this.sysparaService.find("c2c_nofinish_order_count_max");
if (null != obj2) {
if (nofinishOrderCount >= Long.valueOf(this.sysparaService.find("c2c_nofinish_order_count_max").getSvalue()).longValue()) {
- throw new YamiShopBindException("用户未结束订单数量已达上限");
+ throw new YamiShopBindException("Too many open orders");
}
}
@@ -163,34 +163,34 @@
Object obj1 = this.sysparaService.find("c2c_order_cancel_day_times");
if (null != obj1) {
if (orderCancelDayTimes >= Integer.valueOf(this.sysparaService.find("c2c_order_cancel_day_times").getSvalue()).intValue()) {
- throw new YamiShopBindException("今日取消订单次数太多了,请明日再试");
+ throw new YamiShopBindException("Too many cancellations today, try again tomorrow");
}
}
C2cAdvert c2cAdvert = this.c2cAdvertService.getById(c2c_advert_id);
if (null == c2cAdvert) {
- throw new YamiShopBindException("广告不存在");
+ throw new YamiShopBindException("Advertisement does not exist");
}
C2cPaymentMethod method =c2cPaymentMethodService.get(payment_method_id);
if (null == method) {
- throw new YamiShopBindException("支付方式不存在");
+ throw new YamiShopBindException("Payment method does not exist");
}
if (StringUtils.isEmptyString(order_type) || !Arrays.asList("by_amount", "by_num").contains(order_type)) {
- throw new YamiShopBindException("订单类型不正确");
+ throw new YamiShopBindException("Invalid order type");
}
if (C2cOrder.ORDER_TYPE_BY_AMOUNT.equals(order_type)) {
// 按支付金额支付
if (StringUtils.isEmptyString(amount) || !StringUtils.isDouble(amount) || Double.valueOf(amount).doubleValue() <= 0) {
- throw new YamiShopBindException("支付金额不正确");
+ throw new YamiShopBindException("Invalid payment amount");
}
coin_amount = "0";
} else {
// 按币种数量支付
if (StringUtils.isEmptyString(coin_amount) || !StringUtils.isDouble(coin_amount) || Double.valueOf(coin_amount).doubleValue() <= 0) {
- throw new YamiShopBindException("币种数量不正确");
+ throw new YamiShopBindException("Invalid currency amount");
}
amount = "0";
}
@@ -247,16 +247,16 @@
String partyId = SecurityUtils.getCurrentUserId();
if (null == partyId) {
- throw new BusinessException("请重新登录");
+ throw new BusinessException("Please log in again");
}
User party = userService.getById(partyId);
if (Constants.SECURITY_ROLE_TEST.equals(party.getRoleName())) {
- throw new BusinessException("无权限");
+ throw new BusinessException("Permission denied");
}
if (!userService.checkLoginSafeword(partyId, safe_password)) {
- throw new BusinessException("资金密码错误");
+ throw new BusinessException("Incorrect fund password");
}
if (!party.isEnabled()) {
@@ -265,29 +265,29 @@
C2cOrder order = this.c2cOrderService.get(order_no);
if (null == order) {
- throw new BusinessException("订单不存在");
+ throw new BusinessException("Order does not exist");
}
if (partyId.equals(order.getPartyId())) {
// 用户操作
if (!"buy".equals(order.getDirection())) {
- throw new BusinessException("用户不能支付卖单");
+ throw new BusinessException("User cannot pay for a sell order");
}
} else if (partyId.equals(order.getC2cUserPartyId())) {
// 承兑商操作
if (!"sell".equals(order.getDirection())) {
- throw new BusinessException("承兑商不能支付买单");
+ throw new BusinessException("Merchant cannot pay for a buy order");
}
} else {
- throw new BusinessException("无权限");
+ throw new BusinessException("Permission denied");
}
if (!"0".equals(order.getState())) {
- throw new BusinessException("订单不是未付款状态");
+ throw new BusinessException("Order is not in unpaid status");
}
if (!C2cOrderLock.add(order_no)) {
- throw new BusinessException(1, "请稍后再试");
+ throw new BusinessException(1, "Please try again later");
}
lock = true;
@@ -356,22 +356,22 @@
String partyId = SecurityUtils.getCurrentUserId();
if (null == partyId) {
- throw new BusinessException("请重新登录");
+ throw new BusinessException("Please log in again");
}
User party = userService.getById(partyId);
if (Constants.SECURITY_ROLE_TEST.equals(party.getRoleName())) {
- throw new BusinessException("无权限");
+ throw new BusinessException("Permission denied");
}
if (!C2cOrderLock.add(order_no)) {
- throw new BusinessException(1, "请稍后再试");
+ throw new BusinessException(1, "Please try again later");
}
lock = true;
if (!userService.checkLoginSafeword(partyId, safe_password)) {
- throw new BusinessException("资金密码错误");
+ throw new BusinessException("Incorrect fund password");
}
if (!party.isEnabled()) {
return Result.succeed("User is locked");
@@ -379,10 +379,10 @@
C2cOrder order = this.c2cOrderService.get(order_no);
if (null == order || !order.getPartyId().equals(partyId)) {
- throw new BusinessException("订单不存在");
+ throw new BusinessException("Order does not exist");
}
if ("0".equals(order.getState())) {
- throw new BusinessException("待付款的订单无法放行");
+ throw new BusinessException("Unpaid order cannot be released");
}
if ("3".equals(order.getState())) {
resultObject.setCode(0);
@@ -390,7 +390,7 @@
//throw new BusinessException("订单已完成,无法放行");
}
if ("4".equals(order.getState())) {
- throw new BusinessException("订单已取消,无法放行");
+ throw new BusinessException("Cancelled order cannot be released");
}
this.c2cOrderService.saveOrderPass(order);
--
Gitblit v1.9.3