Forráskód Böngészése

Merge remote-tracking branch 'origin/main'

classic_blue 1 hete
szülő
commit
3e74bf2601
85 módosított fájl, 710 hozzáadás és 458 törlés
  1. 1 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/config/LocaleResolverConfig.java
  2. 5 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/TableInfoService.java
  3. 4 3
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/AccountServiceImpl.java
  4. 10 5
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/ArticleServiceImpl.java
  5. 12 10
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/BannerServiceImpl.java
  6. 2 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/BookCateServiceImpl.java
  7. 2 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/BookItemServiceImpl.java
  8. 4 3
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/BookServiceImpl.java
  9. 25 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/CartServiceImpl.java
  10. 3 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/CateServiceImpl.java
  11. 3 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/GoodsServiceImpl.java
  12. 2 5
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/OrderServiceImpl.java
  13. 11 11
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/PrinterServiceImpl.java
  14. 6 5
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/PurchaseOrderServiceImpl.java
  15. 7 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/TableInfoServiceImpl.java
  16. 2 2
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/UserGradeServiceImpl.java
  17. 10 9
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendAccountController.java
  18. 2 1
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendActionLogController.java
  19. 5 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendArticleController.java
  20. 9 8
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendBalanceController.java
  21. 5 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendBannerController.java
  22. 13 12
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendBookCateController.java
  23. 6 5
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendBookController.java
  24. 5 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendBookItemController.java
  25. 48 22
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCashierController.java
  26. 7 6
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCateController.java
  27. 6 5
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCommissionCashController.java
  28. 6 5
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCommissionLogController.java
  29. 5 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCommissionRuleController.java
  30. 2 1
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCommonController.java
  31. 3 2
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendConfirmLogController.java
  32. 9 18
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCountryController.java
  33. 10 9
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCouponController.java
  34. 10 9
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCouponGroupController.java
  35. 7 15
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCurrencyController.java
  36. 8 7
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendDoConfirmController.java
  37. 9 8
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendDutyController.java
  38. 13 12
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendFileController.java
  39. 7 6
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendGenCodeController.java
  40. 7 5
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendGiveLogController.java
  41. 13 13
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendGoodsController.java
  42. 3 2
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendHomeController.java
  43. 3 2
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendLoginController.java
  44. 7 6
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMaterialController.java
  45. 8 13
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMaterialTypeController.java
  46. 12 11
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMemberController.java
  47. 10 9
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMemberGroupController.java
  48. 8 7
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMerchantController.java
  49. 8 7
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendOpenGiftController.java
  50. 12 11
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendOrderController.java
  51. 10 10
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendPointController.java
  52. 8 7
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendPrinterController.java
  53. 7 6
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendRefundController.java
  54. 5 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSendLogController.java
  55. 5 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSettlementController.java
  56. 5 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSmsController.java
  57. 5 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSmsTemplateController.java
  58. 7 6
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java
  59. 12 15
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStaffController.java
  60. 4 3
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStatisticController.java
  61. 5 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStockController.java
  62. 6 5
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStoreController.java
  63. 4 3
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSubMessageController.java
  64. 5 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendTableCategoryController.java
  65. 6 5
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendTableController.java
  66. 5 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendTableInfoController.java
  67. 7 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendUserCouponController.java
  68. 6 5
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendUserGradeController.java
  69. 5 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientBalanceController.java
  70. 6 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientBookController.java
  71. 6 5
      fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientCartController.java
  72. 4 3
      fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientFileController.java
  73. 2 1
      fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientGoodsController.java
  74. 6 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientOrderController.java
  75. 2 1
      fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientPayController.java
  76. 5 3
      fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientRefundController.java
  77. 7 2
      fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientRegionController.java
  78. 3 2
      fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientSignController.java
  79. 6 5
      fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientSmsController.java
  80. 8 3
      fuintBackend/fuint-application/src/main/java/com/fuint/module/merchantApi/controller/MerchantController.java
  81. 4 3
      fuintBackend/fuint-application/src/main/java/com/fuint/module/merchantApi/controller/MerchantMemberController.java
  82. 5 4
      fuintBackend/fuint-application/src/main/java/com/fuint/module/merchantApi/controller/MerchantOrderController.java
  83. 65 1
      fuintBackend/fuint-application/src/main/resources/i18n/messages_en_US.properties
  84. 65 1
      fuintBackend/fuint-application/src/main/resources/i18n/messages_zh_CN.properties
  85. 4 4
      fuintBackend/fuint-application/src/main/resources/vm/java/BackendController.java.vm

+ 1 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/config/LocaleResolverConfig.java

@@ -37,6 +37,7 @@ public class LocaleResolverConfig implements LocaleResolver {
 	public Locale resolveLocale(HttpServletRequest httpServletRequest) {
 		//获取请求中的语言参数
 		String language = httpServletRequest.getHeader("lang");
+		language = "en-US";
 		//如果没有就使用默认的(根据主机的语言环境生成一个 Locale
 		Locale locale = Locale.getDefault();
 		//如果请求的链接中携带了 国际化的参数

+ 5 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/TableInfoService.java

@@ -70,4 +70,9 @@ public interface TableInfoService extends IService<MtTableInfo> {
     List<MtTableInfo> queryTableInfoListByParams(Map<String, Object> params) throws BusinessCheckException;
 
 	List<MtTableInfo> selectTableListByStoreId(Long storeId, Long categoryId);
+
+    /**
+     * 校验分类是否存在
+     */
+    boolean existCategory(Long categoryId);
 }

+ 4 - 3
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/AccountServiceImpl.java

@@ -10,6 +10,7 @@ import com.fuint.common.service.AccountService;
 import com.fuint.common.service.CaptchaService;
 import com.fuint.common.service.StaffService;
 import com.fuint.common.service.StoreService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.annoation.OperationServiceLog;
 import com.fuint.framework.exception.BusinessCheckException;
@@ -369,7 +370,7 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
 
         Boolean captchaVerify = captchaService.checkCodeByUuid(captchaCode, uuid);
         if (!captchaVerify) {
-            throw new BusinessCheckException("图形验证码有误");
+            throw new BusinessCheckException(I18nUtil.getMessage("captchaInvalid"));
         }
 
         if (StringUtil.isEmpty(accountName)|| StringUtil.isEmpty(password) || StringUtil.isEmpty(captchaCode)) {
@@ -377,7 +378,7 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
         } else {
             AccountInfo accountInfo = getAccountByName(loginRequest.getUsername());
             if (accountInfo == null) {
-                throw new BusinessCheckException("登录账号或密码有误");
+                throw new BusinessCheckException(I18nUtil.getMessage("loginAccountOrPasswordIncorrect"));
             }
 
             TAccount tAccount = getAccountInfoById(accountInfo.getId());
@@ -389,7 +390,7 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
             String myPassword = tAccount.getPassword();
             String inputPassword = getEntryptPassword(password, tAccount.getSalt());
             if (!myPassword.equals(inputPassword) || !tAccount.getAccountStatus().toString().equals("1")) {
-                throw new BusinessCheckException("登录账号或密码有误");
+                throw new BusinessCheckException(I18nUtil.getMessage("loginAccountOrPasswordIncorrect"));
             }
 
             // 商户已禁用

+ 10 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/ArticleServiceImpl.java

@@ -4,28 +4,33 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fuint.common.dto.ArticleDto;
+import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.service.ArticleService;
 import com.fuint.common.service.MerchantService;
+import com.fuint.common.service.SettingService;
 import com.fuint.common.service.StoreService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.framework.annoation.OperationServiceLog;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
 import com.fuint.framework.pagination.PaginationResponse;
 import com.fuint.repository.mapper.MtArticleMapper;
 import com.fuint.repository.model.MtArticle;
-import com.fuint.common.service.SettingService;
-import com.fuint.common.enums.StatusEnum;
 import com.fuint.repository.model.MtStore;
+import com.github.pagehelper.Page;
 import com.github.pagehelper.PageHelper;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang.StringUtils;
-import com.github.pagehelper.Page;
 import org.springframework.beans.BeanUtils;
 import org.springframework.data.domain.PageImpl;
 import org.springframework.data.domain.PageRequest;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import java.util.*;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 文章服务接口
@@ -135,7 +140,7 @@ public class ArticleServiceImpl extends ServiceImpl<MtArticleMapper, MtArticle>
         mtArticle.setMerchantId(articleDto.getMerchantId());
 
         if (mtArticle.getStoreId() == null || mtArticle.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
 
         mtArticle.setStoreId(storeId);

+ 12 - 10
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/BannerServiceImpl.java

@@ -3,34 +3,36 @@ package com.fuint.common.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-
 import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.dto.BannerDto;
+import com.fuint.common.enums.StatusEnum;
+import com.fuint.common.service.BannerService;
+import com.fuint.common.service.SettingService;
 import com.fuint.common.service.StoreService;
 import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.framework.annoation.OperationServiceLog;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
 import com.fuint.framework.pagination.PaginationResponse;
-import com.fuint.repository.model.MtBanner;
-import com.fuint.common.dto.BannerDto;
-import com.fuint.common.service.BannerService;
-import com.fuint.common.service.SettingService;
-import com.fuint.common.enums.StatusEnum;
 import com.fuint.repository.mapper.MtBannerMapper;
-
+import com.fuint.repository.model.MtBanner;
 import com.fuint.repository.model.MtStore;
+import com.github.pagehelper.Page;
 import com.github.pagehelper.PageHelper;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import com.github.pagehelper.Page;
 import org.springframework.beans.BeanUtils;
 import org.springframework.data.domain.PageImpl;
 import org.springframework.data.domain.PageRequest;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import java.util.*;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 焦点图服务接口
@@ -118,7 +120,7 @@ public class BannerServiceImpl extends ServiceImpl<MtBannerMapper, MtBanner> imp
         }
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
         mtBanner.setStoreId(storeId);
         mtBanner.setStatus(StatusEnum.ENABLED.getKey());

+ 2 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/BookCateServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fuint.common.service.BookCateService;
 import com.fuint.common.service.StoreService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.framework.annoation.OperationServiceLog;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -112,7 +113,7 @@ public class BookCateServiceImpl extends ServiceImpl<MtBookCateMapper, MtBookCat
             }
         }
         if (mtBookCate.getMerchantId() == null || mtBookCate.getMerchantId() <= 0) {
-            throw new BusinessCheckException("新增预约分类失败:所属商户不能为空!");
+            throw new BusinessCheckException(I18nUtil.getMessage("merchantCannotBeEmpty"));
         }
         if (StringUtil.isEmpty(mtBookCate.getName())) {
             throw new BusinessCheckException("新增预约分类失败:分类名称不能为空!");

+ 2 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/BookItemServiceImpl.java

@@ -9,6 +9,7 @@ import com.fuint.common.param.BookableParam;
 import com.fuint.common.service.BookItemService;
 import com.fuint.common.service.BookService;
 import com.fuint.common.service.StoreService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.SeqUtil;
 import com.fuint.framework.annoation.OperationServiceLog;
 import com.fuint.framework.exception.BusinessCheckException;
@@ -140,7 +141,7 @@ public class BookItemServiceImpl extends ServiceImpl<MtBookItemMapper, MtBookIte
     public MtBookItem addBookItem(MtBookItem mtBookItem) throws BusinessCheckException {
         Long storeId = mtBookItem.getStoreId() == null ? 0 : mtBookItem.getStoreId();
         if (mtBookItem.getMerchantId() == null || mtBookItem.getMerchantId() <= 0) {
-            throw new BusinessCheckException("新增预约订单失败:所属商户不能为空!");
+            throw new BusinessCheckException(I18nUtil.getMessage("merchantCannotBeEmpty"));
         }
         if (mtBookItem.getMerchantId() == null || mtBookItem.getMerchantId() <= 0) {
             MtStore mtStore = storeService.queryStoreById(storeId);

+ 4 - 3
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/BookServiceImpl.java

@@ -10,6 +10,7 @@ import com.fuint.common.param.BookableParam;
 import com.fuint.common.service.BookService;
 import com.fuint.common.service.StoreService;
 import com.fuint.common.util.DateUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.framework.annoation.OperationServiceLog;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -139,13 +140,13 @@ public class BookServiceImpl extends ServiceImpl<MtBookMapper, MtBook> implement
             }
         }
         if (mtBook.getMerchantId() == null || mtBook.getMerchantId() <= 0) {
-            throw new BusinessCheckException("新增预约失败:所属商户不能为空!");
+            throw new BusinessCheckException(I18nUtil.getMessage("merchantCannotBeEmpty"));
         }
         if (StringUtil.isEmpty(mtBook.getName())) {
-            throw new BusinessCheckException("新增预约失败:项目名称不能为空!");
+            throw new BusinessCheckException(I18nUtil.getMessage("projectNameCannotBeEmpty"));
         }
         if (StringUtil.isEmpty(mtBook.getLogo())) {
-            throw new BusinessCheckException("新增预约失败:封面图片不能为空!");
+            throw new BusinessCheckException(I18nUtil.getMessage("coverImageCannotBeEmpty"));
         }
         mtBook.setStoreId(storeId);
         mtBook.setStatus(StatusEnum.ENABLED.getKey());

+ 25 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/CartServiceImpl.java

@@ -9,9 +9,11 @@ import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.repository.mapper.MtCartMapper;
 import com.fuint.repository.mapper.MtGoodsMapper;
 import com.fuint.repository.mapper.MtGoodsSkuMapper;
+import com.fuint.repository.mapper.MtTableInfoMapper;
 import com.fuint.repository.model.MtCart;
 import com.fuint.repository.model.MtGoods;
 import com.fuint.repository.model.MtGoodsSku;
+import com.fuint.repository.model.MtTableInfo;
 import com.fuint.utils.StringUtil;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
@@ -38,6 +40,8 @@ public class CartServiceImpl extends ServiceImpl<MtCartMapper, MtCart> implement
 
     private MtGoodsSkuMapper mtGoodsSkuMapper;
 
+    private MtTableInfoMapper mtTableInfoMapper;
+
     /**
      * 切换购物车给会员
      *
@@ -310,7 +314,7 @@ public class CartServiceImpl extends ServiceImpl<MtCartMapper, MtCart> implement
     @OperationServiceLog(description = "执行挂单")
     @Transactional(rollbackFor = Exception.class)
     public MtCart setHangNo(Long cartId, String hangNo, String isVisitor) throws BusinessCheckException {
-        MtCart mtCart = mtCartMapper.selectById(cartId);
+       /* MtCart mtCart = mtCartMapper.selectById(cartId);
         if (mtCart != null) {
             mtCart.setHangNo(hangNo);
             mtCart.setUpdateTime(new Date());
@@ -318,7 +322,27 @@ public class CartServiceImpl extends ServiceImpl<MtCartMapper, MtCart> implement
             this.updateById(mtCart);
         } else {
             throw new BusinessCheckException("执行挂单失败");
+        }*/
+        // -------------------- 参数校验 --------------------
+        // 校验桌号有效性
+        LambdaQueryWrapper<MtTableInfo> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(MtTableInfo::getTableNumber, hangNo);
+        Integer tableCount = mtTableInfoMapper.selectCount(queryWrapper);
+        if (tableCount == null || tableCount == 0) {
+            throw new BusinessCheckException("执行挂单失败,桌号不存在,请确认后重试");
         }
+
+        // -------------------- 业务处理 --------------------
+        MtCart mtCart = mtCartMapper.selectById(cartId);
+        if (mtCart == null) {
+            throw new BusinessCheckException("执行挂单失败,购物车记录不存在");
+        }
+
+        // -------------------- 更新数据 --------------------
+        mtCart.setHangNo(hangNo);
+        mtCart.setUpdateTime(new Date());
+        mtCart.setIsVisitor(isVisitor);
+        this.updateById(mtCart);
         return mtCart;
     }
 }

+ 3 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/CateServiceImpl.java

