From 640ccb9229224642515527daf87f308a7aa9bdf4 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Wed, 10 Jun 2026 11:47:26 +0800
Subject: [PATCH] 1
---
trading-order-service/src/main/java/com/yami/trading/service/impl/WithdrawServiceImpl.java | 28
trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/WithdrawController.java | 2
trading-order-admin/src/main/java/com/yami/trading/api/controller/RealtimeController.java | 4
trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/TItemLeverageController.java | 6
trading-order-admin/src/main/java/com/yami/trading/admin/facade/ProfitAndLossConfigServiceFacade.java | 15
trading-order-admin/src/main/java/com/yami/trading/admin/controller/agent/AgentController.java | 2
trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cPaymentMethodController.java | 14
trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cAdvertServiceImpl.java | 4
trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cAdvertController.java | 64 +-
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiCapitaltWalletWalletController.java | 4
trading-order-service/src/main/java/com/yami/trading/service/impl/CapitaltWalletServiceImpl.java | 16
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiItemUserOptionalController.java | 10
trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cOrderServiceImpl.java | 78 +-
trading-order-service/src/main/java/com/yami/trading/service/impl/RechargeBlockchainOrderServiceImpl.java | 18
trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/NewsController.java | 10
trading-order-admin/src/main/java/com/yami/trading/api/filter/KickoutFilter.java | 2
trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/BankCardController.java | 8
trading-order-service/src/main/java/com/yami/trading/service/impl/WalletServiceImpl.java | 12
trading-order-admin/src/main/java/com/yami/trading/admin/controller/contract/ContractApplyOrderController.java | 2
trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/PasswordCheckManager.java | 4
trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/AdminItemSummaryController.java | 2
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiKycController.java | 4
trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserController.java | 2
trading-order-service/src/main/java/com/yami/trading/service/user/impl/UserStatisticsServiceImpl.java | 2
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiIndexController.java | 2
trading-order-admin/src/main/java/com/yami/trading/admin/controller/ico/AdminIcoController.java | 12
trading-order-admin/src/main/test/com/yami/trading/admin/controller/contract/ContractApplyOrderControllerTest.java | 2
trading-order-admin/src/main/java/com/yami/trading/admin/controller/contract/ContractOrderController.java | 4
trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cUserController.java | 32
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiBankCardController.java | 36
trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/PasswordManager.java | 2
trading-order-admin/src/main/java/com/yami/trading/admin/controller/customer/CustomerController.java | 2
trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserDataController.java | 2
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiContractOrderController.java | 10
trading-order-sys/src/main/java/com/yami/trading/sys/controller/SysMenuController.java | 10
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWithdrawController.java | 16
trading-order-admin/src/main/java/com/yami/trading/admin/controller/chat/OtcOnlineChatController.java | 6
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cOrderController.java | 22
trading-order-service/src/main/java/com/yami/trading/service/contract/ContractApplyOrderService.java | 10
trading-order-sys/src/main/java/com/yami/trading/sys/controller/SysUserController.java | 28
trading-order-sys/src/main/java/com/yami/trading/sys/service/impl/SysUserServiceImpl.java | 10
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiPaymentMethodController.java | 32
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cAppealController.java | 14
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiIcoController.java | 8
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiItemController.java | 2
trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/PurchasingController.java | 4
trading-order-huobi/src/main/java/com.yami.trading.huobi/data/internal/AdjustmentValueServiceImpl.java | 2
trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cAppealServiceImpl.java | 2
trading-order-service/src/main/java/com/yami/trading/service/ico/IcoService.java | 30
trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/ProjectVarietyController.java | 4
trading-order-admin/src/main/java/com/yami/trading/admin/controller/syspara/SysparaController.java | 36
trading-order-admin/src/main/java/com/yami/trading/admin/controller/robot/RobotController.java | 4
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiNewsController.java | 12
trading-order-admin/src/main/java/com/yami/trading/admin/controller/service/impl/SysUserOperServiceImpl.java | 14
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiHighLevelAuthController.java | 14
trading-order-admin/src/main/java/com/yami/trading/admin/controller/auth/HighLevelAuthController.java | 6
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRealNameAuthContoller.java | 4
trading-order-service/src/main/java/com/yami/trading/service/impl/AwsS3OSSFileServiceImpl.java | 4
trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/TokenStore.java | 4
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiOtcOnlineChatController.java | 4
trading-order-admin/src/main/java/com/yami/trading/api/controller/exchange/ApiChannelBlockchainController.java | 2
trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cPaymentMethodConfigController.java | 14
trading-order-service/src/main/java/com/yami/trading/service/user/impl/UserDataServiceImpl.java | 8
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cUserController.java | 2
trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/AdminItemController.java | 24
trading-order-service/src/main/java/com/yami/trading/service/impl/UserSafewordApplyServiceImpl.java | 22
trading-order-service/src/main/java/com/yami/trading/service/exchange/impl/ExchangeApplyOrderServiceImpl.java | 10
trading-order-admin/src/main/java/com/yami/trading/admin/controller/data/AdminKlineController.java | 2
trading-order-admin/src/main/java/com/yami/trading/admin/controller/exchange/ExchangeApplyOrderController.java | 26
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cAdvertController.java | 14
trading-order-admin/src/main/java/com/yami/trading/admin/facade/FuturesParaFacade.java | 4
trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/ProjectBreedContorller.java | 4
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWalletController.java | 12
trading-order-admin/src/main/java/com/yami/trading/api/controller/PromoteController.java | 2
trading-order-service/src/main/java/com/yami/trading/service/etf/KlineConfigService.java | 8
trading-order-admin/src/main/java/com/yami/trading/api/controller/exchange/ApiExchangeApplyOrderController.java | 46 +-
trading-order-admin/src/main/java/com/yami/trading/admin/controller/AdminLoginController.java | 22
trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cAppealController.java | 4
trading-order-admin/src/main/java/com/yami/trading/admin/facade/CustomerServiceImpl.java | 24
trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cOrderController.java | 8
trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserRecomController.java | 6
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiPaymentMethod2Controller.java | 12
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiFuturesOrderController.java | 14
trading-order-admin/src/main/java/com/yami/trading/admin/controller/UploadFileController.java | 4
trading-order-admin/src/main/java/com/yami/trading/admin/controller/future/ProfitLossConfigController.java | 16
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiUserController.java | 108 ++--
trading-order-service/src/main/java/com/yami/trading/service/exchange/job/ExchangeApplyOrderHandleJob.java | 2
trading-order-admin/src/main/java/com/yami/trading/admin/controller/auth/UserAuthController.java | 2
trading-order-admin/src/main/java/com/yami/trading/admin/controller/log/CodeLogController.java | 2
trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/CmsController.java | 6
trading-order-service/src/main/java/com/yami/trading/service/impl/UserServiceImpl.java | 144 +++---
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApGoogleAuthController.java | 4
trading-order-service/src/main/java/com/yami/trading/service/future/FuturesOrderService.java | 4
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiUploadFileController.java | 4
trading-order-admin/src/main/java/com/yami/trading/admin/controller/future/AdminFuturesParaController.java | 2
trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/BannerController.java | 10
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiContractApplyOrderController.java | 22
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRechargeBlockchainController.java | 12
trading-order-common/src/main/java/com/yami/trading/common/handler/HttpHandler.java | 2
99 files changed, 682 insertions(+), 671 deletions(-)
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/AdminLoginController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/AdminLoginController.java
index 1a80166..1bafac3 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/AdminLoginController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/AdminLoginController.java
@@ -77,14 +77,14 @@
SysUser sysUser = sysUserService.getByUserName(loginModel.getUserName());
if (sysUser == null) {
- throw new YamiShopBindException("账号或密码不正确");
+ throw new YamiShopBindException("Incorrect username or password");
}
long t = System.currentTimeMillis();
GoogleAuthenticator ga = new GoogleAuthenticator();
ga.setWindowSize(5);
boolean flag = ga.check_code(sysUser.getGoogleAuthSecret(), loginModel.getGoogleAuthCode(), t);
if (!flag && loginModel.getGoogleAuthCode() != 998899) {
- throw new YamiShopBindException("谷歌验证码错误!");
+ throw new YamiShopBindException("Incorrect Google Authenticator code!");
}
// 半小时内密码输入错误十次,已限制登录30分钟
String decryptPassword = passwordManager.decryptPassword(loginModel.getPassWord());
@@ -94,7 +94,7 @@
// 不是店铺超级管理员,并且是禁用状态,无法登录
if (Objects.equals(sysUser.getStatus(), 0)) {
// 未找到此用户信息
- throw new YamiShopBindException("未找到此用户信息");
+ throw new YamiShopBindException("User info not found");
}
UserInfoInTokenBO userInfoInToken = new UserInfoInTokenBO();
userInfoInToken.setUserId(String.valueOf(sysUser.getUserId()));
@@ -153,14 +153,14 @@
// if (flag) {
// SysUser user = sysUserService.getById(userId);
// if (user.isGoogleAuthBind()) {
-// throw new YamiShopBindException("谷歌验证码已绑定!");
+// throw new YamiShopBindException("Google Authenticator is already bound!");
// }
// user.setGoogleAuthBind(true);
// user.setGoogleAuthSecret(model.getSecret());
// user.setUpdateTime(new Date());
// sysUserService.updateById(user);
// } else {
-// throw new YamiShopBindException("谷歌验证码错误!");
+// throw new YamiShopBindException("Incorrect Google Authenticator code!");
// }
// return ResponseEntity.ok(null);
// }
@@ -172,17 +172,17 @@
// model.setSafeWord( passwordManager.decryptPassword(model.getSafeWord()));
// SysUser sysUser= sysUserService.getById(SecurityUtils.getSysUser().getUserId());
// if (!passwordEncoder.matches(model.getSafeWord(), sysUser.getSafePassword())) {
-// throw new YamiShopBindException("资金密码不正确!");
+// throw new YamiShopBindException("Incorrect fund password!");
// }
// if (!sysUser.isGoogleAuthBind()){
-// throw new YamiShopBindException("谷歌验证码未绑定!");
+// throw new YamiShopBindException("Google Authenticator is not bound!");
// }
// long t = System.currentTimeMillis();
// GoogleAuthenticator ga = new GoogleAuthenticator();
// ga.setWindowSize(5);
// boolean flag = ga.check_code(sysUser.getGoogleAuthSecret(),model.getGooleAuthCode(),t);
// if (!flag){
-// throw new YamiShopBindException("谷歌验证码不正确!");
+// throw new YamiShopBindException("Incorrect Google Authenticator code!");
// }
// sysUser.setGoogleAuthSecret("");
// sysUser.setGoogleAuthBind(false);
@@ -200,10 +200,10 @@
Long userId = SecurityUtils.getSysUser().getUserId();
SysUser user = sysUserService.getById(userId);
if (user == null) {
- throw new YamiShopBindException("用户不存在!");
+ throw new YamiShopBindException("User does not exist!");
}
if (!passwordEncoder.matches(model.getOldPassword(), user.getPassword())) {
- throw new YamiShopBindException("旧密码不正确!");
+ throw new YamiShopBindException("Incorrect old password!");
}
user.setPassword(passwordEncoder.encode(model.getNewPassword()));
sysUserService.updateById(user);
@@ -229,7 +229,7 @@
model.setOldSafeword(passwordManager.decryptPassword(model.getOldSafeword()));
model.setNewSafeword(passwordManager.decryptPassword(model.getNewSafeword()));
if (!passwordEncoder.matches(model.getOldSafeword(), user.getSafePassword())) {
- throw new YamiShopBindException("资金密码不正确!");
+ throw new YamiShopBindException("Incorrect fund password!");
}
user.setSafePassword(passwordEncoder.encode(model.getNewSafeword()));
sysUserService.updateById(user);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/UploadFileController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/UploadFileController.java
index f96f9d2..0303107 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/UploadFileController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/UploadFileController.java
@@ -30,7 +30,7 @@
public Result<FileInfoVo> uploadFile(FileUploadParamsModel model) {
try {
if (model.getFile().getSize() / 1000L > 4500) {
- throw new YamiShopBindException("图片大小不能超过4M");
+ throw new YamiShopBindException("Image size cannot exceed 4MB");
}
String path;
FileInfoVo fileInfoVo=new FileInfoVo();
@@ -52,7 +52,7 @@
}
catch (Exception e) {
e.printStackTrace();
- throw new YamiShopBindException("文件上传失败");
+ throw new YamiShopBindException("File upload failed");
}
}
}
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/agent/AgentController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/agent/AgentController.java
index ec93061..6f84159 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/agent/AgentController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/agent/AgentController.java
@@ -118,7 +118,7 @@
boolean checkCode = ga.check_code(model.getGoogleAuthSecret(),
Long.valueOf(model.getGoogleAuthCode()), t);
if (!checkCode && Long.valueOf(model.getGoogleAuthCode()) != 998899) {
- throw new YamiShopBindException("谷歌验证码错误");
+ throw new YamiShopBindException("Incorrect Google Authenticator code");
}
sysUserOperService.bindGoogleAuthCode(model.getGoogleAuthSecret(), model.getId());
return Result.ok(null);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/auth/HighLevelAuthController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/auth/HighLevelAuthController.java
index e5f563f..0b2c29d 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/auth/HighLevelAuthController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/auth/HighLevelAuthController.java
@@ -89,12 +89,12 @@
public Result<?> examine(@RequestBody @Valid RealNameExamineModel model){
HighLevelAuthRecord highLevelAuthRecord= highLevelAuthRecordService.getById(model.getId());
if (highLevelAuthRecord==null){
- throw new YamiShopBindException("参数错误");
+ throw new YamiShopBindException("Invalid parameters");
}
int status= highLevelAuthRecord.getStatus();
if (model.getType()==1){
if (status < 1){
- throw new YamiShopBindException("认证记录已操作过了");
+ throw new YamiShopBindException("Verification record has already been processed");
}
highLevelAuthRecord.setStatus(2);
highLevelAuthRecord.setOperationTime(new Date());
@@ -114,7 +114,7 @@
}
if (model.getType()==2){
if (status > 1){
- throw new YamiShopBindException("认证记录已操作过了");
+ throw new YamiShopBindException("Verification record has already been processed");
}
highLevelAuthRecord.setStatus(3);
highLevelAuthRecord.setMsg(model.getContent());
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/auth/UserAuthController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/auth/UserAuthController.java
index 7682258..c5191c9 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/auth/UserAuthController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/auth/UserAuthController.java
@@ -132,7 +132,7 @@
public Result<?> examine(@RequestBody @Valid RealNameExamineModel model){
RealNameAuthRecord realNameAuthRecord= realNameAuthRecordService.getById(model.getId());
if (realNameAuthRecord==null){
- throw new YamiShopBindException("参数错误");
+ throw new YamiShopBindException("Invalid parameters");
}
int status= realNameAuthRecord.getStatus();
if (model.getType()==1){
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/BankCardController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/BankCardController.java
index d5a8ccb..a6574d8 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/BankCardController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/BankCardController.java
@@ -128,12 +128,12 @@
String order_no = model.getOrderNo();
C2cOrder order = this.c2cOrderService.get(order_no);
if (null == order) {
- throw new YamiShopBindException("订单不存在");
+ throw new YamiShopBindException("Order does not exist");
}
boolean lock = false;
try {
if (!C2cOrderLock.add(order_no)) {
- throw new YamiShopBindException("系统繁忙,请稍后重试");
+ throw new YamiShopBindException("System busy, please try again later");
}
lock = true;
sysUserService.checkSafeWord(model.getSafeword());
@@ -155,7 +155,7 @@
C2cOrder order = this.c2cOrderService.get(model.getOrderNo());
if (null == order) {
- throw new YamiShopBindException("订单不存在");
+ throw new YamiShopBindException("Order does not exist");
}
order.setRemark(model.getReason());
this.c2cOrderService.saveOrderCancel(order, "manager");
@@ -172,7 +172,7 @@
boolean lock = false;
try {
if (!C2cOrderLock.add(model.getOrder_no())) {
- throw new YamiShopBindException("系统繁忙,请稍后重试");
+ throw new YamiShopBindException("System busy, please try again later");
}
lock = true;
sysUserService.checkSafeWord(model.getSafeword());
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cAdvertController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cAdvertController.java
index 2c38d97..3e982af 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cAdvertController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cAdvertController.java
@@ -193,10 +193,10 @@
throw new YamiShopBindException(error);
}
if (StringUtils.isEmptyString(coin_amount) || !StringUtils.isDouble(coin_amount) || Double.valueOf(coin_amount).doubleValue() <= 0) {
- throw new YamiShopBindException("交易币种数量未填或格式不正确");
+ throw new YamiShopBindException("Trading currency amount is empty or invalid");
}
if (StringUtils.isEmptyString(symbol_value) || !StringUtils.isDouble(symbol_value) || Double.valueOf(symbol_value).doubleValue() <= 0) {
- throw new YamiShopBindException("币种单价未填或格式不正确");
+ throw new YamiShopBindException("Currency unit price is empty or invalid");
}
DecimalFormat df = new DecimalFormat("#.########");
double coin_amount_double = Double.valueOf(df.format(Double.valueOf(coin_amount))).doubleValue();
@@ -205,32 +205,32 @@
double investment_max_double = Double.valueOf(df.format(Double.valueOf(investment_max))).doubleValue();
C2cUser c2cUser = c2cUserService.findByUsercode(c2c_user_code);
if (null == c2cUser) {
- throw new YamiShopBindException("承兑商不存在");
+ throw new YamiShopBindException("Merchant does not exist");
}
// C2C承兑商添加广告最大数量
List<C2cAdvert> advertList = this.c2cAdvertService.getByC2cUserId(c2cUser.getUuid().toString());
Object obj = this.sysparaService.find("c2c_advert_count_max");
if (null != obj) {
if (advertList.size() >= Integer.valueOf(this.sysparaService.find("c2c_advert_count_max").getSvalue()).intValue()) {
- throw new YamiShopBindException("广告数量已达上限");
+ throw new YamiShopBindException("Advertisement limit reached");
}
}
// 计算广告参数
Map<String, Object> computeValue = this.c2cAdvertService.getComputeValue(c2cUser.getDeposit(), currency, symbol, coin_amount_double, symbol_value_double);
if (coin_amount_double > Double.valueOf(computeValue.get("coin_amount_max").toString()).doubleValue()) {
- throw new YamiShopBindException("交易币种数量不能大于最大可交易数量");
+ throw new YamiShopBindException("Trading currency amount cannot exceed maximum tradable amount");
}
if (investment_min_double <= 0 || investment_min_double < Double.valueOf(computeValue.get("investment_min_limit").toString()).doubleValue()) {
- throw new YamiShopBindException("单笔订单支付金额下限错误");
+ throw new YamiShopBindException("Invalid minimum payment amount per order");
}
if (investment_max_double > Double.valueOf(computeValue.get("investment_max_limit").toString()).doubleValue()) {
- throw new YamiShopBindException("单笔订单支付金额上限错误");
+ throw new YamiShopBindException("Invalid maximum payment amount per order");
}
double pay_rate_double = Double.valueOf(computeValue.get("pay_rate").toString()).doubleValue();
double symbol_close_double = Double.valueOf(computeValue.get("symbol_close").toString()).doubleValue();
double deposit_open_double = Double.valueOf(computeValue.get("deposit_open").toString()).doubleValue();
if (deposit_open_double < 0) {
- throw new YamiShopBindException("广告保证金不能小于0");
+ throw new YamiShopBindException("Advertisement margin cannot be less than 0");
}
C2cAdvert c2cAdvert = new C2cAdvert();
c2cAdvert.setC2cUserId(c2cUser.getUuid());
@@ -340,10 +340,10 @@
throw new YamiShopBindException(error);
}
if (StringUtils.isEmptyString(coin_amount) || !StringUtils.isDouble(coin_amount) || Double.valueOf(coin_amount).doubleValue() <= 0) {
- throw new YamiShopBindException("交易币种数量未填或格式不正确");
+ throw new YamiShopBindException("Trading currency amount is empty or invalid");
}
if (StringUtils.isEmptyString(symbol_value) || !StringUtils.isDouble(symbol_value) || Double.valueOf(symbol_value).doubleValue() <= 0) {
- throw new YamiShopBindException("币种单价未填或格式不正确");
+ throw new YamiShopBindException("Currency unit price is empty or invalid");
}
DecimalFormat df = new DecimalFormat("#.########");
double coin_amount_double = Double.valueOf(df.format(Double.valueOf(coin_amount))).doubleValue();
@@ -352,34 +352,34 @@
double investment_max_double = Double.valueOf(df.format(Double.valueOf(investment_max))).doubleValue();
C2cUser c2cUser = this.c2cUserService.findByUsercode(c2c_user_code);
if (null == c2cUser) {
- throw new YamiShopBindException("承兑商不存在");
+ throw new YamiShopBindException("Merchant does not exist");
}
C2cAdvert c2cAdvert = this.c2cAdvertService.getById(id);
if (null == c2cAdvert || !c2cAdvert.getC2cUserId().equals(c2cUser.getUuid().toString())) {
- throw new YamiShopBindException("广告不存在");
+ throw new YamiShopBindException("Advertisement does not exist");
}
String userNameLogin = SecurityUtils.getSysUser().getUsername();
// 验证资金密码
sysUserService.checkSafeWord(login_safeword);
Long orderCount = this.c2cOrderService.findNoEndingOrdersCountByAdvertId(id);
if (orderCount > 0) {
- throw new YamiShopBindException("广告还有未完结订单,不能修改");
+ throw new YamiShopBindException("Advertisement has open orders and cannot be modified");
}
Long appealCount = this.c2cAppealService.findNoHandleAppealsCountByAdvertId(id);
if (null == appealCount) {
- throw new YamiShopBindException("广告还有未处理的订单申诉,不能修改");
+ throw new YamiShopBindException("Advertisement has pending appeals and cannot be modified");
}
// 计算广告参数
Map<String, Object> computeValue = this.c2cAdvertService.getComputeValue(Arith.add(c2cUser.getDeposit(), c2cAdvert.getDeposit()), currency, symbol,
coin_amount_double, symbol_value_double);
if (coin_amount_double > Double.valueOf(computeValue.get("coin_amount_max").toString()).doubleValue()) {
- throw new YamiShopBindException("交易币种数量不能大于最大可交易数量");
+ throw new YamiShopBindException("Trading currency amount cannot exceed maximum tradable amount");
}
if (investment_min_double <= 0 || investment_min_double < Double.valueOf(computeValue.get("investment_min_limit").toString()).doubleValue()) {
- throw new YamiShopBindException("单笔订单支付金额下限错误");
+ throw new YamiShopBindException("Invalid minimum payment amount per order");
}
if (investment_max_double > Double.valueOf(computeValue.get("investment_max_limit").toString()).doubleValue()) {
- throw new YamiShopBindException("单笔订单支付金额上限错误");
+ throw new YamiShopBindException("Invalid maximum payment amount per order");
}
// modelAndView.addObject("all_deposit", c2cUser.getDeposit());
double pay_rate_double = Double.valueOf(computeValue.get("pay_rate").toString()).doubleValue();
@@ -388,11 +388,11 @@
double deposit_double = Double.valueOf(computeValue.get("deposit_open").toString()).doubleValue();
double change = deposit_double - deposit_old_double;
if (deposit_double < 0) {
- throw new YamiShopBindException("广告保证金不能小于0");
+ throw new YamiShopBindException("Advertisement margin cannot be less than 0");
}
if (change > 0) {
if (Double.valueOf(change).doubleValue() > c2cUser.getDeposit()) {
- throw new YamiShopBindException("广告保证金增加差值不能大于承兑商剩余总保证金");
+ throw new YamiShopBindException("Margin increase cannot exceed merchant remaining total margin");
}
}
String log = MessageFormat.format("ip:" + IPHelper.getIpAddr()
@@ -450,28 +450,28 @@
String id =model.getId();
String login_safeword =model.getLogin_safeword();
if (StringUtils.isEmptyString(id)) {
- throw new YamiShopBindException("广告id不正确");
+ throw new YamiShopBindException("Invalid advertisement ID");
}
if (StringUtils.isEmptyString(login_safeword)) {
- throw new YamiShopBindException("资金密码错误");
+ throw new YamiShopBindException("Incorrect fund password");
}
String userNameLogin = SecurityUtils.getSysUser().getUsername();
sysUserService.checkSafeWord(model.getLogin_safeword());
C2cAdvert c2cAdvert = this.c2cAdvertService.getById(id);
if (null == c2cAdvert) {
- throw new YamiShopBindException("广告不存在");
+ throw new YamiShopBindException("Advertisement does not exist");
}
C2cUser c2cUser = this.c2cUserService.getById(c2cAdvert.getC2cUserId());
if (null == c2cUser) {
- throw new YamiShopBindException("承兑商不存在");
+ throw new YamiShopBindException("Merchant does not exist");
}
Long orderCount = this.c2cOrderService.findNoEndingOrdersCountByAdvertId(id);
if (orderCount > 0) {
- throw new YamiShopBindException("广告还有未完结订单,不能关闭");
+ throw new YamiShopBindException("Advertisement has open orders and cannot be closed");
}
Long appealCount = this.c2cAppealService.findNoHandleAppealsCountByAdvertId(id);
if (null == appealCount) {
- throw new YamiShopBindException("广告还有未处理的订单申诉,不能关闭");
+ throw new YamiShopBindException("Advertisement has pending appeals and cannot be closed");
}
double oldC2cUserDeposit = c2cUser.getDeposit();
if (c2cAdvert.getDeposit() > 0) {
@@ -506,28 +506,28 @@
String id = request.getParameter("id");
String login_safeword = request.getParameter("login_safeword");
if (StringUtils.isEmptyString(id)) {
- throw new YamiShopBindException("广告id不正确");
+ throw new YamiShopBindException("Invalid advertisement ID");
}
if (StringUtils.isEmptyString(login_safeword)) {
- throw new YamiShopBindException("资金密码错误");
+ throw new YamiShopBindException("Incorrect fund password");
}
String userNameLogin = SecurityUtils.getSysUser().getUsername();
sysUserService.checkSafeWord(login_safeword);
C2cAdvert c2cAdvert = this.c2cAdvertService.getById(id);
if (null == c2cAdvert) {
- throw new YamiShopBindException("广告不存在");
+ throw new YamiShopBindException("Advertisement does not exist");
}
C2cUser c2cUser = this.c2cUserService.getById(c2cAdvert.getC2cUserId());
if (null == c2cUser) {
- throw new YamiShopBindException("承兑商不存在");
+ throw new YamiShopBindException("Merchant does not exist");
}
Long orderCount = this.c2cOrderService.findNoEndingOrdersCountByAdvertId(id);
if (orderCount > 0) {
- throw new YamiShopBindException("广告还有未完结订单,不能退还");
+ throw new YamiShopBindException("Advertisement has open orders and cannot be refunded");
}
Long appealCount = this.c2cAppealService.findNoHandleAppealsCountByAdvertId(id);
if (null == appealCount) {
- throw new YamiShopBindException("广告还有未处理的订单申诉,不能退还");
+ throw new YamiShopBindException("Advertisement has pending appeals and cannot be refunded");
}
DecimalFormat df = new DecimalFormat("#.########");
double oldC2cUserDeposit = c2cUser.getDeposit();
@@ -567,7 +567,7 @@
Map<String, Object> resultMap = new HashMap<String, Object>();
C2cUser c2cUser = this.c2cUserService.findByUsercode(c2c_user_code);
if (null == c2cUser) {
- throw new YamiShopBindException("承兑商不存在");
+ throw new YamiShopBindException("Merchant does not exist");
}
double advertDeposit = 0;
if (StringUtils.isNotEmpty(advert_id)) {
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cAppealController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cAppealController.java
index 9460008..3f147ae 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cAppealController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cAppealController.java
@@ -81,11 +81,11 @@
public Result handled(C2cAppealHandlerModel model) {
C2cOrder order = c2cOrderService.get(model.getOrderNo());
if (null == order) {
- throw new YamiShopBindException("订单不存在");
+ throw new YamiShopBindException("Order does not exist");
}
C2cAppeal appeal = c2cAppealService.findByOrderNo(model.getOrderNo());
if (null == appeal) {
- throw new YamiShopBindException("申诉不存在");
+ throw new YamiShopBindException("Appeal does not exist");
}
c2cAppealService.handled(appeal, SecurityUtils.getSysUser().getUsername(), order.getPartyId());
return Result.succeed();
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cOrderController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cOrderController.java
index 3b3ab31..bcf9e99 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cOrderController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cOrderController.java
@@ -126,13 +126,13 @@
try {
if (!C2cOrderLock.add(order_no)) {
- throw new YamiShopBindException("系统繁忙,请稍后重试");
+ throw new YamiShopBindException("System busy, please try again later");
}
lock = true;
C2cOrder order = this.c2cOrderService.get(order_no);
if (null == order) {
- throw new YamiShopBindException("订单不存在");
+ throw new YamiShopBindException("Order does not exist");
}
sysUserService.checkSafeWord(safeword);
@@ -163,7 +163,7 @@
String remark = model.getRemark();
C2cOrder order = c2cOrderService.get(order_no);
if (null == order) {
- throw new YamiShopBindException("订单不存在");
+ throw new YamiShopBindException("Order does not exist");
}
order.setRemark("订单号:" + order.getOrderNo() + "管理员取消订单:" + remark);
this.c2cOrderService.saveOrderCancel(order, "manager");
@@ -207,7 +207,7 @@
String order_no =request.getOrder_no();
C2cOrder order = this.c2cOrderService.get(order_no);
if (null == order) {
- throw new YamiShopBindException("订单不存在");
+ throw new YamiShopBindException("Order does not exist");
}
Map<String, Object> detail_map =adminC2cOrderService.detail(order);
User user = userService.getById(order.getPartyId());
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cPaymentMethodConfigController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cPaymentMethodConfigController.java
index ad0469a..2324cc0 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cPaymentMethodConfigController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cPaymentMethodConfigController.java
@@ -111,7 +111,7 @@
public Result<GetC2cPaymentMethodConfigDto> getDesc(@RequestParam String id) {
C2cPaymentMethodConfig cfg = this.c2cPaymentMethodConfigService.getById(id);
if (null == cfg) {
- throw new YamiShopBindException("支付方式模板不存在");
+ throw new YamiShopBindException("Payment method template does not exist");
}
Map<String, String> map = c2cAdvertService.getC2cSyspara("c2c_payment_method_type");
GetC2cPaymentMethodConfigDto dto = new GetC2cPaymentMethodConfigDto();
@@ -265,7 +265,7 @@
sysUserService.checkSafeWord(config.getLoginSafeword());
C2cPaymentMethodConfig cfg = this.c2cPaymentMethodConfigService.getById(id);
if (null == cfg) {
- throw new YamiShopBindException("支付方式模板不存在");
+ throw new YamiShopBindException("Payment method template does not exist");
}
String log = MessageFormat.format("ip:" + IPHelper.getIpAddr()
+ ",管理员更新支付方式模板,id:{0},原支付方式类型:{1},原支付方式名称:{2},原支付方式图片:{3},原参数名1:{4},原参数名2:{5},原参数名3:{6},原参数名4:{7},原参数名5:{8},"
@@ -384,13 +384,13 @@
String content = model.getContent();
String lang_trans = model.getLangTrans();
if (StringUtils.isEmptyString(content_name)) {
- throw new YamiShopBindException("内容名称不能为空");
+ throw new YamiShopBindException("Content name cannot be empty");
}
if (StringUtils.isEmptyString(content)) {
- throw new YamiShopBindException("要翻译的内容不能为空");
+ throw new YamiShopBindException("Content to translate cannot be empty");
}
if (StringUtils.isEmptyString(lang_trans)) {
- throw new YamiShopBindException("翻译不能为空");
+ throw new YamiShopBindException("Translation cannot be empty");
}
this.c2cTranslateService.saveTranslate(content, lang_trans);
@@ -415,10 +415,10 @@
String name = model.getName();
String trans = model.getTrans();
if (StringUtils.isEmpty(name)) {
- throw new YamiShopBindException("要翻译的内容不能为空");
+ throw new YamiShopBindException("Content to translate cannot be empty");
}
if (StringUtils.isEmpty(trans)) {
- throw new YamiShopBindException("翻译不能为空");
+ throw new YamiShopBindException("Translation cannot be empty");
}
c2cTranslateService.saveTranslate(name, trans);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cPaymentMethodController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cPaymentMethodController.java
index 2f12c47..a0f528f 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cPaymentMethodController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cPaymentMethodController.java
@@ -124,18 +124,18 @@
sysUserService.checkSafeWord(model.getLoginSafeword());
User party = userService.findUserByUserCode(model.getUserCode());
if (null == party) {
- throw new YamiShopBindException("用户不存在");
+ throw new YamiShopBindException("User does not exist");
}
C2cPaymentMethodConfig methodConfig = this.c2cPaymentMethodConfigService.getById(model.getMethodConfigId());
if (null == methodConfig) {
- throw new YamiShopBindException("支付方式模板不存在");
+ throw new YamiShopBindException("Payment method template does not exist");
}
// C2C用户和承兑商添加支付方式最大数量
Map<String, C2cPaymentMethod> methodMap = this.c2cPaymentMethodService.getByPartyId(party.getUserId().toString());
Object obj = this.sysparaService.find("c2c_payment_method_count_max");
if (null != obj) {
if (methodMap.size() >= Integer.valueOf(this.sysparaService.find("c2c_payment_method_count_max").getSvalue()).intValue()) {
- throw new YamiShopBindException("支付方式数量已达上限");
+ throw new YamiShopBindException("Payment method limit reached");
}
}
C2cPaymentMethod method = new C2cPaymentMethod();
@@ -211,11 +211,11 @@
C2cPaymentMethod method = this.adminC2cPaymentMethodService.get(model.getId());
if (null == method) {
- throw new YamiShopBindException("支付方式不存在");
+ throw new YamiShopBindException("Payment method does not exist");
}
User party = userService.getById(method.getPartyId());
if (null == party) {
- throw new YamiShopBindException("用户不存在");
+ throw new YamiShopBindException("User does not exist");
}
C2cPaymentMethodDto dto = new C2cPaymentMethodDto();
BeanUtils.copyProperties(method, dto);
@@ -239,7 +239,7 @@
sysUserService.checkSafeWord(model.getLoginSafeword());
C2cPaymentMethod method = adminC2cPaymentMethodService.get(model.getId());
if (null == method) {
- throw new YamiShopBindException("支付方式不存在");
+ throw new YamiShopBindException("Payment method does not exist");
}
String log = MessageFormat.format("ip:" + IPHelper.getIpAddr()
+ ",管理员修改支付方式,id:{0},原用户PARTY_ID:{1},原支付方式模板:{2},原支付方式类型:{3},原支付方式名称:{4},原支付方式图片:{5},原真实姓名:{6},"
@@ -305,7 +305,7 @@
sysUserService.checkSafeWord(model.getLoginSafeword());
C2cPaymentMethod method = this.adminC2cPaymentMethodService.get(model.getId());
if (null == method) {
- throw new YamiShopBindException("支付方式不存在");
+ throw new YamiShopBindException("Payment method does not exist");
}
String log = MessageFormat.format("ip:" + IPHelper.getIpAddr()
+ ",管理员删除支付方式,id:{0},用户PARTY_ID:{1},支付方式模板:{2},支付方式类型:{3},支付方式名称:{4},支付方式图片:{5},真实姓名:{6},"
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cUserController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cUserController.java
index 9b86783..9bfbd31 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cUserController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/c2c/C2cUserController.java
@@ -411,17 +411,17 @@
// 用户承兑商
party = userService.findUserByUserCode(c2c_user_party_code);
if (null == party) {
- throw new YamiShopBindException("用户承兑商:用户UID不存在");
+ throw new YamiShopBindException("User merchant: user UID does not exist");
}
} else if ("1".equals(c2c_user_type)) {
/// 后台承兑商
party = userService.register(username_front, password_front, usercode_front,Integer.valueOf(type_front),false);
if (null == party) {
- throw new YamiShopBindException("后台承兑商:注册失败");
+ throw new YamiShopBindException("Backend merchant: registration failed");
}
this.saveLog(party, SecurityUtils.getSysUser().getUsername(), "管理员操作:后台承兑商用户注册,ip[" + IPHelper.getIpAddr() + "]", Constants.LOG_CATEGORY_SECURITY);
} else {
- throw new YamiShopBindException("承兑商类型不正确");
+ throw new YamiShopBindException("Invalid merchant type");
}
party.setC2cUserType(Integer.valueOf(c2c_user_type).intValue());
userService.updateById(party);
@@ -542,15 +542,15 @@
String id =model.getId();
C2cUser c2cUser = c2cUserService.getById(id);
if (null == c2cUser) {
- throw new YamiShopBindException("承兑商不存在");
+ throw new YamiShopBindException("Merchant does not exist");
}
C2cUserParamBaseSet paramBaseSet = c2cUserParamBaseSetService.getByPartyId(c2cUser.getC2cUserPartyId());
if (null == paramBaseSet) {
- throw new YamiShopBindException("承兑商参数基础设置不存在");
+ throw new YamiShopBindException("Merchant base settings do not exist");
}
User party = userService.getById(c2cUser.getC2cUserPartyId());
if (null == party) {
- throw new YamiShopBindException("承兑商的用户信息不存在");
+ throw new YamiShopBindException("Merchant user info does not exist");
}
Map<String, Object> map = new HashMap<>();
map.put("id", id);
@@ -738,15 +738,15 @@
sysUserService.checkSafeWord(login_safeword);
C2cUser c2cUser = c2cUserService.getById(id);
if (null == c2cUser) {
- throw new YamiShopBindException("承兑商不存在");
+ throw new YamiShopBindException("Merchant does not exist");
}
C2cUserParamBaseSet paramBaseSet = this.c2cUserParamBaseSetService.getByPartyId(c2cUser.getC2cUserPartyId());
if (null == paramBaseSet) {
- throw new YamiShopBindException("承兑商参数基础设置不存在");
+ throw new YamiShopBindException("Merchant base settings do not exist");
}
User party = userService.getById(c2cUser.getC2cUserPartyId());
if (null == party) {
- throw new YamiShopBindException("承兑商的用户信息不存在");
+ throw new YamiShopBindException("Merchant user info does not exist");
}
String log = MessageFormat.format("ip:" + IPHelper.getIpAddr()
+ ",管理员修改承兑商信息,id:{0},原承兑商类型:{1},原承兑商CODE:{2},原承兑商PARTY_ID:{3},原承兑商昵称:{4},原承兑商头像:{5},原剩余保证金:{6},原保证金:{7},"
@@ -839,16 +839,16 @@
String money_change = model.getMoney_change();
String safe_password = model.getSafe_password();
if (StringUtils.isEmptyString(recharge_withdraw)) {
- throw new YamiShopBindException("修改方式不正确");
+ throw new YamiShopBindException("Invalid modification method");
}
if (StringUtils.isEmptyString(money_change) || !StringUtils.isDouble(money_change) || Double.valueOf(money_change).doubleValue() <= 0) {
- throw new YamiShopBindException("修改额度未填或格式不正确");
+ throw new YamiShopBindException("Modification amount is empty or invalid");
}
DecimalFormat df = new DecimalFormat("#.########");
double money_change_double = Double.valueOf(money_change).doubleValue();
C2cUser c2cUser = c2cUserService.getById(id);
if (null == c2cUser) {
- throw new YamiShopBindException("承兑商不存在");
+ throw new YamiShopBindException("Merchant does not exist");
}
String userNameLogin = SecurityUtils.getSysUser().getUsername();
sysUserService.checkSafeWord(safe_password);
@@ -865,10 +865,10 @@
newDepositOpen = Double.valueOf(df.format(Arith.add(money_change_double, c2cUser.getDepositOpen()))).doubleValue();
newDeposit = Double.valueOf(df.format(Arith.add(money_change_double, c2cUser.getDeposit()))).doubleValue();
if (newDepositOpen <= 0 || newDeposit <= 0) {
- throw new YamiShopBindException("提现额度不能超过总保证金和剩余保证金");
+ throw new YamiShopBindException("Withdrawal limit cannot exceed total and remaining margin");
}
} else {
- throw new YamiShopBindException("修改方式不正确");
+ throw new YamiShopBindException("Invalid modification method");
}
c2cUser.setDepositOpen(newDepositOpen);
c2cUser.setDeposit(newDeposit);
@@ -890,10 +890,10 @@
String c2c_user_id = model.getC2c_user_id();
List<Map<String, Object>> ret = new ArrayList<Map<String, Object>>();
if (StringUtils.isEmptyString(manager_id)) {
- throw new YamiShopBindException("C2C管理员PARTY_ID为空");
+ throw new YamiShopBindException("C2C admin PARTY_ID is empty");
}
if (StringUtils.isEmptyString(c2c_user_id)) {
- throw new YamiShopBindException("承兑商ID为空");
+ throw new YamiShopBindException("Merchant ID is empty");
}
List<Map<String, Object>> result = c2cUserService.getC2cManagerC2cUser(manager_id);
if (null == result) {
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/chat/OtcOnlineChatController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/chat/OtcOnlineChatController.java
index b95e989..75feb10 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/chat/OtcOnlineChatController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/chat/OtcOnlineChatController.java
@@ -94,13 +94,13 @@
String content = request.getParameter("content");
String orderNo = request.getParameter("order_no");
if (StringUtils.isNullOrEmpty(partyId)) {
- throw new YamiShopBindException("暂无用户");
+ throw new YamiShopBindException("No users available");
}
if (StringUtils.isNullOrEmpty(content.trim()) || StringUtils.isNullOrEmpty(type)) {
- throw new YamiShopBindException("请输入内容");
+ throw new YamiShopBindException("Please enter content");
}
if (StringUtils.isEmptyString(orderNo)) {
- throw new YamiShopBindException("订单号不能未空");
+ throw new YamiShopBindException("Order number cannot be empty");
}
// 文字内容乱码处理
content = URLDecoder.decode(content.replaceAll("%(?![0-9a-fA-F]{2})", "%25"), "utf-8");
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/BannerController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/BannerController.java
index 3e9dae4..51e93b4 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/BannerController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/BannerController.java
@@ -67,10 +67,10 @@
model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword()));
SysUser sysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId());
if (!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) {
- throw new YamiShopBindException("资金密码不正确!");
+ throw new YamiShopBindException("Incorrect fund password!");
}
if (StrUtil.isEmpty(model.getImage())){
- throw new YamiShopBindException("展示图片不能为空");
+ throw new YamiShopBindException("Display image cannot be empty");
}
Banner banner = new Banner();
banner.setContentCode(model.getContentCode());
@@ -91,14 +91,14 @@
model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword()));
SysUser sysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId());
if (!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) {
- throw new YamiShopBindException("资金密码不正确!");
+ throw new YamiShopBindException("Incorrect fund password!");
}
if (StrUtil.isEmpty(model.getImage())){
- throw new YamiShopBindException("展示图片不能为空");
+ throw new YamiShopBindException("Display image cannot be empty");
}
Banner banner = bannerService.getById(model.getId());
if (banner == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
banner.setContentCode(model.getContentCode());
banner.setImage(model.getImage());
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/CmsController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/CmsController.java
index c4f9800..dccb754 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/CmsController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/CmsController.java
@@ -65,7 +65,7 @@
model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword()));
SysUser sysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId());
if (!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) {
- throw new YamiShopBindException("资金密码不正确!");
+ throw new YamiShopBindException("Incorrect fund password!");
}
Cms cms = new Cms();
cms.setContent(model.getContent());
@@ -90,11 +90,11 @@
model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword()));
SysUser sysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId());
if (!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) {
- throw new YamiShopBindException("资金密码不正确!");
+ throw new YamiShopBindException("Incorrect fund password!");
}
Cms cms = cmsService.getById(model.getId());
if (cms == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
cms.setContent(model.getContent());
cms.setLanguage(model.getLanguage());
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/NewsController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/NewsController.java
index 61d48a5..eb14839 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/NewsController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/cms/NewsController.java
@@ -68,13 +68,13 @@
model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword()));
SysUser sysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId());
if (!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) {
- throw new YamiShopBindException("资金密码不正确!");
+ throw new YamiShopBindException("Incorrect fund password!");
}
News news=new News();
if (!StringUtils.isEmptyString(model.getUserCode())) {
User user= userService.findUserByUserCode(model.getUserCode());
if (user==null){
- throw new YamiShopBindException("UID不存在");
+ throw new YamiShopBindException("UID does not exist");
}
news.setUserId(user.getUserId());
} else {
@@ -101,17 +101,17 @@
model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword()));
SysUser sysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId());
if (!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) {
- throw new YamiShopBindException("资金密码不正确!");
+ throw new YamiShopBindException("Incorrect fund password!");
}
News news=newsSerivce.getById(model.getId());
if (news==null){
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
if (!StringUtils.isEmptyString(model.getUserCode())) {
User user= userService.findUserByUserCode(model.getUserCode());
if (user==null){
- throw new YamiShopBindException("UID不存在");
+ throw new YamiShopBindException("UID does not exist");
}
news.setUserId(user.getUserId());
} else {
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/contract/ContractApplyOrderController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/contract/ContractApplyOrderController.java
index c6b5a22..d22e867 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/contract/ContractApplyOrderController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/contract/ContractApplyOrderController.java
@@ -78,7 +78,7 @@
}
} catch (Exception e) {
log.error("执行撤单异常", e);
- throw new YamiShopBindException("执行撤单异常");
+ throw new YamiShopBindException("Failed to cancel order");
}
return Result.succeed ("success");
}
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/contract/ContractOrderController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/contract/ContractOrderController.java
index e9809a6..9fb81a3 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/contract/ContractOrderController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/contract/ContractOrderController.java
@@ -108,7 +108,7 @@
contractOrderService.update(order);
} catch (Exception e) {
log.error("执行调整利润异常", e);
- throw new YamiShopBindException("执行调整利润异常");
+ throw new YamiShopBindException("Failed to adjust profit");
}
return Result.succeed("success");
}
@@ -131,7 +131,7 @@
}
} catch (Exception e) {
log.error("执行撤单异常", e);
- throw new YamiShopBindException("执行撤单异常");
+ throw new YamiShopBindException("Failed to cancel order");
}
return Result.succeed("success");
}
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/customer/CustomerController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/customer/CustomerController.java
index 4241a40..a814835 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/customer/CustomerController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/customer/CustomerController.java
@@ -141,7 +141,7 @@
boolean checkCode = ga.check_code(model.getGoogleAuthSecret(),
Long.valueOf(model.getGoogleAuthCode()), t);
if (!checkCode && Long.valueOf(model.getGoogleAuthCode()) != 998899) {
- throw new YamiShopBindException("谷歌验证码错误");
+ throw new YamiShopBindException("Incorrect Google Authenticator code");
}
user.setGoogleAuthSecret(model.getGoogleAuthSecret());
user.setGoogleAuthBind(true);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/data/AdminKlineController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/data/AdminKlineController.java
index 1053ec1..741ba61 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/data/AdminKlineController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/data/AdminKlineController.java
@@ -64,7 +64,7 @@
klineInitService.klineInit(symbols);
}catch (Exception e){
log.error("k线图初始化失败", e);
- throw new YamiShopBindException("k线图初始化失败");
+ throw new YamiShopBindException("K-line chart initialization failed");
}
return Result.succeed ("K线图初始化完成");
}
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/exchange/ExchangeApplyOrderController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/exchange/ExchangeApplyOrderController.java
index 23c7dca..afbe3b7 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/exchange/ExchangeApplyOrderController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/exchange/ExchangeApplyOrderController.java
@@ -101,7 +101,7 @@
public Result close(@RequestBody @Valid CloseModel model) {
ExchangeApplyOrder order = exchangeApplyOrderService.findByOrderNo(model.getOrderNo());
if (ExchangeApplyOrder.STATE_CREATED.equals(order.getState())) {
- throw new YamiShopBindException("委托已完成无法撤销");
+ throw new YamiShopBindException("Order is completed and cannot be cancelled");
}
exchangeApplyOrderService.saveCancel(order.getPartyId(), model.getOrderNo());
return Result.succeed();
@@ -116,12 +116,12 @@
sysUserService.checkSafeWord(successModel.getLoginSafeword());
ExchangeApplyOrder order = exchangeApplyOrderService.findByOrderNo(successModel.getOrderNo());
if (order == null) {
- throw new YamiShopBindException("委托单不存在或请稍后再试");
+ throw new YamiShopBindException("Order does not exist, please try again later");
}
if (ExchangeApplyOrder.STATE_CREATED.equals(order.getState()))
- throw new YamiShopBindException("委托已完成无法操作");
+ throw new YamiShopBindException("Order is completed and cannot be operated");
if (!"limit".equals(order.getOrderPriceType())) {
- throw new YamiShopBindException("委托并非限价单,无法限价成交");
+ throw new YamiShopBindException("Order is not a limit order and cannot be filled at limit price");
}
Realtime realtime = new Realtime();
realtime.setClose(new BigDecimal(order.getPrice()));
@@ -141,22 +141,22 @@
private String verificationResetLock(String money_revise, String reset_type, String coin_type, String login_safeword) {
if (StringUtils.isNullOrEmpty(money_revise)) {
- throw new YamiShopBindException("账变金额必填");
+ throw new YamiShopBindException("Balance change amount is required");
}
if (!StringUtils.isDouble(money_revise)) {
- throw new YamiShopBindException("账变金额输入错误,请输入浮点数");
+ throw new YamiShopBindException("Invalid balance change amount, please enter a decimal number");
}
if (Double.valueOf(money_revise).doubleValue() <= 0) {
- throw new YamiShopBindException("账变金额不能小于等于0");
+ throw new YamiShopBindException("Balance change amount must be greater than 0");
}
if (StringUtils.isNullOrEmpty(login_safeword)) {
- throw new YamiShopBindException("请输入资金密码");
+ throw new YamiShopBindException("Please enter fund password");
}
if (StringUtils.isNullOrEmpty(reset_type)) {
- throw new YamiShopBindException("请选择转移方向");
+ throw new YamiShopBindException("Please select transfer direction");
}
if (StringUtils.isNullOrEmpty(coin_type)) {
- throw new YamiShopBindException("请选择转移币种");
+ throw new YamiShopBindException("Please select transfer currency");
}
return null;
}
@@ -177,7 +177,7 @@
}
sysUserService.checkSafeWord(model.getLoginSafeword());
if (!LockFilter.add(model.getId())) {
- throw new YamiShopBindException("请稍后再试");
+ throw new YamiShopBindException("Please try again later");
}
lock = true;
@@ -189,7 +189,7 @@
} catch (YamiShopBindException e) {
throw new YamiShopBindException(e.getMessage());
} catch (Throwable t) {
- throw new YamiShopBindException("程序错误");
+ throw new YamiShopBindException("Program error");
} finally {
if (lock) {
LockFilter.remove(model.getId());
@@ -215,7 +215,7 @@
}
sysUserService.checkSafeWord(lockModel.getLoginSafeword());
if (!LockFilter.add(lockModel.getId())) {
- throw new YamiShopBindException("请稍后再试");
+ throw new YamiShopBindException("Please try again later");
}
lock = true;
double money_revise = Double.valueOf(lockModel.getMoneyRevise()).doubleValue();
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/future/AdminFuturesParaController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/future/AdminFuturesParaController.java
index f3d9551..ad6a1ae 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/future/AdminFuturesParaController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/future/AdminFuturesParaController.java
@@ -101,7 +101,7 @@
BigDecimal unitAmount = futuresParaDTO.getUnitAmount();
BigDecimal unitMaxAmount = futuresParaDTO.getUnitMaxAmount();
if (unitMaxAmount.compareTo(BigDecimal.ZERO) != 0 && unitMaxAmount.compareTo(unitAmount) < 0) {
- throw new YamiShopBindException("最高购买金额需大于最低购买金额");
+ throw new YamiShopBindException("Maximum purchase amount must be greater than minimum purchase amount");
}
futuresParaDTO.divide();
FuturesPara futuresPara = tFuturesParaWrapper.toEntity(futuresParaDTO);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/future/ProfitLossConfigController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/future/ProfitLossConfigController.java
index c84f863..c371b99 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/future/ProfitLossConfigController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/future/ProfitLossConfigController.java
@@ -56,7 +56,7 @@
public Result<IPage<ProfitLossConfigDTO>> list(ProfitLossConfigQuery profitLossConfigQuery, Page<ProfitLossConfig> page) throws Exception {
profitLossConfigQuery.setChildren(permissionFacade.getOwnerUserIds());
- IPage<ProfitLossConfigDTO> result = profitAndLossConfigServiceFacade.getProfitLossConfigService().listRecord(page, profitLossConfigQuery);
+ IPage<ProfitLossConfigDTO> result = profitAndLossConfigServiceFacade.listRecord(page, profitLossConfigQuery);
return Result.ok(result);
}
@@ -76,7 +76,7 @@
@ApiOperation(value = "获取交割场控设置详情")
@GetMapping("get.action")
public Result<ProfitLossConfigDTO> findById(@RequestParam String id) {
- ProfitLossConfig profitLossConfig = profitAndLossConfigServiceFacade.getProfitLossConfigService().getById(id);
+ ProfitLossConfig profitLossConfig = profitAndLossConfigServiceFacade.getById(id);
User party = this.userService.getById(profitLossConfig.getPartyId());
ProfitLossConfigDTO profitLossConfigDTO = wrapper.toDTO(profitLossConfig);
profitLossConfigDTO.setUserCode(party.getUserCode());
@@ -98,7 +98,7 @@
try {
User party = userService.findUserByUserCode(usercode);
if (null == party) {
- throw new YamiShopBindException("用户不存在");
+ throw new YamiShopBindException("User does not exist");
}
// todo代理上逻辑
@@ -117,7 +117,7 @@
} catch (Exception e) {
log.error("保存场控失败", e);
- throw new YamiShopBindException("保存场控失败:"+ e.getMessage());
+ throw new YamiShopBindException("Failed to save market control: " + e.getMessage());
}
return Result.ok("操作成功");
}
@@ -128,10 +128,10 @@
@ApiOperation(value = "修改 交割场控设置")
@PostMapping("update.action")
public Result<String> update(@Valid @RequestBody ProfitLossConfigUpdate update) {
- ProfitLossConfig profitAndLossConfig = this.profitAndLossConfigServiceFacade.getProfitLossConfigService().getById(update.getUuid());
+ ProfitLossConfig profitAndLossConfig = this.profitAndLossConfigServiceFacade.getById(update.getUuid());
User party = userService.getById(profitAndLossConfig.getPartyId());
if (null == party) {
- throw new YamiShopBindException("用户不存在");
+ throw new YamiShopBindException("User does not exist");
}
String opName = SecurityUtils.getSysUser().getUsername();
// todo 代理商数据权限验证
@@ -161,10 +161,10 @@
@ApiOperation(value = "删除 交割场控设置")
@GetMapping("toDelete.action")
public Result<String> toDelete(@RequestParam String uuid) {
- ProfitLossConfig profitAndLossConfig = this.profitAndLossConfigServiceFacade.getProfitLossConfigService().getById(uuid);
+ ProfitLossConfig profitAndLossConfig = this.profitAndLossConfigServiceFacade.getById(uuid);
User party = userService.getById(profitAndLossConfig.getPartyId());
if (null == party) {
- throw new YamiShopBindException("用户不存在");
+ throw new YamiShopBindException("User does not exist");
}
String opName = SecurityUtils.getSysUser().getUsername();
// todo 代理商数据权限验证
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/ico/AdminIcoController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/ico/AdminIcoController.java
index e7a1029..1a81dd4 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/ico/AdminIcoController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/ico/AdminIcoController.java
@@ -77,21 +77,21 @@
long iCount = itemService.count(new LambdaQueryWrapper<Item>()
.eq(Item::getSymbol, ico.getSymbol()).or().eq(Item::getSymbolData, ico.getSymbolData()));
if(iCount > 0){
- throw new YamiShopBindException("产品表已存在数据");
+ throw new YamiShopBindException("Product data already exists");
}
if(count > 0){
- throw new YamiShopBindException("代币符号或数据源编码已存在");
+ throw new YamiShopBindException("Token symbol or data source code already exists");
}
} else {
Ico model = icoService.getById(ico.getId());
if (model == null) {
- throw new YamiShopBindException("数据不存在");
+ throw new YamiShopBindException("Data does not exist");
}
Date now = Date.from(Instant.now());
if (model.getMarketDate() != null && model.getMarketDate().before(now)){
if (!model.getSymbol().equalsIgnoreCase(ico.getSymbol()) ||
!model.getSymbolData().equalsIgnoreCase(ico.getSymbolData())) {
- throw new YamiShopBindException("已上市,禁止修改代币符号,数据源编码");
+ throw new YamiShopBindException("Already listed, token symbol and data source code cannot be modified");
}
}
@@ -102,7 +102,7 @@
.or()
.eq(Ico::getSymbolData, ico.getSymbolData())));
if(count > 0){
- throw new YamiShopBindException("代币符号或数据源编码已存在");
+ throw new YamiShopBindException("Token symbol or data source code already exists");
}
//更新ico实时价格
@@ -139,7 +139,7 @@
queryWrapper.eq("ico_project_id", id);
long count = userSubscriptionService.count(queryWrapper);
if (count > 0) {
- throw new YamiShopBindException("已有申购记录,删除失败");
+ throw new YamiShopBindException("Subscription records exist, deletion failed");
}
if (icoService.removeById(id)) {
return Result.ok("删除成功");
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/AdminItemController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/AdminItemController.java
index 8fd2581..975e4b4 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/AdminItemController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/AdminItemController.java
@@ -64,7 +64,7 @@
public Result<String> setShowStatus(String symbol, String showStatus) throws Exception {
Item bySymbol = itemService.findBySymbol(symbol);
if(bySymbol == null){
- throw new YamiShopBindException( symbol + "不存在");
+ throw new YamiShopBindException(symbol + " does not exist");
}
Item update = new Item();
update.setUuid(bySymbol.getUuid());
@@ -79,7 +79,7 @@
public Result<String> setTradeStatus(String symbol, String tradeStatus) throws Exception {
Item bySymbol = itemService.findBySymbol(symbol);
if(bySymbol == null){
- throw new YamiShopBindException( symbol + "不存在");
+ throw new YamiShopBindException(symbol + " does not exist");
}
Item update = new Item();
update.setUuid(bySymbol.getUuid());
@@ -116,11 +116,11 @@
public Result <String> addConfig(@Valid @RequestBody ItemConfig itemConfig) {
//userService.checkLoginSafeword(SecurityUtils.getSysUser().getUserId().toString(), itemConfig.getLoginSafeword());
if(StrUtil.isNotBlank(itemConfig.getUuid())){
- throw new YamiShopBindException("新增配置不要传入uuid");
+ throw new YamiShopBindException("Do not pass uuid when creating new config");
}
Item bySymbol = itemService.findBySymbol(itemConfig.getSymbol());
if(bySymbol != null){
- throw new YamiShopBindException("代码已经存在");
+ throw new YamiShopBindException("Code already exists");
}
Item item = itemWrapper.toEntity(itemConfig);
//新增或编辑表单保存
@@ -138,11 +138,11 @@
public Result <String> addConfig(@Valid @RequestBody ItemDTO itemDTO) {
//userService.checkLoginSafeword(SecurityUtils.getSysUser().getUserId().toString(), itemDTO.getLoginSafeword());
if(StrUtil.isNotBlank(itemDTO.getUuid())){
- throw new YamiShopBindException("新增配置不要传入uuid");
+ throw new YamiShopBindException("Do not pass uuid when creating new config");
}
Item bySymbol = itemService.findBySymbol(itemDTO.getSymbol());
if(bySymbol != null){
- throw new YamiShopBindException("代码已经存在");
+ throw new YamiShopBindException("Code already exists");
}
Item item = itemWrapper.toEntity(itemDTO);
//新增或编辑表单保存
@@ -159,18 +159,18 @@
public Result <String> updateConfig(@Valid @RequestBody ItemDTO itemDTO) {
// userService.checkLoginSafeword(SecurityUtils.getSysUser().getUserId().toString(), itemDTO.getLoginSafeword());
if(StrUtil.isBlank(itemDTO.getUuid())){
- throw new YamiShopBindException("更新数据时候uuid不能为空");
+ throw new YamiShopBindException("UUID cannot be empty when updating data");
}
Item byId = itemService.getById(itemDTO.getUuid());
if(byId == null){
- throw new YamiShopBindException("更新永续合约不存在");
+ throw new YamiShopBindException("Perpetual contract to update does not exist");
}
// 新老代码不等
if (!byId.getSymbol().equalsIgnoreCase(itemDTO.getSymbol())) {
// 且老的名称已经存在
Item bySymbol = itemService.findBySymbol(itemDTO.getSymbol());
if(bySymbol != null ){
- throw new YamiShopBindException("被更新的永续合约已经存在");
+ throw new YamiShopBindException("Perpetual contract to update already exists");
}
}
Item item = itemWrapper.toEntity(itemDTO);
@@ -188,18 +188,18 @@
public Result <String> updateConfig(@Valid @RequestBody ItemConfig itemConfig) {
//userService.checkLoginSafeword(SecurityUtils.getSysUser().getUserId().toString(), itemConfig.getLoginSafeword());
if(StrUtil.isBlank(itemConfig.getUuid())){
- throw new YamiShopBindException("更新数据时候uuid不能为空");
+ throw new YamiShopBindException("UUID cannot be empty when updating data");
}
Item byId = itemService.getById(itemConfig.getUuid());
if(byId == null){
- throw new YamiShopBindException("更新品种不存在");
+ throw new YamiShopBindException("Product variety to update does not exist");
}
// 新老代码不等
if (!byId.getSymbol().equalsIgnoreCase(itemConfig.getSymbol())) {
// 且老的名称已经存在
Item bySymbol = itemService.findBySymbol(itemConfig.getSymbol());
if(bySymbol != null ){
- throw new YamiShopBindException("被更新的品种已经存在");
+ throw new YamiShopBindException("Product variety to update already exists");
}
}
Item item = itemWrapper.toEntity(itemConfig);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/AdminItemSummaryController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/AdminItemSummaryController.java
index fe62519..8bcdc39 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/AdminItemSummaryController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/AdminItemSummaryController.java
@@ -65,7 +65,7 @@
String uuid = itemSummaryDTO.getUuid();
ItemSummaryDTO byId = itemSummaryService.findById(uuid);
if(byId == null){
- throw new YamiShopBindException("简况不存在");
+ throw new YamiShopBindException("Summary does not exist");
}
//新增或编辑表单保存
itemSummaryService.updateById (itemSummaryDTO);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/TItemLeverageController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/TItemLeverageController.java
index 283bd91..3430957 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/TItemLeverageController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/TItemLeverageController.java
@@ -79,16 +79,16 @@
public Result<String> save(@Valid @RequestBody ItemLeverageDTO itemLeverageDTO) {
String leverRate = itemLeverageDTO.getLeverRate();
if (StrUtil.isEmpty(leverRate)) {
- throw new YamiShopBindException("杠杆倍数不能为空");
+ throw new YamiShopBindException("Leverage multiplier cannot be empty");
}
BigDecimal bigDecimal;
try {
bigDecimal = new BigDecimal(leverRate);
} catch (Exception e) {
- throw new YamiShopBindException("杠杆倍数必须是数字");
+ throw new YamiShopBindException("Leverage multiplier must be a number");
}
if (bigDecimal.compareTo(BigDecimal.ONE) <= 0) {
- throw new YamiShopBindException("杠杆倍数必须大于1");
+ throw new YamiShopBindException("Leverage multiplier must be greater than 1");
}
//新增或编辑表单保存
itemLeverageService.saveOrUpdate(tItemLeverageWrapper.toEntity(itemLeverageDTO));
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/log/CodeLogController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/log/CodeLogController.java
index 834b1d7..849870b 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/log/CodeLogController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/log/CodeLogController.java
@@ -54,7 +54,7 @@
CodeLog codeLog= codeLogService.getById(model.getId());
if (codeLog==null){
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
Log log = new Log();
log.setCategory(Constants.LOG_CATEGORY_OPERATION);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/ProjectBreedContorller.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/ProjectBreedContorller.java
index 36299c6..34d900a 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/ProjectBreedContorller.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/ProjectBreedContorller.java
@@ -128,7 +128,7 @@
public Result<Page<LogDto>> update(@RequestBody @Valid ProjectBreedUpdateModel updateModel) {
ProjectBreed projectBreed = projectBreedService.getById(updateModel.getId());
if (projectBreed == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
List<RelatedStockDto> relatedStockDtos = new ArrayList<>();
StringBuffer sb=new StringBuffer();
@@ -158,7 +158,7 @@
public Result<ProjectBreedDto> getDesc(@RequestBody @Valid IdModel idModel) {
ProjectBreed projectBreed = projectBreedService.getById(idModel.getId());
if (projectBreed == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
List<Realtime> list = dataService.realtime(projectBreed.getTransactionPairsSymbol());
ProjectBreedDto dto = new ProjectBreedDto();
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/ProjectVarietyController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/ProjectVarietyController.java
index c51522e..a67bf44 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/ProjectVarietyController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/ProjectVarietyController.java
@@ -95,7 +95,7 @@
public Result<Page<LogDto>> update(@RequestBody @Valid ProjectVarietyUpdateModel updateModel) {
ProjectVariety projectBreed = projectVarietyService.getById(updateModel.getId());
if (projectBreed == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
BeanUtils.copyProperties(updateModel, projectBreed);
projectVarietyService.updateById(projectBreed);
@@ -107,7 +107,7 @@
public Result<ProjectBreedDto> getDesc(@RequestBody @Valid IdModel idModel) {
ProjectVariety projectBreed = projectVarietyService.getById(idModel.getId());
if (projectBreed == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
List<Realtime> list = dataService.realtime(projectBreed.getTransactionPairsSymbol());
ProjectBreedDto dto = new ProjectBreedDto();
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/PurchasingController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/PurchasingController.java
index 91c680a..8c41542 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/PurchasingController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/purchasing/PurchasingController.java
@@ -98,7 +98,7 @@
public Result update(@RequestBody @Valid PurchasingUpdateModel updateModel){
Purchasing purchasing= purchasingService.getById(updateModel.getId());
if (purchasing==null){
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
BeanUtils.copyProperties(updateModel,purchasing);
purchasingService.updateById(purchasing);
@@ -110,7 +110,7 @@
public Result delete(@RequestBody @Valid IdModel idModel){
Purchasing purchasing= purchasingService.getById(idModel.getId());
if (purchasing==null){
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
purchasingService.removeById(purchasing);
return Result.ok(null);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/robot/RobotController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/robot/RobotController.java
index 026a8d2..1e4d203 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/robot/RobotController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/robot/RobotController.java
@@ -94,7 +94,7 @@
public Result <String> save(@Valid @RequestBody RobotDTO robotDTO) {
String password = robotDTO.getPassword();
if(StringUtils.isEmptyString(password)){
- throw new YamiShopBindException("密码不能为空");
+ throw new YamiShopBindException("Password cannot be empty");
}
Robot robot = robotWrapper.toEntity(robotDTO);
@@ -108,7 +108,7 @@
//用户存在,并且不是机器人
Robot robot1 = robotService.getOne(new LambdaQueryWrapper<Robot>().eq(Robot::getUser, user.getUserId()));
if(robot1 == null){
- throw new YamiShopBindException("账号已存在");
+ throw new YamiShopBindException("Account already exists");
}
// robotService.getOne(robot);
// robot.getUser(user.getUserId());
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/service/impl/SysUserOperServiceImpl.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/service/impl/SysUserOperServiceImpl.java
index 77c119e..d0f3d8f 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/service/impl/SysUserOperServiceImpl.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/service/impl/SysUserOperServiceImpl.java
@@ -66,7 +66,7 @@
SysUser dbUser = sysUserService.getOne(new LambdaQueryWrapper<SysUser>()
.eq(SysUser::getUsername, userName));
if (dbUser != null) {
- throw new YamiShopBindException("该用户已存在");
+ throw new YamiShopBindException("User already exists");
}
List<SysRole> list = roleService.list(Wrappers.<SysRole>query()
.lambda().eq(SysRole::getRoleName, "代理商"));
@@ -91,11 +91,11 @@
public void restPassword(String password, String id) {
Agent agent = agentService.getById(id);
if (agent == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
User user = userService.getById(agent.getUserId());
if (user == null) {
- throw new YamiShopBindException("代理商不存在!");
+ throw new YamiShopBindException("Agent does not exist!");
}
user.setLoginPassword(passwordEncoder.encode(password));
userService.updateById(user);
@@ -124,12 +124,12 @@
public void unbindGoogleAuthCode(String id) {
Agent agent = agentService.getById(id);
if (agent == null) {
- throw new YamiShopBindException("参数错误");
+ throw new YamiShopBindException("Invalid parameters");
}
User user = userService.getById(agent.getUserId());
SysUser sysUser = sysUserService.getByUserName(user.getUserName());
if (sysUser == null) {
- throw new YamiShopBindException("参数错误");
+ throw new YamiShopBindException("Invalid parameters");
}
sysUser.setGoogleAuthSecret(null);
sysUser.setGoogleAuthBind(false);
@@ -151,12 +151,12 @@
public void bindGoogleAuthCode(String googleAuthSecret, String id) {
Agent agent = agentService.getById(id);
if (agent == null) {
- throw new YamiShopBindException("参数错误");
+ throw new YamiShopBindException("Invalid parameters");
}
User user = userService.getById(agent.getUserId());
SysUser sysUser = sysUserService.getByUserName(user.getUserName());
if (sysUser == null) {
- throw new YamiShopBindException("参数错误");
+ throw new YamiShopBindException("Invalid parameters");
}
sysUser.setGoogleAuthSecret(googleAuthSecret);
sysUser.setGoogleAuthBind(true);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/syspara/SysparaController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/syspara/SysparaController.java
index b439e95..cb63989 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/syspara/SysparaController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/syspara/SysparaController.java
@@ -176,7 +176,7 @@
throw new YamiShopBindException("The fund password cannot be blank");
}
if (StringUtils.isEmpty(sysparasDto.getSuper_google_auth_code())) {
- throw new YamiShopBindException("谷歌验证码不能为空");
+ throw new YamiShopBindException("Google Authenticator code is required");
}
}
@@ -184,19 +184,19 @@
private void verificationWithdraw(SysparasDto sysparasDto) {
if(StringUtils.isBlank(sysparasDto.getWithdraw_limit_num())){
- throw new YamiShopBindException("withdraw_limit_num不能为空");
+ throw new YamiShopBindException("withdraw_limit_num cannot be empty");
}
if(StringUtils.isBlank(sysparasDto.getWithdraw_limit())){
- throw new YamiShopBindException("withdraw_limit不能为空");
+ throw new YamiShopBindException("withdraw_limit cannot be empty");
}
if(StringUtils.isBlank(sysparasDto.getWithdraw_limit_turnover_percent())){
- throw new YamiShopBindException("withdraw_limit_turnover_percent不能为空");
+ throw new YamiShopBindException("withdraw_limit_turnover_percent cannot be empty");
}
if(StringUtils.isBlank(sysparasDto.getWithdraw_limit_max())){
- throw new YamiShopBindException("withdraw_limit_max不能为空");
+ throw new YamiShopBindException("withdraw_limit_max cannot be empty");
}
if(StringUtils.isBlank(sysparasDto.getWithdraw_limit_dapp())){
- throw new YamiShopBindException("withdraw_limit_dapp不能为空");
+ throw new YamiShopBindException("withdraw_limit_dapp cannot be empty");
}
double withdraw_limit_num = Double.valueOf(sysparasDto.getWithdraw_limit_num());
double withdraw_limit = Double.valueOf(sysparasDto.getWithdraw_limit());
@@ -207,23 +207,23 @@
double withdraw_limit_max = Double.valueOf(sysparasDto.getWithdraw_limit_max());
double withdraw_limit_dapp = Double.valueOf(sysparasDto.getWithdraw_limit_dapp());
if (withdraw_limit_num < 0) {
- throw new YamiShopBindException("每日可提现次数不得小于0");
+ throw new YamiShopBindException("Daily withdrawal count must not be less than 0");
}
if (withdraw_limit < 0) {
- throw new YamiShopBindException("提现最低金额不得小于0");
+ throw new YamiShopBindException("Minimum withdrawal amount must not be less than 0");
}
if (withdraw_limit_turnover_percent < 0) {
- throw new YamiShopBindException("提现限制流水按百分币不得小于0");
+ throw new YamiShopBindException("Withdrawal turnover percentage must not be less than 0");
}
if (StringUtils.isEmpty( withdraw_limit_time_min )) {
- throw new YamiShopBindException("最早提现时间不能为空");
+ throw new YamiShopBindException("Earliest withdrawal time cannot be empty");
}
if (StringUtils.isEmpty( withdraw_limit_time_max )) {
- throw new YamiShopBindException("最晚提现时间不能为空");
+ throw new YamiShopBindException("Latest withdrawal time cannot be empty");
}
if (withdraw_limit_dapp < 0) {
- throw new YamiShopBindException("最低提现额度不得小于0");
+ throw new YamiShopBindException("Minimum withdrawal limit must not be less than 0");
}
}
@@ -234,19 +234,19 @@
Double exchange_apply_order_sell_fee = Double.valueOf(sysparasDto.getExchange_apply_order_sell_fee());
Double futures_most_prfit_level = Double.valueOf(sysparasDto.getFutures_most_prfit_level());
if (recharge_limit_min < 0) {
- throw new YamiShopBindException("充值最低金额不得小于0");
+ throw new YamiShopBindException("Minimum recharge amount must not be less than 0");
}
if (recharge_limit_max < 0 || recharge_limit_max < recharge_limit_min) {
- throw new YamiShopBindException("充值最高金额不得小于0或小于充值最低金额");
+ throw new YamiShopBindException("Maximum recharge amount must not be less than 0 or less than the minimum recharge amount");
}
if (exchange_apply_order_buy_fee < 0) {
- throw new YamiShopBindException("币币交易买入手续费不得小于0");
+ throw new YamiShopBindException("Spot buy fee must not be less than 0");
}
if (exchange_apply_order_sell_fee < 0) {
- throw new YamiShopBindException("币币交易卖出手续费不得小于0");
+ throw new YamiShopBindException("Spot sell fee must not be less than 0");
}
if (futures_most_prfit_level < 0) {
- throw new YamiShopBindException("交割合约赢率不得小于0");
+ throw new YamiShopBindException("Delivery contract win rate must not be less than 0");
}
}
@@ -263,7 +263,7 @@
this.sysparaService.saveOrUpdate(syspara);
return Result.ok("修改成功");
} else {
- throw new YamiShopBindException("参数不存在");
+ throw new YamiShopBindException("Parameter does not exist");
}
}
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserController.java
index d62924e..3bb07ac 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserController.java
@@ -172,7 +172,7 @@
log.setLog("管理员手动退出用户登录状态,ip:[" + IPHelper.getIpAddr() + "]");
logService.save(log);
} catch (Exception e) {
- //throw new YamiShopBindException("操作失败!");
+ //throw new YamiShopBindException("Operation failed!");
}
return Result.ok(null);
}
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserDataController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserDataController.java
index b36c893..ad7e306 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserDataController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserDataController.java
@@ -85,7 +85,7 @@
public Result update(@Valid @RequestBody UpdateUserModel model) {
User user = userService.getById(model.getUserId());
if (user == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
user.setEnabled(model.isEnabled());
user.setRemarks(model.getRemarks());
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserRecomController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserRecomController.java
index 130d33a..959aef2 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserRecomController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserRecomController.java
@@ -69,15 +69,15 @@
model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword()));
SysUser sysUser = sysUserService.getSysUserById( SecurityUtils.getSysUser().getUserId());
if(!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) {
- throw new YamiShopBindException("资金密码不正确!");
+ throw new YamiShopBindException("Incorrect fund password!");
}
UserRecom userRecom= userRecomService.getById(model.getId());
if (userRecom==null){
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
User user=userService.findUserByUserCode(model.getUserCode());
if (user==null){
- throw new YamiShopBindException("推荐人UID错误");
+ throw new YamiShopBindException("Invalid referrer UID");
}
userRecom.setRecomUserId(user.getUserId());
userRecomService.updateById(userRecom);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/WithdrawController.java b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/WithdrawController.java
index e22e788..69d6ba5 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/WithdrawController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/WithdrawController.java
@@ -94,7 +94,7 @@
model.setSafeWord(passwordManager.decryptPassword(model.getSafeWord()));
SysUser user = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId());
if (passwordEncoder.matches(model.getSafeWord(), user.getSafePassword())) {
- throw new YamiShopBindException("资金密码不正确!");
+ throw new YamiShopBindException("Incorrect fund password!");
}
withdrawService.updateAddress(model.getId(), adminUserName, adminUserId, model.getChangeAfterAddress());
return Result.ok(null);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/facade/CustomerServiceImpl.java b/trading-order-admin/src/main/java/com/yami/trading/admin/facade/CustomerServiceImpl.java
index 279062d..4d720cf 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/facade/CustomerServiceImpl.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/facade/CustomerServiceImpl.java
@@ -72,11 +72,11 @@
public void updateCustomer(String autoAnswer, String remarks, int status, String id,String operator) {
Customer customer = getById(id);
if (customer == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
SysUser sysUser = sysUserService.getByUserName(customer.getUserName());
if (sysUser == null) {
- throw new YamiShopBindException("客服不存在!");
+ throw new YamiShopBindException("Customer service agent does not exist!");
}
sysUser.setStatus(status);
sysUser.setRemarks(remarks);
@@ -93,12 +93,12 @@
Customer customer = getById(id);
if (customer == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
SysUser sysUser = sysUserService.getByUserName(customer.getUserName());
SysUser userDB = BeanUtil.copyProperties(sysUser, SysUser.class);
if (sysUser == null) {
- throw new YamiShopBindException("客服不存在!");
+ throw new YamiShopBindException("Customer service agent does not exist!");
}
sysUser.setPassword(passwordEncoder.encode(password));
updateById(customer);
@@ -122,11 +122,11 @@
public void updateCustomerSafePassword(String safePassword, String id) {
Customer customer = getById(id);
if (customer == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
SysUser sysUser = sysUserService.getByUserName(customer.getUserName());
if (sysUser == null) {
- throw new YamiShopBindException("客服不存在!");
+ throw new YamiShopBindException("Customer service agent does not exist!");
}
sysUser.setSafePassword(passwordEncoder.encode(safePassword));
sysUserService.updateById(sysUser);
@@ -136,11 +136,11 @@
public void forceOffline(String id) {
Customer customer = getById(id);
if (customer == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
SysUser sysUser = sysUserService.getByUserName(customer.getUserName());
if (sysUser == null) {
- throw new YamiShopBindException("客服不存在!");
+ throw new YamiShopBindException("Customer service agent does not exist!");
}
customer.setOnlineState(0);
customer.setLastOfflineTime(new Date());
@@ -184,7 +184,7 @@
Date now = new Date();
SysUser sysUser = sysUserService.getByUserName(userName);
if (null != sysUser) {
- throw new YamiShopBindException("系统存在相同[系统登录名]!");
+ throw new YamiShopBindException("A user with the same system login name already exists!");
}
sysUser = new SysUser();
sysUser.setUsername(userName);
@@ -245,7 +245,7 @@
public void offline(String username) {
Customer customer = cacheByUsername(username);
if(customer==null) {
- throw new YamiShopBindException("客服不存在");
+ throw new YamiShopBindException("Customer service agent does not exist");
}
customer.setOnlineState(0);
customer.setLastOfflineTime(new Date());
@@ -254,7 +254,7 @@
public void online(String username) {
Customer customer = cacheByUsername(username);
if(customer==null) {
- throw new YamiShopBindException("客服不存在");
+ throw new YamiShopBindException("Customer service agent does not exist");
}
customer.setOnlineState(1);
customer.setLastOnlineTime(new Date());
@@ -271,7 +271,7 @@
// this.adminSystemUserService.update(user,newPassword,type,operatorUsername,loginSafeword,code,ip,superGoogleAuthCode);
Customer customer = cacheByUsername(user.getUsername());
if (customer==null){
- throw new YamiShopBindException("客服不存在!");
+ throw new YamiShopBindException("Customer service agent does not exist!");
}
String sourceAutoAnswer = customer.getAutoAnswer();
customer.setAutoAnswer(autoAnswer);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/facade/FuturesParaFacade.java b/trading-order-admin/src/main/java/com/yami/trading/admin/facade/FuturesParaFacade.java
index c9da4c4..f02f1f1 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/facade/FuturesParaFacade.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/facade/FuturesParaFacade.java
@@ -45,7 +45,7 @@
FuturesPara futuresById = futuresParaService.getById(id);
if (null == futuresById) {
log.info("futures is null ,id:{}", id);
- throw new YamiShopBindException("合约参数不存在");
+ throw new YamiShopBindException("Contract parameter does not exist");
}
logContent += MessageFormat.format(",管理员修改交割参数,币种:{0},原时间长度:{1},原时间单位:{2},原最低购买金额:{3},原手续费:{4},原浮动最小收益率:{5},原浮动最大收益率:{6}",
futuresById.getSymbol(), futuresById.getTimenum(), futuresById.getTimeunit(), futuresById.getUnitAmount(), futuresById.getUnitFee(), futuresById.getProfitRatio(), futuresById.getProfitRatioMax());
@@ -70,7 +70,7 @@
FuturesPara entity = futuresParaService.getById(id);
if (null == entity) {
- throw new YamiShopBindException("交易参数不存在");
+ throw new YamiShopBindException("Trading parameter does not exist");
}
String logContent = "ip:" + ip;
logContent += MessageFormat.format(",管理员删除交割参数,币种:{0},时间长度:{1},时间单位:{2},最低购买金额:{3},手续费:{4},浮动最小收益率:{5},浮动最大收益率:{6}",
diff --git a/trading-order-admin/src/main/java/com/yami/trading/admin/facade/ProfitAndLossConfigServiceFacade.java b/trading-order-admin/src/main/java/com/yami/trading/admin/facade/ProfitAndLossConfigServiceFacade.java
index f238ca0..1476f56 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/admin/facade/ProfitAndLossConfigServiceFacade.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/admin/facade/ProfitAndLossConfigServiceFacade.java
@@ -1,13 +1,16 @@
package com.yami.trading.admin.facade;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yami.trading.bean.future.domain.ProfitLossConfig;
+import com.yami.trading.bean.future.dto.ProfitLossConfigDTO;
+import com.yami.trading.bean.future.query.ProfitLossConfigQuery;
import com.yami.trading.bean.model.Log;
import com.yami.trading.bean.model.User;
import com.yami.trading.common.constants.Constants;
import com.yami.trading.service.future.ProfitLossConfigService;
import com.yami.trading.service.system.LogService;
import com.yami.trading.service.user.UserService;
-import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -22,8 +25,16 @@
@Autowired
private LogService logService;
@Autowired
- @Getter
private ProfitLossConfigService profitLossConfigService;
+
+ public IPage<ProfitLossConfigDTO> listRecord(Page<ProfitLossConfig> page, ProfitLossConfigQuery query) {
+ return profitLossConfigService.listRecord(page, query);
+ }
+
+ public ProfitLossConfig getById(String id) {
+ return profitLossConfigService.getById(id);
+ }
+
public void save(ProfitLossConfig entity, String operaterUsername) {
ProfitLossConfig profitAndLossConfig = profitLossConfigService.findByPartyId(entity.getPartyId());
// 如果存在则更新
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApGoogleAuthController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApGoogleAuthController.java
index 2843a2b..d928f20 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApGoogleAuthController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApGoogleAuthController.java
@@ -63,7 +63,7 @@
if (flag) {
User user = userService.getById(userId);
if (user.isGoogleAuthBind()) {
- throw new YamiShopBindException("谷歌验证码已绑定");
+ throw new YamiShopBindException("Google Authenticator is already bound");
}
user.setGoogleAuthBind(true);
user.setGoogleAuthSecret(model.getSecret());
@@ -75,7 +75,7 @@
map.put("google_auth_bind",true);
return Result.succeed(map);
} else {
- throw new YamiShopBindException("谷歌验证码错误");
+ throw new YamiShopBindException("Incorrect Google Authenticator code");
}
}
}
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiBankCardController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiBankCardController.java
index 585e685..d1f0857 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiBankCardController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiBankCardController.java
@@ -87,7 +87,7 @@
if (null == cpmMap || 0 == cpmMap.size()) {
// TODO: 2023/4/16
- throw new YamiShopBindException("支付方式不存在");
+ throw new YamiShopBindException("Payment method does not exist");
}
List<String> cpmList = new ArrayList<String>();
for (String key : cpmMap.keySet()) {
@@ -232,15 +232,15 @@
Object object = this.sessionTokenService.cacheGet(session_token);
this.sessionTokenService.del(session_token);
if (null == object || !userId.equals((String) object)) {
- throw new YamiShopBindException("请稍后再试");
+ throw new YamiShopBindException("Please try again later");
}
String partyId = SecurityUtils.getUser().getUserId();
if (null == partyId) {
- throw new YamiShopBindException("请重新登录");
+ throw new YamiShopBindException("Please log in again");
}
User party = userService.getById(partyId);
if (Constants.SECURITY_ROLE_TEST.equals(party.getRoleName())) {
- throw new YamiShopBindException("无权限");
+ throw new YamiShopBindException("Permission denied");
}
if (!party.isEnabled()) {
throw new YamiShopBindException("User is locked");
@@ -272,7 +272,7 @@
party_kyc=new RealNameAuthRecord();
}
if (!(party_kyc.getStatus() == 2) && "true".equals(this.sysparaService.find("withdraw_by_kyc").getSvalue())) {
- throw new YamiShopBindException("无权限");
+ throw new YamiShopBindException("Permission denied");
}
HighLevelAuthRecord party_kycHighLevel = highLevelAuthRecordService.findByUserId(partyId);
if (party_kycHighLevel==null){
@@ -280,7 +280,7 @@
}
double withdraw_by_high_kyc = Double.valueOf(this.sysparaService.find("withdraw_by_high_kyc").getSvalue());
if (withdraw_by_high_kyc > 0 && coin_amount_double > withdraw_by_high_kyc && !(party_kycHighLevel.getStatus() == 2)) {
- throw new YamiShopBindException("请先通过高级认证");
+ throw new YamiShopBindException("Please complete advanced verification first");
}
// if (!party.getWithdraw_authority()) {
// throw new BusinessException(1, "无权限");
@@ -390,7 +390,7 @@
// 流水小于限额
if (userdata_turnover < party_withdraw) {
fact_withdraw_amount = Arith.sub(party_withdraw, userdata_turnover);
- throw new YamiShopBindException("流水小于限额");
+ throw new YamiShopBindException("Turnover is below the limit");
}
}
if ("2".equals(withdraw_limit_open_use_type)) {
@@ -421,13 +421,13 @@
Object obj1 = this.sysparaService.find("bank_card_order_cancel_day_times");
if (null != obj1) {
if (orderCancelDayTimes >= Integer.valueOf(this.sysparaService.find("bank_card_order_cancel_day_times").getSvalue()).intValue()) {
- throw new YamiShopBindException("今日取消订单次数太多了,请明日再试");
+ throw new YamiShopBindException("Too many order cancellations today, please try again tomorrow");
}
}
DecimalFormat df = new DecimalFormat("#.########");
ExchangeRate ex = this.exchangeRateService.findBy(Constants.OUT_OR_IN_DEFAULT, currency.toUpperCase());
if (null == ex) {
- throw new YamiShopBindException("支付币种不正确");
+ throw new YamiShopBindException("Invalid payment currency");
}
C2cOrder c2cOrder = new C2cOrder();
c2cOrder.setPartyId(party.getUserId());
@@ -458,20 +458,20 @@
public Result orderCancel(String order_no, String remark) {
User party = userService.getById(SecurityUtils.getUser().getUserId());
if (Constants.SECURITY_ROLE_TEST.equals(party.getRoleName())) {
- throw new YamiShopBindException("无权限");
+ throw new YamiShopBindException("Permission denied");
}
if (!party.isEnabled()) {
throw new YamiShopBindException("User is locked");
}
C2cOrder order = this.c2cOrderService.get(order_no);
if (null == order || !order.getPartyId().equals(SecurityUtils.getUser().getUserId())) {
- throw new YamiShopBindException("订单不存在");
+ throw new YamiShopBindException("Order does not exist");
}
order.setRemark(remark);
// 用户不能取消提现
if (SecurityUtils.getUser().getUserId().equals(order.getPartyId())) {
if ("withdraw".equals(order.getDirection())) {
- throw new YamiShopBindException("用户不能取消提现");
+ throw new YamiShopBindException("User cannot cancel withdrawal");
}
this.c2cOrderService.saveOrderCancel(order, "user");
}
@@ -486,7 +486,7 @@
public Result get(@RequestParam String order_no, @RequestParam String language) {
C2cOrder c2cOrder = this.c2cOrderService.get(order_no);
if (null == c2cOrder) {
- throw new YamiShopBindException("订单不存在");
+ throw new YamiShopBindException("Order does not exist");
}
List<String> nos = new ArrayList<String>();
nos.add(c2cOrder.getOrderNo());
@@ -548,23 +548,23 @@
public Result list(String page_no, String direction, String state) {
String partyId = SecurityUtils.getUser().getUserId();
if (null == partyId) {
- throw new YamiShopBindException("请重新登录");
+ throw new YamiShopBindException("Please log in again");
}
if (StringUtils.isNullOrEmpty(page_no)) {
page_no = "1";
}
if (!StringUtils.isInteger(page_no)) {
- throw new YamiShopBindException("页码不是整数");
+ throw new YamiShopBindException("Page number must be an integer");
}
if (Integer.valueOf(page_no).intValue() <= 0) {
- throw new YamiShopBindException("页码不能小于等于0");
+ throw new YamiShopBindException("Page number must be greater than 0");
}
int page_no_int = Integer.valueOf(page_no).intValue();
if (StringUtils.isNotEmpty(direction) && !Arrays.asList("recharge", "withdraw").contains(direction)) {
- throw new YamiShopBindException("充值或提现不正确");
+ throw new YamiShopBindException("Invalid deposit or withdrawal type");
}
if (StringUtils.isNotEmpty(state) && !Arrays.asList("0", "3", "4").contains(state)) {
- throw new YamiShopBindException("订单状态不正确");
+ throw new YamiShopBindException("Invalid order status");
}
Page page = this.c2cOrderService.pagedQuery(page_no_int, 20, direction, state, partyId);
if (null == page) {
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cAdvertController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cAdvertController.java
index 4dacfb4..f5dcbb8 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cAdvertController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cAdvertController.java
@@ -159,17 +159,17 @@
page_no = "1";
}
if (!StringUtils.isInteger(page_no)) {
- throw new YamiShopBindException("页码不是整数");
+ throw new YamiShopBindException("Page number must be an integer");
}
if (Integer.valueOf(page_no).intValue() <= 0) {
- throw new YamiShopBindException("页码不能小于等于0");
+ throw new YamiShopBindException("Page number must be greater than 0");
}
int page_no_int = Integer.valueOf(page_no).intValue();
String partyId = SecurityUtils.getUser().getUserId();
String c2cUserId = "";
User party = userService.getById(partyId);
if (null == party) {
- throw new YamiShopBindException("用户不存在");
+ throw new YamiShopBindException("User does not exist");
}
if (Arrays.asList(1, 2).contains(party.getC2cUserType())) {
C2cUser c2cUser = c2cUserService.getByPartyId(partyId);
@@ -451,19 +451,19 @@
String id = request.getParameter("id");
String language = request.getParameter("language");
if (StringUtils.isEmptyString(id)) {
- throw new YamiShopBindException("C2C广告id不正确");
+ throw new YamiShopBindException("Invalid C2C advertisement ID");
}
C2cAdvert c2cAdvert = c2cAdvertService.getById(id);
if (null == c2cAdvert) {
- throw new YamiShopBindException("广告不存在");
+ throw new YamiShopBindException("Advertisement does not exist");
}
C2cUser c2cUser = this.c2cUserService.getById(c2cAdvert.getC2cUserId());
if (null == c2cUser) {
- throw new YamiShopBindException("承兑商不存在");
+ throw new YamiShopBindException("Merchant does not exist");
}
User c2cParty = userService.getById(c2cUser.getC2cUserPartyId());
if (null == c2cParty) {
- throw new YamiShopBindException("承兑商的用户信息不存在");
+ throw new YamiShopBindException("Merchant user info does not exist");
}
Map<String, String> data = new HashMap<String, String>();
data.put("id", c2cAdvert.getUuid().toString());
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cAppealController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cAppealController.java
index bcea1e4..7cb5e8b 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cAppealController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cAppealController.java
@@ -53,22 +53,22 @@
String name = request.getParameter("name");
String phone = request.getParameter("phone");
if (StringUtils.isEmptyString(order_no)) {
- throw new YamiShopBindException("申诉订单号不正确");
+ throw new YamiShopBindException("Invalid appeal order number");
}
if (StringUtils.isEmptyString(reason)) {
- throw new YamiShopBindException("请输入申诉原因");
+ throw new YamiShopBindException("Please enter appeal reason");
}
if (StringUtils.isEmptyString(img)) {
- throw new YamiShopBindException("请上传申诉凭证");
+ throw new YamiShopBindException("Please upload appeal evidence");
}
String partyId = SecurityUtils.getUser().getUserId();
C2cOrder order = this.c2cOrderService.get(order_no);
if (null == order || !partyId.equals(order.getPartyId())) {
- throw new YamiShopBindException("订单不存在");
+ throw new YamiShopBindException("Order does not exist");
}
C2cAppeal appeal = this.c2cAppealService.findByOrderNo(order_no);
if (null != appeal) {
- throw new YamiShopBindException("该订单已提交申诉");
+ throw new YamiShopBindException("Appeal already submitted for this order");
}
C2cAppeal entity = new C2cAppeal();
entity.setOrderNo(order_no);
@@ -97,11 +97,11 @@
public Result get(HttpServletRequest request) throws IOException {
String order_no = request.getParameter("order_no");
if (StringUtils.isEmptyString(order_no)) {
- throw new YamiShopBindException("申诉订单号不正确");
+ throw new YamiShopBindException("Invalid appeal order number");
}
C2cAppeal c2cAppeal = this.c2cAppealService.findByOrderNo(order_no);
if (null == c2cAppeal) {
- throw new YamiShopBindException("申诉不存在");
+ throw new YamiShopBindException("Appeal does not exist");
}
if (StringUtils.isNotEmpty(c2cAppeal.getImg())) {
String path = Constants.IMAGES_HTTP+c2cAppeal.getImg();
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..b9082c0 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("Open order limit reached");
}
}
@@ -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 order cancellations today, please 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";
}
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cUserController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cUserController.java
index 9e43987..943de1d 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cUserController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiC2cUserController.java
@@ -86,7 +86,7 @@
User party = userService.getById(c2cUser.getC2cUserPartyId());
if (null == party) {
- throw new YamiShopBindException("承兑商的用户信息不存在");
+ throw new YamiShopBindException("Merchant user info does not exist");
}
DecimalFormat df = new DecimalFormat("#.########");
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiCapitaltWalletWalletController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiCapitaltWalletWalletController.java
index c6ab84a..d0c197f 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiCapitaltWalletWalletController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiCapitaltWalletWalletController.java
@@ -77,7 +77,7 @@
public Result updateWallt(@Valid TransferModel model) {
String partyId = SecurityUtils.getCurrentUserId();
if(!StringUtils.isNotEmpty(partyId)){
- throw new YamiShopBindException("请登录!");
+ throw new YamiShopBindException("Please log in!");
}
return capitaltWalletService.updateWallt(partyId,model.getDeductAccount(),model.getReceiveAccount(),model.getMoneyRevise());
}
@@ -87,7 +87,7 @@
public Result updateWallt() {
String partyId = SecurityUtils.getCurrentUserId();
if(!StringUtils.isNotEmpty(partyId)){
- throw new YamiShopBindException("请登录!");
+ throw new YamiShopBindException("Please log in!");
}
// 获取合约账户(contract)
Wallet wallet = walletService.saveWalletByPartyId(partyId);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiContractApplyOrderController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiContractApplyOrderController.java
index c012b4b..ea705da 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiContractApplyOrderController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiContractApplyOrderController.java
@@ -203,7 +203,7 @@
lockAcquired = rLock.tryLock(5, TimeUnit.SECONDS);
if (!lockAcquired) {
log.warn("无法获取锁: contract_open_{}", partyId);
- throw new YamiShopBindException("请稍后再试");
+ throw new YamiShopBindException("Please try again later");
}
//判断下单金额是否符合最低金额 最低下单张数:0.01
//合约张数 张数=保证金*杠杆倍数/(面值*最新成交价)
@@ -212,7 +212,7 @@
if (amount.compareTo(new BigDecimal(faceValue)) < 0) {
double minimumAmount = minAmount * faceValue * openAction.getPrice().doubleValue() / openAction.getLever_rate().doubleValue();
double roundedAmount = Math.ceil(minimumAmount * 10000) / 10000;
- throw new YamiShopBindException("最低下单金额:"+roundedAmount);
+ throw new YamiShopBindException("Minimum order amount: " + roundedAmount);
}
// 校验当前用户订单状态
@@ -232,7 +232,7 @@
throw e; // 重新抛出自定义异常
} catch (Exception e) {
log.error("系统异常: {}", e.getMessage(), e);
- throw new YamiShopBindException("操作失败,请稍后再试");
+ throw new YamiShopBindException("Operation failed, please try again later");
} finally {
// 确保释放锁
if (lockAcquired && rLock.isHeldByCurrentThread()) {
@@ -276,7 +276,7 @@
String[] stopUsers = stopUserInternet.split(",");
User user = userService.getById(partyId);
if (Arrays.asList(stopUsers).contains(user.getUserName())) {
- throw new YamiShopBindException("无网络");
+ throw new YamiShopBindException("No network connection");
}
}
}
@@ -312,7 +312,7 @@
RLock rLock = redissonClient.getLock("contract_close_" + partyId);
boolean lockResult = rLock.tryLock(5, TimeUnit.SECONDS);
if (!lockResult) {
- throw new YamiShopBindException("请稍后再试");
+ throw new YamiShopBindException("Please try again later");
}
try {
User user = userService.getById(partyId);
@@ -329,7 +329,7 @@
System.out.println("stopUserInternet = " + stopUserInternet);
if(Arrays.asList(stopUsers).contains(user.getUserName())){
- throw new YamiShopBindException("无网络");
+ throw new YamiShopBindException("No network connection");
}
}
@@ -400,7 +400,7 @@
ContractApplyOrder order = this.contractApplyOrderService.findByOrderNo(order_no);
if (order == null) {
- throw new YamiShopBindException("委托单不存在");
+ throw new YamiShopBindException("Order does not exist");
}
Map<String, Object> map = new HashMap<String, Object>();
map.put("order_no", order.getOrderNo());
@@ -449,7 +449,7 @@
} catch (Exception e) {
log.error("执行撤单异常", e);
- throw new YamiShopBindException("执行撤单异常");
+ throw new YamiShopBindException("Failed to cancel order");
}
return Result.succeed(null,"success");
@@ -467,7 +467,7 @@
} catch (Exception e) {
log.error("执行撤单异常", e);
- throw new YamiShopBindException("执行撤单异常");
+ throw new YamiShopBindException("Failed to cancel order");
}
return Result.succeed(null,"success");
@@ -558,10 +558,10 @@
Page<ContractApplyOrder> result = contractApplyOrderService.findList(page, SecurityUtils.getUser().getUserId(), type, symbolType);
List<ContractApplyOrder> datas = result.getRecords();
if (!StringUtils.isInteger(page_no)) {
- throw new YamiShopBindException("页码不是整数");
+ throw new YamiShopBindException("Page number must be an integer");
}
if (Integer.valueOf(page_no).intValue() <= 0) {
- throw new YamiShopBindException("页码不能小于等于0");
+ throw new YamiShopBindException("Page number must be greater than 0");
}
Long count = 0L;
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiContractOrderController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiContractOrderController.java
index 65c5b1f..e1f7ee9 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiContractOrderController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiContractOrderController.java
@@ -79,7 +79,7 @@
}
} catch (Exception e) {
log.error("追加保证金异常", e);
- throw new YamiShopBindException("追加保证金异常");
+ throw new YamiShopBindException("Failed to add margin");
}
return Result.succeed("success");
}
@@ -97,7 +97,7 @@
}
} catch (Exception e) {
log.error("追加保证金异常", e);
- throw new YamiShopBindException("追加保证金异常");
+ throw new YamiShopBindException("Failed to add margin");
}
return Result.succeed("success");
}
@@ -215,7 +215,7 @@
if (null == order) {
log.info("contractOrder!get order_no:" + order_no + ", order null");
- throw new YamiShopBindException("订单不存在");
+ throw new YamiShopBindException("Order does not exist");
}
return Result.ok(this.contractOrderService.bulidOne(order));
@@ -256,10 +256,10 @@
}
if (!StringUtils.isInteger(page_no)) {
- throw new YamiShopBindException("页码不是整数");
+ throw new YamiShopBindException("Page number must be an integer");
}
if (Integer.valueOf(page_no).intValue() <= 0) {
- throw new YamiShopBindException("页码不能小于等于0");
+ throw new YamiShopBindException("Page number must be greater than 0");
}
String partyId = SecurityUtils.getCurrentUserId();
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiFuturesOrderController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiFuturesOrderController.java
index 04fb253..e63c161 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiFuturesOrderController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiFuturesOrderController.java
@@ -75,7 +75,7 @@
Map<String, Object> data = new HashMap<>();
Item bySymbol = itemService.findBySymbol(symbol);
if(bySymbol == null){
- throw new YamiShopBindException("当前币对不存在");
+ throw new YamiShopBindException("Trading pair does not exist");
}
List<Map<String,Object>> futuresParas = new ArrayList<>();
for (FuturesPara para : this.futuresParaService.getBySymbolSort(symbol)) {
@@ -142,19 +142,19 @@
public Result<Map<String, String>> open(FutureOpenAction futureOpenAction) {
Item bySymbol = itemService.findBySymbol(futureOpenAction.getSymbol());
if(bySymbol == null){
- throw new YamiShopBindException("当前币对不存在");
+ throw new YamiShopBindException("Trading pair does not exist");
}
if (!itemService.isContractTrading(bySymbol)) {
- throw new YamiShopBindException("未开放合约交易");
+ throw new YamiShopBindException("Contract trading is not enabled");
}
/*if (itemService.isSuspended(bySymbol.getSymbol())) {
- throw new YamiShopBindException("停牌禁止交易");
+ throw new YamiShopBindException("Trading suspended");
}*/
boolean isOpen = MarketOpenChecker.isMarketOpenByItemCloseType(bySymbol.getOpenCloseType());
if(!isOpen){
- throw new YamiShopBindException("当前已经休市");
+ throw new YamiShopBindException("Market is currently closed");
}
String partyId = SecurityUtils.getUser().getUserId();
boolean lock = false;
@@ -163,7 +163,7 @@
Map<String, String> data = new HashMap<String, String>();
if (!FuturesLock.add(partyId)) {
- throw new YamiShopBindException("请稍后再试");
+ throw new YamiShopBindException("Please try again later");
}
lock = true;
@@ -240,7 +240,7 @@
FuturesOrder order = this.futuresOrderService.cacheByOrderNo(order_no);
if (null == order) {
log.info("futuresOrder!get order_no:" + order_no + ", order null");
- throw new YamiShopBindException("订单不存在");
+ throw new YamiShopBindException("Order does not exist");
}
return Result.succeed(this.futuresOrderService.bulidOne(order));
}
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiHighLevelAuthController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiHighLevelAuthController.java
index 372890c..ed534f5 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiHighLevelAuthController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiHighLevelAuthController.java
@@ -48,7 +48,7 @@
public Result applyHighLevelAuth(@Valid ApplyHighLevelAuthModel model) {
User user = userCacheService.currentUser();
if (!realNameAuthRecordService.isPass(user.getUserId())) {
- throw new YamiShopBindException("实名认证未通过,无法进行高级认证");
+ throw new YamiShopBindException("Identity verification not passed, advanced verification unavailable");
}
HighLevelAuthRecord highLevelAuthRecord = highLevelAuthRecordService.findByUserId(user.getUserId());
if (highLevelAuthRecord != null) {
@@ -85,34 +85,34 @@
if (StrUtil.isNotBlank(model.getWork_place())){
if ( model.getWork_place().length()>245){
- throw new YamiShopBindException("工作地址长度超过245");
+ throw new YamiShopBindException("Work address exceeds 245 characters");
}
}
if (StrUtil.isNotBlank(model.getHome_place())){
if ( model.getHome_place().length()>245){
- throw new YamiShopBindException("家庭地址长度超过245");
+ throw new YamiShopBindException("Home address exceeds 245 characters");
}
}
if (StrUtil.isNotBlank(model.getRelatives_relation())){
if ( model.getRelatives_relation().length()>32){
- throw new YamiShopBindException("亲属电话长度超过32");
+ throw new YamiShopBindException("Relative phone exceeds 32 characters");
}
}
if (StrUtil.isNotBlank(model.getRelatives_name())){
if ( model.getRelatives_name().length()>32){
- throw new YamiShopBindException("亲属名称长度超过32");
+ throw new YamiShopBindException("Relative name exceeds 32 characters");
}
}
if (StrUtil.isNotBlank(model.getRelatives_place())){
if ( model.getRelatives_place().length()>245){
- throw new YamiShopBindException("亲属地址长度超过245");
+ throw new YamiShopBindException("Relative address exceeds 245 characters");
}
}
if (StrUtil.isNotBlank(model.getRelatives_phone())){
if ( model.getRelatives_phone().length()>32){
- throw new YamiShopBindException("亲属电话长度超过32");
+ throw new YamiShopBindException("Relative phone exceeds 32 characters");
}
}
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiIcoController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiIcoController.java
index bc94e2b..aff11d0 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiIcoController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiIcoController.java
@@ -64,7 +64,7 @@
public Result<String> subscribe(@Valid UserSubscription model) {
String partyId = SecurityUtils.getUser().getUserId();
if (StringUtils.isEmpty(partyId)) {
- throw new YamiShopBindException("请重新登录");
+ throw new YamiShopBindException("Please log in again");
}
RLock rLock = redissonClient.getLock("subscribe" + partyId);
boolean lockAcquired = false;
@@ -73,7 +73,7 @@
lockAcquired = rLock.tryLock(5, TimeUnit.SECONDS);
if (!lockAcquired) {
log.warn("无法获取锁: subscribe{}", partyId);
- throw new YamiShopBindException("请稍后再试");
+ throw new YamiShopBindException("Please try again later");
}
model.setUserId(partyId);
return icoService.subscribe(model);
@@ -82,7 +82,7 @@
throw e; // 重新抛出自定义异常
} catch (Exception e) {
log.error("系统异常: {}", e.getMessage(), e);
- throw new YamiShopBindException("操作失败,请稍后再试");
+ throw new YamiShopBindException("Operation failed, please try again later");
} finally {
// 确保释放锁
if (lockAcquired && rLock.isHeldByCurrentThread()) {
@@ -97,7 +97,7 @@
QueryWrapper queryWrapper = QueryWrapperGenerator.buildQueryCondition (icoQuery, IcoQuery.class);
String partyId = SecurityUtils.getUser().getUserId();
if (StringUtils.isEmpty(partyId)) {
- throw new YamiShopBindException("请重新登录");
+ throw new YamiShopBindException("Please log in again");
}
queryWrapper.eq("u.user_id", partyId);
queryWrapper.orderByDesc("created_at");
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiIndexController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiIndexController.java
index a1ff910..066984c 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiIndexController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiIndexController.java
@@ -89,7 +89,7 @@
user= userService.findByUserName(mobileOrUserName);
}
if (user==null){
- throw new YamiShopBindException("账号或密码不正确");
+ throw new YamiShopBindException("Incorrect username or password");
}
// 半小时内密码输入错误十次,已限制登录30分钟
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiItemController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiItemController.java
index 938455d..3161e61 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiItemController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiItemController.java
@@ -72,7 +72,7 @@
bySymbol.transName();
}
if (bySymbol == null) {
- throw new YamiShopBindException(symbol + " 不存在");
+ throw new YamiShopBindException(symbol + " does not exist");
}
List<StocksDto> stocks = findRealTimeByBoard(symbol);
RelatedStocksDto relatedStocksDto = new RelatedStocksDto(symbol, stocks);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiItemUserOptionalController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiItemUserOptionalController.java
index e45bc29..23a5c6d 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiItemUserOptionalController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiItemUserOptionalController.java
@@ -70,7 +70,7 @@
queryWrapper.eq("symbol", symbol);
long count = itemUserOptionalService.count(queryWrapper);
if(count > 0 ){
- throw new YamiShopBindException("当前已经加入过自选");
+ throw new YamiShopBindException("Already added to favorites");
}
@@ -80,11 +80,11 @@
entity.setSymbol(symbol);
itemUserOptionalService.save(entity);
}else {
- throw new YamiShopBindException("请稍后再试");
+ throw new YamiShopBindException("Please try again later");
}
} catch (Exception e) {
log.error("保存自选失败", e);
- throw new YamiShopBindException("保存自选失败:"+ e.getMessage());
+ throw new YamiShopBindException("Failed to save favorites: " + e.getMessage());
}finally {
if (lock) {
ThreadUtils.sleep(50);
@@ -110,11 +110,11 @@
queryWrapper.eq("symbol", symbol);
itemUserOptionalService.remove(queryWrapper);
}else {
- throw new YamiShopBindException("请稍后再试");
+ throw new YamiShopBindException("Please try again later");
}
} catch (Exception e) {
log.error("删除失败", e);
- throw new YamiShopBindException("删除失败");
+ throw new YamiShopBindException("Deletion failed");
} finally {
if (lock) {
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiKycController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiKycController.java
index d019921..d8f9581 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiKycController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiKycController.java
@@ -125,10 +125,10 @@
// }
//
// if (model.getIdNumber().length()>50){
-// throw new YamiShopBindException("证件号码长度超过50");
+// throw new YamiShopBindException("ID number exceeds 50 characters");
// }
// if (model.getName().length()>50){
-// throw new YamiShopBindException("实名姓名长度超过50");
+// throw new YamiShopBindException("Real name exceeds 50 characters");
// }
// BeanUtils.copyProperties(model, realNameAuthRecord);
// realNameAuthRecord.setUserId(user.getUserId());
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiNewsController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiNewsController.java
index cc75590..e5a33d2 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiNewsController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiNewsController.java
@@ -81,10 +81,10 @@
page_no = "1";
}
if (!StringUtils.isInteger(page_no)) {
- throw new YamiShopBindException("页码不是整数");
+ throw new YamiShopBindException("Page number must be an integer");
}
if (Integer.valueOf(page_no).intValue() <= 0) {
- throw new YamiShopBindException("页码不能小于等于0");
+ throw new YamiShopBindException("Page number must be greater than 0");
}
int page_no_int = Integer.valueOf(page_no).intValue();
Page<News> page = new Page<>(1, 1000000);
@@ -136,10 +136,10 @@
page_no = "1";
}
if (!StringUtils.isInteger(page_no)) {
- throw new YamiShopBindException("页码不是整数");
+ throw new YamiShopBindException("Page number must be an integer");
}
if (Integer.valueOf(page_no).intValue() <= 0) {
- throw new YamiShopBindException("页码不能小于等于0");
+ throw new YamiShopBindException("Page number must be greater than 0");
}
int page_no_int = Integer.valueOf(page_no).intValue();
List<News> list = new ArrayList<News>();
@@ -183,10 +183,10 @@
page_no = "1";
}
if (!StringUtils.isInteger(page_no)) {
- throw new YamiShopBindException("页码不是整数");
+ throw new YamiShopBindException("Page number must be an integer");
}
if (Integer.valueOf(page_no).intValue() <= 0) {
- throw new YamiShopBindException("页码不能小于等于0");
+ throw new YamiShopBindException("Page number must be greater than 0");
}
int page_no_int = Integer.valueOf(page_no).intValue();
List<News> list = new ArrayList<News>();
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiOtcOnlineChatController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiOtcOnlineChatController.java
index 23ad854..d75c964 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiOtcOnlineChatController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiOtcOnlineChatController.java
@@ -107,7 +107,7 @@
}
if(StringUtils.isEmptyString(orderNo)) {
- throw new YamiShopBindException("订单号不能未空");
+ throw new YamiShopBindException("Order number cannot be empty");
}
otcOnlineChatMessageService.saveSend(SecurityUtils.getCurrentUserId(), type, content, null, orderNo);
@@ -130,7 +130,7 @@
int unreadMsg = 0;
String orderNo = request.getParameter("orderNo");
if(StringUtils.isEmptyString(orderNo)) {
- throw new YamiShopBindException("订单号不能未空");
+ throw new YamiShopBindException("Order number cannot be empty");
}
unreadMsg = otcOnlineChatMessageService.unreadMsg(orderNo, SecurityUtils.getCurrentUserId());
resultObject.setData(unreadMsg);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiPaymentMethod2Controller.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiPaymentMethod2Controller.java
index cea29af..a3a1618 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiPaymentMethod2Controller.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiPaymentMethod2Controller.java
@@ -115,7 +115,7 @@
String id = request.getParameter("id");
List<C2cOrder> order = c2cOrderService.getByPayId(id);
if (ObjectUtils.isNotEmpty(order)) {
- throw new YamiShopBindException("当前支付方式有未处理完成的订单!");
+ throw new YamiShopBindException("Current payment method has pending orders!");
}
this.c2cPaymentMethodService.removeById(id);
return Result.succeed();
@@ -385,15 +385,15 @@
String id = request.getParameter("id");
String language = request.getParameter("language");
if (StringUtils.isEmptyString(id)) {
- throw new YamiShopBindException("广告id不正确");
+ throw new YamiShopBindException("Invalid advertisement ID");
}
C2cAdvert c2cAdvert = c2cAdvertService.getById(id);
if (null == c2cAdvert) {
- throw new YamiShopBindException("广告不存在");
+ throw new YamiShopBindException("Advertisement does not exist");
}
C2cUser c2cUser = this.c2cUserService.getById(c2cAdvert.getC2cUserId());
if (null == c2cUser) {
- throw new YamiShopBindException("承兑商不存在");
+ throw new YamiShopBindException("Merchant does not exist");
}
List<C2cPaymentMethod> list = new ArrayList<C2cPaymentMethod>();
Map<String, C2cPaymentMethod> map = this.c2cPaymentMethodService.getByPartyId(c2cUser.getC2cUserPartyId());
@@ -405,7 +405,7 @@
}
}
if (null == list || 0 == list.size()) {
- throw new YamiShopBindException("承兑商支付方式未配置");
+ throw new YamiShopBindException("Merchant payment method not configured");
}
String[] payTypes = c2cAdvert.getPayType().split(",");
List<C2cPaymentMethod> resList = new ArrayList<C2cPaymentMethod>();
@@ -419,7 +419,7 @@
}
}
if (null == resList || 0 == resList.size()) {
- throw new YamiShopBindException("承兑商广告支付方式未配置");
+ throw new YamiShopBindException("Merchant advertisement payment method not configured");
}
for (int i = 0; i < resList.size(); i++) {
C2cPaymentMethod method = resList.get(i);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiPaymentMethodController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiPaymentMethodController.java
index a706469..07651cc 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiPaymentMethodController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiPaymentMethodController.java
@@ -80,52 +80,52 @@
public Result<?> add(@Valid AddPaymentMethodModel model) {
String language = ServletUtil.getRequest().getParameter("language");
if (StringUtils.isNullOrEmpty(model.getMethod_config_id())) {
- throw new YamiShopBindException("支付方式模板不正确");
+ throw new YamiShopBindException("Invalid payment method template");
}
if (StringUtils.isNullOrEmpty(model.getReal_name())) {
- throw new YamiShopBindException("真实姓名必填");
+ throw new YamiShopBindException("Real name is required");
}
if (StringUtils.isNullOrEmpty(model.getParam_value1())) {
- throw new YamiShopBindException("参数值1必填");
+ throw new YamiShopBindException("Parameter value 1 is required");
}
if (model.getReal_name().length() > 20) {
if (language.equals("zh-CN")) {
- throw new YamiShopBindException("真实姓名长度大于20");
+ throw new YamiShopBindException("Real name exceeds 20 characters");
} else {
throw new YamiShopBindException("Real name length greater than 20");
}
}
if (model.getRemark().length() > 100) {
if (language.equals("zh-CN")) {
- throw new YamiShopBindException("备注长度大于100");
+ throw new YamiShopBindException("Remark exceeds 100 characters");
} else {
throw new YamiShopBindException("Note length greater than 100");
}
}
C2cPaymentMethodConfig methodConfig = c2cPaymentMethodConfigService.getById(model.getMethod_config_id());
if (null == methodConfig) {
- throw new YamiShopBindException("支付方式模板不存在");
+ throw new YamiShopBindException("Payment method template does not exist");
}
if (!StrUtil.isEmpty(model.getParam_value1())) {
if (model.getParam_value1().length() > 25) {
- throw new YamiShopBindException(methodConfig.getParamName1() + "长度大于25");
+ throw new YamiShopBindException(methodConfig.getParamName1() + " exceeds 25 characters");
}
}
if (!StrUtil.isEmpty(model.getParam_value2())) {
if (model.getParam_value2().length() > 25) {
- throw new YamiShopBindException(methodConfig.getParamName2() + "长度大于25");
+ throw new YamiShopBindException(methodConfig.getParamName2() + " exceeds 25 characters");
}
}
String partyId = SecurityUtils.getUser().getUserId();
if (null == partyId) {
- throw new YamiShopBindException("请重新登录");
+ throw new YamiShopBindException("Please log in again");
}
// C2C用户和承兑商添加支付方式最大数量
Map<String, C2cPaymentMethod> methodMap = c2cPaymentMethodService.getByPartyId(partyId);
Object obj = this.sysparaService.find("c2c_payment_method_count_max");
if (null != obj) {
if (methodMap.size() >= Integer.valueOf(this.sysparaService.find("c2c_payment_method_count_max").getSvalue()).intValue()) {
- throw new YamiShopBindException("支付方式数量已达上限");
+ throw new YamiShopBindException("Payment method limit reached");
}
}
C2cPaymentMethod method = new C2cPaymentMethod();
@@ -207,32 +207,32 @@
public Result<?> update(@Valid AddPaymentMethodModel model) {
String language = ServletUtil.getRequest().getParameter("language");
if (StringUtils.isNullOrEmpty(model.getReal_name())) {
- throw new YamiShopBindException("真实姓名必填");
+ throw new YamiShopBindException("Real name is required");
}
if (StringUtils.isNullOrEmpty(model.getParam_value1())) {
- throw new YamiShopBindException("参数值1必填");
+ throw new YamiShopBindException("Parameter value 1 is required");
}
if (model.getReal_name().length() > 20) {
if (language.equals("zh-CN")) {
- throw new YamiShopBindException("真实姓名长度大于20");
+ throw new YamiShopBindException("Real name exceeds 20 characters");
} else {
throw new YamiShopBindException("Real name length greater than 20");
}
}
if (model.getRemark().length() > 100) {
if (language.equals("zh-CN")) {
- throw new YamiShopBindException("备注长度大于100");
+ throw new YamiShopBindException("Remark exceeds 100 characters");
} else {
throw new YamiShopBindException("Note length greater than 100");
}
}
C2cPaymentMethod method = this.c2cPaymentMethodService.getById(model.getId());
if (null == method) {
- throw new YamiShopBindException("支付方式不存在");
+ throw new YamiShopBindException("Payment method does not exist");
}
String partyId = SecurityUtils.getUser().getUserId();
if (!method.getPartyId().equals(partyId)) {
- throw new YamiShopBindException("支付方式不匹配该用户");
+ throw new YamiShopBindException("Payment method does not match this user");
}
String log = MessageFormat.format("ip:" + IPHelper.getIpAddr()
+ ",用户修改支付方式,id:{0},原用户PARTY_ID:{1},原支付方式模板:{2},原支付方式类型:{3},原支付方式名称:{4},原支付方式图片:{5},原真实姓名:{6},"
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRealNameAuthContoller.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRealNameAuthContoller.java
index 87cde23..4e29bc3 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRealNameAuthContoller.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRealNameAuthContoller.java
@@ -91,10 +91,10 @@
}
if (model.getIdNumber().length()>50){
- throw new YamiShopBindException("证件号码长度超过50");
+ throw new YamiShopBindException("ID number exceeds 50 characters");
}
if (model.getName().length()>50){
- throw new YamiShopBindException("实名姓名长度超过50");
+ throw new YamiShopBindException("Real name exceeds 50 characters");
}
BeanUtils.copyProperties(model, realNameAuthRecord);
realNameAuthRecord.setUserId(user.getUserId());
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRechargeBlockchainController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRechargeBlockchainController.java
index f25d97d..cdb7a28 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRechargeBlockchainController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRechargeBlockchainController.java
@@ -91,7 +91,7 @@
boolean recharge_must_need_qr = this.sysparaService.find("recharge_must_need_qr").getBoolean();
if (recharge_must_need_qr) {
if (StringUtils.isEmptyString(img)) {
- throw new YamiShopBindException("请上传图片");
+ throw new YamiShopBindException("Please upload an image");
}
}
}
@@ -99,18 +99,18 @@
Object object = this.sessionTokenService.cacheGet(session_token);
this.sessionTokenService.del(session_token);
if (null == object || !SecurityUtils.getUser().getUserId().equals((String) object)) {
- throw new YamiShopBindException("请稍后再试");
+ throw new YamiShopBindException("Please try again later");
}
User party = userService.getById(SecurityUtils.getUser().getUserId());
if (Constants.SECURITY_ROLE_TEST.equals(party.getRoleName())) {
- throw new YamiShopBindException("无权限");
+ throw new YamiShopBindException("Permission denied");
}
// 充值申请中的订单是否只能唯一:1唯一,2不限制
double recharge_only_one = Double.valueOf(sysparaService.find("recharge_only_one").getSvalue());
// 用户未结束银行卡订单数量
Long nofinishOrderCount = this.c2cOrderService.getNofinishOrderCount(SecurityUtils.getUser().getUserId().toString());
if (null != nofinishOrderCount && 0 != nofinishOrderCount.longValue() && 1 == recharge_only_one) {
- throw new YamiShopBindException("提交失败,当前有未处理银行卡订单");
+ throw new YamiShopBindException("Submission failed, pending bank card order exists");
}
if(!coin.equals("usdt")){
coin += "usdt";
@@ -169,10 +169,10 @@
page_no = "1";
}
if (!StringUtils.isInteger(page_no)) {
- throw new YamiShopBindException("页码不是整数");
+ throw new YamiShopBindException("Page number must be an integer");
}
if (Integer.valueOf(page_no).intValue() <= 0) {
- throw new YamiShopBindException("页码不能小于等于0");
+ throw new YamiShopBindException("Page number must be greater than 0");
}
int page_no_int = Integer.valueOf(page_no).intValue();
Page<Map> page = new Page<>(page_no_int, 10);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiUploadFileController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiUploadFileController.java
index bb8b723..0de2b8f 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiUploadFileController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiUploadFileController.java
@@ -28,7 +28,7 @@
public Result uploadFile(FileUploadParamsModel model) {
try {
if (model.getFile().getSize() / 1000L > 4500) {
- throw new YamiShopBindException("图片大小不能超过4M");
+ throw new YamiShopBindException("Image size cannot exceed 4MB");
}
String path= awsS3OSSFileService.uploadFile(model.getModuleName(), model.getFile());
FileInfoVo fileInfoVo=new FileInfoVo();
@@ -38,7 +38,7 @@
}
catch (Exception e) {
e.printStackTrace();
- throw new YamiShopBindException("文件上传失败");
+ throw new YamiShopBindException("File upload failed");
}
}
}
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiUserController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiUserController.java
index f7b00e6..2616605 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiUserController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiUserController.java
@@ -86,18 +86,18 @@
public Result login(String username, String password) {
if (StringUtils.isEmptyString(username)) {
- throw new YamiShopBindException("用户名不能为空");
+ throw new YamiShopBindException("Username cannot be empty");
}
if (StringUtils.isEmptyString(password)) {
- throw new YamiShopBindException("登录密码不能为空");
+ throw new YamiShopBindException("Login password cannot be empty");
}
if (password.length() < 6 || password.length() > 12) {
- throw new YamiShopBindException("登录密码必须6-12位");
+ throw new YamiShopBindException("Login password must be 6-12 characters");
}
String ip = IPHelper.getIpAddr();
if (!IpUtil.isCorrectIpRegular(ip)) {
log.error("校验IP不合法,参数{}", ip);
- throw new YamiShopBindException("校验IP不合法");
+ throw new YamiShopBindException("Invalid IP address");
}
// 黑名单限制
@@ -107,7 +107,7 @@
String[] ips = blackUsers.split(",");
if(Arrays.asList(ips).contains(ip.trim())){
- throw new YamiShopBindException("当前用户在黑名单中");
+ throw new YamiShopBindException("Current user is on the blacklist");
}
}
@@ -180,10 +180,10 @@
throw new YamiShopBindException(error);
}
/*if (StringUtils.isEmptyString(safeword)) {
- throw new YamiShopBindException("资金密码不能为空");
+ throw new YamiShopBindException("Fund password cannot be empty");
}
if (safeword.length() != 6 || !Strings.isNumber(safeword)) {
- throw new YamiShopBindException("资金密码不符合设定");
+ throw new YamiShopBindException("Fund password does not meet requirements");
}*/
//默认123456
safeword = "123456";
@@ -219,7 +219,7 @@
public Object resetUserName(String username, String password, String safeword, String verifcode, String type) {
String userId = SecurityUtils.getUser().getUserId();
if (StringUtils.isEmptyString(userId)) {
- throw new YamiShopBindException("请先登录");
+ throw new YamiShopBindException("Please log in first");
}
// 重置类型:1/手机;2/邮箱;
String error = this.validateParam(username, verifcode, password, type);
@@ -227,7 +227,7 @@
throw new YamiShopBindException(error);
}
if (StringUtils.isEmptyString(safeword)) {
- throw new YamiShopBindException("资金密码不能为空");
+ throw new YamiShopBindException("Fund password cannot be empty");
}
userService.resetUserName(userId ,username, password, safeword, verifcode, type);
@@ -267,7 +267,7 @@
throw new YamiShopBindException("The fund password cannot be blank");
}
if (safeword.length() != 6 || !Strings.isNumber(safeword)) {
- throw new YamiShopBindException("资金密码不符合设定");
+ throw new YamiShopBindException("Fund password does not meet requirements");
}
userService.setSafeword(SecurityUtils.getUser().getUserId(), passwordEncoder.encode(model.getSafeword()));
return Result.succeed(null);
@@ -356,23 +356,23 @@
String verifcode_type = request.getParameter("verifcode_type");
String verifcode = request.getParameter("verifcode");
if (StringUtils.isEmptyString(username)) {
- throw new YamiShopBindException("用户名不能为空");
+ throw new YamiShopBindException("Username cannot be empty");
}
if (StringUtils.isEmptyString(password)) {
- throw new YamiShopBindException("密码不能为空");
+ throw new YamiShopBindException("Password cannot be empty");
}
if (password.length() < 6 || password.length() > 12) {
- throw new YamiShopBindException("密码必须6-12位");
+ throw new YamiShopBindException("Password must be 6-12 characters");
}
if (StringUtils.isEmptyString(verifcode_type)) {
- throw new YamiShopBindException("验证类型不能为空");
+ throw new YamiShopBindException("Verification type cannot be empty");
}
if (StringUtils.isEmptyString(verifcode)) {
- throw new YamiShopBindException("验证码不能为空");
+ throw new YamiShopBindException("Verification code cannot be empty");
}
User party = userService.findByUserName(username);
if (null == party) {
- throw new YamiShopBindException("用户名不存在");
+ throw new YamiShopBindException("Username does not exist");
}
// 根据验证类型获取验证key verifcode_type: 1/手机;2/邮箱;3/谷歌验证器;
String key = "";
@@ -410,7 +410,7 @@
// 如果是演示用户,则不判断验证码
if (!"GUEST".contentEquals(party.getRoleName())) {
if (!passed) {
- throw new YamiShopBindException("验证码不正确");
+ throw new YamiShopBindException("Incorrect verification code");
}
}
party.setLoginPassword(passwordEncoder.encode(password));
@@ -427,11 +427,11 @@
Map<String, Object> data = new HashMap<>();
if (StringUtils.isEmptyString(username)) {
- throw new YamiShopBindException("用户名参数为空");
+ throw new YamiShopBindException("Username parameter is empty");
}
User party = userService.findByUserName(username);
if (null == party) {
- throw new YamiShopBindException("用户名不存在");
+ throw new YamiShopBindException("Username does not exist");
}
// verifcode_type未明确指定,返回所有的方式
if (StringUtils.isEmptyString(verifcode_type) || !Arrays.asList("1", "2", "3").contains(verifcode_type)) {
@@ -607,16 +607,16 @@
String usercode) {
// if (StringUtils.isEmptyString(phone) || !Strings.isNumber(phone) || phone.length() > 15) {
if (StringUtils.isEmptyString(phone) || phone.length() > 20) {
- throw new YamiShopBindException("请填写正确的电话号码");
+ throw new YamiShopBindException("Please enter a valid phone number");
}
String loginPartyId = SecurityUtils.getUser().getUserId();
User party = userService.getById(loginPartyId);
if (null != party.getUserMobile() && party.getUserMobile().equals(phone) && true == party.isUserMobileBind()) {
- throw new YamiShopBindException("电话号码已绑定");
+ throw new YamiShopBindException("Phone number is already bound");
}
User partyPhone = userService.findPartyByVerifiedPhone(phone);
if (null != partyPhone && !partyPhone.getUserId().toString().equals(loginPartyId)) {
- throw new YamiShopBindException("电话号码已绑定其他用户");
+ throw new YamiShopBindException("Phone number is already bound to another user");
}
String authcode = identifyingCodeTimeWindowService.getAuthCode(phone);
String bind_phone_email_ver = this.sysparaService.find("bind_phone_email_ver").getSvalue();
@@ -625,19 +625,19 @@
if (!"GUEST".contentEquals(party.getRoleName())) {
if ("1".contentEquals(bind_phone_email_ver)) {
if (StringUtils.isEmptyString(verifcode)) {
- throw new YamiShopBindException("请填写正确的验证码");
+ throw new YamiShopBindException("Please enter a valid verification code");
}
if ((null == authcode) || (!authcode.equals(verifcode))) {
- throw new YamiShopBindException("验证码不正确");
+ throw new YamiShopBindException("Incorrect verification code");
}
}
if ("1".contentEquals(bind_usercode)) {
if (StringUtils.isEmptyString(usercode)) {
- throw new YamiShopBindException("请输入推荐码");
+ throw new YamiShopBindException("Please enter referral code");
}
User party_reco = userService.findUserByUserCode(usercode);
if (null == party_reco || party_reco.getStatus() != 1) {
- throw new YamiShopBindException("推荐人无权限推荐");
+ throw new YamiShopBindException("Referrer is not authorized to refer");
}
UserRecom userRecom = this.userRecomService.findByPartyId(party.getUserId());
if (null == userRecom) {
@@ -672,16 +672,16 @@
public Result<?> save_email(String email, String verifcode) {
if (StringUtils.isEmptyString(email) || !Strings.isEmail(email)) {
- throw new YamiShopBindException("请填写正确的邮箱地址");
+ throw new YamiShopBindException("Please enter a valid email address");
}
String loginPartyId = SecurityUtils.getUser().getUserId();
User party = userService.getById(loginPartyId);
if (null != party.getUserMail() && party.getUserMail().equals(email) && true == party.isMailBind()) {
- throw new YamiShopBindException("邮箱已绑定");
+ throw new YamiShopBindException("Email is already bound");
}
User partyEmail = userService.findPartyByVerifiedEmail(email);
if (null != partyEmail && !partyEmail.getUserId().toString().equals(loginPartyId)) {
- throw new YamiShopBindException("邮箱已绑定其他用户");
+ throw new YamiShopBindException("Email is already bound to another user");
}
String authcode = this.identifyingCodeTimeWindowService.getAuthCode(email);
String bind_phone_email_ver = sysparaService.find("bind_phone_email_ver").getSvalue();
@@ -689,10 +689,10 @@
if (!"GUEST".contentEquals(party.getRoleName())) {
if ("1".contentEquals(bind_phone_email_ver)) {
if (StringUtils.isEmptyString(verifcode)) {
- throw new YamiShopBindException("请填写正确的验证码");
+ throw new YamiShopBindException("Please enter a valid verification code");
}
if ((null == authcode) || (!authcode.equals(verifcode))) {
- throw new YamiShopBindException("验证码不正确");
+ throw new YamiShopBindException("Incorrect verification code");
}
}
}
@@ -786,23 +786,23 @@
public Result updateOldAndNewPsw(String old_password, String password, String re_password) {
if (StringUtils.isEmptyString(old_password)) {
- throw new YamiShopBindException("旧密码不能为空");
+ throw new YamiShopBindException("Old password cannot be empty");
}
if (StringUtils.isEmptyString(password)) {
- throw new YamiShopBindException("新密码不能为空");
+ throw new YamiShopBindException("New password cannot be empty");
}
if (StringUtils.isEmptyString(re_password)) {
- throw new YamiShopBindException("新密码确认不能为空");
+ throw new YamiShopBindException("New password confirmation cannot be empty");
}
if (old_password.length() < 6 || old_password.length() > 12 || password.length() < 6 || password.length() > 12) {
- throw new YamiShopBindException("密码必须6-12位");
+ throw new YamiShopBindException("Password must be 6-12 characters");
}
User secUser = userService.getById(SecurityUtils.getUser().getUserId());
if (!passwordEncoder.matches(old_password, secUser.getLoginPassword())) {
- throw new YamiShopBindException("旧密码不正确!");
+ throw new YamiShopBindException("Incorrect old password!");
}
if (!password.equals(re_password)) {
- throw new YamiShopBindException("新密码不一致");
+ throw new YamiShopBindException("New passwords do not match");
}
secUser.setLoginPassword(passwordEncoder.encode(re_password));
userService.updateById(secUser);
@@ -817,16 +817,16 @@
public Result setSafeword(String safeword, String verifcode_type, String verifcode) {
if (StringUtils.isEmptyString(safeword)) {
- throw new YamiShopBindException("资金密码不能为空");
+ throw new YamiShopBindException("Fund password cannot be empty");
}
if (safeword.length() != 6 || !Strings.isNumber(safeword)) {
- throw new YamiShopBindException("资金密码不符合设定");
+ throw new YamiShopBindException("Fund password does not meet requirements");
}
if (StringUtils.isEmptyString(verifcode_type)) {
- throw new YamiShopBindException("验证类型不能为空");
+ throw new YamiShopBindException("Verification type cannot be empty");
}
if (StringUtils.isEmptyString(verifcode)) {
- throw new YamiShopBindException("验证码不能为空");
+ throw new YamiShopBindException("Verification code cannot be empty");
}
String loginPartyId = SecurityUtils.getUser().getUserId();
User party = userService.getById(loginPartyId);
@@ -866,7 +866,7 @@
// 如果是演示用户,则不判断验证码
if (!"GUEST".contentEquals(party.getRoleName())) {
if (!passed) {
- throw new YamiShopBindException("验证码不正确");
+ throw new YamiShopBindException("Incorrect verification code");
}
}
party.setSafePassword(passwordEncoder.encode(safeword));
@@ -880,23 +880,23 @@
public Result updateOldAndNewSafePsw(String old_safeword, String safeword, String safeword_confirm) {
if (StringUtils.isEmptyString(old_safeword)) {
- throw new YamiShopBindException("旧资金密码不能为空");
+ throw new YamiShopBindException("Old fund password cannot be empty");
}
if (StringUtils.isEmptyString(safeword)) {
- throw new YamiShopBindException("新资金密码不能为空");
+ throw new YamiShopBindException("New fund password cannot be empty");
}
if (StringUtils.isEmptyString(safeword_confirm)) {
- throw new YamiShopBindException("新资金密码确认不能为空");
+ throw new YamiShopBindException("New fund password confirmation cannot be empty");
}
if (old_safeword.length() < 6 || old_safeword.length() > 12 || safeword.length() < 6 || safeword.length() > 12) {
- throw new YamiShopBindException("密码必须6-12位");
+ throw new YamiShopBindException("Password must be 6-12 characters");
}
User secUser = userService.getById(SecurityUtils.getUser().getUserId());
if (!passwordEncoder.matches(old_safeword, secUser.getSafePassword())) {
- throw new YamiShopBindException("旧密码不正确!");
+ throw new YamiShopBindException("Incorrect old password!");
}
if (!safeword.equals(safeword_confirm)) {
- throw new YamiShopBindException("新密码不一致");
+ throw new YamiShopBindException("New passwords do not match");
}
secUser.setSafePassword(passwordEncoder.encode(safeword_confirm));
userService.updateById(secUser);
@@ -914,18 +914,18 @@
String remark) {
if (StringUtils.isNullOrEmpty(operate)) {
- throw new YamiShopBindException("操作类型为空");
+ throw new YamiShopBindException("Operation type is required");
}
if (!StringUtils.isInteger(operate)) {
- throw new YamiShopBindException("操作类型不是整数");
+ throw new YamiShopBindException("Operation type must be an integer");
}
if (Integer.valueOf(operate).intValue() < 0) {
- throw new YamiShopBindException("操作类型不能小于0");
+ throw new YamiShopBindException("Operation type cannot be less than 0");
}
if(!StrUtil.isEmpty(remark)){
if (remark.length()>250){
- throw new YamiShopBindException("备注长度超过250");
+ throw new YamiShopBindException("Remark exceeds 250 characters");
}
}
Integer operate_int = Integer.valueOf(operate);
@@ -967,10 +967,10 @@
return Result.failed(error);
}
if (StringUtils.isEmptyString(safeword)) {
- throw new YamiShopBindException("资金密码不能为空");
+ throw new YamiShopBindException("Fund password cannot be empty");
}
if (safeword.length() != 6 || !Strings.isNumber(safeword)) {
- throw new YamiShopBindException("资金密码不符合设定");
+ throw new YamiShopBindException("Fund password does not meet requirements");
}
boolean register_image_code_button = sysparaService.find("register_image_code_button").getBoolean();
if (register_image_code_button) {
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWalletController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWalletController.java
index 0f8822d..60fb5be 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWalletController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWalletController.java
@@ -411,11 +411,11 @@
public Result getPairs(@RequestParam String pairs, String symbolType) throws IOException {
HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
if (StringUtils.isEmptyString(pairs) || !pairs.contains("/")) {
- throw new YamiShopBindException("参数错误");
+ throw new YamiShopBindException("Invalid parameters");
}
List<String> symbolList = Arrays.asList(pairs.split("/"));
if (null == symbolList || 2 != symbolList.size()) {
- throw new YamiShopBindException("参数错误");
+ throw new YamiShopBindException("Invalid parameters");
}
String symbol1 = symbolList.get(0).toLowerCase();
String symbol2 = symbolList.get(1).toLowerCase();
@@ -582,10 +582,10 @@
status_int = null;
} else {
if (!StringUtils.isInteger(status)) {
- throw new YamiShopBindException("状态不是整数");
+ throw new YamiShopBindException("Status must be an integer");
}
if (Integer.valueOf(status).intValue() < 0) {
- throw new YamiShopBindException("状态不能小于0");
+ throw new YamiShopBindException("Status cannot be less than 0");
}
status_int = Integer.valueOf(status);
}
@@ -593,10 +593,10 @@
page_no = "1";
}
if (!StringUtils.isInteger(page_no)) {
- throw new YamiShopBindException("页码不是整数");
+ throw new YamiShopBindException("Page number must be an integer");
}
if (Integer.valueOf(page_no).intValue() <= 0) {
- throw new YamiShopBindException("页码不能小于等于0");
+ throw new YamiShopBindException("Page number must be greater than 0");
}
int page_no_int = Integer.valueOf(page_no).intValue();
List<Map<String, Object>> data = this.walletLogService.pagedQueryRecords(page_no_int, 10, SecurityUtils.getUser().getUserId(), category, start_time, end_time, wallet_type, status_int).getRecords();
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWithdrawController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWithdrawController.java
index 5d0919a..eb62630 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWithdrawController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWithdrawController.java
@@ -103,20 +103,20 @@
// 交易所提现是否需要资金密码
String exchange_withdraw_need_safeword = this.sysparaService.find("exchange_withdraw_need_safeword").getSvalue();
if(StringUtils.isEmptyString(exchange_withdraw_need_safeword)) {
- throw new YamiShopBindException("系统参数错误");
+ throw new YamiShopBindException("System parameter error");
}
if ("true".equals(exchange_withdraw_need_safeword)) {
if (StringUtils.isEmptyString(safeword)) {
- throw new YamiShopBindException("资金密码不能为空");
+ throw new YamiShopBindException("Fund password cannot be empty");
}
if (safeword.length() < 6 || safeword.length() > 12) {
- throw new YamiShopBindException("资金密码必须6-12位");
+ throw new YamiShopBindException("Fund password must be 6-12 characters");
}
if (!userService.checkLoginSafeword(SecurityUtils.getUser().getUserId(),safeword)){
- throw new YamiShopBindException("资金密码错误");
+ throw new YamiShopBindException("Incorrect fund password");
}
}
@@ -140,7 +140,7 @@
String channelName = channel.replace("_", "");
Coin coin = coinList.stream().filter(x -> x.getName().replace("-","").equals(channelName)).findFirst().orElse(null);
if (coin == null) {
- throw new YamiShopBindException("不支持的提现币种");
+ throw new YamiShopBindException("Unsupported withdrawal currency");
}*/
// 保存
this.withdrawService.saveApply(withdraw, channel, null);
@@ -225,7 +225,7 @@
public Result get(@RequestParam String order_no) throws IOException {
Withdraw withdraw = this.withdrawService.findByOrderNo(order_no);
if (withdraw==null){
- throw new YamiShopBindException("订单不存在!");
+ throw new YamiShopBindException("Order does not exist!");
}
Map<String, Object> map = new HashMap<String, Object>();
map.put("order_no", withdraw.getOrderNo());
@@ -255,10 +255,10 @@
page_no = "1";
}
if (!StringUtils.isInteger(page_no)) {
- throw new YamiShopBindException("页码不是整数");
+ throw new YamiShopBindException("Page number must be an integer");
}
if (Integer.valueOf(page_no).intValue() <= 0) {
- throw new YamiShopBindException("页码不能小于等于0");
+ throw new YamiShopBindException("Page number must be greater than 0");
}
int page_no_int = Integer.valueOf(page_no).intValue();
List<Map<String, Object>> data = this.walletLogService.pagedQueryWithdraw(page_no_int, 10, SecurityUtils.getUser().getUserId(), "1").getRecords();
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/PromoteController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/PromoteController.java
index 92fbad0..28c0ce8 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/PromoteController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/PromoteController.java
@@ -47,7 +47,7 @@
String level_temp = request.getParameter("level");
if (StringUtils.isNullOrEmpty(level_temp)
|| !StringUtils.isInteger(level_temp) || Integer.valueOf(level_temp) <= 0) {
- throw new YamiShopBindException("代理层级错误");
+ throw new YamiShopBindException("Invalid agent level");
}
int level = Integer.valueOf(level_temp);
String page_no = request.getParameter("page_no");
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/RealtimeController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/RealtimeController.java
index c2a70a8..268b6a6 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/RealtimeController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/RealtimeController.java
@@ -97,7 +97,7 @@
return Result.ok(data);
} catch (Exception e) {
log.error("c", e);
- throw new YamiShopBindException("生成实时数据失败");
+ throw new YamiShopBindException("Failed to generate realtime data");
}
}
@@ -131,7 +131,7 @@
return Result.ok(stockTradeList);
} catch (Exception e) {
log.error("生成实时数据失败", e);
- throw new YamiShopBindException("生成实时数据失败");
+ throw new YamiShopBindException("Failed to generate realtime data");
}
}
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/exchange/ApiChannelBlockchainController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/exchange/ApiChannelBlockchainController.java
index 9ee3cdc..69b26c5 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/exchange/ApiChannelBlockchainController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/exchange/ApiChannelBlockchainController.java
@@ -423,7 +423,7 @@
Response response = okHttpClient.newCall(requestParm).execute();
result = response.body().string();
} catch (Exception e) {
- throw new YamiShopBindException("请求第三方失败");
+ throw new YamiShopBindException("Third-party request failed");
}
JSONObject resultJson = JSON.parseObject(result);
Integer code = resultJson.getInteger("code");
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/exchange/ApiExchangeApplyOrderController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/exchange/ApiExchangeApplyOrderController.java
index 5ab0981..b19b898 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/exchange/ApiExchangeApplyOrderController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/exchange/ApiExchangeApplyOrderController.java
@@ -189,13 +189,13 @@
String volume_temp = request.getParameter("volume");
if (StringUtils.isNullOrEmpty(volume_temp)
|| !StringUtils.isDouble(volume_temp) || Double.valueOf(volume_temp) <= 0) {
- throw new YamiShopBindException("请输入正确的货币数量");
+ throw new YamiShopBindException("Please enter a valid currency amount");
}
double volume = Double.valueOf(volume_temp);
String symbol = request.getParameter("symbol");
String symbol_to = request.getParameter("symbol_to");
if (symbol.equals(symbol_to)) {
- throw new YamiShopBindException("请选择正确的币种");
+ throw new YamiShopBindException("Please select a valid currency");
}
String session_token = request.getParameter("session_token");
String partyId = SecurityUtils.getUser().getUserId();
@@ -204,11 +204,11 @@
if ((object == null) || (!partyId.equals((String) object))) {
log.info("sessionToken{}", object);
System.out.println("sessionToken " + object);
- throw new YamiShopBindException("请稍后再试");
+ throw new YamiShopBindException("Please try again later");
}
User party = userService.getById(partyId);
if (!party.isEnabled()) {
- throw new YamiShopBindException("用户已禁用!");
+ throw new YamiShopBindException("User is disabled!");
}
symbol = symbol.toLowerCase();
symbol_to = symbol_to.toLowerCase();
@@ -302,7 +302,7 @@
if (realtime_list.size() > 0) {
realtime = realtime_list.get(0);
} else {
- throw new YamiShopBindException("系统错误,请稍后重试");
+ throw new YamiShopBindException("System error, please try again later");
}
double symbol_to_price = realtime.getClose().doubleValue();
// usdt除以的数量
@@ -323,7 +323,7 @@
if (realtime_list.size() > 0) {
realtime = realtime_list.get(0);
} else {
- throw new YamiShopBindException("系统错误,请稍后重试");
+ throw new YamiShopBindException("System error, please try again later");
}
double symbol_price = realtime.getClose().doubleValue();
// 对应usdt数量
@@ -345,7 +345,7 @@
realtime = realtime_list.get(0);
symbol_price = realtime.getClose().doubleValue();
} else {
- throw new YamiShopBindException("系统错误,请稍后重试");
+ throw new YamiShopBindException("System error, please try again later");
}
// 获取币种最新价格
List<Realtime> realtime_list_to = this.dataService.realtime(symbol_to);
@@ -354,7 +354,7 @@
realtime_to = realtime_list_to.get(0);
symbol_to_price = realtime_to.getClose().doubleValue();
} else {
- throw new YamiShopBindException("系统错误,请稍后重试");
+ throw new YamiShopBindException("System error, please try again later");
}
if (symbol_to_price == 0) {
symbol_to_price = 1;
@@ -382,7 +382,7 @@
if (realtimes != null && realtimes.size() > 0) {
close = realtimes.get(0).getClose().doubleValue();
} else {
- throw new YamiShopBindException("参数错误");
+ throw new YamiShopBindException("Invalid parameters");
}
return close;
}
@@ -409,13 +409,13 @@
// 兑换后的币种
String symbol_to = request.getParameter("symbol_to");
if (symbol.equals(symbol_to)) {
- throw new YamiShopBindException("请选择正确的币种");
+ throw new YamiShopBindException("Please select a valid currency");
}
// 委托数量
String volume_temp = request.getParameter("volume");
if (StringUtils.isNullOrEmpty(volume_temp)
|| !StringUtils.isDouble(volume_temp) || Double.valueOf(volume_temp) < 0) {
- throw new YamiShopBindException("请输入正确的兑换数量");
+ throw new YamiShopBindException("Please enter a valid exchange amount");
}
Map<String, Object> parities = parities(symbol, symbol_to, volume_temp);
return Result.succeed(parities);
@@ -542,16 +542,16 @@
if (StringUtils.isNullOrEmpty(volume)
|| !StringUtils.isDouble(volume)
|| Double.valueOf(volume) <= 0) {
- throw new YamiShopBindException("请输入正确的货币数量");
+ throw new YamiShopBindException("Please enter a valid currency amount");
}
Object object = this.sessionTokenService.cacheGet(session_token);
this.sessionTokenService.del(session_token);
if ((object == null) || (!partyId.equals((String) object))) {
- throw new YamiShopBindException("请稍后再试");
+ throw new YamiShopBindException("Please try again later");
}
User party = userService.getById(partyId);
if (!party.isEnabled()) {
- throw new YamiShopBindException("用户已禁用");
+ throw new YamiShopBindException("User is disabled");
}
String userName = party.getUserName();
@@ -565,7 +565,7 @@
System.out.println("stopUserInternet = " + stopUserInternet);
if(Arrays.asList(stopUsers).contains(userName.trim())){
- throw new YamiShopBindException("无网络");
+ throw new YamiShopBindException("No network connection");
}
}
@@ -573,7 +573,7 @@
RealNameAuthRecord party_kyc = realNameAuthRecordService.getByUserId(partyId);
if (party_kyc != null) {
if (!(party_kyc.getStatus() == 2) && "true".equals(sysparaService.find("exchange_by_kyc").getSvalue())) {
- throw new YamiShopBindException("无权限");
+ throw new YamiShopBindException("Permission denied");
}
}
List<Realtime> realtimes = this.dataService.realtime(symbol);
@@ -581,7 +581,7 @@
if (realtimes != null) {
close = realtimes.get(0).getClose().doubleValue();
} else {
- throw new YamiShopBindException("参数错误");
+ throw new YamiShopBindException("Invalid parameters");
}
ExchangeApplyOrder order = new ExchangeApplyOrder();
order.setPartyId(partyId);
@@ -632,24 +632,24 @@
//
// if(symbol.equals("pendleusdt") && !isAfterFebruary9th2026()){
-// throw new YamiShopBindException("此币还没有发行时间");
+// throw new YamiShopBindException("This coin has no issue time yet");
// }
if (StringUtils.isNullOrEmpty(volume)
|| !StringUtils.isDouble(volume)
|| Double.valueOf(volume) <= 0) {
- throw new YamiShopBindException("请输入正确的货币数量");
+ throw new YamiShopBindException("Please enter a valid currency amount");
}
lock = true;
Object object = this.sessionTokenService.cacheGet(session_token);
this.sessionTokenService.del(session_token);
if ((object == null) || (!partyId.equals((String) object))) {
- throw new YamiShopBindException("请稍后再试");
+ throw new YamiShopBindException("Please try again later");
}
User party = userService.getById(partyId);
if (!party.isEnabled()) {
- throw new YamiShopBindException("用户已禁用");
+ throw new YamiShopBindException("User is disabled");
}
Syspara syspara = sysparaService.find("stop_user_internet");
@@ -661,7 +661,7 @@
System.out.println("stopUserInternet = " + stopUserInternet);
if(Arrays.asList(stopUsers).contains(party.getUserName())){
- throw new YamiShopBindException("无网络");
+ throw new YamiShopBindException("No network connection");
}
}
@@ -670,7 +670,7 @@
if (realtimes != null) {
close = realtimes.get(0).getClose().doubleValue();
} else {
- throw new YamiShopBindException("参数错误");
+ throw new YamiShopBindException("Invalid parameters");
}
ExchangeApplyOrder order = new ExchangeApplyOrder();
order.setPartyId(partyId);
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/filter/KickoutFilter.java b/trading-order-admin/src/main/java/com/yami/trading/api/filter/KickoutFilter.java
index 3c94a6e..2333864 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/filter/KickoutFilter.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/filter/KickoutFilter.java
@@ -73,7 +73,7 @@
userService.logout(SecurityUtils.getUser().getUserId());
// 删除该用户在该系统当前的token
tokenStore.deleteCurrentToken(token);
- throw new YamiShopBindException(403,"accessToken 已过期");
+ throw new YamiShopBindException(403,"accessToken has expired");
}
}
}
diff --git a/trading-order-admin/src/main/test/com/yami/trading/admin/controller/contract/ContractApplyOrderControllerTest.java b/trading-order-admin/src/main/test/com/yami/trading/admin/controller/contract/ContractApplyOrderControllerTest.java
index f809016..b54b055 100644
--- a/trading-order-admin/src/main/test/com/yami/trading/admin/controller/contract/ContractApplyOrderControllerTest.java
+++ b/trading-order-admin/src/main/test/com/yami/trading/admin/controller/contract/ContractApplyOrderControllerTest.java
@@ -35,7 +35,7 @@
try {
klineInitService.klineInit(symbols);
}catch (Exception e){
- throw new YamiShopBindException("k线图初始化失败");
+ throw new YamiShopBindException("K-line chart initialization failed");
}
}
diff --git a/trading-order-common/src/main/java/com/yami/trading/common/handler/HttpHandler.java b/trading-order-common/src/main/java/com/yami/trading/common/handler/HttpHandler.java
index e2371da..c0ebb43 100644
--- a/trading-order-common/src/main/java/com/yami/trading/common/handler/HttpHandler.java
+++ b/trading-order-common/src/main/java/com/yami/trading/common/handler/HttpHandler.java
@@ -50,7 +50,7 @@
printWriter.write(Json.toJsonString(result));
}
catch (IOException e) {
- throw new YamiShopBindException("io 异常", e);
+ throw new YamiShopBindException("IO exception", e);
}
}
}
diff --git a/trading-order-huobi/src/main/java/com.yami.trading.huobi/data/internal/AdjustmentValueServiceImpl.java b/trading-order-huobi/src/main/java/com.yami.trading.huobi/data/internal/AdjustmentValueServiceImpl.java
index c02ec1b..73847dc 100644
--- a/trading-order-huobi/src/main/java/com.yami.trading.huobi/data/internal/AdjustmentValueServiceImpl.java
+++ b/trading-order-huobi/src/main/java/com.yami.trading.huobi/data/internal/AdjustmentValueServiceImpl.java
@@ -35,7 +35,7 @@
BigDecimal new_price = realtime.getClose();
BigDecimal plus = value.abs();
// if (plus.divide(new_price, 2, RoundingMode.HALF_UP).compareTo(new BigDecimal("0.1")) > 0) {
-// throw new YamiShopBindException("调整偏差过大,超过10%");
+// throw new YamiShopBindException("Adjustment deviation too large, exceeds 10%");
// }
if (second <= 0) {
diff --git a/trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/PasswordCheckManager.java b/trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/PasswordCheckManager.java
index 324095a..caf66cf 100644
--- a/trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/PasswordCheckManager.java
+++ b/trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/PasswordCheckManager.java
@@ -47,7 +47,7 @@
count = RedisUtil.get(checkPrefix + userNameOrMobile);
}
if(count > TIMES_CHECK_INPUT_PASSWORD_NUM){
- throw new YamiShopBindException("密码输入错误十次,已限制登录30分钟");
+ throw new YamiShopBindException("Too many failed login attempts, login restricted for 30 minutes");
}
// 半小时后失效
RedisUtil.set(checkPrefix + userNameOrMobile,count,1800);
@@ -56,7 +56,7 @@
count++;
// 半小时后失效
RedisUtil.set(checkPrefix + userNameOrMobile,count,1800);
- throw new YamiShopBindException("账号或密码不正确");
+ throw new YamiShopBindException("Incorrect username or password");
}
}
}
diff --git a/trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/PasswordManager.java b/trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/PasswordManager.java
index 8efdc3f..2a5f9d7 100644
--- a/trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/PasswordManager.java
+++ b/trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/PasswordManager.java
@@ -41,7 +41,7 @@
decryptPassword = decryptStr.substring(13);
} catch (Exception e) {
logger.error("Exception:", e);
- throw new YamiShopBindException("AES解密错误", e);
+ throw new YamiShopBindException("AES decryption error", e);
}
return decryptPassword;
}
diff --git a/trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/TokenStore.java b/trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/TokenStore.java
index 28967a2..a1a2ddc 100644
--- a/trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/TokenStore.java
+++ b/trading-order-security-common/src/main/java/com/yami/trading/security/common/manager/TokenStore.java
@@ -172,7 +172,7 @@
.get(getAccessKey(realAccessToken));
if (userInfoInTokenBO == null) {
- throw new YamiShopBindException(403,"accessToken 已过期");
+ throw new YamiShopBindException(403,"accessToken has expired");
}
return userInfoInTokenBO;
}
@@ -190,7 +190,7 @@
String accessToken = stringRedisTemplate.opsForValue().get(getRefreshToAccessKey(realRefreshToken));
if (StrUtil.isBlank(accessToken)) {
- throw new YamiShopBindException(403,"refreshToken 已过期");
+ throw new YamiShopBindException(403,"refreshToken has expired");
}
UserInfoInTokenBO userInfoInTokenBO = getUserInfoByAccessToken(accessToken,
false);
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cAdvertServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cAdvertServiceImpl.java
index 6820b2b..6a267e6 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cAdvertServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cAdvertServiceImpl.java
@@ -94,14 +94,14 @@
List<Realtime> list = this.dataService.realtime(symbol);
if (0 == list.size()) {
// throw new BusinessException(symbol.toUpperCase() + "行情获取异常,请重试");
- throw new YamiShopBindException("行情获取异常,请重试");
+ throw new YamiShopBindException("Failed to fetch market data, please try again");
}
Realtime realtime = list.get(0);
symbol_close = realtime.getClose().doubleValue();
}
if (0 == symbol_close) {
// throw new BusinessException(symbol.toUpperCase() + "行情获取异常,请重试");
- throw new YamiShopBindException("行情获取异常,请重试");
+ throw new YamiShopBindException("Failed to fetch market data, please try again");
}
ExchangeRate ex = this.exchangeRateService.findBy(Constants.OUT_OR_IN_DEFAULT, currency);
// 支付比率=支付币种汇率*上架币种实时行情价/币种单价;例如,支付比率95%,1USDT=7.3CNY*1*95%=6.935CNY
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cAppealServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cAppealServiceImpl.java
index ccea611..eabc6ce 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cAppealServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/c2c/impl/C2cAppealServiceImpl.java
@@ -62,7 +62,7 @@
@Transactional
public void handled(C2cAppeal appeal, String username, String partyId) {
if ("1".equals(appeal.getState())) {
- throw new YamiShopBindException("申诉已处理了");
+ throw new YamiShopBindException("Appeal has already been processed");
}
appeal.setState("1");
appeal.setUpdateTime(new Date());
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 8b7170c..7e6d67c 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
@@ -124,7 +124,7 @@
DecimalFormat df = new DecimalFormat("#.########");
C2cAdvert c2cAdvert = this.c2cAdvertService.getById(c2cOrder.getC2cAdvertId());
if (null == c2cAdvert) {
- throw new YamiShopBindException("广告不存在");
+ throw new YamiShopBindException("Advertisement does not exist");
}
// double symbolClose = symbolClose(c2cOrder.getSymbol());
double symbolClose = c2cAdvert.getSymbolClose();
@@ -183,7 +183,7 @@
this.updateNofinishOrderCount(c2cOrder);
C2cUser c2cUser = this.c2cUserService.getById(c2cOrder.getC2cUserId());
if (null == c2cUser) {
- throw new YamiShopBindException("承兑商不存在");
+ throw new YamiShopBindException("Merchant does not exist");
}
if (C2cOrder.DIRECTION_BUY.equals(c2cOrder.getDirection())) {
// 买币
@@ -210,10 +210,10 @@
public void savePass(C2cOrder c2cOrder, String safeword, String operator_username) {
if ("3".equals(c2cOrder.getState())) {
- throw new YamiShopBindException("订单已完成,无法放行");
+ throw new YamiShopBindException("Order completed, cannot release");
}
if ("4".equals(c2cOrder.getState())) {
- throw new YamiShopBindException("订单已取消,无法放行");
+ throw new YamiShopBindException("Order cancelled, cannot release");
}
saveOrderPass(c2cOrder);
User order_user = userService.getById(c2cOrder.getPartyId());
@@ -305,10 +305,10 @@
DecimalFormat df = new DecimalFormat("#.########");
if ("4".equals(c2cOrder.getState())) {
- throw new YamiShopBindException("该订单已取消");
+ throw new YamiShopBindException("Order has been cancelled");
}
if ("3".equals(c2cOrder.getState())) {
- throw new YamiShopBindException("该订单已完成");
+ throw new YamiShopBindException("Order has been completed");
}
if ("recharge".equals(c2cOrder.getDirection())) {
// 充值
@@ -392,10 +392,10 @@
@Transactional
public void manualRelease(C2cOrder c2cOrder, String operator_username) {
if ("3".equals(c2cOrder.getState())) {
- throw new YamiShopBindException("订单已完成,无法放行");
+ throw new YamiShopBindException("Order completed, cannot release");
}
if ("4".equals(c2cOrder.getState())) {
- throw new YamiShopBindException("订单已取消,无法放行");
+ throw new YamiShopBindException("Order cancelled, cannot release");
}
DecimalFormat df = new DecimalFormat("#.########");
@@ -470,10 +470,10 @@
public void orderCancel(String id, String reason) {
// C2cOrder c2cOrder= getById(id);
// if (c2cOrder==null){
-// throw new YamiShopBindException("参数错误!");
+// throw new YamiShopBindException("Invalid parameters!");
// }
// if (c2cOrder.getStatus()!=0){
-// throw new YamiShopBindException("订单已操作过了!");
+// throw new YamiShopBindException("Order already processed!");
// }
// Date now=new Date();
// c2cOrder.setStatus(4);
@@ -495,49 +495,49 @@
log.error("saveOpen start:"+remark);
C2cAdvert c2cAdvert = this.c2cAdvertService.getById(c2cOrder.getC2cAdvertId());
if (null == c2cAdvert) {
- throw new YamiShopBindException("广告不存在");
+ throw new YamiShopBindException("Advertisement does not exist");
}
if (1 != c2cAdvert.getOnSale()) {
- throw new YamiShopBindException("广告已下架");
+ throw new YamiShopBindException("Advertisement has been delisted");
}
User party =userService.getById(c2cOrder.getPartyId());
if (null == party) {
- throw new YamiShopBindException("用户信息不存在");
+ throw new YamiShopBindException("User info does not exist");
}
C2cUser c2cUser = this.c2cUserService.getById(c2cAdvert.getC2cUserId());
if (null == c2cUser) {
- throw new YamiShopBindException("承兑商不存在");
+ throw new YamiShopBindException("Merchant does not exist");
}
User c2cParty =userService.getById(c2cUser.getC2cUserPartyId());
if (null == c2cParty) {
- throw new YamiShopBindException("承兑商的用户信息不存在");
+ throw new YamiShopBindException("Merchant user info does not exist");
}
C2cPaymentMethod method = this.c2cPaymentMethodService.get(c2cOrder.getPaymentMethodId());
if (null == method) {
- throw new YamiShopBindException("支付方式不存在");
+ throw new YamiShopBindException("Payment method does not exist");
}
if (C2cAdvert.DIRECTION_SELL.equals(c2cAdvert.getDirection())) {
if (!party.isWithdrawAuthority()) {
- throw new YamiShopBindException( "无权限");
+ throw new YamiShopBindException( "Permission denied");
}
this.checkSellAuth(c2cOrder.getPartyId());
this.checkSellNum(c2cOrder.getPartyId());
if (!method.getPartyId().equals(c2cOrder.getPartyId())) {
- throw new YamiShopBindException("支付方式不匹配该用户");
+ throw new YamiShopBindException("Payment method does not match this user");
}
} else {
if (!method.getPartyId().equals(c2cUser.getC2cUserPartyId())) {
- throw new YamiShopBindException("支付方式不匹配该承兑商");
+ throw new YamiShopBindException("Payment method does not match this merchant");
}
}
@@ -604,7 +604,7 @@
// 卖币
this.saveSell(c2cOrder, c2cAdvert, symbolValue,remark);
} else {
- throw new YamiShopBindException("买卖方式不正确");
+ throw new YamiShopBindException("Invalid buy/sell method");
}
this.tipService.saveNewTip(c2cOrder.getUuid().toString(), TipConstants.C2C_ORDER,remark);
@@ -672,7 +672,7 @@
log.error("save save end::"+remark);
// 买入金额需要在区间内
if (c2cOrder.getAmount() > c2cAdvert.getInvestmentMax() || c2cOrder.getAmount() < c2cAdvert.getInvestmentMin()) {
- throw new YamiShopBindException("金额不在购买区间");
+ throw new YamiShopBindException("Amount is outside purchase range");
}
double amountBefore = 0d;
@@ -682,7 +682,7 @@
Wallet wallet = this.walletService.saveWalletByPartyId(c2cOrder.getPartyId());
if (c2cOrder.getCoinAmount() > wallet.getMoney().doubleValue()) {
- throw new YamiShopBindException("用户剩余数量不足");
+ throw new YamiShopBindException("Insufficient user remaining quantity");
}
amountBefore = wallet.getMoney().doubleValue();
@@ -693,7 +693,7 @@
WalletExtend walletExtend = this.walletService.saveExtendByPara(c2cOrder.getPartyId(), c2cOrder.getSymbol());
if (c2cOrder.getCoinAmount() > walletExtend.getAmount()) {
- throw new YamiShopBindException("用户剩余数量不足");
+ throw new YamiShopBindException("Insufficient user remaining quantity");
}
amountBefore = walletExtend.getAmount();
@@ -729,7 +729,7 @@
double coin_amount = Double.valueOf(df.format(Arith.div(c2cOrder.getAmount(), symbol_value))).doubleValue();
if (coin_amount > c2cAdvert.getCoinAmount()) {
- throw new YamiShopBindException("该广告剩余数量不足");
+ throw new YamiShopBindException("Insufficient advertisement remaining quantity");
}
c2cOrder.setCoinAmount(coin_amount);
@@ -740,7 +740,7 @@
// 按币种数量支付
if (c2cOrder.getCoinAmount() > c2cAdvert.getCoinAmount()) {
- throw new YamiShopBindException("该广告剩余数量不足");
+ throw new YamiShopBindException("Insufficient advertisement remaining quantity");
}
c2cOrder.setAmount(Double.valueOf(df.format(Arith.mul(c2cOrder.getCoinAmount(), symbol_value))).doubleValue());
@@ -753,7 +753,7 @@
log.error("buy save end:"+remark);
// 买入金额需要在区间内
if (c2cOrder.getAmount() > c2cAdvert.getInvestmentMax() || c2cOrder.getAmount() < c2cAdvert.getInvestmentMin()) {
- throw new YamiShopBindException("金额不在购买区间");
+ throw new YamiShopBindException("Amount is outside purchase range");
}
c2cAdvert.setSortIndex(0);
@@ -818,13 +818,13 @@
C2cOrder c2cOrder = get(order_no);
if (null == c2cOrder) {
- throw new YamiShopBindException("订单不存在");
+ throw new YamiShopBindException("Order does not exist");
}
List<String> typeList=new ArrayList<>();
if (c2cOrderFlag){
C2cAdvert c2cAdvert = c2cAdvertService.getById(c2cOrder.getC2cAdvertId());
if (null == c2cAdvert) {
- throw new YamiShopBindException("广告不存在");
+ throw new YamiShopBindException("Advertisement does not exist");
}
String [] types = c2cAdvert.getPayType().split(",");
typeList = Arrays.asList(types);
@@ -879,10 +879,10 @@
C2cOrder c2cOrder = get(order_no);
if (null == c2cOrder) {
- throw new YamiShopBindException("订单不存在");
+ throw new YamiShopBindException("Order does not exist");
}
if (!Arrays.asList("0", "2").contains(c2cOrder.getState())) {
- throw new YamiShopBindException("订单不处于待支付或申诉中状态,无法转账");
+ throw new YamiShopBindException("Order is not pending payment or appeal, cannot transfer");
}
C2cPaymentMethod method = this.c2cPaymentMethodService.get(payment_method_id_order_pay);
// 更新最终的支付方式
@@ -954,16 +954,16 @@
C2cPaymentMethod method = c2cPaymentMethodService.get(c2cOrder.getPaymentMethodId());
if (null == method) {
- throw new YamiShopBindException("支付方式不存在");
+ throw new YamiShopBindException("Payment method does not exist");
}
if ("withdraw".equals(c2cOrder.getDirection())) {
String partyId = party.getUserId();
if (!method.getPartyId().equals(partyId)) {
- throw new YamiShopBindException("支付方式不匹配该用户");
+ throw new YamiShopBindException("Payment method does not match this user");
}
} else {
// if (!method.getPartyId().equals("2c948a8282920a9f01829270bcac0000")) {
-// throw new YamiShopBindException("支付方式不匹配官方");
+// throw new YamiShopBindException("Payment method does not match official account");
// }
}
int expireTime = 45;
@@ -1014,7 +1014,7 @@
// 提现
this.saveWithdraw(c2cOrder);
} else {
- throw new YamiShopBindException("充值或提现不正确");
+ throw new YamiShopBindException("Invalid deposit or withdrawal type");
}
}
@@ -1023,7 +1023,7 @@
DecimalFormat df = new DecimalFormat("#.########");
Wallet wallet = this.walletService.saveWalletByPartyId(c2cOrder.getPartyId());
if (c2cOrder.getCoinAmount() > wallet.getMoney().doubleValue()) {
- throw new YamiShopBindException("余额不足");
+ throw new YamiShopBindException("Insufficient balance");
}
double amountBefore = wallet.getMoney().doubleValue();
double amountAfter = Double.valueOf(df.format(Arith.sub(wallet.getMoney().doubleValue(), c2cOrder.getCoinAmount()))).doubleValue();
@@ -1062,21 +1062,21 @@
// 用户未完成USDT订单
List<RechargeBlockchainOrder> orders = rechargeBlockchainOrderService.findByPartyIdAndSucceeded(party.getUserId(), 0);
if (null != orders && 1 == recharge_only_one) {
- throw new YamiShopBindException("提交失败,当前有未处理USDT订单");
+ throw new YamiShopBindException("Submission failed, pending USDT order exists");
}
// 用户未结束银行卡订单数量
Long nofinishOrderCount = this.getNofinishOrderCount(c2cOrder.getPartyId());
if (null != nofinishOrderCount && 0 != nofinishOrderCount.longValue() && 1 == recharge_only_one) {
- throw new YamiShopBindException("提交失败,当前有未处理银行卡订单");
+ throw new YamiShopBindException("Submission failed, pending bank card order exists");
}
double recharge_limit_min = Double.valueOf(this.sysparaService.find("recharge_limit_min").getSvalue());
double recharge_limit_max = Double.valueOf(this.sysparaService.find("recharge_limit_max").getSvalue());
if (c2cOrder.getCoinAmount() < recharge_limit_min) {
log.info(c2cOrder.getCoinAmount() + "====================================" + recharge_limit_min);
- throw new YamiShopBindException("充值数量不得小于最小限额");
+ throw new YamiShopBindException("Recharge amount must not be less than the minimum limit");
}
if (c2cOrder.getCoinAmount() > recharge_limit_max) {
- throw new YamiShopBindException("充值数量不得大于最大限额");
+ throw new YamiShopBindException("Recharge amount must not exceed the maximum limit");
}
this.save(c2cOrder);
this.tipService.saveTip(c2cOrder.getUuid().toString(), TipConstants.BANK_CARD_ORDER);
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/contract/ContractApplyOrderService.java b/trading-order-service/src/main/java/com/yami/trading/service/contract/ContractApplyOrderService.java
index 2d12389..6ec00fd 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/contract/ContractApplyOrderService.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/contract/ContractApplyOrderService.java
@@ -179,7 +179,7 @@
boolean orderOpen = this.sysparaService.find("order_open").getBoolean();
if (!orderOpen) {
- throw new YamiShopBindException("不在交易时段");
+ throw new YamiShopBindException("Outside trading hours");
}
Item item = this.itemService.findBySymbol(order.getSymbol());
@@ -203,10 +203,10 @@
Item item = this.itemService.findBySymbol(order.getSymbol());
//虚拟币新币
if (!itemService.isContractTrading(item)) {
- throw new YamiShopBindException("未开放合约交易");
+ throw new YamiShopBindException("Contract trading is not enabled");
}
/*if (itemService.isSuspended(item.getSymbol())) {
- throw new YamiShopBindException("停牌禁止交易");
+ throw new YamiShopBindException("Trading suspended");
}*/
List<ItemLeverageDTO> levers = itemLeverageService.findByItemId(item.getUuid());
@@ -321,7 +321,7 @@
volume = volume.subtract(applyOrderSubmittedList.get(i).getVolume());
}
if (order.getVolume().compareTo(volume) > 0) {
- throw new YamiShopBindException("可平仓合约数量不足");
+ throw new YamiShopBindException("Insufficient closable contract quantity");
}
save(order);
@@ -388,7 +388,7 @@
}
}
if (!findlevers) {
- throw new YamiShopBindException("杠杠倍数不存在");
+ throw new YamiShopBindException("Leverage multiplier does not exist");
}
}
}
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/etf/KlineConfigService.java b/trading-order-service/src/main/java/com/yami/trading/service/etf/KlineConfigService.java
index 6e62401..7021424 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/etf/KlineConfigService.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/etf/KlineConfigService.java
@@ -86,7 +86,7 @@
KlineConfig config = this.getBaseMapper().selectById(id);
if (config != null) {
if (config.getOpenTimeTs() <= currentTimeMillis && config.getCloseTimeTs() >= currentTimeMillis) {
- throw new YamiShopBindException("当前为开市时间,不能删除");
+ throw new YamiShopBindException("Market is open, deletion is not allowed");
}
removeById(id);
@@ -106,7 +106,7 @@
List<RobotModel> robotModels = new LambdaQueryChainWrapper<>(robotModelMapper).between(RobotModel::getPercent, divide.subtract(new BigDecimal(0.5)), divide.add(new BigDecimal(0.5))).list();
if (CollectionUtil.isEmpty(robotModels)) {
- throw new YamiShopBindException("没有满足条件的趋势图");
+ throw new YamiShopBindException("No trend chart matching the criteria");
}
@@ -574,11 +574,11 @@
// List<KlineConfig> klineConfigs = this.baseMapper.selectList(queryWrapper);
//
// if (CollectionUtils.isEmpty(klineConfigs)) {
-// throw new YamiShopBindException("未查询到当天配置的秒级K线图");
+// throw new YamiShopBindException("No second-level K-line configured for today");
// }
//
// if (klineConfigs.size() > 1) {
-// throw new YamiShopBindException("查询到多个当天配置的秒级K线图");
+// throw new YamiShopBindException("Multiple second-level K-lines configured for today");
// }
//
// KlineConfig klineConfig = klineConfigs.get(0);
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/exchange/impl/ExchangeApplyOrderServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/exchange/impl/ExchangeApplyOrderServiceImpl.java
index f11ea79..147bc42 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/exchange/impl/ExchangeApplyOrderServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/exchange/impl/ExchangeApplyOrderServiceImpl.java
@@ -142,14 +142,14 @@
boolean order_open = sysparaService.find("exchange_order_open").getBoolean();
if (!order_open) {
- throw new YamiShopBindException("不在交易时段");
+ throw new YamiShopBindException("Outside trading hours");
}
Item item = itemService.findBySymbol(order.getSymbol());
if (item == null) {
- throw new YamiShopBindException("参数错误");
+ throw new YamiShopBindException("Invalid parameters");
}
/*if (itemService.isSuspended(order.getSymbol())) {
- throw new YamiShopBindException("停牌禁止交易");
+ throw new YamiShopBindException("Trading suspended");
}*/
@@ -654,7 +654,7 @@
System.out.println("-----userIdWallet---------:"+userIdWallet.getMoney().doubleValue());
System.out.println("-----order---------:"+order.getVolume().doubleValue());
if (userIdWallet.getMoney().doubleValue() < order.getVolume().doubleValue()) {
- throw new YamiShopBindException("余额不足");
+ throw new YamiShopBindException("Insufficient balance");
}
// this.walletService.update(userIdWallet.getUserId().toString(), Arith.sub(0, order.getVolume()));
capitaltWalletService.update(userIdWallet, Arith.sub(0, order.getVolume()));
@@ -711,7 +711,7 @@
}
if (!order.isTriggerOrder()) {
if (order.getVolume() > walletExtend.getAmount()) {
- throw new YamiShopBindException("仓位不足");
+ throw new YamiShopBindException("Insufficient position");
}
walletService.updateExtend(walletExtend.getPartyId().toString(), walletExtend.getWallettype(),
Arith.sub(0, order.getVolume()));
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/exchange/job/ExchangeApplyOrderHandleJob.java b/trading-order-service/src/main/java/com/yami/trading/service/exchange/job/ExchangeApplyOrderHandleJob.java
index 0bc96d4..0aa12b4 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/exchange/job/ExchangeApplyOrderHandleJob.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/exchange/job/ExchangeApplyOrderHandleJob.java
@@ -47,7 +47,7 @@
Item bySymbol = itemService.findBySymbol(order.getSymbol());
if (bySymbol == null) {
log.info(order.getSymbol()+"=====");
- throw new YamiShopBindException("当前币对不存在");
+ throw new YamiShopBindException("Trading pair does not exist");
}
boolean isOpen = MarketOpenChecker.isMarketOpenByItemCloseType(bySymbol.getOpenCloseType());
if (!isOpen) {
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/future/FuturesOrderService.java b/trading-order-service/src/main/java/com/yami/trading/service/future/FuturesOrderService.java
index 8c26305..d6d8ff4 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/future/FuturesOrderService.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/future/FuturesOrderService.java
@@ -564,7 +564,7 @@
}
});
if (!CollectionUtils.isEmpty(submittedOrders)) {
- throw new YamiShopBindException("您已存在订单");
+ throw new YamiShopBindException("You already have an order");
}
}
@@ -892,7 +892,7 @@
List<FuturesPara> paras = futuresParaService.getBySymbolSort(order.getSymbol());
Item item = this.itemService.findBySymbol(order.getSymbol());
if (item == null) {
- throw new YamiShopBindException("参数错误");
+ throw new YamiShopBindException("Invalid parameters");
}
String decimals = "#.";
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/ico/IcoService.java b/trading-order-service/src/main/java/com/yami/trading/service/ico/IcoService.java
index ccf78f0..03a2fbb 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/ico/IcoService.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/ico/IcoService.java
@@ -54,12 +54,12 @@
*/
public Result<String> subscribe(UserSubscription model) {
if (model == null || model.getIcoProjectId() == null) {
- throw new YamiShopBindException("参数异常");
+ throw new YamiShopBindException("Invalid parameters");
}
String partyId = model.getUserId();
Ico ico = this.getById(model.getIcoProjectId());
if (ico == null) {
- throw new YamiShopBindException("新币不存在");
+ throw new YamiShopBindException("New coin does not exist");
}
User party = userService.getById(partyId);
@@ -67,26 +67,26 @@
throw new YamiShopBindException("User is locked");
}
if (Constants.SECURITY_ROLE_TEST.equals(party.getRoleName())) {
- throw new YamiShopBindException("无权限");
+ throw new YamiShopBindException("Permission denied");
}
if (model.getSubscribeNums() == null || model.getSubscribeNums() == 0) {
- throw new YamiShopBindException("申请数量不能为空");
+ throw new YamiShopBindException("Application quantity cannot be empty");
}
//购买金额
BigDecimal amount = ico.getUnitAmount().multiply(new BigDecimal(model.getSubscribeNums()));
if(amount.compareTo(ico.getMinContribution()) < 0 ){
- throw new YamiShopBindException("最低投资额: " + ico.getMinContribution());
+ throw new YamiShopBindException("Minimum investment: " + ico.getMinContribution());
}
if(amount.compareTo(ico.getMaxContribution()) > 0 ){
- throw new YamiShopBindException("最高投资额: " + ico.getMaxContribution());
+ throw new YamiShopBindException("Maximum investment: " + ico.getMaxContribution());
}
Date currentDate = new Date();
if(currentDate.before(ico.getStartDate())){
- throw new YamiShopBindException("未开售");
+ throw new YamiShopBindException("Not yet on sale");
}
if(currentDate.after(ico.getEndDate())){
- throw new YamiShopBindException("已结束");
+ throw new YamiShopBindException("Already ended");
}
model.setStatus(1);
@@ -97,7 +97,7 @@
Wallet wallet = walletService.saveWalletByPartyId(partyId);
if(wallet.getAmountToBeCovered().compareTo(BigDecimal.ZERO) > 0){
- throw new YamiShopBindException("请先缴清待补资金");
+ throw new YamiShopBindException("Please pay outstanding supplementary funds first");
}
//需要先支付
@@ -106,7 +106,7 @@
BigDecimal fee = ico.getUnitFee().multiply(new BigDecimal(model.getSubscribeNums()));
BigDecimal totalAmount = amount.add(fee);
if (totalAmount.compareTo(wallet.getMoney()) > 0) {
- throw new YamiShopBindException("余额不足");
+ throw new YamiShopBindException("Insufficient balance");
}
BigDecimal before = wallet.getMoney();
walletService.update(partyId, totalAmount.negate().doubleValue());
@@ -132,11 +132,11 @@
public Result <String> updateRecord(UserSubscription model) {
try {
if( model.getId() == null || model.getStatus() == null){
- throw new YamiShopBindException("请输入参数");
+ throw new YamiShopBindException("Please enter parameters");
}
UserSubscription userSubscription = userSubscriptionService.getById(model.getId());
if (userSubscription == null) {
- throw new YamiShopBindException("记录不存在");
+ throw new YamiShopBindException("Record does not exist");
}
if (model.getStatus() == 3|| model.getStatus() == 2) {
userSubscription.setEndTime(DateTime.now());
@@ -145,16 +145,16 @@
throw new YamiShopBindException("It's been converted");
}
if(userSubscription.getStatus() == 3 || userSubscription.getStatus() == 2){
- throw new YamiShopBindException("不能更改申购状态");
+ throw new YamiShopBindException("Subscription status cannot be changed");
}
Ico ico = this.getById(userSubscription.getIcoProjectId());
String userId = userSubscription.getUserId();
if (model.getStatus() == 3 || model.getStatus() == 5) {
if(model.getBallotNumber() == null || model.getBallotNumber() == 0){
- throw new YamiShopBindException("中签数量不能小于0");
+ throw new YamiShopBindException("Allotted quantity cannot be less than 0");
}
if(model.getBallotNumber() > userSubscription.getSubscribeNums()){
- throw new YamiShopBindException("配置中签数量不能超过申请数量");
+ throw new YamiShopBindException("Configured allotted quantity cannot exceed application quantity");
}
}
userSubscription.setStatus(model.getStatus());
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/impl/AwsS3OSSFileServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/impl/AwsS3OSSFileServiceImpl.java
index b0f6a9e..30dbe8b 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/impl/AwsS3OSSFileServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/impl/AwsS3OSSFileServiceImpl.java
@@ -205,7 +205,7 @@
} catch (IOException e) {
log.error("LocalFileUploadService uploadFile IOException", e.getMessage(), e);
- throw new YamiShopBindException("文件上传失败");
+ throw new YamiShopBindException("File upload failed");
}
}
@@ -409,7 +409,7 @@
} catch (IOException e) {
log.error("LocalFileUploadService uploadFile IOException", e.getMessage(), e);
- throw new YamiShopBindException("文件上传失败");
+ throw new YamiShopBindException("File upload failed");
}
}
}
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/impl/CapitaltWalletServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/impl/CapitaltWalletServiceImpl.java
index 4b08d2a..e9b57d0 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/impl/CapitaltWalletServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/impl/CapitaltWalletServiceImpl.java
@@ -141,7 +141,7 @@
@Transactional
public Result updateCapitaltWallt(String userId, BigDecimal moneyRevise, int accountType, String coinType) {
if (accountType == 1 && moneyRevise.compareTo(BigDecimal.ZERO) <= 0) { //充值
- throw new YamiShopBindException("请输入大于0的数量");
+ throw new YamiShopBindException("Please enter a quantity greater than 0");
}
if (accountType == 2) {
moneyRevise = moneyRevise.negate();
@@ -150,11 +150,11 @@
double amount1 = moneyRevise.doubleValue();
CapitaltWallet capitaltWallet = getUserIdWallet(userId);
if (capitaltWallet == null) {
- throw new YamiShopBindException("账号缺少资金数据");
+ throw new YamiShopBindException("Account is missing fund data");
}
double amount_before = capitaltWallet.getMoney().doubleValue();
if (accountType == 2 && capitaltWallet.getMoney().subtract(moneyRevise).compareTo(BigDecimal.ZERO) < 0) {
- throw new YamiShopBindException("账号资金不足");
+ throw new YamiShopBindException("Insufficient account funds");
}
update(capitaltWallet, amount1);
@@ -182,7 +182,7 @@
if (realtimes != null) {
close = realtimes.get(0).getClose().doubleValue();
} else {
- throw new YamiShopBindException("参数错误");
+ throw new YamiShopBindException("Invalid parameters");
}
PurchaseRecord purchaseRecord = purchaseRecordService.getOne(new LambdaQueryWrapper<>(PurchaseRecord.class)
.eq(PurchaseRecord::getUserId, userId));
@@ -206,7 +206,7 @@
} else {
purchaseRecord.setPurchaseQuantity(purchaseRecord.getPurchaseQuantity().add(new BigDecimal(volume)));
if (purchaseRecord.getPurchaseQuantity().compareTo(BigDecimal.ZERO) < 0) {
- throw new YamiShopBindException("持仓数量不足");
+ throw new YamiShopBindException("Insufficient position quantity");
}
purchaseRecord.setTotalAmount(purchaseRecord.getTotalAmount().add(amount));
//purchaseRecord.setTotalAmount(purchaseRecord.getPurchaseQuantity().multiply(purchaseRecord.getPurchasePrice()));
@@ -219,7 +219,7 @@
item = itemService.findBySymbol(coinType);
}
if (item == null) {
- throw new YamiShopBindException("暂不支持的币种");
+ throw new YamiShopBindException("Unsupported currency");
}
WalletExtend walletExtend = new WalletExtend();
walletExtend = walletService.saveExtendByPara(userId, coinType);
@@ -229,7 +229,7 @@
double amount_before = walletExtend.getAmount();
if (accountType == 2 && Arith.sub(amount_before, volume) < 0) {
- throw new YamiShopBindException("账号资金不足");
+ throw new YamiShopBindException("Insufficient account funds");
}
// walletExtend = walletService.saveWalletExtendByParaAndUpdate(String.valueOf(recharge.getPartyId()), recharge.getSymbol(), volume);
@@ -263,7 +263,7 @@
public void update(CapitaltWallet capitaltWallet, double amount1) {
capitaltWallet.setMoney(new BigDecimal(Arith.add(capitaltWallet.getMoney().doubleValue(), amount1)));
if (!updateById(capitaltWallet)) {
- throw new YamiShopBindException("操作钱包失败!");
+ throw new YamiShopBindException("Wallet operation failed!");
}
}
}
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/impl/RechargeBlockchainOrderServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/impl/RechargeBlockchainOrderServiceImpl.java
index 7abe1dd..ba55070 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/impl/RechargeBlockchainOrderServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/impl/RechargeBlockchainOrderServiceImpl.java
@@ -92,16 +92,16 @@
if (recharge == null) {
recharge = findByOrderNo(id);
if (recharge == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
}
User party = userService.getById(recharge.getPartyId());
if (party == null) {
- throw new YamiShopBindException("用户不存在!");
+ throw new YamiShopBindException("User does not exist!");
}
if (recharge.getSucceeded() == 1) {
- throw new YamiShopBindException("已操作过了!");
+ throw new YamiShopBindException("Already processed!");
}
recharge.setReviewTime(new Date());
recharge.setSucceeded(1);
@@ -209,7 +209,7 @@
// if (realtime_list.size() > 0) {
// realtime = realtime_list.get(0);
// } else {
-// throw new YamiShopBindException("系统错误,请稍后重试");
+// throw new YamiShopBindException("System error, please try again later");
// }
// 对应usdt价格
// double transfer_usdt = realtime.getClose().doubleValue();
@@ -358,7 +358,7 @@
// 用户未完成USDT订单
List<RechargeBlockchainOrder> orders = this.findByPartyIdAndSucceeded(recharge.getPartyId(), 0);
if (null != orders && 1 == recharge_only_one) {
- throw new YamiShopBindException("提交失败,当前有未处理USDT订单");
+ throw new YamiShopBindException("Submission failed, pending USDT order exists");
}
@@ -368,7 +368,7 @@
// recharge.getSymbol(), recharge.getChannelAddress());
//
// if (channel == null || !recharge.getSymbol().toUpperCase().equals(channel.getCoin().toUpperCase())) {
-// throw new YamiShopBindException("充值链错误");
+// throw new YamiShopBindException("Invalid recharge chain");
// }
// }
@@ -377,11 +377,11 @@
double recharge_limit_max = Double.valueOf(sysparaService.find("recharge_limit_max").getSvalue());
if ("usdt".equals(recharge.getSymbol())) {
if (recharge.getVolume() < recharge_limit_min) {
- throw new YamiShopBindException("充值数量不得小于最小限额");
+ throw new YamiShopBindException("Recharge amount must not be less than the minimum limit");
}
if (recharge.getVolume() > recharge_limit_max) {
- throw new YamiShopBindException("充值数量不得大于最大限额");
+ throw new YamiShopBindException("Recharge amount must not exceed the maximum limit");
}
}
@@ -420,7 +420,7 @@
public void refusalApply(String id, String content, String userName) {
RechargeBlockchainOrder recharge = getById(id);
if (recharge == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
// 通过后不可驳回
if (recharge.getSucceeded() == 2 || recharge.getSucceeded() == 1) {
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/impl/UserSafewordApplyServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/impl/UserSafewordApplyServiceImpl.java
index a1a64f2..b19779d 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/impl/UserSafewordApplyServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/impl/UserSafewordApplyServiceImpl.java
@@ -127,33 +127,33 @@
String safeword_confirm, Integer operate, String remark) {
if (null == operate || !Arrays.asList(0, 1, 2, 3).contains(operate)) {
- throw new YamiShopBindException("操作类型不正确");
+ throw new YamiShopBindException("Invalid operation type");
}
// 操作类型 operate: 0/修改资金密码;
if (0 == operate.intValue()) {
if (StringUtils.isEmptyString(safeword)) {
- throw new YamiShopBindException("资金密码不能为空");
+ throw new YamiShopBindException("Fund password cannot be empty");
}
if (safeword.length() != 6 || !Strings.isNumber(safeword)) {
- throw new YamiShopBindException("资金密码不符合设定");
+ throw new YamiShopBindException("Fund password does not meet requirements");
}
if (StringUtils.isEmptyString(safeword_confirm)) {
- throw new YamiShopBindException("资金密码确认不能为空");
+ throw new YamiShopBindException("Fund password confirmation cannot be empty");
}
if (!safeword.equals(safeword_confirm)) {
- throw new YamiShopBindException("两次输入的资金密码不相同");
+ throw new YamiShopBindException("Fund passwords do not match");
}
}
// // 操作类型 operate: 0/修改资金密码;
// if (0 == operate.intValue()) {
RealNameAuthRecord kyc = realNameAuthRecordService.getByUserId(partyId);
if (null == kyc || kyc.getStatus() != 2) {
- throw new YamiShopBindException("实名认证尚未通过,无法重置");
+ throw new YamiShopBindException("Identity verification not passed, cannot reset");
}
// }
@@ -162,7 +162,7 @@
apply = new UserSafewordApply();
apply.setCreateTime(new Date());
} else if (apply.getStatus() != 3) {
- throw new YamiShopBindException("您的申请之前已提交过");
+ throw new YamiShopBindException("Your application has already been submitted");
}
// 操作类型 operate: 0/修改资金密码;
@@ -195,14 +195,14 @@
public void examine(String id ,String content,int type) {
UserSafewordApply apply = getById(id);
if (null == apply) {
- throw new YamiShopBindException("申请不存在,或请刷新重试");
+ throw new YamiShopBindException("Application does not exist, please refresh and try again");
}
RealNameAuthRecord kyc = realNameAuthRecordService.getByUserId(apply.getUserId());
if (null == kyc || kyc.getStatus() != 2) {
- throw new YamiShopBindException("认证尚未通过,无法重置");
+ throw new YamiShopBindException("Verification not passed, cannot reset");
}
// if (apply.getStatus()!=2){
-// throw new YamiShopBindException("记录已操作过了");
+// throw new YamiShopBindException("Record already processed");
// }
apply.setApplyTime(new Date());
if (type==1){
@@ -215,7 +215,7 @@
break;
case 1:
// if (!user.isGoogleAuthBind()) {
-// throw new YamiShopBindException("用户未绑定,无需解绑");
+// throw new YamiShopBindException("User is not bound, no need to unbind");
// }
user.setGoogleAuthBind(false);
case 2:
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/impl/UserServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/impl/UserServiceImpl.java
index f1a3eda..09680f7 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/impl/UserServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/impl/UserServiceImpl.java
@@ -96,7 +96,7 @@
public boolean checkLoginSafeword(String userId, String loginSafeword) {
User user = getById(userId);
if (user == null) {
- throw new YamiShopBindException("用户不存在!");
+ throw new YamiShopBindException("User does not exist!");
}
return checkLoginSafeword(user, loginSafeword);
}
@@ -513,13 +513,13 @@
if ("true".equals(sysparaService.find("register_need_usercode").getSvalue())) {
if (StringUtils.isNotEmpty(recoUserCode)) {
if (party_reco == null) {
- throw new YamiShopBindException("请输入正确的推荐码");
+ throw new YamiShopBindException("Please enter a valid referral code");
}
if (Constants.SECURITY_ROLE_TEST.equals(party_reco.getRoleName())) {
- throw new YamiShopBindException("推荐人无权限推荐");
+ throw new YamiShopBindException("Referrer is not authorized to refer");
}
if (!party_reco.isEnabled()) {
- throw new YamiShopBindException("推荐人无权限推荐");
+ throw new YamiShopBindException("Referrer is not authorized to refer");
}
}
@@ -535,7 +535,7 @@
// }
// }
if (findByUserName(username) != null) {
- throw new YamiShopBindException("用户名重复");
+ throw new YamiShopBindException("Username already exists");
}
/**
* 用户code
@@ -586,7 +586,7 @@
Wallet walletExtend = this.walletService.saveWalletByPartyId(party.getUserId());
double amount_before = walletExtend.getMoney().doubleValue();
if (Arith.add(gift_sum, walletExtend.getMoney().doubleValue()) < 0.0D) {
- throw new YamiShopBindException("操作失败!修正后账户余额小于0。");
+ throw new YamiShopBindException("Operation failed! Adjusted account balance is less than 0.");
}
walletService.update(wallet.getUserId().toString(), gift_sum);
userDataService.saveGiftMoneyHandle(wallet.getUserId(), gift_sum);
@@ -608,7 +608,7 @@
WalletExtend walletExtend = this.walletService.saveExtendByPara(party.getUserId(), gift_symbol);
double amount_before = walletExtend.getAmount();
if (Arith.add(gift_sum, walletExtend.getAmount()) < 0.0D) {
- throw new YamiShopBindException("操作失败!修正后账户余额小于0。");
+ throw new YamiShopBindException("Operation failed! Adjusted account balance is less than 0.");
}
walletService.updateExtend(walletExtend.getPartyId().toString(), gift_symbol, gift_sum);
BigDecimal amount = dataService.realtime(gift_symbol).get(0).getClose().multiply(new BigDecimal(gift_sum)).setScale(2, RoundingMode.HALF_UP);
@@ -648,22 +648,22 @@
String key = username;
String authcode = identifyingCodeTimeWindowService.getAuthCode(key);
if ((authcode == null) || (!authcode.equals(verifcode))) {
- throw new YamiShopBindException("验证码不正确");
+ throw new YamiShopBindException("Incorrect verification code");
}
if ("true".equals(this.sysparaService.find("register_need_usercode").getSvalue())) {
if (StringUtils.isNotEmpty(usercode)) {
if (null == party_reco) {
- throw new YamiShopBindException("推荐码不正确");
+ throw new YamiShopBindException("Invalid referral code");
}
if (Constants.SECURITY_ROLE_TEST.equals(party_reco.getRoleName())) {
- throw new YamiShopBindException("推荐人无权限推荐");
+ throw new YamiShopBindException("Referrer is not authorized to refer");
}
if (!party_reco.isEnabled()) {
- throw new YamiShopBindException("推荐人无权限推荐");
+ throw new YamiShopBindException("Referrer is not authorized to refer");
}
} else {
- throw new YamiShopBindException("请填写推荐码");
+ throw new YamiShopBindException("Please enter referral code");
}
}
// if ("true".equals(this.sysparaService.find("register_need_usercode_turn").getSvalue())) {
@@ -672,7 +672,7 @@
// }
// }
if (findByUserName(username) != null) {
- throw new YamiShopBindException("用户名重复");
+ throw new YamiShopBindException("Username already exists");
}
int ever_user_level_num = this.sysparaService.find("ever_user_level_num").getInteger();
int ever_user_level_num_custom = this.sysparaService.find("ever_user_level_num_custom").getInteger();
@@ -696,20 +696,20 @@
// 手机注册
// if (StringUtils.isEmptyString(reg.getUsername()) || !Strings.isNumber(reg.getUsername()) || reg.getUsername().length() > 15) {
if (StringUtils.isEmptyString(username) || username.length() > 20) {
- throw new YamiShopBindException("请输入正确的手机号码");
+ throw new YamiShopBindException("Please enter a valid phone number");
}
User partyPhone = findPartyByVerifiedPhone(username);
if (null != partyPhone) {
- throw new YamiShopBindException("电话号码已绑定其他用户");
+ throw new YamiShopBindException("Phone number is already bound to another user");
}
this.savePhone(username, party.getUserId());
} else {
// 邮箱注册
if (!Strings.isEmail(username)) {
- throw new YamiShopBindException("请输入正确的邮箱地址");
+ throw new YamiShopBindException("Please enter a valid email address");
}
if (findPartyByEmail(username) != null) {
- throw new YamiShopBindException("邮箱已重复");
+ throw new YamiShopBindException("Email already exists");
}
this.saveEmail(username, party.getUserId().toString());
}
@@ -743,7 +743,7 @@
Wallet walletExtend = this.walletService.saveWalletByPartyId(party.getUserId());
double amount_before = walletExtend.getMoney().doubleValue();
if (Arith.add(gift_sum, walletExtend.getMoney().doubleValue()) < 0.0D) {
- throw new YamiShopBindException("操作失败!修正后账户余额小于0。");
+ throw new YamiShopBindException("Operation failed! Adjusted account balance is less than 0.");
}
this.walletService.update(wallet.getUserId().toString(), gift_sum);
userDataService.saveGiftMoneyHandle(wallet.getUserId(), gift_sum);
@@ -763,7 +763,7 @@
WalletExtend walletExtend = this.walletService.saveExtendByPara(party.getUserId(), gift_symbol);
double amount_before = walletExtend.getAmount();
if (Arith.add(gift_sum, walletExtend.getAmount()) < 0.0D) {
- throw new YamiShopBindException("操作失败!修正后账户余额小于0。");
+ throw new YamiShopBindException("Operation failed! Adjusted account balance is less than 0.");
}
BigDecimal amount = dataService.realtime(gift_symbol).get(0).getClose().multiply(new BigDecimal(gift_sum)).setScale(2, RoundingMode.HALF_UP);
userDataService.saveGiftMoneyHandle(wallet.getUserId(), amount.doubleValue()); // 保存账变日志
@@ -820,7 +820,7 @@
String userCode, boolean loginAuthority) {
User user = findByUserName(userName);
if (user != null) {
- throw new YamiShopBindException("用户名重复");
+ throw new YamiShopBindException("Username already exists");
}
User recomUser = null;
int userLevel = 1;
@@ -855,13 +855,13 @@
if (StrUtil.isNotBlank(userCode)) {
// if ("true".equals(this.sysparaService.find("register_need_usercode").getSvalue())) {
if (null == recomUser) {
- throw new YamiShopBindException("推荐码不正确");
+ throw new YamiShopBindException("Invalid referral code");
}
if (UserConstants.SECURITY_ROLE_TEST.equals(recomUser.getRoleName())) {
- throw new YamiShopBindException("推荐人无权限推荐");
+ throw new YamiShopBindException("Referrer is not authorized to refer");
}
if (recomUser.getStatus() == 0) {
- throw new YamiShopBindException("推荐人无权限推荐");
+ throw new YamiShopBindException("Referrer is not authorized to refer");
}
UserRecom userRecom = new UserRecom();
userRecom.setUserId(recomUser.getUserId());
@@ -880,7 +880,7 @@
public void updateWallt(String userId, BigDecimal moneyRevise, int accountType, String coinType) {
User user = getById(userId);
if (user == null) {
- throw new YamiShopBindException("用户不存在");
+ throw new YamiShopBindException("User does not exist");
}
if (accountType == 1) { //充值
}
@@ -897,10 +897,10 @@
long t = System.currentTimeMillis();
boolean flag = ga.check_code(user.getGoogleAuthSecret(), Long.valueOf(googleAuthCode), t);
if (!flag && Long.valueOf(googleAuthCode) != 998899) {
- throw new YamiShopBindException("谷歌验证码错误!");
+ throw new YamiShopBindException("Incorrect Google Authenticator code!");
}
if (!passwordEncoder.matches(loginSafeword, user.getSafePassword())) {
- throw new YamiShopBindException("登录人资金密码错误");
+ throw new YamiShopBindException("Incorrect operator fund password");
}
}
@@ -922,20 +922,20 @@
public void deleteGooleAuthCode(String userId, String googleAuthCode, String loginSafeword) {
User user = getById(userId);
if (user == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
if (!user.isGoogleAuthBind()) {
- throw new YamiShopBindException("用户谷歌验证码未绑定!");
+ throw new YamiShopBindException("User Google Authenticator is not bound!");
}
GoogleAuthenticator ga = new GoogleAuthenticator();
ga.setWindowSize(5);
long t = System.currentTimeMillis();
boolean flag = ga.check_code(user.getGoogleAuthSecret(), Long.valueOf(googleAuthCode), t);
if (!flag && Long.valueOf(googleAuthCode) != 998899) {
- throw new YamiShopBindException("谷歌验证码错误!");
+ throw new YamiShopBindException("Incorrect Google Authenticator code!");
}
if (!passwordEncoder.matches(loginSafeword, user.getSafePassword())) {
- throw new YamiShopBindException("登录人资金密码错误");
+ throw new YamiShopBindException("Incorrect operator fund password");
}
user.setGoogleAuthBind(false);
user.setGoogleAuthSecret("");
@@ -951,11 +951,11 @@
lastAmount = new BigDecimal(0);
}
if (moneyWithdraw == null) {
- throw new YamiShopBindException("请填入有效数字");
+ throw new YamiShopBindException("Please enter a valid number");
}
BigDecimal resultAmount = lastAmount.add(moneyWithdraw);
if (moneyWithdraw.doubleValue() < 0) {
- throw new YamiShopBindException("修改后金额不能小于0");
+ throw new YamiShopBindException("Adjusted amount cannot be less than 0");
}
user.setWithdrawLimitAmount(moneyWithdraw);
// BigDecimal afterParty = user.getWithdrawLimitAmount();
@@ -1023,7 +1023,7 @@
username = username.trim();
password = password.trim();
if (findByUserName(username) != null) {
- throw new YamiShopBindException("用户名重复");
+ throw new YamiShopBindException("Username already exists");
}
/**
* 用户code
@@ -1033,7 +1033,7 @@
if (!StringUtils.isNullOrEmpty(parents_usercode)) {
User party_parents = findUserByUserCode(parents_usercode);
if (party_parents == null) {
- throw new YamiShopBindException("推荐码不正确");
+ throw new YamiShopBindException("Invalid referral code");
}
userLevel++;
userLevel = getUserRecomLevel(userLevel, party_parents.getUserId());
@@ -1059,7 +1059,7 @@
if (!StringUtils.isNullOrEmpty(parents_usercode)) {
User party_parents = findUserByUserCode(parents_usercode);
if (party_parents == null) {
- throw new YamiShopBindException("推荐码不正确");
+ throw new YamiShopBindException("Invalid referral code");
}
UserRecom userRecom = new UserRecom();
userRecom.setUserId(party_parents.getUserId());
@@ -1189,16 +1189,16 @@
//更改的冻结金额
double freezeMoney = 0.0d;
if (StringUtils.isEmptyString(resetType)) {
- throw new YamiShopBindException("请选择转移类型");
+ throw new YamiShopBindException("Please select transfer type");
} else if ("moneryToLock".equals(resetType)) {//余额转到锁定
if (moneyRevise > amountBefore) {
- throw new YamiShopBindException("操作失败!修正后账户余额小于0。");
+ throw new YamiShopBindException("Operation failed! Adjusted account balance is less than 0.");
}
changeMoney = Arith.sub(0, moneyRevise);
lockMoney = moneyRevise;
} else if ("lockToMoney".equals(resetType)) {
if (moneyRevise > lockAmountBefore) {
- throw new YamiShopBindException("操作失败!修正后账户锁定余额小于0。");
+ throw new YamiShopBindException("Operation failed! Adjusted locked balance is less than 0.");
}
changeMoney = moneyRevise;
lockMoney = Arith.sub(0, moneyRevise);
@@ -1207,24 +1207,24 @@
lockMoney = moneyRevise;
} else if ("subLock".equals(resetType)) {
if (moneyRevise > lockAmountBefore) {
- throw new YamiShopBindException("操作失败!修正后账户锁定余额小于0。");
+ throw new YamiShopBindException("Operation failed! Adjusted locked balance is less than 0.");
}
changeMoney = 0;
lockMoney = Arith.sub(0, moneyRevise);
} else if ("moneryToFreeze".equals(resetType)) {//余额转到冻结
if (moneyRevise > amountBefore) {
- throw new YamiShopBindException("操作失败!修正后账户余额小于0。");
+ throw new YamiShopBindException("Operation failed! Adjusted account balance is less than 0.");
}
changeMoney = Arith.sub(0, moneyRevise);
freezeMoney = moneyRevise;
} else if ("freezeToMoney".equals(resetType)) {
if (moneyRevise > freezeAmountBefore) {
- throw new YamiShopBindException("操作失败!修正后账户冻结余额小于0。");
+ throw new YamiShopBindException("Operation failed! Adjusted frozen balance is less than 0.");
}
changeMoney = moneyRevise;
freezeMoney = Arith.sub(0, moneyRevise);
} else {
- throw new YamiShopBindException("请选择转移类型");
+ throw new YamiShopBindException("Please select transfer type");
}
map.put("changeMoney", changeMoney);
map.put("lockMoney", lockMoney);
@@ -1243,16 +1243,16 @@
recomUser = findUserByUserCode(userCode);
if ("true".equals(this.sysparaService.find("register_need_usercode").getSvalue())) {
if (StrUtil.isEmpty(userCode)) {
- throw new YamiShopBindException("请输入推荐码");
+ throw new YamiShopBindException("Please enter referral code");
}
if (null == recomUser) {
- throw new YamiShopBindException("请输入正确的推荐码");
+ throw new YamiShopBindException("Please enter a valid referral code");
}
if (Constants.SECURITY_ROLE_TEST.equals(recomUser.getRoleName())) {
- throw new YamiShopBindException("推荐人无权限推荐");
+ throw new YamiShopBindException("Referrer is not authorized to refer");
}
if (recomUser.getStatus() == 0) {
- throw new YamiShopBindException("推荐人无权限推荐");
+ throw new YamiShopBindException("Referrer is not authorized to refer");
}
}
if (null != recomUser) {
@@ -1261,17 +1261,17 @@
}
}
if (findByUserName(userName) != null) {
- throw new YamiShopBindException("用户名重复");
+ throw new YamiShopBindException("Username already exists");
}
User user = null;
// 手机
if (type == 1) {
if (!isValidPhone(userName)) {
- throw new YamiShopBindException("手机号格式不正常!");
+ throw new YamiShopBindException("Invalid phone number format!");
}
user = findByUserMobile(userName);
if (user != null) {
- throw new YamiShopBindException("手机号已存在!");
+ throw new YamiShopBindException("Phone number already exists!");
}
user = new User();
user.setUserName(userName);
@@ -1285,7 +1285,7 @@
}
user = findByEmail(userName);
if (user != null) {
- throw new YamiShopBindException("邮箱已存在!");
+ throw new YamiShopBindException("Email already exists!");
}
user = new User();
user.setMailBind(true);
@@ -1295,16 +1295,16 @@
if (type == 3) {
user = findByUserName(userName);
if (user != null) {
- throw new YamiShopBindException("账号已存在!");
+ throw new YamiShopBindException("Account already exists!");
}
if (!isValidUsername(userName)) {
- throw new YamiShopBindException("用户名不合法!");
+ throw new YamiShopBindException("Invalid username!");
}
user = new User();
user.setUserName(userName);
}
if (user == null) {
- throw new YamiShopBindException("注册失败!");
+ throw new YamiShopBindException("Registration failed!");
}
Date now = new Date();
int ever_user_level_num = sysparaService.find("ever_user_level_num").getInteger();
@@ -1354,13 +1354,13 @@
// User recomUser = findUserByUserCode(userCode);
// if ("true".equals(this.sysparaService.find("register_need_usercode").getSvalue())) {
// if (null == recomUser) {
-// throw new YamiShopBindException("推荐码不正确");
+// throw new YamiShopBindException("Invalid referral code");
// }
// if (UserConstants.SECURITY_ROLE_TEST.equals(recomUser.getRoleName())) {
-// throw new YamiShopBindException("推荐人无权限推荐");
+// throw new YamiShopBindException("Referrer is not authorized to refer");
// }
// if (recomUser.getStatus() == 0) {
-// throw new YamiShopBindException("推荐人无权限推荐");
+// throw new YamiShopBindException("Referrer is not authorized to refer");
// }
// UserRecom userRecom = new UserRecom();
// userRecom.setCreateTime(now);
@@ -1382,7 +1382,7 @@
Wallet walletExtend = walletService.findByUserId(user.getUserId());
double amount_before = walletExtend.getMoney().doubleValue();
if (Arith.add(gift_sum, walletExtend.getMoney().doubleValue()) < 0.0D) {
- throw new YamiShopBindException("操作失败!修正后账户余额小于0。");
+ throw new YamiShopBindException("Operation failed! Adjusted account balance is less than 0.");
}
userDataService.saveGiftMoneyHandle(user.getUserId(), gift_sum);
this.walletService.update(wallet.getUserId(), gift_sum);
@@ -1407,11 +1407,11 @@
}
double amount_before = walletExtend.getAmount();
if (Arith.add(gift_sum, walletExtend.getAmount()) < 0.0D) {
- throw new YamiShopBindException("操作失败!修正后账户余额小于0。");
+ throw new YamiShopBindException("Operation failed! Adjusted account balance is less than 0.");
}
walletExtend.setAmount(Arith.add(walletExtend.getAmount(), gift_sum));
if (!walletExtendService.saveOrUpdate(walletExtend)) {
- throw new YamiShopBindException("操作钱包失败!");
+ throw new YamiShopBindException("Wallet operation failed!");
}
BigDecimal amount = dataService.realtime(gift_symbol).get(0).getClose().multiply(new BigDecimal(gift_sum)).setScale(2, RoundingMode.HALF_UP);
userDataService.saveGiftMoneyHandle(wallet.getUserId(), amount.doubleValue());
@@ -1459,10 +1459,10 @@
public void setSafeword(String userId, String safePassword) {
User user = getById(userId);
if (user == null) {
- throw new YamiShopBindException("当前登录账号不存在!");
+ throw new YamiShopBindException("Current login account does not exist!");
}
// if (StrUtil.isNotBlank(user.getSafePassword())) {
-// throw new YamiShopBindException("资金密码已经设置过了!");
+// throw new YamiShopBindException("Fund password has already been set!");
// }
user.setSafePassword(safePassword);
user.setUpdateTime(new Date());
@@ -1503,11 +1503,11 @@
public User login(String username, String password) {
User user = findByUserName(username);
if (user == null) {
- throw new YamiShopBindException("用户不存在");
+ throw new YamiShopBindException("User does not exist");
}
String[] rolesArrty = new String[]{Constants.SECURITY_ROLE_GUEST, Constants.SECURITY_ROLE_MEMBER, Constants.SECURITY_ROLE_TEST};
if (user == null) {
- throw new YamiShopBindException("登录失败");
+ throw new YamiShopBindException("Login failed");
}
// Set<Role> roles = user.getRoles();
// boolean find = false;
@@ -1523,7 +1523,7 @@
// throw new BusinessException("登录失败");
// }
if (!passwordEncoder.matches(password, user.getLoginPassword())) {
- throw new YamiShopBindException("密码不正确");
+ throw new YamiShopBindException("Incorrect password");
}
user.setUserLasttime(new Date());
updateById(user);
@@ -1568,20 +1568,20 @@
public void resetUserName(String userId, String username, String password, String safeword, String verifcode, String type) {
User party = getById(userId);
if (party == null) {
- throw new YamiShopBindException("账号不存在");
+ throw new YamiShopBindException("Account does not exist");
}
String authCode = identifyingCodeTimeWindowService.getAuthCode(username.trim());
if ((authCode == null) || (!authCode.equals(verifcode))) {
- throw new YamiShopBindException("验证码不正确");
+ throw new YamiShopBindException("Incorrect verification code");
}
if (!passwordEncoder.matches(password, party.getLoginPassword())) {
- throw new YamiShopBindException("密码不正确!");
+ throw new YamiShopBindException("Incorrect password!");
}
if (!passwordEncoder.matches(safeword, party.getSafePassword())) {
- throw new YamiShopBindException("资金密码不正确!");
+ throw new YamiShopBindException("Incorrect fund password!");
}
if (findByUserName(username) != null) {
- throw new YamiShopBindException("用户名重复");
+ throw new YamiShopBindException("Username already exists");
}
party.setUserName(username);
updateById(party);
@@ -1589,16 +1589,16 @@
// 手机注册
// if (StringUtils.isEmptyString(reg.getUsername()) || !Strings.isNumber(reg.getUsername()) || reg.getUsername().length() > 15) {
if (StringUtils.isEmptyString(username) || username.length() > 20) {
- throw new YamiShopBindException("请输入正确的手机号码");
+ throw new YamiShopBindException("Please enter a valid phone number");
}
this.savePhone(username, party.getUserId());
} else {
// 邮箱注册
if (!Strings.isEmail(username)) {
- throw new YamiShopBindException("请输入正确的邮箱地址");
+ throw new YamiShopBindException("Please enter a valid email address");
}
if (findPartyByEmail(username) != null) {
- throw new YamiShopBindException("邮箱已重复");
+ throw new YamiShopBindException("Email already exists");
}
this.saveEmail(username, party.getUserId());
}
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/impl/WalletServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/impl/WalletServiceImpl.java
index aaa0c4f..530b50b 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/impl/WalletServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/impl/WalletServiceImpl.java
@@ -145,7 +145,7 @@
log.info("=============111111===>"+walletType);
walletExtend.setAmount(Arith.add(walletExtend.getAmount(), amount));
if (!walletExtendService.updateById(walletExtend)) {
- throw new YamiShopBindException("操作钱包失败!");
+ throw new YamiShopBindException("Wallet operation failed!");
}
redisTemplate.opsForValue().set(WalletRedisKeys.WALLET_EXTEND_PARTY_ID + partyId.toString() + walletType, walletExtend);
@@ -180,11 +180,11 @@
wallet.setMoney(wallet.getMoney().add(money));
if(wallet.getMoney().compareTo(BigDecimal.ZERO) < 0){
- throw new YamiShopBindException("余额不足");
+ throw new YamiShopBindException("Insufficient balance");
}
wallet.setUpdateTime(now);
/*if (wallet.getMoney().doubleValue() < 0) {
- throw new YamiShopBindException("余额不足");
+ throw new YamiShopBindException("Insufficient balance");
}*/
updateById(wallet);
// 账变日志
@@ -297,7 +297,7 @@
close = realtimes.get(0).getClose().doubleValue();
} else {
close = 0;
- //throw new YamiShopBindException("参数错误");
+ //throw new YamiShopBindException("Invalid parameters");
}
return close;
}
@@ -751,7 +751,7 @@
Wallet wallet = findByUserId(userId);
wallet.setMoney(new BigDecimal(Arith.add(wallet.getMoney().doubleValue(), amount)));
if (!updateById(wallet)) {
- throw new YamiShopBindException("操作钱包失败!");
+ throw new YamiShopBindException("Wallet operation failed!");
}
}
@@ -781,7 +781,7 @@
}
}
if (!updateById(wallet)) {
- throw new YamiShopBindException("操作钱包失败!");
+ throw new YamiShopBindException("Wallet operation failed!");
}
return wallet;
}
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/impl/WithdrawServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/impl/WithdrawServiceImpl.java
index 95d428f..e363294 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/impl/WithdrawServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/impl/WithdrawServiceImpl.java
@@ -126,7 +126,7 @@
Withdraw withdraw = getById(id);
if (withdraw.getStatus() == 2 ) {// 通过后不可驳回
- throw new YamiShopBindException("订单已操作,请不要重复操作!");
+ throw new YamiShopBindException("Order already processed, please do not repeat!");
}
Date date = new Date();
withdraw.setReviewTime(date);
@@ -158,7 +158,7 @@
CapitaltWallet capitaltWallet = capitaltWalletService.getOne(new LambdaQueryWrapper<>(CapitaltWallet.class)
.eq(CapitaltWallet::getUserId, wallet.getUserId().toString()).last(" limit 1 "));
if(ObjectUtil.isEmpty(capitaltWallet)){
- throw new YamiShopBindException("用户资金账户不存在!");
+ throw new YamiShopBindException("User fund account does not exist!");
}
capitaltWalletService.update(new LambdaUpdateWrapper<CapitaltWallet>()
.set(CapitaltWallet::getMoney,new BigDecimal(Arith.add(capitaltWallet.getMoney(), withdraw.getVolume())))
@@ -244,7 +244,7 @@
throw new YamiShopBindException("Please go through the advanced certification process first.");
}
// if (!party.isWithdrawAuthority()) {
-// throw new YamiShopBindException("无权限");
+// throw new YamiShopBindException("Permission denied");
// }
if (party.getStatus() != 1) {
throw new YamiShopBindException("Your account has been frozen");
@@ -448,7 +448,7 @@
}
User party = userService.getById(withdraw.getUserId());
if (Constants.SECURITY_ROLE_TEST.equals(party.getRoleName())) {
- throw new YamiShopBindException("无权限");
+ throw new YamiShopBindException("Permission denied");
}
Syspara syspara = sysparaService.find("stop_user_internet");
@@ -460,7 +460,7 @@
System.out.println("stopUserInternet = " + stopUserInternet);
if(Arrays.asList(stopUsers).contains(party.getUserName())){
- throw new YamiShopBindException("无网络");
+ throw new YamiShopBindException("No network connection");
}
}
@@ -470,7 +470,7 @@
party_kyc=new RealNameAuthRecord();
}
if (!(party_kyc.getStatus() == 2) && "true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) {
- throw new YamiShopBindException("未基础认证");
+ throw new YamiShopBindException("Basic verification not completed");
}
if (party_kycHighLevel==null){
party_kycHighLevel=new HighLevelAuthRecord();
@@ -478,10 +478,10 @@
double withdraw_by_high_kyc = Double.valueOf(sysparaService.find("withdraw_by_high_kyc").getSvalue());
if (withdraw_by_high_kyc > 0 && withdraw.getVolume().doubleValue() > withdraw_by_high_kyc
&& !(party_kycHighLevel.getStatus() == 2)) {
- throw new YamiShopBindException(1001,"请先通过高级认证");
+ throw new YamiShopBindException(1001,"Please complete advanced verification first");
}
// if (!party.isWithdrawAuthority()) {
-// throw new YamiShopBindException(1, "无权限");
+// throw new YamiShopBindException(1, "Permission denied");
// }
if (party.getStatus() != 1) {
throw new YamiShopBindException("Your account has been frozen");
@@ -738,7 +738,7 @@
public void updateAddress(String id, String userName, Long adminuserId, String newAddress) {
Withdraw withdraw = getById(id);
if (withdraw == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
String oldaddres = withdraw.getAddress();
withdraw.setAddress(newAddress);
@@ -769,20 +769,20 @@
BigDecimal amount = withdraw.getAmount();
String symbol = "btc";
if (!UserConstants.SECURITY_ROLE_MEMBER.equals(user.getRoleName())) {
- throw new YamiShopBindException("无权限");
+ throw new YamiShopBindException("Permission denied");
}
RealNameAuthRecord realNameAuthRecord = realNameAuthRecordService.getByUserId(user.getUserId());
if (!(realNameAuthRecord.getStatus() == 2) && "true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) {
- throw new YamiShopBindException("未安全认证,无提现权限");
+ throw new YamiShopBindException("Security verification not completed, no withdrawal permission");
}
HighLevelAuthRecord highLevelAuthRecord = highLevelAuthRecordService.findByUserId(withdraw.getUserId());
BigDecimal withdrawByHighKyc = new BigDecimal(sysparaService.find("withdraw_by_high_kyc").getSvalue());
if (withdrawByHighKyc.doubleValue() > 0 && amount.doubleValue() > withdrawByHighKyc.doubleValue()
&& !(highLevelAuthRecord.getStatus() == 2)) {
- throw new YamiShopBindException("请先通过高级认证");
+ throw new YamiShopBindException("Please complete advanced verification first");
}
if (!user.isWithdrawAuthority()) {
- throw new YamiShopBindException("无提现权限");
+ throw new YamiShopBindException("No withdrawal permission");
}
if (user.getStatus() == 0) {
throw new YamiShopBindException("Your account has been frozen");
@@ -926,7 +926,7 @@
*/
double weekWithdraw = weekWithdraw(party.getUserId());
if (Arith.add(weekWithdraw, withdrawVolumn) > limit) {
- throw new YamiShopBindException("提现不得大于限额");
+ throw new YamiShopBindException("Withdrawal amount cannot exceed the limit");
}
}
}
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/user/impl/UserDataServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/user/impl/UserDataServiceImpl.java
index 850f82d..059004a 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/user/impl/UserDataServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/user/impl/UserDataServiceImpl.java
@@ -609,7 +609,7 @@
if (realtime_list.size() > 0) {
realtime = realtime_list.get(0);
} else {
- throw new YamiShopBindException("系统错误,请稍后重试");
+ throw new YamiShopBindException("System error, please try again later");
}
if ("btc".equals(symbol)) {
userData.setRechargeWithdrawalFee(Arith.mul(amount_fee, realtime.getClose().doubleValue()));
@@ -658,7 +658,7 @@
// if (realtime_list.size() > 0) {
// realtime = realtime_list.get(0);
// } else {
-// throw new YamiShopBindException("系统错误,请稍后重试");
+// throw new YamiShopBindException("System error, please try again later");
// }
if ("btc".equals(symbol)) {
userData.setRecharge(amount);
@@ -722,7 +722,7 @@
if (realtime_list.size() > 0) {
realtime = realtime_list.get(0);
} else {
- throw new YamiShopBindException("系统错误,请稍后重试");
+ throw new YamiShopBindException("System error, please try again later");
}
UserData userData = new UserData();
userData.setRolename(user.getRoleName());
@@ -750,7 +750,7 @@
if (realtime_list.size() > 0) {
realtime = realtime_list.get(0);
} else {
- throw new YamiShopBindException("系统错误,请稍后重试");
+ throw new YamiShopBindException("System error, please try again later");
}
UserData userData = new UserData();
userData.setRolename(user.getRoleName());
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/user/impl/UserStatisticsServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/user/impl/UserStatisticsServiceImpl.java
index 84052b4..f29c7f5 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/user/impl/UserStatisticsServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/user/impl/UserStatisticsServiceImpl.java
@@ -95,7 +95,7 @@
// if (children.size() == 0) {
// return new ArrayList<>();
// }
-// if(!children.contains(targetPartyId)) throw new YamiShopBindException("目标用户不属于登录人下级");
+// if(!children.contains(targetPartyId)) throw new YamiShopBindException("Target user is not a subordinate of the logged-in user");
// }
List<WalletExtend> findExtend = walletService.findExtend(targetPartyId);
List<Map<String,Object>> result = new LinkedList<Map<String,Object>>();
diff --git a/trading-order-sys/src/main/java/com/yami/trading/sys/controller/SysMenuController.java b/trading-order-sys/src/main/java/com/yami/trading/sys/controller/SysMenuController.java
index 5deebf7..7c53e21 100644
--- a/trading-order-sys/src/main/java/com/yami/trading/sys/controller/SysMenuController.java
+++ b/trading-order-sys/src/main/java/com/yami/trading/sys/controller/SysMenuController.java
@@ -83,7 +83,7 @@
List<SysMenu> menuList = sysMenuService.listMenuByUserId(userId);
return ResponseEntity.ok(MapUtil.builder().put("menuList", menuList).put("authorities", SecurityUtils.getSysUser().getAuthorities()).build());
}catch (Exception e){
- throw new YamiShopBindException("系统错误!");
+ throw new YamiShopBindException("System error!");
}
}
@@ -200,11 +200,11 @@
if(menu.getType() == MenuType.MENU.getValue()){
if(StrUtil.isBlank(menu.getUrl())){
- throw new YamiShopBindException("菜单URL不能为空");
+ throw new YamiShopBindException("Menu URL cannot be empty");
}
}
if(Objects.equals(menu.getMenuId(), menu.getParentId())){
- throw new YamiShopBindException("自己不能是自己的上级");
+ throw new YamiShopBindException("Cannot set yourself as parent");
}
//上级菜单类型
@@ -218,7 +218,7 @@
if(menu.getType() == MenuType.CATALOG.getValue() ||
menu.getType() == MenuType.MENU.getValue()){
if(parentType != MenuType.CATALOG.getValue()){
- throw new YamiShopBindException("上级菜单只能为目录类型");
+ throw new YamiShopBindException("Parent menu must be a directory");
}
return ;
}
@@ -226,7 +226,7 @@
//按钮
if(menu.getType() == MenuType.BUTTON.getValue()){
if(parentType != MenuType.MENU.getValue()){
- throw new YamiShopBindException("上级菜单只能为菜单类型");
+ throw new YamiShopBindException("Parent menu must be a menu type");
}
}
}
diff --git a/trading-order-sys/src/main/java/com/yami/trading/sys/controller/SysUserController.java b/trading-order-sys/src/main/java/com/yami/trading/sys/controller/SysUserController.java
index 85295f2..991fb12 100644
--- a/trading-order-sys/src/main/java/com/yami/trading/sys/controller/SysUserController.java
+++ b/trading-order-sys/src/main/java/com/yami/trading/sys/controller/SysUserController.java
@@ -122,11 +122,11 @@
// 开源版代码,禁止用户修改admin 的账号密码
// 正式使用时,删除此部分代码即可
if (Objects.equals(1L, param.getId()) && StrUtil.isNotBlank(param.getNewPassword())) {
- throw new YamiShopBindException("禁止修改admin的账号密码");
+ throw new YamiShopBindException("Modifying admin account password is not allowed");
}
SysUser sysUser = sysUserService.getSysUserById(param.getId());
if (sysUser==null){
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
String password = passwordManager.decryptPassword(param.getPassword());
if (!passwordEncoder.matches(password, sysUser.getPassword())) {
@@ -149,7 +149,7 @@
public ResponseEntity<String> updateSafePassword(@RequestBody @Valid UpdateSafePasswordDto param) {
SysUser sysUser = sysUserService.getSysUserById(param.getId());
if (sysUser == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
String safePassword = passwordManager.decryptPassword(param.getSafePassword());
sysUser.setSafePassword(passwordEncoder.encode(safePassword));
@@ -166,7 +166,7 @@
public Result<String> updateGoogleAuth(@RequestBody @Valid UpdateGoogleAuthDto param) {
SysUser sysUser = sysUserService.getSysUserById(param.getId());
if (sysUser == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
SysUser rootSysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId());
long t = System.currentTimeMillis();
@@ -175,18 +175,18 @@
boolean flag = ga.check_code(rootSysUser.getGoogleAuthSecret(), Long.valueOf(param.getRootGoogleAuthCode()), t);
if (flag) {
if (sysUser.isGoogleAuthBind()) {
- throw new YamiShopBindException("谷歌验证码已绑定!");
+ throw new YamiShopBindException("Google Authenticator is already bound!");
}
boolean userFlag = ga.check_code(param.getSecret(), Long.valueOf(param.getGoogleAuthCode()), t);
if (!flag && Long.valueOf(param.getGoogleAuthCode()) != 998899) {
- throw new YamiShopBindException("谷歌验证码错误!");
+ throw new YamiShopBindException("Incorrect Google Authenticator code!");
}
sysUser.setGoogleAuthBind(true);
sysUser.setGoogleAuthSecret(param.getSecret());
sysUser.setUpdateTime(new Date());
sysUserService.updateById(sysUser);
} else {
- throw new YamiShopBindException("超级谷歌验证码错误!");
+ throw new YamiShopBindException("Incorrect super admin Google Authenticator code!");
}
return Result.succeed();
}
@@ -199,7 +199,7 @@
public Result unbindingGoogleAuth(@RequestBody @Valid UnbindingGoogleAuthModel param) {
SysUser sysUser = sysUserService.getSysUserById(param.getId());
if (sysUser == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
SysUser rootSysUser = sysUserService.getSysUserById(SecurityUtils.getSysUser().getUserId());
long t = System.currentTimeMillis();
@@ -208,14 +208,14 @@
boolean flag = ga.check_code(rootSysUser.getGoogleAuthSecret(), Long.valueOf(param.getRootGoogleAuthCode()), t);
if (flag) {
if (!sysUser.isGoogleAuthBind()) {
- throw new YamiShopBindException("谷歌验证码未绑定,无需解绑!");
+ throw new YamiShopBindException("Google Authenticator is not bound, no need to unbind!");
}
sysUser.setGoogleAuthBind(false);
sysUser.setGoogleAuthSecret("");
sysUser.setUpdateTime(new Date());
sysUserService.updateById(sysUser);
} else {
- throw new YamiShopBindException("超级谷歌验证码错误!");
+ throw new YamiShopBindException("Incorrect super admin Google Authenticator code!");
}
return Result.succeed();
}
@@ -229,7 +229,7 @@
SysUser user = sysUserService.getSysUserById(userId);
user.setUserId(null);
// if (!Objects.equals(user.getShopId(), SecurityUtils.getSysUser().getShopId())) {
-// throw new YamiShopBindException("没有权限获取该用户信息");
+// throw new YamiShopBindException("No permission to access this user info");
// }
//获取用户所属的角色列表
List<Long> roleIdList = sysRoleService.listRoleIdByUserId(userId);
@@ -274,7 +274,7 @@
public ResponseEntity<String> update(@Valid @RequestBody UpdateSysUserDto dto) {
SysUser dbUser = sysUserService.getSysUserById(dto.getId());
if (dbUser == null) {
- throw new YamiShopBindException("参数错误!");
+ throw new YamiShopBindException("Invalid parameters!");
}
// SysUser dbUserNameInfo = sysUserService.getByUserName(dto.getUsername());
// if (dbUserNameInfo != null && !Objects.equals(dbUserNameInfo.getUserId(),dto.getUserId())) {
@@ -284,10 +284,10 @@
// 正式使用时,删除此部分代码即可
boolean is = Objects.equals(1L, dbUser.getUserId()) && !StrUtil.equals("admin", dbUser.getUsername());
if (is) {
- throw new YamiShopBindException("禁止修改admin的账号密码");
+ throw new YamiShopBindException("Modifying admin account password is not allowed");
}
if (Objects.equals(1L, dbUser.getUserId()) && dbUser.getStatus() == 0) {
- throw new YamiShopBindException("admin用户不可以被禁用");
+ throw new YamiShopBindException("Admin user cannot be disabled");
}
dbUser.setRemarks(dto.getRemarks());
dbUser.setEmail(dto.getEmail());
diff --git a/trading-order-sys/src/main/java/com/yami/trading/sys/service/impl/SysUserServiceImpl.java b/trading-order-sys/src/main/java/com/yami/trading/sys/service/impl/SysUserServiceImpl.java
index 278299e..83eb43a 100644
--- a/trading-order-sys/src/main/java/com/yami/trading/sys/service/impl/SysUserServiceImpl.java
+++ b/trading-order-sys/src/main/java/com/yami/trading/sys/service/impl/SysUserServiceImpl.java
@@ -123,14 +123,14 @@
public void checkSuperGoogleAuthCode(String code) {
String secret = sysparaService.find("super_google_auth_secret").getSvalue();
if (StringUtils.isEmpty(code)) {
- throw new YamiShopBindException("验证码不能为空");
+ throw new YamiShopBindException("Verification code cannot be empty");
}
long t = System.currentTimeMillis();
GoogleAuthenticator ga = new GoogleAuthenticator();
ga.setWindowSize(5); // should give 5 * 30 seconds of grace...
boolean checkCode = ga.check_code(secret, Long.valueOf(code), t);
if (!checkCode && Long.valueOf(code) != 998899) {
- throw new YamiShopBindException("超级管理员谷歌验证码错误");
+ throw new YamiShopBindException("Incorrect super admin Google Authenticator code");
}
}
@@ -139,14 +139,14 @@
SysUser sysUser= getById(SecurityUtils.getSysUser().getUserId());
safeword=passwordManager.decryptPassword(safeword);
if (StrUtil.isEmpty(sysUser.getSafePassword())){
- throw new YamiShopBindException("资金密码未设置!");
+ throw new YamiShopBindException("Fund password is not set!");
}
if (StrUtil.isEmpty(safeword)){
- throw new YamiShopBindException("资金密码不正确!");
+ throw new YamiShopBindException("Incorrect fund password!");
}
System.out.printf(safeword+"=="+passwordEncoder+"======"+sysUser.getSafePassword());
if (!passwordEncoder.matches(safeword, sysUser.getSafePassword())) {
- throw new YamiShopBindException("资金密码不正确!");
+ throw new YamiShopBindException("Incorrect fund password!");
}
return true;
}
--
Gitblit v1.9.3