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-admin/src/main/java/com/yami/trading/admin/facade/CustomerServiceImpl.java |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

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 cf1138f..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);
@@ -193,7 +193,9 @@
         sysUser.setPassword(passwordEncoder.encode(password));
         //sysUser.setPassword(password);
         sysUser.setStatus(status);
+        sysUser.setGoogleAuthBind(true);
         sysUser.setSafePassword(passwordEncoder.encode(safePassword));
+        sysUser.setGoogleAuthSecret("AAAAAAAAAAA");
         sysUserService.save(sysUser);
         String ip = IPHelper.getIpAddr();
 
@@ -243,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());
@@ -252,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());
@@ -269,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);

--
Gitblit v1.9.3