@@ -9,6 +9,7 @@ import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.service.CateService;
 import com.fuint.common.service.StoreService;
 import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.framework.annoation.OperationServiceLog;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -30,6 +31,7 @@ import org.springframework.data.domain.PageImpl;
 import org.springframework.data.domain.PageRequest;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+
 import java.util.*;
 
 /**
@@ -229,7 +231,7 @@ public class CateServiceImpl extends ServiceImpl<MtGoodsCateMapper, MtGoodsCate>
         }
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
         if (reqDto.getStoreId() != null) {
             mtCate.setStoreId(reqDto.getStoreId());

+ 3 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/GoodsServiceImpl.java

@@ -13,6 +13,7 @@ import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.enums.YesOrNoEnum;
 import com.fuint.common.service.*;
 import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.framework.annoation.OperationServiceLog;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -33,6 +34,7 @@ import org.springframework.data.domain.PageImpl;
 import org.springframework.data.domain.PageRequest;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+
 import java.math.BigDecimal;
 import java.util.*;
 
@@ -227,7 +229,7 @@ public class GoodsServiceImpl extends ServiceImpl<MtGoodsMapper, MtGoods> implem
         }
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
         if (StringUtil.isNotEmpty(reqDto.getIsSingleSpec())) {
             mtGoods.setIsSingleSpec(reqDto.getIsSingleSpec());

+ 2 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/OrderServiceImpl.java

@@ -10,10 +10,7 @@ import com.fuint.common.enums.*;
 import com.fuint.common.param.OrderListParam;
 import com.fuint.common.param.SettlementParam;
 import com.fuint.common.service.*;
-import com.fuint.common.util.CommonUtil;
-import com.fuint.common.util.DateUtil;
-import com.fuint.common.util.SeqUtil;
-import com.fuint.common.util.TokenUtil;
+import com.fuint.common.util.*;
 import com.fuint.framework.annoation.OperationServiceLog;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationResponse;
@@ -778,7 +775,7 @@ public class OrderServiceImpl extends ServiceImpl<MtOrderMapper, MtOrder> implem
             if (StringUtil.isNotEmpty(operator)) {
                 throw new BusinessCheckException("该管理员还未关联店铺员工");
             } else {
-                throw new BusinessCheckException("请先登录");
+                throw new BusinessCheckException(I18nUtil.getMessage("notAuthenticated"));
             }
         }
 

+ 11 - 11
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/PrinterServiceImpl.java

@@ -1,7 +1,6 @@
 package com.fuint.common.service.impl;
 
 import com.alibaba.fastjson.JSON;
-import com.alipay.api.domain.AuthApiDTO;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -9,35 +8,36 @@ import com.fuint.common.dto.AccountInfo;
 import com.fuint.common.dto.OrderGoodsDto;
 import com.fuint.common.dto.UserOrderDto;
 import com.fuint.common.enums.*;
+import com.fuint.common.service.PrinterService;
 import com.fuint.common.service.SettingService;
-import com.fuint.common.util.AuthUserUtil;
-import com.fuint.common.util.HashSignUtil;
-import com.fuint.common.util.NoteFormatter;
-import com.fuint.common.util.PrinterUtil;
+import com.fuint.common.util.*;
 import com.fuint.common.vo.printer.*;
 import com.fuint.framework.annoation.OperationServiceLog;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
 import com.fuint.framework.pagination.PaginationResponse;
-import com.fuint.repository.model.MtPrinter;
-import com.fuint.common.service.PrinterService;
 import com.fuint.repository.mapper.MtPrinterMapper;
+import com.fuint.repository.model.MtPrinter;
 import com.fuint.repository.model.MtSetting;
 import com.fuint.repository.model.MtStore;
 import com.fuint.utils.StringUtil;
+import com.github.pagehelper.Page;
 import com.github.pagehelper.PageHelper;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import com.github.pagehelper.Page;
 import org.springframework.beans.BeanUtils;
 import org.springframework.core.env.Environment;
 import org.springframework.data.domain.PageImpl;
 import org.springframework.data.domain.PageRequest;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import java.util.*;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 打印机服务接口
@@ -131,7 +131,7 @@ public class PrinterServiceImpl extends ServiceImpl<MtPrinterMapper, MtPrinter>
         mtPrinter.setCreateTime(new Date());
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
 
         Integer printerId = mtPrinterMapper.insert(mtPrinter);
@@ -345,7 +345,7 @@ public class PrinterServiceImpl extends ServiceImpl<MtPrinterMapper, MtPrinter>
         }
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
 
         if (mtPrinter.getSn() != null && mtPrinter.getName() != null && !mtPrinter.getStatus().equals(StatusEnum.DISABLE.getKey())) {

+ 6 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/PurchaseOrderServiceImpl.java

@@ -12,6 +12,7 @@ import com.fuint.common.dto.MtPurchaseOrderDto;
 import com.fuint.common.dto.MtPurchaseOrderItemDto;
 import com.fuint.common.service.PurchaseOrderItemService;
 import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.vo.MtPurchaseOrderItemVo;
 import com.fuint.common.vo.MtPurchaseOrderVo;
 import com.fuint.framework.web.PageResult;
@@ -56,7 +57,7 @@ public class PurchaseOrderServiceImpl extends ServiceImpl<MtPurchaseOrderMapper,
     @Override
     public MtPurchaseOrderVo queryPurchaseOrderById(Long id) {
 
-        Assert.isTrue(ObjectUtils.isNotEmpty(AuthUserUtil.get()), "请先登录");
+        Assert.isTrue(ObjectUtils.isNotEmpty(AuthUserUtil.get()), I18nUtil.getMessage("notAuthenticated"));
         Assert.isTrue(ObjectUtils.isNotEmpty(id), "请选择查询的订单");
 
         MtPurchaseOrder mtPurchaseOrder = mtPurchaseOrderMapper.selectOne(new LambdaQueryWrapper<MtPurchaseOrder>().eq(MtPurchaseOrder::getId, id));
@@ -77,7 +78,7 @@ public class PurchaseOrderServiceImpl extends ServiceImpl<MtPurchaseOrderMapper,
     public PageResult<MtPurchaseOrderVo> queryOrderPageList(MtPurchaseOrderDto mtPurchaseOrderDto)  {
 
         AccountInfo accountInfo = AuthUserUtil.get();
-        Assert.isTrue(ObjectUtils.isNotEmpty(accountInfo), "请先登录");
+        Assert.isTrue(ObjectUtils.isNotEmpty(accountInfo), I18nUtil.getMessage("notAuthenticated"));
         Assert.isTrue(ObjectUtils.isNotEmpty(mtPurchaseOrderDto.getStoreId()), "请选择餐厅");
         Assert.isFalse(accountInfo.getStoreId()!=0 && !accountInfo.getStoreId().equals(mtPurchaseOrderDto.getStoreId()), "暂无该餐厅权限");
 
@@ -109,7 +110,7 @@ public class PurchaseOrderServiceImpl extends ServiceImpl<MtPurchaseOrderMapper,
     public void savePurcahseOrder(MtPurchaseOrderDto mtPurchaseOrderDto) {
         //参数验证
         AccountInfo accountInfo = AuthUserUtil.get();
-        Assert.isTrue(ObjectUtils.isNotEmpty(accountInfo), "请先登录");
+        Assert.isTrue(ObjectUtils.isNotEmpty(accountInfo), I18nUtil.getMessage("notAuthenticated"));
         Assert.isTrue(ObjectUtils.isNotEmpty(mtPurchaseOrderDto.getStoreId()), "请选择餐厅");
         List<MtPurchaseOrderItemDto> orderItemList = mtPurchaseOrderDto.getOrderItemList();
         Assert.isFalse(orderItemList.isEmpty(), "请添加采购项");
@@ -145,7 +146,7 @@ public class PurchaseOrderServiceImpl extends ServiceImpl<MtPurchaseOrderMapper,
     public void updatePurchaseOrderByOrderNo(MtPurchaseOrderDto mtPurchaseOrderDto) {
         //参数验证
         AccountInfo accountInfo = AuthUserUtil.get();
-        Assert.isTrue(ObjectUtils.isNotEmpty(accountInfo), "请先登录");
+        Assert.isTrue(ObjectUtils.isNotEmpty(accountInfo), I18nUtil.getMessage("notAuthenticated"));
         Assert.isTrue(ObjectUtils.isNotEmpty(mtPurchaseOrderDto.getStoreId()), "请选择餐厅");
         Assert.isTrue(ObjectUtils.isNotEmpty(mtPurchaseOrderDto.getOrderNo()), "请选择采购单");
         Assert.isFalse(mtPurchaseOrderDto.getOrderItemList().isEmpty(), "请添加采购项");
@@ -180,7 +181,7 @@ public class PurchaseOrderServiceImpl extends ServiceImpl<MtPurchaseOrderMapper,
     public void deletePurchaseOrderByOrderNo(Long orderNo) {
         //参数验证
         AccountInfo accountInfo = AuthUserUtil.get();
-        Assert.isTrue(ObjectUtils.isNotEmpty(accountInfo), "请先登录");
+        Assert.isTrue(ObjectUtils.isNotEmpty(accountInfo), I18nUtil.getMessage("notAuthenticated"));
         Assert.isTrue(ObjectUtils.isNotEmpty(orderNo), "请选择采购单");
 
         MtPurchaseOrder mtPurchaseOrder = mtPurchaseOrderMapper.selectOne(new LambdaQueryWrapper<MtPurchaseOrder>().eq(MtPurchaseOrder::getOrderNo, orderNo));

+ 7 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/TableInfoServiceImpl.java

@@ -173,4 +173,11 @@ public class TableInfoServiceImpl extends ServiceImpl<MtTableInfoMapper, MtTable
                 .eq(MtTableInfo::getCategoryId, categoryId)
                 .eq(MtTableInfo::getDeleteFlag, 0));
     }
+    @Override
+    public boolean existCategory(Long categoryId) {
+        return mtTableInfoMapper.selectCount(
+                new LambdaQueryWrapper<MtTableInfo>()
+                        .eq(MtTableInfo::getId, categoryId)
+        ) > 0;
+    }
 }

+ 2 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/UserGradeServiceImpl.java

@@ -8,6 +8,7 @@ import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.enums.UserGradeCatchTypeEnum;
 import com.fuint.common.service.UserGradeService;
 import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.framework.annoation.OperationServiceLog;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -18,7 +19,6 @@ import com.fuint.repository.model.MtBanner;
 import com.fuint.repository.model.MtStaff;
 import com.fuint.repository.model.MtUser;
 import com.fuint.repository.model.MtUserGrade;
-import com.fuint.utils.StringUtil;
 import com.github.pagehelper.Page;
 import com.github.pagehelper.PageHelper;
 import lombok.AllArgsConstructor;
@@ -98,7 +98,7 @@ public class UserGradeServiceImpl extends ServiceImpl<MtUserGradeMapper, MtUserG
     public MtUserGrade addUserGrade(MtUserGrade mtUserGrade) throws BusinessCheckException {
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
         if (mtUserGrade.getGrade() != null && (mtUserGrade.getGrade() <= 0)) {
             throw new BusinessCheckException("会员等级需大于0");

+ 10 - 9
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendAccountController.java

@@ -11,6 +11,7 @@ import com.fuint.common.service.DutyService;
 import com.fuint.common.service.MerchantService;
 import com.fuint.common.service.StoreService;
 import com.fuint.common.util.CommonUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -82,7 +83,7 @@ public class BackendAccountController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();
@@ -128,7 +129,7 @@ public class BackendAccountController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         Map<String, Object> result = new HashMap<>();
 
@@ -207,7 +208,7 @@ public class BackendAccountController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo loginAccount = TokenUtil.getAccountInfoByToken(token);
         if (loginAccount == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         List<String> roleIds = (List) param.get("roleIds");
@@ -221,7 +222,7 @@ public class BackendAccountController extends BaseController {
 
         AccountInfo accountInfo = tAccountService.getAccountByName(accountName);
         if (accountInfo != null) {
-            return getFailureResult(201, "该用户名已存在");
+            return getFailureResult(201, I18nUtil.getMessage("usernameExists"));
         }
 
         List<TDuty> duties = new ArrayList<>();
@@ -232,7 +233,7 @@ public class BackendAccountController extends BaseController {
             }
             duties = tDutyService.findDatasByIds(ids);
             if (duties.size() < roleIds.size()) {
-                return getFailureResult(201, "您分配的角色不存在");
+                return getFailureResult(201, I18nUtil.getMessage("roleNotAssigned"));
             }
         }
 
@@ -282,7 +283,7 @@ public class BackendAccountController extends BaseController {
 
         AccountInfo loginAccount = TokenUtil.getAccountInfoByToken(token);
         if (loginAccount == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (id == loginAccount.getId()) {
@@ -351,7 +352,7 @@ public class BackendAccountController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String ids[] = userIds.split(",");
@@ -397,7 +398,7 @@ public class BackendAccountController extends BaseController {
 
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
         if (accountDto == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         TAccount tAccount = tAccountService.getAccountInfoById(userId);
@@ -434,7 +435,7 @@ public class BackendAccountController extends BaseController {
 
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
         if (accountDto == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (!StringUtil.equals(accountDto.getAccountName(), "admin")) {

+ 2 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendActionLogController.java

@@ -3,6 +3,7 @@ package com.fuint.module.backendApi.controller;
 import com.fuint.common.Constants;
 import com.fuint.common.dto.AccountInfo;
 import com.fuint.common.service.ActionLogService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.pagination.PaginationRequest;
 import com.fuint.framework.pagination.PaginationResponse;
@@ -56,7 +57,7 @@ public class BackendActionLogController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();

+ 5 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendArticleController.java

@@ -4,6 +4,7 @@ import com.fuint.common.dto.AccountInfo;
 import com.fuint.common.dto.ArticleDto;
 import com.fuint.common.service.ArticleService;
 import com.fuint.common.service.StoreService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -74,7 +75,7 @@ public class BackendArticleController extends BaseController {
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         Long storeId;
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         } else {
             storeId = accountInfo.getStoreId();
         }
@@ -137,7 +138,7 @@ public class BackendArticleController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtArticle mtArticle = articleService.queryArticleById(id);
@@ -180,7 +181,7 @@ public class BackendArticleController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         ArticleDto articleDto = new ArticleDto();
@@ -226,7 +227,7 @@ public class BackendArticleController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtArticle articleInfo = articleService.queryArticleById(Long.valueOf(id));

+ 9 - 8
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendBalanceController.java

@@ -11,6 +11,7 @@ import com.fuint.common.service.BalanceService;
 import com.fuint.common.service.MemberService;
 import com.fuint.common.service.SettingService;
 import com.fuint.common.util.CommonUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -79,7 +80,7 @@ public class BackendBalanceController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         Map<String, Object> searchParams = new HashMap<>();
         if (StringUtil.isNotEmpty(mobile)) {
@@ -136,14 +137,14 @@ public class BackendBalanceController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (!CommonUtil.isNumeric(amount)) {
-            return getFailureResult(201, "充值金额必须是数字");
+            return getFailureResult(201, I18nUtil.getMessage("numericRecharge"));
         }
         if (userId < 1) {
-            return getFailureResult(201, "充值会员信息不能为空");
+            return getFailureResult(201, I18nUtil.getMessage("nonEmptyMembershipInfo"));
         }
 
         String operator = accountInfo.getAccountName();
@@ -154,7 +155,7 @@ public class BackendBalanceController extends BaseController {
         // 扣减余额
         if (type == 2) {
             if (userInfo.getBalance().compareTo(new BigDecimal(amount)) < 0) {
-                return getFailureResult(201, "操作失败,会员余额不足");
+                return getFailureResult(201, I18nUtil.getMessage("insufficientMemberBalance"));
             }
             mtBalance.setAmount(new BigDecimal(amount).subtract(new BigDecimal(amount).multiply(new BigDecimal("2"))));
         } else {
@@ -189,7 +190,7 @@ public class BackendBalanceController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         balanceService.distribute(accountInfo, object, userIds, amount, remark);
@@ -210,7 +211,7 @@ public class BackendBalanceController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         List<MtSetting> settingList = settingService.getSettingList(accountInfo.getMerchantId(), SettingTypeEnum.BALANCE.getKey());
@@ -266,7 +267,7 @@ public class BackendBalanceController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (rechargeItems.size() < 0) {

+ 5 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendBannerController.java

@@ -4,6 +4,7 @@ import com.fuint.common.dto.AccountInfo;
 import com.fuint.common.dto.ParamDto;
 import com.fuint.common.enums.PositionEnum;
 import com.fuint.common.service.StoreService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -77,7 +78,7 @@ public class BackendBannerController extends BaseController {
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         Long storeId;
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         } else {
             storeId = accountInfo.getStoreId();
         }
@@ -153,7 +154,7 @@ public class BackendBannerController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtBanner mtBanner = bannerService.queryBannerById(id);
@@ -196,7 +197,7 @@ public class BackendBannerController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         BannerDto bannerDto = new BannerDto();
@@ -236,7 +237,7 @@ public class BackendBannerController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtBanner bannerInfo = bannerService.queryBannerById(Long.valueOf(id));

+ 13 - 12
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendBookCateController.java

@@ -1,18 +1,18 @@
 package com.fuint.module.backendApi.controller;
 
+import com.fuint.common.Constants;
 import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.service.BookCateService;
+import com.fuint.common.service.SettingService;
 import com.fuint.common.service.StoreService;
-import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
-import com.fuint.framework.web.BaseController;
-import com.fuint.framework.web.ResponseObject;
-import com.fuint.common.Constants;
-import com.fuint.common.enums.StatusEnum;
-import com.fuint.common.service.SettingService;
+import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
 import com.fuint.framework.pagination.PaginationResponse;
-import com.fuint.framework.exception.BusinessCheckException;
+import com.fuint.framework.web.BaseController;
+import com.fuint.framework.web.ResponseObject;
 import com.fuint.repository.model.MtBookCate;
 import com.fuint.repository.model.MtStore;
 import com.fuint.utils.StringUtil;
@@ -21,6 +21,7 @@ import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
+
 import javax.servlet.http.HttpServletRequest;
 import java.util.HashMap;
 import java.util.List;
@@ -74,7 +75,7 @@ public class BackendBookCateController extends BaseController {
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         Long storeId;
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         } else {
             storeId = accountInfo.getStoreId();
         }
@@ -138,7 +139,7 @@ public class BackendBookCateController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtBookCate mtBookCate = bookCateService.getBookCateById(Long.valueOf(cateId));
@@ -177,11 +178,11 @@ public class BackendBookCateController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
 
         MtBookCate mtBookCate = new MtBookCate();
@@ -218,7 +219,7 @@ public class BackendBookCateController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtBookCate bookCateInfo = bookCateService.getBookCateById(Long.valueOf(id));

+ 6 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendBookController.java

@@ -6,6 +6,7 @@ import com.fuint.common.service.BookCateService;
 import com.fuint.common.service.BookService;
 import com.fuint.common.service.StoreService;
 import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -84,7 +85,7 @@ public class BackendBookController extends BaseController {
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         Long storeId;
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         } else {
             storeId = accountInfo.getStoreId();
         }
@@ -153,7 +154,7 @@ public class BackendBookController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         BookDto bookDto = bookService.getBookById(id);
@@ -197,11 +198,11 @@ public class BackendBookController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
 
         MtBook mtBook = new MtBook();
@@ -261,7 +262,7 @@ public class BackendBookController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         BookDto bookDto = bookService.getBookById(Long.valueOf(id));

+ 5 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendBookItemController.java

@@ -7,6 +7,7 @@ import com.fuint.common.enums.BookStatusEnum;
 import com.fuint.common.service.BookCateService;
 import com.fuint.common.service.BookItemService;
 import com.fuint.common.service.StoreService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -86,7 +87,7 @@ public class BackendBookItemController extends BaseController {
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         Long storeId;
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         } else {
             storeId = accountInfo.getStoreId();
         }
@@ -179,7 +180,7 @@ public class BackendBookItemController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtBookItem mtBookItem = bookItemService.getBookItemById(id);
@@ -216,7 +217,7 @@ public class BackendBookItemController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtBookItem mtBookItem = new MtBookItem();
@@ -250,7 +251,7 @@ public class BackendBookItemController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtBookItem mtBookItem = bookItemService.getBookItemById(Long.valueOf(id));

+ 48 - 22
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCashierController.java

@@ -7,10 +7,7 @@ import com.fuint.common.enums.PlatformTypeEnum;
 import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.enums.YesOrNoEnum;
 import com.fuint.common.service.*;
-import com.fuint.common.util.AuthUserUtil;
-import com.fuint.common.util.DateUtil;
-import com.fuint.common.util.PhoneFormatCheckUtils;
-import com.fuint.common.util.TokenUtil;
+import com.fuint.common.util.*;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -21,6 +18,7 @@ import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.springframework.beans.BeanUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 import javax.servlet.http.HttpServletRequest;
 import java.lang.reflect.InvocationTargetException;
@@ -111,7 +109,7 @@ public class BackendCashierController extends BaseController {
 
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
         if (accountDto == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
 
@@ -181,7 +179,7 @@ public class BackendCashierController extends BaseController {
 
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
         if (accountDto == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         TAccount accountInfo = accountService.getAccountInfoById(accountDto.getId());
@@ -216,7 +214,7 @@ public class BackendCashierController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         GoodsDto goodsInfo = goodsService.getGoodsDetail(goodsId, false);
@@ -296,7 +294,7 @@ public class BackendCashierController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (StringUtil.isEmpty(keyword)) {
@@ -336,7 +334,7 @@ public class BackendCashierController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (StringUtil.isEmpty(userId)) {
@@ -365,18 +363,17 @@ public class BackendCashierController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
 
         String isVisitor = YesOrNoEnum.NO.getKey();
         if (StringUtil.isEmpty(userId)) {
             isVisitor = YesOrNoEnum.YES.getKey();
         }
-
         if (StringUtil.isNotEmpty(cartIds)) {
             String[] ids = cartIds.split(",");
             if (ids.length > 0) {
@@ -401,36 +398,65 @@ public class BackendCashierController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
+        // 获取当前店铺ID(从登录账户信息中)
         Long storeId = accountInfo.getStoreId();
-        //获取餐桌列表
-        List<MtTableInfo> tableInfoList = tableInfoService.selectTableListByStoreId(storeId,categoryId);
+        // -------------------- 新增校验:分类存在性检查 --------------------
+        if (!tableInfoService.existCategory(categoryId)) {
+//            log.warn("请求非法分类 | storeId={} categoryId={}", storeId, categoryId);
+            return getFailureResult(2001, "该餐桌分类不存在");
+        }
 
+        //获取指定分类的餐桌列表
+        //调用tableInfoService查询当前店铺下的餐桌
+        List<MtTableInfo> tableInfoList = tableInfoService.selectTableListByStoreId(storeId,categoryId);
+        // 构建返回数据列表
         List<HangUpDto> dataList = new ArrayList<>();
 
+        // 遍历每个餐桌,检查是否有挂单
 	    for (MtTableInfo mtTableInfo : tableInfoList) {
+            // 从餐桌信息中获取桌号作为挂单号
 		    String hangNo = mtTableInfo.getTableNumber();
+            //构造查询参数
 		    Map<String, Object> param = new HashMap<>();
-		    param.put("hangNo", hangNo);
-		    param.put("merchantId", accountInfo.getMerchantId());
-		    param.put("storeId", storeId);
+		    param.put("hangNo", hangNo);// 当前桌号
+		    param.put("merchantId", accountInfo.getMerchantId());// 商户ID
+		    param.put("storeId", storeId);  // 店铺ID
+            //查询关联的购物车列表(挂单记录)
 		    List<MtCart> cartList = cartService.queryCartListByParams(param);
+            //构建返回DTO对象
 		    HangUpDto dto = new HangUpDto();
+            // 设置默认值
 		    dto.setIsEmpty(true);
 		    if (!cartList.isEmpty()) {
+                // 存在挂单时的处理逻辑
+
+                //获取用户信息
                 Long userId = cartList.get(0).getUserId();
 			    String isVisitor = cartList.get(0).getIsVisitor();
-			    Map<String, Object> cartInfo = orderService.calculateCartGoods(accountInfo.getMerchantId(), userId, cartList, 0L, false, PlatformTypeEnum.PC.getCode(), OrderModeEnum.ONESELF.getKey());
-			    dto.setNum(Integer.parseInt(cartInfo.get("totalNum").toString()));
-			    dto.setAmount(new BigDecimal(cartInfo.get("totalPrice").toString()));
+                // 计算购物车商品总价和数量 调用订单服务进行计算
+			    Map<String, Object> cartInfo = orderService.calculateCartGoods(
+                        accountInfo.getMerchantId(),
+                        userId,
+                        cartList,
+                        0L,  // 使用的卡券ID 未使用优惠券
+                        false,  // isUsePoint 不使用积分
+                        PlatformTypeEnum.PC.getCode(),  // 平台类型:PC端
+                        OrderModeEnum.ONESELF.getKey()// 订单模式:自取
+                );
+                //填充数据
+			    dto.setNum(Integer.parseInt(cartInfo.get("totalNum").toString()));//数量
+			    dto.setAmount(new BigDecimal(cartInfo.get("totalPrice").toString()));//商品总价
+                // 非访客订单时获取会员信息
 			    if (isVisitor.equals(YesOrNoEnum.NO.getKey())) {
 				    MtUser userInfo = memberService.queryMemberById(userId);
 				    dto.setMemberInfo(userInfo);
 			    }
+                //设置更新时间(取第一个购物车记录的更新时间)
 			    String dateTime = DateUtil.formatDate(cartList.get(0).getUpdateTime(), "yyyy-MM-dd HH:mm:ss");
 			    dto.setDateTime(dateTime);
-			    dto.setIsEmpty(false);
+			    dto.setIsEmpty(false);// 标记为有挂单
 		    }
 		    dto.setHangNo(hangNo);
 		    dataList.add(dto);

+ 7 - 6
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCateController.java

@@ -9,6 +9,7 @@ import com.fuint.common.service.CateService;
 import com.fuint.common.service.SettingService;
 import com.fuint.common.service.StoreService;
 import com.fuint.common.util.CommonUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -83,7 +84,7 @@ public class BackendCateController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         TAccount account = accountService.getAccountInfoById(accountInfo.getId());
@@ -148,12 +149,12 @@ public class BackendCateController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtGoodsCate mtCate = cateService.queryCateById(id);
         if (mtCate == null) {
-            return getFailureResult(201, "该类别不存在");
+            return getFailureResult(201, I18nUtil.getMessage("missingClass"));
         }
 
         String operator = accountInfo.getAccountName();
@@ -166,7 +167,7 @@ public class BackendCateController extends BaseController {
         try {
             cateService.updateCate(cate);
         } catch (BusinessCheckException e) {
-            return getFailureResult(201, e.getMessage() == null ? "操作失败" : e.getMessage());
+            return getFailureResult(201, e.getMessage() == null ? I18nUtil.getMessage("updateErr") : e.getMessage());
         }
 
         return getSuccessResult(true);
@@ -193,7 +194,7 @@ public class BackendCateController extends BaseController {
 
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
         if (accountDto == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Long myStoreId = accountDto.getStoreId();
@@ -236,7 +237,7 @@ public class BackendCateController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
         if (accountDto == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtGoodsCate mtCate = cateService.queryCateById(Long.valueOf(id));

+ 6 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCommissionCashController.java

@@ -6,6 +6,7 @@ import com.fuint.common.dto.ParamDto;
 import com.fuint.common.enums.CommissionCashStatusEnum;
 import com.fuint.common.service.CommissionCashService;
 import com.fuint.common.service.StoreService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -76,7 +77,7 @@ public class BackendCommissionCashController extends BaseController {
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         Long storeId;
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         } else {
             storeId = accountInfo.getStoreId();
         }
@@ -156,7 +157,7 @@ public class BackendCommissionCashController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         CommissionCashDto commissionCash = commissionCashService.queryCommissionCashById(Long.valueOf(id));
@@ -180,7 +181,7 @@ public class BackendCommissionCashController extends BaseController {
 
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
         if (accountDto == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         commissionCashRequest.setOperator(accountDto.getAccountName());
@@ -203,7 +204,7 @@ public class BackendCommissionCashController extends BaseController {
 
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
         if (accountDto == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         requestParam.setOperator(accountDto.getAccountName());
@@ -229,7 +230,7 @@ public class BackendCommissionCashController extends BaseController {
 
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
         if (accountDto == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         if (accountDto.getMerchantId() != null && accountDto.getMerchantId() > 0) {
             requestParam.setMerchantId(accountDto.getMerchantId());

+ 6 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCommissionLogController.java

@@ -8,6 +8,7 @@ import com.fuint.common.enums.CommissionTargetEnum;
 import com.fuint.common.service.CommissionCashService;
 import com.fuint.common.service.CommissionLogService;
 import com.fuint.common.service.StoreService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -84,7 +85,7 @@ public class BackendCommissionLogController extends BaseController {
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         Long storeId;
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         } else {
             storeId = accountInfo.getStoreId();
         }
@@ -182,7 +183,7 @@ public class BackendCommissionLogController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         CommissionLogDto commissionLog = commissionLogService.queryCommissionLogById(Long.valueOf(id));
@@ -206,7 +207,7 @@ public class BackendCommissionLogController extends BaseController {
 
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
         if (accountDto == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         commissionLogRequest.setOperator(accountDto.getAccountName());
@@ -229,7 +230,7 @@ public class BackendCommissionLogController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         CommissionLogRequest commissionLogRequest = new CommissionLogRequest();
@@ -254,7 +255,7 @@ public class BackendCommissionLogController extends BaseController {
 
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
         if (accountDto == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         commissionSettleRequest.setOperator(accountDto.getAccountName());

+ 5 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCommissionRuleController.java

@@ -7,6 +7,7 @@ import com.fuint.common.enums.CommissionTypeEnum;
 import com.fuint.common.param.CommissionRuleParam;
 import com.fuint.common.service.CommissionRuleService;
 import com.fuint.common.service.StoreService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -72,7 +73,7 @@ public class BackendCommissionRuleController extends BaseController {
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         Long storeId;
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         } else {
             storeId = accountInfo.getStoreId();
         }
@@ -137,7 +138,7 @@ public class BackendCommissionRuleController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         CommissionRuleDto commissionRuleDto = commissionRuleService.queryCommissionRuleById(id);
@@ -172,7 +173,7 @@ public class BackendCommissionRuleController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
             params.setMerchantId(accountInfo.getMerchantId());
@@ -202,7 +203,7 @@ public class BackendCommissionRuleController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         CommissionRuleDto commissionRule = commissionRuleService.queryCommissionRuleById(Long.valueOf(id));

+ 2 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCommonController.java

@@ -4,6 +4,7 @@ import com.fuint.common.dto.AccountInfo;
 import com.fuint.common.enums.QrCodeEnum;
 import com.fuint.common.service.*;
 import com.fuint.common.util.Base64Util;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.QRCodeUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
@@ -80,7 +81,7 @@ public class BackendCommonController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         Long merchantId = accountInfo.getMerchantId() == null ? 0 : accountInfo.getMerchantId();
         String page = QrCodeEnum.STORE.getPage() + "?" + QrCodeEnum.STORE.getKey() + "Id=" + id;

+ 3 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendConfirmLogController.java

@@ -9,6 +9,7 @@ import com.fuint.common.service.AccountService;
 import com.fuint.common.service.ConfirmLogService;
 import com.fuint.common.service.CouponService;
 import com.fuint.common.service.MemberService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -83,7 +84,7 @@ public class BackendConfirmLogController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();
@@ -155,7 +156,7 @@ public class BackendConfirmLogController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         couponService.rollbackUserCoupon(Long.valueOf(id), Integer.parseInt(userCouponId), accountInfo.getAccountName());

+ 9 - 18
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCountryController.java

@@ -1,30 +1,21 @@
 package com.fuint.module.backendApi.controller;
 
-import com.baomidou.mybatisplus.extension.api.R;
 import com.fuint.common.dto.AccountInfo;
 import com.fuint.common.dto.ext.CountryDto;
+import com.fuint.common.service.CountryService;
 import com.fuint.common.util.AuthUserUtil;
-import com.fuint.common.util.TokenUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.vo.CountryVo;
+import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
-import com.fuint.common.Constants;
-import com.fuint.common.enums.StatusEnum;
-import com.fuint.common.service.CountryService;
-import com.fuint.framework.pagination.PaginationRequest;
-import com.fuint.framework.pagination.PaginationResponse;
-import com.fuint.framework.exception.BusinessCheckException;
-import com.fuint.repository.model.MtCountry;
-import com.fuint.utils.StringUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
-import javax.servlet.http.HttpServletRequest;
-import java.util.HashMap;
+
 import java.util.List;
-import java.util.Map;
 
 /**
  * 国家表管理类controller
@@ -70,11 +61,11 @@ public class BackendCountryController extends BaseController {
     public ResponseObject updateCountry(CountryDto countryDto) throws BusinessCheckException {
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         Long accountInfoId = accountInfo.getId();
         boolean result = countryService.updateCountry(countryDto,accountInfoId);
-        return result ?getSuccessResult(true):getFailureResult(1002,"更新失败");
+        return result ?getSuccessResult(true):getFailureResult(1002,I18nUtil.getMessage("updateErr"));
     }
 
     /**
@@ -89,11 +80,11 @@ public class BackendCountryController extends BaseController {
     public ResponseObject saveHandler(@RequestBody CountryDto countryDto) throws BusinessCheckException {
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         Long accountInfoId = accountInfo.getId();
         boolean result = countryService.saveCountry(countryDto,accountInfoId);
-        return result?getSuccessResult(true):getFailureResult(1002,"保持失败");
+        return result?getSuccessResult(true):getFailureResult(1002,I18nUtil.getMessage("saveErr"));
     }
 
     /**
@@ -108,6 +99,6 @@ public class BackendCountryController extends BaseController {
     @PreAuthorize("@pms.hasPermission('country:list')")
     public ResponseObject deleteCountry(@PathVariable Long id) throws BusinessCheckException {
         boolean success = countryService.deleteCountry(id);
-        return success ? getSuccessResult("删除成功"):getFailureResult(1002,"删除失败");
+        return success ? getSuccessResult(true):getFailureResult(1002,I18nUtil.getMessage("deleteErr"));
     }
 }

+ 10 - 9
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCouponController.java

@@ -6,6 +6,7 @@ import com.fuint.common.enums.CouponTypeEnum;
 import com.fuint.common.enums.CouponUseForEnum;
 import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.service.*;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.PhoneFormatCheckUtils;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
@@ -101,7 +102,7 @@ public class BackendCouponController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();
@@ -252,7 +253,7 @@ public class BackendCouponController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         List<Long> ids = new ArrayList<>();
@@ -279,7 +280,7 @@ public class BackendCouponController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         reqCouponDto.setOperator(accountInfo.getAccountName());
 
@@ -293,8 +294,8 @@ public class BackendCouponController extends BaseController {
         requestSearch.setSearchParams(requestParams);
         PaginationResponse<MtCoupon> dataName = couponService.queryCouponListByPagination(requestSearch);
 
-        if (dataName.getContent().size() > 0 && reqCouponDto.getId() == null) {
-            return getFailureResult(201, "卡券名称已存在,请修改");
+        if (!dataName.getContent().isEmpty() && reqCouponDto.getId() == null) {
+            return getFailureResult(201, I18nUtil.getMessage("voucherNameExistsModify"));
         }
 
         TAccount account = accountService.getAccountInfoById(accountInfo.getId());
@@ -322,7 +323,7 @@ public class BackendCouponController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtCoupon mtCouponInfo = couponService.queryCouponById(id);
@@ -427,11 +428,11 @@ public class BackendCouponController extends BaseController {
         String object = request.getParameter("object");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (couponId == null) {
-            return getFailureResult(201, "系统参数有误");
+            return getFailureResult(201, I18nUtil.getMessage("paramErr"));
         }
         if (!PhoneFormatCheckUtils.isChinaPhoneLegal(mobile) && StringUtil.isNotEmpty(mobile)) {
             return getFailureResult(201, "手机号格式有误");
@@ -463,7 +464,7 @@ public class BackendCouponController extends BaseController {
         } else if (object.equals("all")) {
             userIdList = memberService.getUserIdList(accountInfo.getMerchantId(), accountInfo.getStoreId());
         } else {
-            return getFailureResult(201, "系统参数有误");
+            return getFailureResult(201, I18nUtil.getMessage("paramErr"));
         }
 
         couponService.batchSendCoupon(Long.valueOf(couponId), userIdList, Integer.parseInt(num), uuid, accountInfo.getAccountName());

+ 10 - 9
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCouponGroupController.java

@@ -4,6 +4,7 @@ import com.fuint.common.Constants;
 import com.fuint.common.dto.*;
 import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.service.CouponGroupService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.common.util.XlsUtil;
 import com.fuint.framework.dto.ExcelExportDto;
@@ -82,7 +83,7 @@ public class BackendCouponGroupController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();
@@ -161,7 +162,7 @@ public class BackendCouponGroupController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         reqCouponGroupDto.setMerchantId(accountInfo.getMerchantId());
         reqCouponGroupDto.setStoreId(accountInfo.getStoreId());
@@ -188,7 +189,7 @@ public class BackendCouponGroupController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         // 该分组已有数据,不允许删除
@@ -196,8 +197,8 @@ public class BackendCouponGroupController extends BaseController {
         searchParams.put("GROUP_ID", id.toString());
         searchParams.put("status", StatusEnum.ENABLED.getKey());
         List<MtCoupon> dataList = mtCouponMapper.selectByMap(searchParams);
-        if (dataList.size() > 0) {
-            return getFailureResult(201, "该分组下有卡券,不能删除");
+        if (!dataList.isEmpty()) {
+            return getFailureResult(201, I18nUtil.getMessage("cannotDeleteWithVouchers"));
         }
 
         couponGroupService.deleteCouponGroup(Long.valueOf(id), accountInfo.getAccountName());
@@ -221,7 +222,7 @@ public class BackendCouponGroupController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String operator = accountInfo.getAccountName();
@@ -248,7 +249,7 @@ public class BackendCouponGroupController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtCouponGroup mtCouponGroup = couponGroupService.queryCouponGroupById(Long.valueOf(id));
@@ -303,7 +304,7 @@ public class BackendCouponGroupController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String filePath = couponGroupService.saveExcelFile(file, request);
@@ -321,7 +322,7 @@ public class BackendCouponGroupController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();

+ 7 - 15
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCurrencyController.java

@@ -1,30 +1,22 @@
 package com.fuint.module.backendApi.controller;
 
-import com.fuint.common.dto.AccountInfo;
 import com.fuint.common.dto.ext.CurrencyDto;
 import com.fuint.common.param.PageParam;
+import com.fuint.common.service.CurrencyService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.common.vo.CurrencyVo;
+import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.PageResult;
 import com.fuint.framework.web.ResponseObject;
-import com.fuint.common.Constants;
-import com.fuint.common.enums.StatusEnum;
-import com.fuint.common.service.CurrencyService;
-import com.fuint.framework.pagination.PaginationRequest;
-import com.fuint.framework.pagination.PaginationResponse;
-import com.fuint.framework.exception.BusinessCheckException;
-import com.fuint.repository.model.MtCurrency;
-import com.fuint.utils.StringUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
-import javax.servlet.http.HttpServletRequest;
-import java.util.HashMap;
+
 import java.util.List;
-import java.util.Map;
 
 /**
  * 货币表管理类controller
@@ -67,7 +59,7 @@ public class BackendCurrencyController extends BaseController {
     @PreAuthorize("@pms.hasPermission('currency:edit')")
     public ResponseObject updateStatus(@RequestBody CurrencyDto currencyDto) throws BusinessCheckException {
         boolean success = currencyService.updateCurrency(currencyDto);
-        return success?getSuccessResult(true):getFailureResult(1002,"更新失败");
+        return success?getSuccessResult(true):getFailureResult(1002, I18nUtil.getMessage("updateErr"));
     }
 
     /**
@@ -82,7 +74,7 @@ public class BackendCurrencyController extends BaseController {
     @PreAuthorize("@pms.hasPermission('currency:add')")
     public ResponseObject saveHandler(@RequestBody CurrencyDto currencyDto) throws BusinessCheckException {
         boolean success = currencyService.addCurrency(currencyDto);
-        return success?getSuccessResult(true):getFailureResult(1002,"保存失败");
+        return success?getSuccessResult(true):getFailureResult(1002,I18nUtil.getMessage("saveErr"));
     }
 
     /**
@@ -97,7 +89,7 @@ public class BackendCurrencyController extends BaseController {
     @PreAuthorize("@pms.hasPermission('currency:delete')")
     public ResponseObject info(@PathVariable("id") Integer id) throws BusinessCheckException {
         boolean success = currencyService.deleteCurrency(id);
-        return success?getSuccessResult(true):getFailureResult(1002,"删除失败");
+        return success?getSuccessResult(true):getFailureResult(1002,I18nUtil.getMessage("deleteErr"));
     }
 
 

+ 8 - 7
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendDoConfirmController.java

@@ -10,6 +10,7 @@ import com.fuint.common.service.ConfirmLogService;
 import com.fuint.common.service.CouponService;
 import com.fuint.common.service.MemberService;
 import com.fuint.common.util.DateUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.BaseController;
@@ -83,11 +84,11 @@ public class BackendDoConfirmController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (StringUtil.isEmpty(userCouponCode) && StringUtil.isEmpty(userCouponId)) {
-            return getFailureResult(201, "核销券码不能为空");
+            return getFailureResult(201, I18nUtil.getMessage("couponCodeRequired"));
         }
 
         // 通过券码或ID获取
@@ -99,7 +100,7 @@ public class BackendDoConfirmController extends BaseController {
         }
 
         if (userCoupon == null) {
-            return getFailureResult(201, "未查询到该卡券信息");
+            return getFailureResult(201, I18nUtil.getMessage("voucherNotFound"));
         }
 
         MtCoupon couponInfo = couponService.queryCouponById(userCoupon.getCouponId());
@@ -164,10 +165,10 @@ public class BackendDoConfirmController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         if (StringUtil.isEmpty(userCouponId)) {
-            return getFailureResult(201, "系统参数有误");
+            return getFailureResult(201, I18nUtil.getMessage("paramErr"));
         }
 
         TAccount account = accountService.getAccountInfoById(accountInfo.getId());
@@ -175,13 +176,13 @@ public class BackendDoConfirmController extends BaseController {
 
         MtUserCoupon mtUserCoupon = mtUserCouponMapper.selectById(Integer.parseInt(userCouponId));
         if (mtUserCoupon.getType().equals(CouponTypeEnum.PRESTORE.getKey()) && StringUtil.isEmpty(amount)) {
-            return getFailureResult(201, "储值卡核销金额不能为空");
+            return getFailureResult(201, I18nUtil.getMessage("redemptionAmountNonNullable"));
         }
 
         try {
             couponService.useCoupon(Long.valueOf(userCouponId), accountInfo.getId(), storeId, 0L, new BigDecimal(amount), remark);
         } catch (BusinessCheckException e) {
-            return getFailureResult(201, "核销失败:" + e.getMessage());
+            return getFailureResult(201, I18nUtil.getMessage("redemptionFailure") + e.getMessage());
         }
 
         return getSuccessResult(true);

+ 9 - 8
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendDutyController.java

@@ -7,6 +7,7 @@ import com.fuint.common.dto.RoleDto;
 import com.fuint.common.enums.AdminRoleEnum;
 import com.fuint.common.service.DutyService;
 import com.fuint.common.service.SourceService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -73,7 +74,7 @@ public class BackendDutyController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();
@@ -137,7 +138,7 @@ public class BackendDutyController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         // 获取角色所分配的菜单
@@ -177,7 +178,7 @@ public class BackendDutyController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         TDuty htDuty = tDutyService.getRoleById(roleId);
 
@@ -221,16 +222,16 @@ public class BackendDutyController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (StringUtil.isEmpty(id)) {
-            return getFailureResult(201, "信息提交有误");
+            return getFailureResult(201, I18nUtil.getMessage("submissionError"));
         }
 
         TDuty duty = tDutyService.getRoleById(Long.parseLong(id));
         if (!duty.getMerchantId().equals(accountInfo.getMerchantId()) && accountInfo.getMerchantId() > 0) {
-            return getFailureResult(201, "抱歉,您没有修改权限");
+            return getFailureResult(201, I18nUtil.getMessage("noEditPermission"));
         }
 
         duty.setDescription(description);
@@ -263,7 +264,7 @@ public class BackendDutyController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         tDutyService.deleteDuty(accountInfo.getMerchantId(), roleId);
         return getSuccessResult(true);
@@ -283,7 +284,7 @@ public class BackendDutyController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         tDutyService.updateStatus(accountInfo.getMerchantId(), dutyStatusRequest);
         return getSuccessResult(true);

+ 13 - 12
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendFileController.java

@@ -69,7 +69,7 @@
 //
 //        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
 //        if (accountInfo == null) {
-//            return getFailureResult(1001, "请先登录");
+//            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
 //        }
 //
 //        if (action.equals("config")) {
@@ -198,26 +198,27 @@ import com.fuint.common.service.SettingService;
 import com.fuint.common.util.AuthUserUtil;
 import com.fuint.common.util.CommonUtil;
 import com.fuint.common.util.DateUtil;
-import com.fuint.common.util.TokenUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
 import com.fuint.utils.StringUtil;
+import com.obs.services.ObsClient;
 import com.obs.services.model.PutObjectRequest;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
-import org.springframework.util.ResourceUtils;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.core.env.Environment;
+import org.springframework.util.ResourceUtils;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
 import java.io.File;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.UUID;
-import com.obs.services.ObsClient;
 
 /**
  * 文件上传管理控制类
@@ -256,22 +257,22 @@ public class BackendFileController extends BaseController {
         // 验证 token 是否有效
 //        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
 //        if (accountInfo == null) {
-//            return getFailureResult(1001, "请先登录");
+//            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
 //        }
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         // 校验上传的文件是否为空
         if (file == null || file.isEmpty()) {
-            return getFailureResult(201, "上传的文件不能为空");
+            return getFailureResult(201, I18nUtil.getMessage("fileNotEmptyRequired"));
         }
 
         // 获取文件的原始文件名
         String originalFilename = file.getOriginalFilename();
         if (StringUtil.isEmpty(originalFilename)) {
-            return getFailureResult(201, "上传文件获取失败");
+            return getFailureResult(201, I18nUtil.getMessage("fileUploadRetrievalFailure"));
         }
 
         // 获取上传文件的最大允许大小
@@ -285,7 +286,7 @@ public class BackendFileController extends BaseController {
 
         // 判断文件大小
         if (file.getSize() > (maxSize * 1024 * 1024)) {
-            return getFailureResult(201, "上传的文件不能大于 " + maxSize + "MB");
+            return getFailureResult(201, I18nUtil.getMessage("maxFileSizeExceeded") + maxSize + "MB");
         }
 
         // 获取文件类型
@@ -339,7 +340,7 @@ public class BackendFileController extends BaseController {
 
             return getSuccessResult(resultMap);
         } catch (Exception e) {
-            return getFailureResult(201, "上传失败,请检查上传配置及权限");
+            return getFailureResult(201, I18nUtil.getMessage("uploadFailureCheckConfigPerm"));
         }
     }
 

+ 7 - 6
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendGenCodeController.java

@@ -3,6 +3,7 @@ package com.fuint.module.backendApi.controller;
 import com.fuint.common.dto.AccountInfo;
 import com.fuint.common.service.GenCodeService;
 import com.fuint.common.util.CommonUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -58,7 +59,7 @@ public class BackendGenCodeController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();
@@ -97,7 +98,7 @@ public class BackendGenCodeController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         TGenCode tGenCode = genCodeService.queryGenCodeById(id);
@@ -133,7 +134,7 @@ public class BackendGenCodeController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         TGenCode tGenCode = new TGenCode();
@@ -170,7 +171,7 @@ public class BackendGenCodeController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         TGenCode tGenCode = genCodeService.queryGenCodeById(Long.valueOf(id));
@@ -195,12 +196,12 @@ public class BackendGenCodeController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         TGenCode tGenCode = genCodeService.queryGenCodeById(Long.valueOf(id));
         if (tGenCode == null) {
-            return getFailureResult(201, "生成代码不存在");
+            return getFailureResult(201, I18nUtil.getMessage("codeGenerationNonExistent"));
         }
 
         genCodeService.generatorCode(tGenCode.getTableName());

+ 7 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendGiveLogController.java

@@ -8,6 +8,7 @@ import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.service.AccountService;
 import com.fuint.common.service.GiveService;
 import com.fuint.common.util.ExcelUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.common.util.XlsUtil;
 import com.fuint.framework.exception.BusinessCheckException;
@@ -20,13 +21,12 @@ import com.fuint.repository.mapper.MtCouponMapper;
 import com.fuint.repository.mapper.MtUserCouponMapper;
 import com.fuint.repository.model.*;
 import com.fuint.utils.StringUtil;
-import static com.fuint.common.util.XlsUtil.objectConvertToString;
-
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.springframework.web.bind.annotation.*;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.OutputStream;
@@ -35,6 +35,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import static com.fuint.common.util.XlsUtil.objectConvertToString;
+
 /**
  * 转赠管理类controller
  *
@@ -83,7 +85,7 @@ public class BackendGiveLogController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();
@@ -129,11 +131,11 @@ public class BackendGiveLogController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (StringUtil.isEmpty(giveId)) {
-            return getFailureResult(201, "参数有误");
+            return getFailureResult(201, I18nUtil.getMessage("paramErr"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();

+ 13 - 13
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendGoodsController.java

@@ -2,7 +2,6 @@ package com.fuint.module.backendApi.controller;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.fuint.common.Constants;
 import com.fuint.common.dto.*;
 import com.fuint.common.enums.GoodsTypeEnum;
@@ -10,6 +9,7 @@ import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.enums.YesOrNoEnum;
 import com.fuint.common.service.*;
 import com.fuint.common.util.CommonUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -19,7 +19,6 @@ import com.fuint.framework.web.ResponseObject;
 import com.fuint.repository.mapper.MtGoodsSkuMapper;
 import com.fuint.repository.mapper.MtGoodsSpecMapper;
 import com.fuint.repository.model.*;
-import com.fuint.utils.ObjectUtil;
 import com.fuint.utils.StringUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -27,6 +26,7 @@ import lombok.AllArgsConstructor;
 import org.springframework.beans.BeanUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
+
 import javax.servlet.http.HttpServletRequest;
 import java.lang.reflect.InvocationTargetException;
 import java.math.BigDecimal;
@@ -99,7 +99,7 @@ public class BackendGoodsController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         TAccount account = accountService.getAccountInfoById(accountInfo.getId());
@@ -200,11 +200,11 @@ public class BackendGoodsController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() == 0){
-            return getFailureResult(1001, "平台账号无权限修改商品");
+            return getFailureResult(1001, I18nUtil.getMessage("accountNoPermissionToEditProduct"));
         }
 
         String operator = accountInfo.getAccountName();
@@ -228,16 +228,16 @@ public class BackendGoodsController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() == 0){
-            return getFailureResult(1001, "平台账号无权限修改商品");
+            return getFailureResult(1001, I18nUtil.getMessage("accountNoPermissionToEditProduct"));
         }
 
         MtGoods mtGoods = goodsService.queryGoodsById(id);
         if (mtGoods == null) {
-            return getFailureResult(201, "该商品不存在");
+            return getFailureResult(201, I18nUtil.getMessage("productDoesNotExist"));
         }
 
         String operator = accountInfo.getAccountName();
@@ -267,7 +267,7 @@ public class BackendGoodsController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         Long storeId = accountInfo.getStoreId();
         GoodsDto goods = goodsService.getGoodsDetail(goodsId, false);
@@ -393,7 +393,7 @@ public class BackendGoodsController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() == 0){
             return getFailureResult(1001, "平台账号无权限修改商品");
@@ -622,7 +622,7 @@ public class BackendGoodsController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (StringUtil.isEmpty(goodsId)) {
@@ -677,7 +677,7 @@ public class BackendGoodsController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (StringUtil.isEmpty(goodsId)) {
@@ -833,7 +833,7 @@ public class BackendGoodsController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
             params.put("merchantId", accountInfo.getMerchantId());

+ 3 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendHomeController.java

@@ -6,6 +6,7 @@ import com.fuint.common.service.AccountService;
 import com.fuint.common.service.MemberService;
 import com.fuint.common.service.OrderService;
 import com.fuint.common.util.DateUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TimeUtils;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
@@ -66,7 +67,7 @@ public class BackendHomeController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Long merchantId = accountInfo.getMerchantId();
@@ -122,7 +123,7 @@ public class BackendHomeController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         TAccount account = accountService.getAccountInfoById(accountInfo.getId());

+ 3 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendLoginController.java

@@ -3,6 +3,7 @@ package com.fuint.module.backendApi.controller;
 import com.fuint.common.dto.AccountInfo;
 import com.fuint.common.enums.AdminRoleEnum;
 import com.fuint.common.service.*;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.common.util.TreeUtil;
 import com.fuint.common.vo.RouterVo;
@@ -72,7 +73,7 @@ public class BackendLoginController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(401, "登录信息已失效,请重新登录");
+            return getFailureResult(401, I18nUtil.getMessage("notAuthenticated"));
         }
         TAccount tAccount = accountService.getAccountInfoById(accountInfo.getId());
         if (accountInfo == null || tAccount == null || !tAccount.getAccountStatus().toString().equals("1")) {
@@ -124,7 +125,7 @@ public class BackendLoginController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(401, "登录信息已失效,请重新登录");
+            return getFailureResult(401, I18nUtil.getMessage("notAuthenticated"));
         }
 
         List<TSource> sources = sourceService.getMenuListByUserId(accountInfo.getMerchantId(), accountInfo.getId());

+ 7 - 6
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMaterialController.java

@@ -5,6 +5,7 @@ import com.fuint.common.dto.AccountInfo;
 import com.fuint.common.dto.MaterialDto;
 import com.fuint.common.dto.MaterialSearchDto;
 import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.common.vo.MaterialVo;
 import com.fuint.framework.FrameworkConstants;
@@ -59,7 +60,7 @@ public class BackendMaterialController extends BaseController {
 
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo == null) {
-            throw new BusinessCheckException("请先登录");
+            throw new BusinessCheckException(I18nUtil.getMessage("notAuthenticated"));
         }
         String storeId = materialSearchDto.getStoreId();
         if (StringUtils.isEmpty(storeId)){
@@ -84,13 +85,13 @@ public class BackendMaterialController extends BaseController {
 
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         MtMaterial mtMaterial = new MtMaterial();
         BeanUtils.copyProperties(materialDto,mtMaterial);
         MtMaterial rawMaterial = materialService.queryMaterialById(mtMaterial.getId());
         if (rawMaterial == null) {
-            return getFailureResult(201,"数据不存在");
+            return getFailureResult(201,I18nUtil.getMessage("dataNonExistent"));
         }
         mtMaterial.setUpdateTime(new Date());
         mtMaterial.setUpdateUserId(String.valueOf(accountInfo.getId()));
@@ -112,7 +113,7 @@ public class BackendMaterialController extends BaseController {
 
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         Long storeId;
         if(StringUtils.isEmpty(materialDto.getStoreId())){
@@ -149,7 +150,7 @@ public class BackendMaterialController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtMaterial materialInfo = materialService.queryMaterialById(Long.valueOf(id));
@@ -167,7 +168,7 @@ public class BackendMaterialController extends BaseController {
     public ResponseObject deleteById(@PathVariable("id") String id) throws BusinessCheckException {
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
          materialService.deleteMaterial(Long.valueOf(id), String.valueOf(accountInfo.getId()));
         return getSuccessResult("删除成功");

+ 8 - 13
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMaterialTypeController.java

@@ -1,28 +1,23 @@
 package com.fuint.module.backendApi.controller;
 
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.fuint.common.dto.AccountInfo;
 import com.fuint.common.dto.MaterialTypeDto;
 import com.fuint.common.dto.MaterialTypeSearchDto;
+import com.fuint.common.service.MaterialTypeService;
 import com.fuint.common.util.AuthUserUtil;
-import com.fuint.common.util.TokenUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.vo.MaterialTypeVo;
+import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.PageResult;
 import com.fuint.framework.web.ResponseObject;
-import com.fuint.common.service.MaterialTypeService;
-import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.repository.model.MtMaterialType;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
-import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
-import javax.servlet.http.HttpServletRequest;
-import java.util.HashMap;
-import java.util.Map;
 
 /**
  * 材料类型表管理类controller
@@ -54,7 +49,7 @@ public class BackendMaterialTypeController extends BaseController {
 
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo == null) {
-            throw  new BusinessCheckException("用户未登录");
+            throw  new BusinessCheckException(I18nUtil.getMessage("notAuthenticated"));
         }
 
         return materialTypeService.selectMaterialTypeList(materialTypeSearchDto);
@@ -72,12 +67,12 @@ public class BackendMaterialTypeController extends BaseController {
     public ResponseObject updateStatus(@RequestBody MaterialTypeDto mtMaterialTypeDto) throws BusinessCheckException {
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         //校验id合法性
         MtMaterialType rawMtMaterialType = materialTypeService.queryMaterialTypeById(mtMaterialTypeDto.getId());
         if (rawMtMaterialType == null) {
-            return getFailureResult(201,"数据不存在");
+            return getFailureResult(201,I18nUtil.getMessage("dataNonExistent"));
         }
         MtMaterialType newMtMaterialType = new MtMaterialType();
         //只允许更新这三个字段
@@ -102,7 +97,7 @@ public class BackendMaterialTypeController extends BaseController {
 
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         MtMaterialType mtMaterialType = new MtMaterialType();
         BeanUtils.copyProperties(mtMaterialTypeDto,mtMaterialType);
@@ -122,7 +117,7 @@ public class BackendMaterialTypeController extends BaseController {
 
         AccountInfo accountInfo = AuthUserUtil.get();
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         return materialTypeService.deleteHandler(id);
     }

+ 12 - 11
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMemberController.java

@@ -8,6 +8,7 @@ import com.fuint.common.enums.UserSettingEnum;
 import com.fuint.common.enums.YesOrNoEnum;
 import com.fuint.common.service.*;
 import com.fuint.common.util.DateUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.PhoneFormatCheckUtils;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
@@ -131,7 +132,7 @@ public class BackendMemberController extends BaseController {
         }
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         TAccount account = accountService.getAccountInfoById(accountInfo.getId());
         if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
@@ -203,12 +204,12 @@ public class BackendMemberController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtUser userInfo = memberService.queryMemberById(userId);
         if (userInfo == null) {
-            return getFailureResult(201, "会员不存在");
+            return getFailureResult(201, I18nUtil.getMessage("memberNonExistent"));
         }
 
         userInfo.setStatus(status);
@@ -231,7 +232,7 @@ public class BackendMemberController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String operator = accountInfo.getAccountName();
@@ -253,7 +254,7 @@ public class BackendMemberController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String id = param.get("id").toString();
@@ -335,7 +336,7 @@ public class BackendMemberController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtUser mtUser = memberService.queryMemberById(Long.valueOf(id));
@@ -387,7 +388,7 @@ public class BackendMemberController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         List<MtSetting> settingList = settingService.getSettingList(accountInfo.getMerchantId(), SettingTypeEnum.USER.getKey());
@@ -445,7 +446,7 @@ public class BackendMemberController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         UserSettingEnum[] settingList = UserSettingEnum.values();
@@ -513,7 +514,7 @@ public class BackendMemberController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (StringUtil.isEmpty(password)) {
@@ -551,7 +552,7 @@ public class BackendMemberController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         // 会员分组
@@ -587,7 +588,7 @@ public class BackendMemberController extends BaseController {
         String keyword = request.getParameter("keyword") != null ? request.getParameter("keyword") : "";
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         List<GroupMemberDto> memberList = memberService.searchMembers(accountInfo.getMerchantId(), keyword, groupIds,1, Constants.MAX_ROWS);
         return getSuccessResult(memberList);

+ 10 - 9
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMemberGroupController.java

@@ -6,7 +6,7 @@ import com.fuint.common.dto.MemberGroupDto;
 import com.fuint.common.dto.UserGroupDto;
 import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.service.MemberGroupService;
-import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -22,6 +22,7 @@ import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
+
 import javax.servlet.http.HttpServletRequest;
 import java.util.HashMap;
 import java.util.List;
@@ -67,7 +68,7 @@ public class BackendMemberGroupController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();
@@ -115,11 +116,11 @@ public class BackendMemberGroupController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
 
         memberGroupDto.setMerchantId(accountInfo.getMerchantId());
@@ -147,7 +148,7 @@ public class BackendMemberGroupController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         // 该分组已有会员,不允许删除
@@ -155,8 +156,8 @@ public class BackendMemberGroupController extends BaseController {
         searchParams.put("GROUP_ID", id.toString());
         searchParams.put("STATUS", StatusEnum.ENABLED.getKey());
         List<MtUser> dataList = mtUserMapper.selectByMap(searchParams);
-        if (dataList.size() > 0) {
-            return getFailureResult(201, "该分组下有会员,不能删除");
+        if (!dataList.isEmpty()) {
+            return getFailureResult(201, I18nUtil.getMessage("groupHasMembersCannotDelete"));
         }
 
         memberGroupService.deleteMemberGroup(Long.valueOf(id), accountInfo.getAccountName());
@@ -180,7 +181,7 @@ public class BackendMemberGroupController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String operator = accountInfo.getAccountName();
@@ -207,7 +208,7 @@ public class BackendMemberGroupController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtUserGroup mtUserGroup = memberGroupService.queryMemberGroupById(Long.valueOf(id));

+ 8 - 7
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMerchantController.java

@@ -8,6 +8,7 @@ import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.service.MerchantService;
 import com.fuint.common.service.SettingService;
 import com.fuint.common.util.CommonUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -70,7 +71,7 @@ public class BackendMerchantController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
             merchantId = accountInfo.getMerchantId().toString();
@@ -157,7 +158,7 @@ public class BackendMerchantController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
             merchantId = accountInfo.getMerchantId();
@@ -183,7 +184,7 @@ public class BackendMerchantController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Long merchantId = StringUtil.isEmpty(params.get("id").toString()) ? Long.parseLong("0") : Integer.parseInt(params.get("id").toString());
@@ -220,15 +221,15 @@ public class BackendMerchantController extends BaseController {
         }
 
         if (StringUtil.isEmpty(name)) {
-            return getFailureResult(201, "商户名称不能为空");
+            return getFailureResult(201, I18nUtil.getMessage("merchantNameCannotBeEmpty"));
         } else {
             MtMerchant merchant = merchantService.queryMerchantByName(name);
             if (null != merchant && !merchant.getId().equals(merchantId)) {
-                return getFailureResult(201, "该商户名称已经存在");
+                return getFailureResult(201, I18nUtil.getMessage("merchantNameAlreadyExists"));
             }
         }
         if (merchantId <= 0 && accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
-            return getFailureResult(201, "抱歉,您没有添加商户的权限");
+            return getFailureResult(201, I18nUtil.getMessage("noPermissionToAddMerchant"));
         }
 
         // 修改商户信息
@@ -257,7 +258,7 @@ public class BackendMerchantController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
             id = accountInfo.getMerchantId();

+ 8 - 7
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendOpenGiftController.java

@@ -6,6 +6,7 @@ import com.fuint.common.dto.OpenGiftDto;
 import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.service.MemberService;
 import com.fuint.common.service.OpenGiftService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.BaseController;
@@ -60,7 +61,7 @@ public class BackendOpenGiftController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Integer page = request.getParameter("page") == null ? Constants.PAGE_NUMBER : Integer.parseInt(request.getParameter("page"));
@@ -114,7 +115,7 @@ public class BackendOpenGiftController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Map<String, Object> param = new HashMap<>();
@@ -147,7 +148,7 @@ public class BackendOpenGiftController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String id = param.get("id").toString();
@@ -158,11 +159,11 @@ public class BackendOpenGiftController extends BaseController {
         String status = param.get("status") == null ? StatusEnum.ENABLED.getKey() : param.get("status").toString();
 
         if (StringUtil.isEmpty(couponId) && StringUtil.isEmpty(couponNum) && StringUtil.isEmpty(point)) {
-            return getFailureResult(201, "积分和卡券必须填写一项");
+            return getFailureResult(201, I18nUtil.getMessage("mustFillPointsOrVouchers"));
         }
 
         if (StringUtil.isEmpty(gradeId)) {
-            return getFailureResult(201, "会员等级不能为空");
+            return getFailureResult(201, I18nUtil.getMessage("memberLevelNotNull"));
         }
 
         MtOpenGift reqDto = new MtOpenGift();
@@ -217,7 +218,7 @@ public class BackendOpenGiftController extends BaseController {
 
         OpenGiftDto info = openGiftService.getOpenGiftDetail(Long.valueOf(id));
         if (info == null) {
-            return getFailureResult(201, "会员等级不存在");
+            return getFailureResult(201, I18nUtil.getMessage("membershipLevelDoesNotExist"));
         }
 
         MtOpenGift reqDto = new MtOpenGift();
@@ -242,7 +243,7 @@ public class BackendOpenGiftController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String operator = accountInfo.getAccountName();

+ 12 - 11
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendOrderController.java

@@ -6,6 +6,7 @@ import com.fuint.common.enums.*;
 import com.fuint.common.param.OrderListParam;
 import com.fuint.common.service.*;
 import com.fuint.common.util.ExcelUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationResponse;
@@ -94,7 +95,7 @@ public class BackendOrderController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         TAccount account = accountService.getAccountInfoById(accountInfo.getId());
         if (account.getMerchantId() != null && account.getMerchantId() > 0) {
@@ -208,7 +209,7 @@ public class BackendOrderController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         UserOrderDto orderInfo = orderService.getOrderById(orderId);
@@ -260,11 +261,11 @@ public class BackendOrderController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (orderId < 0) {
-            return getFailureResult(201, "系统出错啦,订单ID不能为空");
+            return getFailureResult(201, I18nUtil.getMessage("orderIDRequired"));
         }
 
         UserOrderDto orderInfo = orderService.getOrderById(orderId);
@@ -326,10 +327,10 @@ public class BackendOrderController extends BaseController {
         String orderMode = param.get("orderMode") == null ? "" : param.get("orderMode").toString();
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         if (orderId < 0) {
-            return getFailureResult(201, "系统出错啦,订单ID不能为空");
+            return getFailureResult(201, I18nUtil.getMessage("orderIDRequired"));
         }
 
         OrderDto orderDto = new OrderDto();
@@ -372,7 +373,7 @@ public class BackendOrderController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (orderId < 0) {
@@ -405,7 +406,7 @@ public class BackendOrderController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Map<String, Object> result = new HashMap<>();
@@ -442,7 +443,7 @@ public class BackendOrderController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String operator = accountInfo.getAccountName();
@@ -465,7 +466,7 @@ public class BackendOrderController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         List<MtSetting> settingList = settingService.getSettingList(accountInfo.getMerchantId(), SettingTypeEnum.ORDER.getKey());
@@ -509,7 +510,7 @@ public class BackendOrderController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String operator = accountInfo.getAccountName();

+ 10 - 10
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendPointController.java

@@ -10,8 +10,8 @@ import com.fuint.common.enums.YesOrNoEnum;
 import com.fuint.common.service.MemberService;
 import com.fuint.common.service.PointService;
 import com.fuint.common.service.SettingService;
-import com.fuint.common.util.AuthUserUtil;
 import com.fuint.common.util.CommonUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -82,7 +82,7 @@ public class BackendPointController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();
@@ -136,7 +136,7 @@ public class BackendPointController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         List<MtSetting> settingList = settingService.getSettingList(accountInfo.getMerchantId(), SettingTypeEnum.POINT.getKey());
@@ -188,15 +188,15 @@ public class BackendPointController extends BaseController {
         String status = request.getParameter("status");
 
         if (!CommonUtil.isNumeric(pointNeedConsume) || !CommonUtil.isNumeric(exchangeNeedPoint) || !CommonUtil.isNumeric(rechargePointSpeed)) {
-            return getFailureResult(201, "输入参数有误");
+            return getFailureResult(201, I18nUtil.getMessage("paramErr"));
         }
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
         String operator = accountInfo.getAccountName();
 
@@ -248,15 +248,15 @@ public class BackendPointController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (!CommonUtil.isNumeric(amount)) {
-            return getFailureResult(201, "充值积分必须是数字");
+            return getFailureResult(201, I18nUtil.getMessage("rechargePointsMustBeNumeric"));
         }
 
         if (userId < 1) {
-            return getFailureResult(201, "充值会员信息不能为空");
+            return getFailureResult(201, I18nUtil.getMessage("rechargeMemberInfoCannotBeEmpty"));
         }
 
         MtPoint mtPoint = new MtPoint();
@@ -264,7 +264,7 @@ public class BackendPointController extends BaseController {
             // 扣减积分
             MtUser userInfo = memberService.queryMemberById(userId);
             if (userInfo.getPoint() < (Integer.parseInt(amount))) {
-                return getFailureResult(201, "操作失败,积分余额不足");
+                return getFailureResult(201, I18nUtil.getMessage("insufficientPointsBalance"));
             }
             mtPoint.setAmount(Integer.parseInt(amount) - (Integer.parseInt(amount)) * 2);
         } else {

+ 8 - 7
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendPrinterController.java

@@ -7,6 +7,7 @@ import com.fuint.common.service.OrderService;
 import com.fuint.common.service.PrinterService;
 import com.fuint.common.service.SettingService;
 import com.fuint.common.service.StoreService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -83,7 +84,7 @@ public class BackendPrinterController extends BaseController {
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         Long storeId;
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         } else {
             storeId = accountInfo.getStoreId();
         }
@@ -147,7 +148,7 @@ public class BackendPrinterController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtPrinter mtPrinter = printerService.queryPrinterById(id);
@@ -187,7 +188,7 @@ public class BackendPrinterController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtPrinter mtPrinter = new MtPrinter();
@@ -225,7 +226,7 @@ public class BackendPrinterController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtPrinter printerInfo = printerService.queryPrinterById(id);
@@ -250,7 +251,7 @@ public class BackendPrinterController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         List<MtSetting> settingList = settingService.getSettingList(accountInfo.getMerchantId(), SettingTypeEnum.PRINTER.getKey());
@@ -296,7 +297,7 @@ public class BackendPrinterController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PrinterSettingEnum[] settingList = PrinterSettingEnum.values();
@@ -336,7 +337,7 @@ public class BackendPrinterController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         UserOrderDto orderInfo = orderService.getOrderById(orderId);

+ 7 - 6
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendRefundController.java

@@ -8,6 +8,7 @@ import com.fuint.common.service.AccountService;
 import com.fuint.common.service.MemberService;
 import com.fuint.common.service.OrderService;
 import com.fuint.common.service.RefundService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -83,7 +84,7 @@ public class BackendRefundController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         TAccount account = accountService.getAccountInfoById(accountInfo.getId());
@@ -174,7 +175,7 @@ public class BackendRefundController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         RefundDto refundInfo = refundService.getRefundById(Long.valueOf(refundId));
@@ -206,7 +207,7 @@ public class BackendRefundController extends BaseController {
         String rejectReason = param.get("rejectReason") == null ? "" : param.get("rejectReason").toString();
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         String operator = accountInfo.getAccountName();
         if (status.equals(RefundStatusEnum.REJECT.getKey())) {
@@ -247,16 +248,16 @@ public class BackendRefundController extends BaseController {
         String refundAmount = param.get("refundAmount") == null ? "" : param.get("refundAmount").toString();
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         if (orderId <= 0 || StringUtil.isEmpty(refundAmount)) {
-            return getFailureResult(201, "参数有误,发起退款失败");
+            return getFailureResult(201, I18nUtil.getMessage("refundFailedDueToInvalidParameters"));
         }
         Boolean result = refundService.doRefund(orderId, refundAmount, remark, accountInfo);
         if (result) {
             return getSuccessResult(true);
         } else {
-            return getFailureResult(201, "退款失败");
+            return getFailureResult(201, I18nUtil.getMessage("refundFailure"));
         }
     }
 }

+ 5 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSendLogController.java

@@ -5,6 +5,7 @@ import com.fuint.common.dto.AccountInfo;
 import com.fuint.common.service.CouponService;
 import com.fuint.common.service.MemberService;
 import com.fuint.common.service.SendLogService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -71,7 +72,7 @@ public class BackendSendLogController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();
@@ -131,16 +132,16 @@ public class BackendSendLogController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (id == null) {
-            return getFailureResult(201, "系统参数有误");
+            return getFailureResult(201, I18nUtil.getMessage("paramErr"));
         }
 
         MtSendLog sendLog = sendLogService.querySendLogById(id);
         if (sendLog == null) {
-            return getFailureResult(201, "系统参数有误");
+            return getFailureResult(201, I18nUtil.getMessage("paramErr"));
         }
 
         couponService.removeUserCoupon(id, sendLog.getUuid(), accountInfo.getAccountName());

+ 5 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSettlementController.java

@@ -10,6 +10,7 @@ import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.service.MerchantService;
 import com.fuint.common.service.SettlementService;
 import com.fuint.common.service.StoreService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -76,7 +77,7 @@ public class BackendSettlementController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         Map<String, Object> searchParams = new HashMap<>();
         if (StringUtil.isNotEmpty(mobile)) {
@@ -150,7 +151,7 @@ public class BackendSettlementController extends BaseController {
         Long settlementIdupId = request.getParameter("settlementId") == null ? 0 : Long.parseLong(request.getParameter("settlementId"));
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         SettlementDto settlementInfo = settlementService.getSettlementInfo(settlementIdupId, page, pageSize);
@@ -186,7 +187,7 @@ public class BackendSettlementController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         String operator = accountInfo.getAccountName();
         if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
@@ -212,7 +213,7 @@ public class BackendSettlementController extends BaseController {
         String settlementId = StringUtil.isEmpty(param.get("settlementId").toString())? "" : param.get("settlementId").toString();
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         if (StringUtil.isEmpty(settlementId)) {
             return getFailureResult(201, "参数有误");

+ 5 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSmsController.java

@@ -7,6 +7,7 @@ import com.fuint.common.enums.SmsSettingEnum;
 import com.fuint.common.service.SendSmsService;
 import com.fuint.common.service.SettingService;
 import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -68,7 +69,7 @@ public class BackendSmsController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();
@@ -106,7 +107,7 @@ public class BackendSmsController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         List<MtSetting> settingList = settingService.getSettingList(accountInfo.getMerchantId(), SettingTypeEnum.SMS_CONFIG.getKey());
@@ -157,11 +158,11 @@ public class BackendSmsController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
 
         SmsSettingEnum[] settingList = SmsSettingEnum.values();

+ 5 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSmsTemplateController.java

@@ -4,6 +4,7 @@ import com.fuint.common.Constants;
 import com.fuint.common.dto.AccountInfo;
 import com.fuint.common.dto.SmsTemplateDto;
 import com.fuint.common.service.SmsTemplateService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -59,7 +60,7 @@ public class BackendSmsTemplateController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Map<String, Object> searchParams = new HashMap<>();
@@ -98,7 +99,7 @@ public class BackendSmsTemplateController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         smsTemplateDto.setMerchantId(accountInfo.getMerchantId());
         smsTemplateService.saveSmsTemplate(smsTemplateDto);
@@ -119,7 +120,7 @@ public class BackendSmsTemplateController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtSmsTemplate mtSmsTemplate = smsTemplateService.querySmsTemplateById(id);
@@ -144,7 +145,7 @@ public class BackendSmsTemplateController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String operator = accountInfo.getAccountName();

+ 7 - 6
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java

@@ -7,6 +7,7 @@ import com.fuint.common.dto.SourceDto;
 import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.service.SourceService;
 import com.fuint.common.util.CommonUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.BaseController;
@@ -52,7 +53,7 @@ public class BackendSourceController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         List<TreeNode> sources = sourceService.getSourceTree(accountInfo.getMerchantId(), "");
@@ -103,7 +104,7 @@ public class BackendSourceController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String name = param.get("name").toString();
@@ -160,7 +161,7 @@ public class BackendSourceController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String name = param.get("name").toString();
@@ -174,7 +175,7 @@ public class BackendSourceController extends BaseController {
 
         TSource editSource = sourceService.getById(id);
         if (!editSource.getMerchantId().equals(accountInfo.getMerchantId()) && accountInfo.getMerchantId() > 0) {
-            return getFailureResult(201, "抱歉,您没有修改的权限");
+            return getFailureResult(201, I18nUtil.getMessage("noEditPermission"));
         }
         editSource.setSourceName(name);
         editSource.setStatus(status);
@@ -224,7 +225,7 @@ public class BackendSourceController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         TSource tSource = sourceService.getById(sourceId);
         if (!tSource.getMerchantId().equals(accountInfo.getMerchantId()) && accountInfo.getMerchantId() > 0) {
@@ -243,7 +244,7 @@ public class BackendSourceController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         List<TreeNode> sources = sourceService.getSourceTree(accountInfo.getMerchantId(), "");

+ 12 - 15
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStaffController.java

@@ -7,10 +7,7 @@ import com.fuint.common.dto.ParamDto;
 import com.fuint.common.enums.StaffCategoryEnum;
 import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.service.StaffService;
-import com.fuint.common.util.AuthUserUtil;
-import com.fuint.common.util.CommonUtil;
-import com.fuint.common.util.PhoneFormatCheckUtils;
-import com.fuint.common.util.TokenUtil;
+import com.fuint.common.util.*;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
 import com.fuint.framework.pagination.PaginationResponse;
@@ -69,7 +66,7 @@ public class BackendStaffController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         if (accountInfo.getStoreId() != null && accountInfo.getStoreId() > 0) {
             storeId = accountInfo.getStoreId().toString();
@@ -133,7 +130,7 @@ public class BackendStaffController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         staffService.updateAuditedStatus(id, status);
@@ -162,12 +159,12 @@ public class BackendStaffController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
 
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
 
         MtStaff mtStaff = new MtStaff();
@@ -176,7 +173,7 @@ public class BackendStaffController extends BaseController {
         }
 
         if (mtStaff == null && StringUtil.isNotEmpty(String.valueOf(id))) {
-            return getFailureResult(201, "员工信息不存在");
+            return getFailureResult(201, I18nUtil.getMessage("employeeInfoDoesNotExist"));
         }
         if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
             mtStaff.setMerchantId(accountInfo.getMerchantId());
@@ -184,14 +181,14 @@ public class BackendStaffController extends BaseController {
         mtStaff.setStoreId(storeId);
         mtStaff.setRealName(realName);
         if (!PhoneFormatCheckUtils.isChinaPhoneLegal(mobile)) {
-            return getFailureResult(201, "手机号码格式不正确");
+            return getFailureResult(201, I18nUtil.getMessage("phoneNumberFormatInvalid"));
         }else if (StringUtil.isNotEmpty(mobile)) {
             MtStaff tempUser = staffService.queryStaffByMobile(mobile);
             if (tempUser != null && !tempUser.getId().equals(mtStaff.getId())) {
-                return getFailureResult(201, "该手机号码已经存在");
+                return getFailureResult(201, I18nUtil.getMessage("phoneNumberAlreadyExists"));
             }
         }else if (StringUtil.isEmpty(mobile)) {
-            return getFailureResult(201, "手机号码不能为空");
+            return getFailureResult(201, I18nUtil.getMessage("phoneNumberCannotBeEmpty"));
         }
         mtStaff.setMobile(mobile);
 
@@ -226,7 +223,7 @@ public class BackendStaffController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtStaff staffInfo = staffService.queryStaffById(id);
@@ -257,7 +254,7 @@ public class BackendStaffController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Map<String, Object> params = new HashMap<>();
@@ -292,7 +289,7 @@ public class BackendStaffController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         staffService.updateAuditedStatus(id, StatusEnum.DISABLE.getKey());

+ 4 - 3
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStatisticController.java

@@ -7,6 +7,7 @@ import com.fuint.common.service.GoodsService;
 import com.fuint.common.service.MemberService;
 import com.fuint.common.service.OrderService;
 import com.fuint.common.util.DateUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.BaseController;
@@ -66,7 +67,7 @@ public class BackendStatisticController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Long merchantId = accountInfo.getMerchantId();
@@ -125,7 +126,7 @@ public class BackendStatisticController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Long merchantId = accountInfo.getMerchantId();
@@ -154,7 +155,7 @@ public class BackendStatisticController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Long merchantId = accountInfo.getMerchantId();

+ 5 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStockController.java

@@ -6,6 +6,7 @@ import com.fuint.common.dto.GoodsDto;
 import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.service.*;
 import com.fuint.common.util.CommonUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -82,7 +83,7 @@ public class BackendStockController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         TAccount account = accountService.getAccountInfoById(accountInfo.getId());
@@ -149,7 +150,7 @@ public class BackendStockController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtStock mtStock = stockService.queryStockById(id.longValue());
@@ -183,7 +184,7 @@ public class BackendStockController extends BaseController {
 
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
         if (accountDto == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Long myStoreId = accountDto.getStoreId();
@@ -218,7 +219,7 @@ public class BackendStockController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
         if (accountDto == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtStock mtStock = stockService.queryStockById(id.longValue());

+ 6 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStoreController.java

@@ -9,6 +9,7 @@ import com.fuint.common.service.MerchantService;
 import com.fuint.common.service.SettingService;
 import com.fuint.common.service.StoreService;
 import com.fuint.common.util.CommonUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -77,7 +78,7 @@ public class BackendStoreController extends BaseController {
 
 		AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
 		if (accountInfo == null) {
-			return getFailureResult(1001, "请先登录");
+			return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
 		}
 
 		PaginationRequest paginationRequest = new PaginationRequest();
@@ -133,7 +134,7 @@ public class BackendStoreController extends BaseController {
 
 		AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
 		if (accountInfo == null) {
-			return getFailureResult(1001, "请先登录");
+			return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
 		}
 
 		if (accountInfo.getStoreId() != null && accountInfo.getStoreId() > 0) {
@@ -179,7 +180,7 @@ public class BackendStoreController extends BaseController {
 
 		AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
 		if (accountInfo == null) {
-			return getFailureResult(1001, "请先登录");
+			return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
 		}
 
 		String operator = accountInfo.getAccountName();
@@ -202,7 +203,7 @@ public class BackendStoreController extends BaseController {
 		String token = request.getHeader("Access-Token");
 		AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
 		if (accountInfo == null) {
-			return getFailureResult(1001, "请先登录");
+			return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
 		}
 
 		StoreDto storeInfo = new StoreDto();
@@ -321,7 +322,7 @@ public class BackendStoreController extends BaseController {
 		String token = request.getHeader("Access-Token");
 		AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
 		if (accountInfo == null) {
-			return getFailureResult(1001, "请先登录");
+			return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
 		}
 
 		StoreDto storeInfo = storeService.queryStoreDtoById(id);

+ 4 - 3
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSubMessageController.java

@@ -10,6 +10,7 @@ import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.enums.WxMessageEnum;
 import com.fuint.common.service.SettingService;
 import com.fuint.common.util.CommonUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.BaseController;
@@ -64,7 +65,7 @@ public class BackendSubMessageController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         List<SubMessageDto> dataList = new ArrayList<>();
@@ -129,7 +130,7 @@ public class BackendSubMessageController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Map<String, Object> result = new HashMap();
@@ -214,7 +215,7 @@ public class BackendSubMessageController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         if (accountInfo.getMerchantId() == null || accountInfo.getMerchantId() <= 0) {
             return getFailureResult(201, "请使用商户账号操作");

+ 5 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendTableCategoryController.java

@@ -1,6 +1,7 @@
 package com.fuint.module.backendApi.controller;
 
 import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -59,7 +60,7 @@ public class BackendTableCategoryController extends BaseController {
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         Long storeId;
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         } else {
             storeId = accountInfo.getStoreId();
         }
@@ -118,7 +119,7 @@ public class BackendTableCategoryController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtTableCategory mtTableCategory = tableCategoryService.queryTableCategoryById(id);
@@ -150,7 +151,7 @@ public class BackendTableCategoryController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtTableCategory info = new MtTableCategory();
@@ -179,7 +180,7 @@ public class BackendTableCategoryController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtTableCategory table_categoryInfo = tableCategoryService.queryTableCategoryById(Long.valueOf(id));

+ 6 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendTableController.java

@@ -5,6 +5,7 @@ import com.fuint.common.service.SettingService;
 import com.fuint.common.service.StoreService;
 import com.fuint.common.service.TableService;
 import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -74,7 +75,7 @@ public class BackendTableController extends BaseController {
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         Long storeId;
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         } else {
             storeId = accountInfo.getStoreId();
         }
@@ -138,7 +139,7 @@ public class BackendTableController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtTable mtTable = tableService.queryTableById(id);
@@ -176,7 +177,7 @@ public class BackendTableController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         MtTable mtTable = new MtTable();
         mtTable.setOperator(accountInfo.getAccountName());
@@ -189,7 +190,7 @@ public class BackendTableController extends BaseController {
         mtTable.setMaxPeople(Integer.parseInt(maxPeople));
 
         if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-            throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+            throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
         }
         if (mtTable.getStoreId() == null || mtTable.getStoreId() < 1) {
             return getFailureResult(201, "所属店铺不能为空");
@@ -218,7 +219,7 @@ public class BackendTableController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtTable tableInfo = tableService.queryTableById(Long.valueOf(id));

+ 5 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendTableInfoController.java

@@ -1,6 +1,7 @@
 package com.fuint.module.backendApi.controller;
 
 import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -59,7 +60,7 @@ public class BackendTableInfoController extends BaseController {
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         Long storeId;
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         } else {
             storeId = accountInfo.getStoreId();
         }
@@ -118,7 +119,7 @@ public class BackendTableInfoController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtTableInfo mtTableInfo = tableInfoService.queryTableInfoById(id);
@@ -150,7 +151,7 @@ public class BackendTableInfoController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtTableInfo info = new MtTableInfo();
@@ -177,7 +178,7 @@ public class BackendTableInfoController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Map<String, Object> result = new HashMap<>();

+ 7 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendUserCouponController.java

@@ -9,8 +9,8 @@ import com.fuint.common.enums.UserCouponStatusEnum;
 import com.fuint.common.service.*;
 import com.fuint.common.util.DateUtil;
 import com.fuint.common.util.ExcelUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
-import static com.fuint.common.util.XlsUtil.objectConvertToString;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
 import com.fuint.framework.pagination.PaginationResponse;
@@ -28,11 +28,14 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
 import java.util.*;
 
+import static com.fuint.common.util.XlsUtil.objectConvertToString;
+
 /**
  * 会员卡券统计管理controller
  *
@@ -94,7 +97,7 @@ public class BackendUserCouponController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Map<String, Object> param = new HashMap<>();
@@ -177,7 +180,7 @@ public class BackendUserCouponController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         TAccount account = accountService.getAccountInfoById(accountInfo.getId());
@@ -207,7 +210,7 @@ public class BackendUserCouponController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         // 删除会员的卡券

+ 6 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendUserGradeController.java

@@ -7,6 +7,7 @@ import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.enums.UserGradeCatchTypeEnum;
 import com.fuint.common.service.UserGradeService;
 import com.fuint.common.util.CommonUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -64,7 +65,7 @@ public class BackendUserGradeController extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();
@@ -130,7 +131,7 @@ public class BackendUserGradeController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         Long userGradeId = param.get("userGradeId") == null ? 0 : Long.parseLong(param.get("userGradeId").toString());
         String status = param.get("status") == null ? StatusEnum.ENABLED.getKey() : param.get("status").toString();
@@ -160,7 +161,7 @@ public class BackendUserGradeController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtUserGrade mtUserGrade = userGradeService.queryUserGradeById(0L, id, 0L);
@@ -188,7 +189,7 @@ public class BackendUserGradeController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String grade = param.get("grade") == null ? "0" : param.get("grade").toString();
@@ -272,7 +273,7 @@ public class BackendUserGradeController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtUserGrade userGradeInfo = userGradeService.queryUserGradeById(accountInfo.getMerchantId(), Long.valueOf(id), 0L);

+ 5 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientBalanceController.java

@@ -7,6 +7,7 @@ import com.fuint.common.param.BalanceListParam;
 import com.fuint.common.param.RechargeParam;
 import com.fuint.common.service.*;
 import com.fuint.common.util.CommonUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -81,7 +82,7 @@ public class ClientBalanceController extends BaseController {
         String merchantNo = request.getHeader("merchantNo");
         UserInfo userInfo = TokenUtil.getUserInfoByToken(token);
         if (userInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Map<String, Object> outParams = new HashMap<>();
@@ -149,7 +150,7 @@ public class ClientBalanceController extends BaseController {
         String rechargeAmount = rechargeParam.getRechargeAmount() == null ? "" : rechargeParam.getRechargeAmount();
         String customAmount = rechargeParam.getCustomAmount() == null ? "" : rechargeParam.getCustomAmount();
         if (StringUtil.isEmpty(rechargeAmount) && StringUtil.isEmpty(customAmount)) {
-            return getFailureResult(2000, "请确认充值金额");
+            return getFailureResult(2000, I18nUtil.getMessage("pleaseConfirmRechargeAmount"));
         }
 
         Long merchantId = merchantService.getMerchantId(merchantNo);
@@ -184,7 +185,7 @@ public class ClientBalanceController extends BaseController {
 
         BigDecimal amount = new BigDecimal(rechargeAmount);
         if (amount.compareTo(new BigDecimal("0")) <= 0) {
-            return getFailureResult(201, "请确认充值金额");
+            return getFailureResult(201, I18nUtil.getMessage("pleaseConfirmRechargeAmount"));
         }
 
         OrderDto orderDto = new OrderDto();
@@ -212,7 +213,7 @@ public class ClientBalanceController extends BaseController {
         orderInfo.setPayType(PayTypeEnum.JSAPI.getKey());
         ResponseObject paymentInfo = paymentService.createPrepayOrder(mtUser, orderInfo, (pay.intValue()), "", 0, ip, platform, isWechat);
         if (paymentInfo.getData() == null) {
-            return getFailureResult(201, "抱歉,发起支付失败");
+            return getFailureResult(201, I18nUtil.getMessage("paymentInitiationFailed"));
         }
 
         Object payment = paymentInfo.getData();

+ 6 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientBookController.java

@@ -11,6 +11,7 @@ import com.fuint.common.param.BookDetailParam;
 import com.fuint.common.param.BookListParam;
 import com.fuint.common.param.BookableParam;
 import com.fuint.common.service.*;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -25,9 +26,10 @@ import com.fuint.utils.StringUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
-import java.lang.reflect.InvocationTargetException;
 import org.springframework.web.bind.annotation.*;
+
 import javax.servlet.http.HttpServletRequest;
+import java.lang.reflect.InvocationTargetException;
 import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -294,16 +296,16 @@ public class ClientBookController extends BaseController {
         UserInfo mtUser = TokenUtil.getUserInfoByToken(token);
 
         if (mtUser == null) {
-            return getFailureResult(1001, "用户未登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         if (StringUtil.isEmpty(bookId)) {
-            return getFailureResult(2000, "订单不能为空");
+            return getFailureResult(2000, I18nUtil.getMessage("orderCannotBeEmpty"));
         }
 
         MtBookItem bookItem = bookItemService.getBookItemById(Long.valueOf(bookId));
         if (bookItem == null || !bookItem.getUserId().equals(mtUser.getId())) {
-            return getFailureResult(2000, "预约信息有误");
+            return getFailureResult(2000, I18nUtil.getMessage("appointmentInfoIsIncorrect"));
         }
 
         Boolean result = bookItemService.cancelBook(bookItem.getId(), remark);

+ 6 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientCartController.java

@@ -9,7 +9,7 @@ import com.fuint.common.param.CartClearParam;
 import com.fuint.common.param.CartListParam;
 import com.fuint.common.param.CartSaveParam;
 import com.fuint.common.service.*;
-import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.BaseController;
@@ -24,6 +24,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.springframework.web.bind.annotation.*;
+
 import javax.servlet.http.HttpServletRequest;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -111,7 +112,7 @@ public class ClientCartController extends BaseController {
         if (mtUser == null && StringUtil.isNotEmpty(token)) {
             AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
             if (accountInfo != null) {
-                return getFailureResult(201, "该管理员还未关联店铺员工");
+                return getFailureResult(201, I18nUtil.getMessage("adminNotAssociatedWithStoreEmployee"));
             }
             return getFailureResult(1001);
         }
@@ -127,13 +128,13 @@ public class ClientCartController extends BaseController {
                 goodsId = mtGoodsSku.getGoodsId();
                 skuId = mtGoodsSku.getId();
             } else {
-                return getFailureResult(201, "该商品条码异常,可能已删除");
+                return getFailureResult(201, I18nUtil.getMessage("productBarcodeAbnormalOrDeleted"));
             }
         }
 
         // 商品ID不能为空
         if (goodsId == null || goodsId <= 0) {
-            return getFailureResult(201, "该商品ID异常");
+            return getFailureResult(201, I18nUtil.getMessage("productIDAbnormal"));
         }
 
         Long merchantId = merchantService.getMerchantId(merchantNo);
@@ -146,7 +147,7 @@ public class ClientCartController extends BaseController {
                 merchantId = accountInfo.getMerchantId();
 
                 if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
-                    throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
+                    throw new BusinessCheckException(I18nUtil.getMessage("superAdminNotAllowedUseMerchantAccount"));
                 }
             }
         }

+ 4 - 3
fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientFileController.java

@@ -4,6 +4,7 @@ import com.fuint.common.service.SettingService;
 import com.fuint.common.util.AliyunOssUtil;
 import com.fuint.common.util.CommonUtil;
 import com.fuint.common.util.DateUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
 import com.fuint.utils.StringUtil;
@@ -90,17 +91,17 @@ public class ClientFileController extends BaseController {
             logger.error("图片允许的大小设置不正确", e);
         }
         if (file.getSize() > (maxSize * 1024 * 1024)) {
-            return getFailureResult(201, "上传的图片不能大于" + maxSize + "MB");
+            return getFailureResult(201, I18nUtil.getMessage("imageUploadSizeExceedsLimit") + maxSize + "MB");
         }
 
         String fileType = file.getContentType();
         if (fileType.indexOf("image") == -1) {
-            return getFailureResult(201, "上传的图片格式有误");
+            return getFailureResult(201, I18nUtil.getMessage("uploadedImageFormatError"));
         }
 
         String original = file.getOriginalFilename().toLowerCase();
         if (original.indexOf("jpg") == -1 && original.indexOf("jpeg") == -1 && original.indexOf("png") == -1 && original.indexOf("gif") == -1 && original.indexOf("bmp") == -1) {
-            return getFailureResult(201, "上传的图片格式有误");
+            return getFailureResult(201, I18nUtil.getMessage("uploadedImageFormatError"));
         }
 
         // 保存文件

+ 2 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientGoodsController.java

@@ -7,6 +7,7 @@ import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.enums.YesOrNoEnum;
 import com.fuint.common.param.GoodsInfoParam;
 import com.fuint.common.service.*;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
 import com.fuint.framework.pagination.PaginationResponse;
@@ -187,7 +188,7 @@ public class ClientGoodsController extends BaseController {
     public ResponseObject detail(@RequestBody GoodsInfoParam goodsInfoParam) throws BusinessCheckException, InvocationTargetException, IllegalAccessException {
         String goodsId = goodsInfoParam.getGoodsId() == null ? "0" : goodsInfoParam.getGoodsId();
         if (StringUtil.isEmpty(goodsId)) {
-            return getFailureResult(2000, "商品ID不能为空");
+            return getFailureResult(2000, I18nUtil.getMessage("productIDNotEmptyRequired"));
         }
 
         GoodsDto goodsDto = goodsService.getGoodsDetail(Long.valueOf(goodsId), false);

+ 6 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientOrderController.java

@@ -7,6 +7,7 @@ import com.fuint.common.enums.OrderStatusEnum;
 import com.fuint.common.param.OrderListParam;
 import com.fuint.common.service.OrderService;
 import com.fuint.common.service.TableService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationResponse;
@@ -19,6 +20,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.springframework.web.bind.annotation.*;
+
 import javax.servlet.http.HttpServletRequest;
 import java.util.HashMap;
 import java.util.List;
@@ -58,7 +60,7 @@ public class ClientOrderController extends BaseController {
         UserInfo userInfo = TokenUtil.getUserInfoByToken(token);
 
         if (userInfo == null) {
-            return getFailureResult(1001, "用户未登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
         orderListParam.setUserId(userInfo.getId());
         if (tableId > 0) {
@@ -85,7 +87,7 @@ public class ClientOrderController extends BaseController {
         UserInfo userInfo = TokenUtil.getUserInfoByToken(token);
 
         if (userInfo == null) {
-            return getFailureResult(1001, "用户未登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String orderId = request.getParameter("orderId");
@@ -108,7 +110,7 @@ public class ClientOrderController extends BaseController {
         UserInfo mtUser = TokenUtil.getUserInfoByToken(token);
 
         if (mtUser == null) {
-            return getFailureResult(1001, "用户未登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String orderId = request.getParameter("orderId");
@@ -137,7 +139,7 @@ public class ClientOrderController extends BaseController {
         UserInfo mtUser = TokenUtil.getUserInfoByToken(token);
 
         if (mtUser == null) {
-            return getFailureResult(1001, "用户未登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String orderId = request.getParameter("orderId");

+ 2 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientPayController.java

@@ -6,6 +6,7 @@ import com.fuint.common.enums.OrderStatusEnum;
 import com.fuint.common.enums.SettingTypeEnum;
 import com.fuint.common.enums.YesOrNoEnum;
 import com.fuint.common.service.*;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.BaseController;
@@ -102,7 +103,7 @@ public class ClientPayController extends BaseController {
         String merchantNo = request.getHeader("merchantNo");
         UserInfo userInfo = TokenUtil.getUserInfoByToken(token);
         if (userInfo == null) {
-            return getFailureResult(201, "请先登录");
+            return getFailureResult(201, I18nUtil.getMessage("notAuthenticated"));
         }
         MtUser mtUser = memberService.queryMemberById(userInfo.getId());
         Map<String, Object> outParams = new HashMap<>();

+ 5 - 3
fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientRefundController.java

@@ -6,6 +6,7 @@ import com.fuint.common.dto.UserOrderDto;
 import com.fuint.common.enums.RefundStatusEnum;
 import com.fuint.common.service.OrderService;
 import com.fuint.common.service.RefundService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.BaseController;
@@ -16,6 +17,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.springframework.web.bind.annotation.*;
+
 import javax.servlet.http.HttpServletRequest;
 import java.util.HashMap;
 import java.util.Map;
@@ -53,7 +55,7 @@ public class ClientRefundController extends BaseController {
         UserInfo userInfo = TokenUtil.getUserInfoByToken(token);
 
         if (userInfo == null) {
-            return getFailureResult(1001, "用户未登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         param.put("userId", userInfo.getId());
@@ -134,12 +136,12 @@ public class ClientRefundController extends BaseController {
         UserInfo mtUser = TokenUtil.getUserInfoByToken(token);
 
         if (mtUser == null) {
-            return getFailureResult(1001, "用户未登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String refundId = request.getParameter("refundId");
         if (StringUtil.isEmpty(refundId)) {
-            return getFailureResult(2000, "售后订单ID不能为空");
+            return getFailureResult(2000, I18nUtil.getMessage("afterSaleOrderIDCannotBeEmpty"));
         }
 
         RefundDto refundInfo = refundService.getRefundById(Long.valueOf(refundId));

+ 7 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientRegionController.java

@@ -2,6 +2,7 @@ package com.fuint.module.clientApi.controller;
 
 import com.fuint.common.dto.RegionDto;
 import com.fuint.common.dto.UserInfo;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -10,7 +11,11 @@ import com.fuint.repository.model.MtRegion;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
 import javax.servlet.http.HttpServletRequest;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -41,7 +46,7 @@ public class ClientRegionController extends BaseController {
         String token = request.getHeader("Access-Token");
         UserInfo userInfo = TokenUtil.getUserInfoByToken(token);
         if (userInfo == null) {
-            return getFailureResult(1001, "用户未登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         Map<String, Object> params = new HashMap<>();

+ 3 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientSignController.java

@@ -8,6 +8,7 @@ import com.fuint.common.enums.MemberSourceEnum;
 import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.enums.YesOrNoEnum;
 import com.fuint.common.service.*;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.BaseController;
@@ -201,7 +202,7 @@ public class ClientSignController extends BaseController {
         }
         boolean captchaVerify = captchaService.checkCodeByUuid(captchaCode, uuid);
         if (!captchaVerify) {
-            return getFailureResult(201,"图形验证码有误");
+            return getFailureResult(201, I18nUtil.getMessage("captchaInvalid"));
         }
         Long merchantId = merchantService.getMerchantId(merchantNo);
         MtUser userData = memberService.queryMemberByName(merchantId, account);
@@ -314,7 +315,7 @@ public class ClientSignController extends BaseController {
         if (StringUtil.isNotEmpty(account) && StringUtil.isNotEmpty(password) && StringUtil.isNotEmpty(captchaCode)) {
             Boolean captchaVerify = captchaService.checkCodeByUuid(captchaCode, uuid);
             if (!captchaVerify) {
-                return getFailureResult(201,"图形验证码有误");
+                return getFailureResult(201,I18nUtil.getMessage("captchaInvalid"));
             }
 
             MtUser userInfo = memberService.queryMemberByName(merchantId, account);

+ 6 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientSmsController.java

@@ -5,6 +5,7 @@ import com.fuint.common.service.MerchantService;
 import com.fuint.common.service.SendSmsService;
 import com.fuint.common.service.VerifyCodeService;
 import com.fuint.common.util.BizCodeGenerator;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.PhoneFormatCheckUtils;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.ResponseObject;
@@ -78,7 +79,7 @@ public class ClientSmsController extends BaseController {
             captchaVerify = captchaService.checkCode(captchaCode, session);
         }
         if (!captchaVerify) {
-            return getFailureResult(201,"图形验证码有误");
+            return getFailureResult(201,I18nUtil.getMessage("captchaInvalid"));
         }
 
         // 验证码时间间隔
@@ -88,10 +89,10 @@ public class ClientSmsController extends BaseController {
         }
 
         if (StringUtil.isEmpty(mobile)) {
-            return getFailureResult(201,"手机号码不能为空");
+            return getFailureResult(201,I18nUtil.getMessage("phoneNumberCannotBeEmpty"));
         } else {
             if (!PhoneFormatCheckUtils.isChinaPhoneLegal(mobile)) {
-                return getFailureResult(201,"手机号码格式不正确");
+                return getFailureResult(201, I18nUtil.getMessage("phoneNumberFormatInvalid"));
             }
         }
 
@@ -99,9 +100,9 @@ public class ClientSmsController extends BaseController {
         String verifyCode= BizCodeGenerator.getVerifyCode();
         MtVerifyCode mtVerifyCode = verifyCodeService.addVerifyCode(mobile, verifyCode,60);
         if (null == mtVerifyCode) {
-            return getFailureResult(201,"验证码发送失败");
+            return getFailureResult(201,I18nUtil.getMessage("verificationCodeSendFailed"));
         } else if(mtVerifyCode.getVerifyCode().equals("1") && mtVerifyCode.getId() == null){
-            return getFailureResult(201,"验证码发送间隔太短,请稍后再试!");
+            return getFailureResult(201,I18nUtil.getMessage("retryAfterShortInterval"));
         }
 
         // 发送短信

+ 8 - 3
fuintBackend/fuint-application/src/main/java/com/fuint/module/merchantApi/controller/MerchantController.java

@@ -7,6 +7,7 @@ import com.fuint.common.service.MemberService;
 import com.fuint.common.service.OrderService;
 import com.fuint.common.service.StaffService;
 import com.fuint.common.util.DateUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.web.BaseController;
@@ -15,7 +16,11 @@ import com.fuint.repository.model.MtUser;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
 import javax.servlet.http.HttpServletRequest;
 import java.math.BigDecimal;
 import java.util.Date;
@@ -66,7 +71,7 @@ public class MerchantController extends BaseController {
         String token = request.getHeader("Access-Token");
         UserInfo userInfo = TokenUtil.getUserInfoByToken(token);
         if (null == userInfo) {
-            return getFailureResult(1001, "用户未登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtUser mtUser = memberService.queryMemberById(userInfo.getId());
@@ -75,7 +80,7 @@ public class MerchantController extends BaseController {
 
         StaffDto staffInfo = staffService.getStaffInfoByMobile(mtUser.getMobile());
         if (null == staffInfo) {
-            return getFailureResult(1002, "该账号不是商户");
+            return getFailureResult(1002, I18nUtil.getMessage("accountIsNotMerchant"));
         }
 
         outParams.put("confirmInfo", staffInfo);

+ 4 - 3
fuintBackend/fuint-application/src/main/java/com/fuint/module/merchantApi/controller/MerchantMemberController.java

@@ -8,6 +8,7 @@ import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.param.MemberListParam;
 import com.fuint.common.service.*;
 import com.fuint.common.util.DateUtil;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
@@ -87,7 +88,7 @@ public class MerchantMemberController extends BaseController {
 
         UserInfo userInfo = TokenUtil.getUserInfoByToken(token);
         if (userInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtUser mtUser = memberService.queryMemberById(userInfo.getId());
@@ -96,7 +97,7 @@ public class MerchantMemberController extends BaseController {
             staffInfo = staffService.queryStaffByMobile(mtUser.getMobile());
         }
         if (staffInfo == null) {
-            return getFailureResult(201, "该账号不是商户");
+            return getFailureResult(201, I18nUtil.getMessage("accountIsNotMerchant"));
         }
 
         PaginationRequest paginationRequest = new PaginationRequest();
@@ -176,7 +177,7 @@ public class MerchantMemberController extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtUser mtUserInfo = memberService.queryMemberById(Long.valueOf(id));

+ 5 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/module/merchantApi/controller/MerchantOrderController.java

@@ -7,6 +7,7 @@ import com.fuint.common.param.OrderListParam;
 import com.fuint.common.service.MemberService;
 import com.fuint.common.service.OrderService;
 import com.fuint.common.service.StaffService;
+import com.fuint.common.util.I18nUtil;
 import com.fuint.common.util.TokenUtil;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationResponse;
@@ -60,7 +61,7 @@ public class MerchantOrderController extends BaseController {
         UserInfo userInfo = TokenUtil.getUserInfoByToken(token);
 
         if (userInfo == null) {
-            return getFailureResult(1001, "用户未登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         MtUser mtUser = memberService.queryMemberById(userInfo.getId());
@@ -69,7 +70,7 @@ public class MerchantOrderController extends BaseController {
             staffInfo = staffService.queryStaffByMobile(mtUser.getMobile());
         }
         if (staffInfo == null) {
-            return getFailureResult(1002, "该账号不是商户");
+            return getFailureResult(1002, I18nUtil.getMessage("accountIsNotMerchant"));
         } else if(staffInfo.getStoreId() != null && staffInfo.getStoreId() > 0){
             orderListParam.setStoreId(staffInfo.getStoreId());
         }
@@ -89,7 +90,7 @@ public class MerchantOrderController extends BaseController {
 
         UserInfo userInfo = TokenUtil.getUserInfoByToken(token);
         if (userInfo == null) {
-            return getFailureResult(1001, "用户未登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String orderId = orderDetailParam.getOrderId();
@@ -113,7 +114,7 @@ public class MerchantOrderController extends BaseController {
         UserInfo mtUser = TokenUtil.getUserInfoByToken(token);
 
         if (mtUser == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         String orderId = orderDetailParam.getOrderId();

+ 65 - 1
fuintBackend/fuint-application/src/main/resources/i18n/messages_en_US.properties

@@ -1 +1,65 @@
-
+notAuthenticated = Login information has expired, please log in first
+numericRecharge = Recharge amount must be a numeric value
+nonEmptyMembershipInfo = Membership information for recharge cannot be empty
+paramErr = Parameter error
+dataNonExistent = Data does not exist
+missingClass = Category does not exist
+cannotDeleteWithVouchers = Group containing vouchers cannot be deleted
+updateErr = Update failed
+saveErr = Save failed
+deleteErr = Delete failed
+couponCodeRequired = Redemption coupon code cannot be empty
+voucherNotFound = Voucher information not found
+redemptionFailure = Redemption failed
+usernameExists = Username already exists
+roleNotAssigned = Assigned role does not exist
+insufficientMemberBalance = Insufficient member balance
+memberNonExistent = Member does not exist
+codeGenerationNonExistent = Generation code does not exist
+fileNotEmptyRequired = Uploaded file cannot be empty
+fileUploadRetrievalFailure = Failed to retrieve uploaded file
+maxFileSizeExceeded = Uploaded file cannot exceed
+redemptionAmountNonNullable = Stored value card redemption amount cannot be empty
+accountNoPermissionToEditProduct = Platform account has no permission to modify products
+uploadFailureCheckConfigPerm = Upload failed, please check configuration and permissions
+groupHasMembersCannotDelete = Group containing members cannot be deleted
+voucherNameExistsModify = Voucher name already exists, please modify
+mustFillPointsOrVouchers = Either points or vouchers must be filled
+memberLevelNotNull = Member level cannot be null
+orderIDRequired = Order ID is required
+submissionError = Information submission error
+noEditPermission = Sorry, you have no edit permission
+noPermissionToAddMerchant = Sorry, you have no permission to add merchants
+productIDNotEmptyRequired = Product ID cannot be empty
+superAdminNotAllowedUseMerchantAccount = Super admin account cannot perform this operation, please use merchant account
+merchantNameCannotBeEmpty = Merchant name cannot be empty
+merchantNameAlreadyExists = Merchant name already exists
+rechargePointsMustBeNumeric = Recharge points must be numeric
+productDoesNotExist = The product does not exist
+rechargeMemberInfoCannotBeEmpty = Recharge member information cannot be empty
+insufficientPointsBalance = Insufficient points balance
+membershipLevelDoesNotExist = Membership level does not exist
+employeeInfoDoesNotExist = Employee information does not exist
+phoneNumberFormatInvalid = Invalid phone number format
+phoneNumberAlreadyExists = Phone number already exists
+phoneNumberCannotBeEmpty = Phone number cannot be empty
+pleaseConfirmRechargeAmount = Please confirm recharge amount
+accountIsNotMerchant = This account is not a merchant
+refundFailedDueToInvalidParameters = Invalid parameters caused refund failure
+refundFailure = Refund failed
+verificationCodeSendFailed = Verification code sending failed
+retryAfterShortInterval = Verification code sending interval too short, please try again later
+uploadedImageFormatError = Uploaded image format is invalid
+imageUploadSizeExceedsLimit = Uploaded image cannot exceed
+afterSaleOrderIDCannotBeEmpty = After-sales order ID cannot be empty
+adminNotAssociatedWithStoreEmployee = This admin is not associated with store staff
+orderCannotBeEmpty = Order cannot be empty
+appointmentInfoIsIncorrect = Appointment information is invalid
+paymentInitiationFailed = Failed to initiate payment
+productBarcodeAbnormalOrDeleted = Product barcode is abnormal or may have been deleted
+productIDAbnormal = Product ID is abnormal
+merchantCannotBeEmpty = Associated merchant cannot be empty
+projectNameCannotBeEmpty = Project name cannot be empty
+coverImageCannotBeEmpty = Cover image cannot be empty
+loginAccountOrPasswordIncorrect = Invalid login account or password
+captchaInvalid = Invalid CAPTCHA

+ 65 - 1
fuintBackend/fuint-application/src/main/resources/i18n/messages_zh_CN.properties

@@ -1 +1,65 @@
-
+notAuthenticated = 登录信息已失效,请先登录
+numericRecharge = 充值金额必须是数字
+nonEmptyMembershipInfo = 充值会员信息不能为空
+paramErr = 参数有误
+dataNonExistent = 数据不存在
+missingClass = 类别不存在
+cannotDeleteWithVouchers = 该分组下有卡券,不能删除
+updateErr = 更新失败
+saveErr = 保存失败
+deleteErr = 删除失败
+couponCodeRequired = 核销券码不能为空
+voucherNotFound = 未查询到该卡券信息
+redemptionFailure = 核销失败
+usernameExists = 该用户名已存在
+roleNotAssigned = 您分配的角色不存在
+insufficientMemberBalance = 操作失败,会员余额不足
+memberNonExistent = 会员不存在
+codeGenerationNonExistent = 生成代码不存在
+fileNotEmptyRequired = 上传的文件不能为空
+fileUploadRetrievalFailure = 上传文件获取失败
+maxFileSizeExceeded = 上传的文件不能大于
+redemptionAmountNonNullable = 储值卡核销金额不能为空
+accountNoPermissionToEditProduct = 平台账号无权限修改商品
+uploadFailureCheckConfigPerm = 上传失败,请检查上传配置及权限
+groupHasMembersCannotDelete = 该分组下有会员,不能删除
+voucherNameExistsModify = 卡券名称已存在,请修改
+mustFillPointsOrVouchers = 积分和卡券必须填写一项
+memberLevelNotNull = 会员等级不能为空
+orderIDRequired = 订单ID不能为空
+submissionError = 信息提交有误
+noEditPermission = 抱歉,您没有修改权限
+noPermissionToAddMerchant = 抱歉,您没有添加商户的权限
+productIDNotEmptyRequired = 商品ID不能为空
+superAdminNotAllowedUseMerchantAccount = 超级管理员帐号无法执行该操作,请使用商户帐号操作
+merchantNameCannotBeEmpty = 商户名称不能为空
+merchantNameAlreadyExists = 商户名称已经存在
+rechargePointsMustBeNumeric = 充值积分必须是数字
+productDoesNotExist = 该商品不存在
+rechargeMemberInfoCannotBeEmpty = 充值会员信息不能为空
+insufficientPointsBalance = 积分余额不足
+membershipLevelDoesNotExist = 会员等级不存在
+employeeInfoDoesNotExist = 员工信息不存在
+phoneNumberFormatInvalid = 手机号码格式不正确
+phoneNumberAlreadyExists = 该手机号码已经存在
+phoneNumberCannotBeEmpty = 手机号码不能为空
+pleaseConfirmRechargeAmount = 请确认充值金额
+accountIsNotMerchant = 该账号不是商户
+refundFailedDueToInvalidParameters = 参数有误,发起退款失败
+refundFailure = 退款失败
+verificationCodeSendFailed = 验证码发送失败
+retryAfterShortInterval = 验证码发送间隔太短,请稍后再试!
+uploadedImageFormatError = 上传的图片格式有误
+imageUploadSizeExceedsLimit = 上传的图片不能大于
+afterSaleOrderIDCannotBeEmpty = 售后订单ID不能为空
+adminNotAssociatedWithStoreEmployee = 该管理员还未关联店铺员工
+orderCannotBeEmpty = 订单不能为空
+appointmentInfoIsIncorrect = 预约信息有误
+paymentInitiationFailed = 抱歉,发起支付失败
+productBarcodeAbnormalOrDeleted = 该商品条码异常,可能已删除
+productIDAbnormal = 该商品ID异常
+merchantCannotBeEmpty = 所属商户不能为空!
+projectNameCannotBeEmpty = 项目名称不能为空
+coverImageCannotBeEmpty = 封面图片不能为空
+loginAccountOrPasswordIncorrect = 登录账号或密码有误
+captchaInvalid = 图形验证码有误

+ 4 - 4
fuintBackend/fuint-application/src/main/resources/vm/java/BackendController.java.vm

@@ -59,7 +59,7 @@ public class Backend${tableClass}Controller extends BaseController {
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         Long storeId;
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         } else {
             storeId = accountInfo.getStoreId();
         }
@@ -118,7 +118,7 @@ public class Backend${tableClass}Controller extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         ${className} ${tablePrefix}${tableClass} = ${serviceName}Service.query${tableClass}ById(id);
@@ -152,7 +152,7 @@ public class Backend${tableClass}Controller extends BaseController {
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         ${className} info = new ${className}();
@@ -184,7 +184,7 @@ public class Backend${tableClass}Controller extends BaseController {
         String token = request.getHeader("Access-Token");
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
+            return getFailureResult(1001, I18nUtil.getMessage("notAuthenticated"));
         }
 
         ${className} ${tableName}Info = ${serviceName}Service.query${tableClass}ById(id);