Explorar o código

多语言,三种-->泰文,英语,中文

xie.kaifeng hai 1 ano
pai
achega
3ab0bbc8e6
Modificáronse 57 ficheiros con 1359 adicións e 913 borrados
  1. 9 11
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/BankAccountController.java
  2. 33 36
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/CommonController.java
  3. 15 13
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/FuncmenulistController.java
  4. 20 19
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/InvestorController.java
  5. 2 2
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/MarketRunManagerController.java
  6. 1 1
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/OrganDetailController.java
  7. 20 21
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/OrganSonController.java
  8. 4 4
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/ProfitSharController.java
  9. 32 32
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/QueryController.java
  10. 14 14
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/ReportFormController.java
  11. 8 8
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/SettlementController.java
  12. 6 5
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/SystemRoleController.java
  13. 3 3
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/SystemSetUpController.java
  14. 24 23
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/SystemmanagerController.java
  15. 13 12
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/TaAccountController.java
  16. 14 13
      mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/WskhUserinfoController.java
  17. 4 4
      mtp3-century/src/main/java/com/muchinfo/mtp3century/exception/GlobalExceptionHandler.java
  18. 4 4
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IBankAccountSignService.java
  19. 16 16
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ICommonService.java
  20. 3 3
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IDealLoginService.java
  21. 2 1
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IFuncmenulistService.java
  22. 1 1
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IOrganService.java
  23. 2 2
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IProfitSharService.java
  24. 8 8
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IQueryService.java
  25. 2 2
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IReportFormService.java
  26. 1 1
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ISendMsgService.java
  27. 2 2
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ISettlementService.java
  28. 2 2
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ISystemRoleService.java
  29. 3 3
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ISystemmanagerService.java
  30. 2 2
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ITaaccountService.java
  31. 1 1
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IUseraccountService.java
  32. 9 9
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IWskhUserinfoService.java
  33. 48 46
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/BankAccountSignServiceImpl.java
  34. 32 35
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/CommonServiceImpl.java
  35. 22 21
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/DealLoginServiceImpl.java
  36. 15 14
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/FuncmenulistServiceImpl.java
  37. 37 39
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/IOrganServiceImpl.java
  38. 19 17
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/MarketRunManageServiceImpl.java
  39. 46 48
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/ProfitSharServiceImpl.java
  40. 70 69
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/QueryServiceImpl.java
  41. 3 2
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/RedisInitServiceImpl.java
  42. 32 25
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/ReportFormServiceImpl.java
  43. 2 2
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SendMsgServiceImpl.java
  44. 9 8
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SettlementServiceImpl.java
  45. 3 3
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SysUserDetailsServiceImpl.java
  46. 10 9
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SystemRoleServiceImpl.java
  47. 19 18
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SystemSetUpServiceImpl.java
  48. 28 28
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SystemmanagerServiceImpl.java
  49. 61 54
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/TaaccountServiceImpl.java
  50. 95 94
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/UseraccountServiceImpl.java
  51. 102 97
      mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/WskhUserinfoServiceImpl.java
  52. 85 0
      mtp3-century/src/main/resources/message_en.properties
  53. 85 0
      mtp3-century/src/main/resources/message_th.properties
  54. 85 0
      mtp3-century/src/main/resources/message_zh-CN.properties
  55. 103 0
      mtp3-common/src/main/java/com/muchinfo/mtp3common/enumtype/MessageType.java
  56. 67 5
      mtp3-common/src/main/java/com/muchinfo/mtp3common/vo/AjaxResult.java
  57. 1 1
      mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/reportform/HolderTotalResult.java

+ 9 - 11
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/BankAccountController.java

@@ -1,15 +1,14 @@
 package com.muchinfo.mtp3century.controller;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.muchinfo.mtp3century.service.IBankAccountSignService;
 import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.utils.CenturyDecryptUtil;
 import com.muchinfo.mtp3common.enumtype.Constants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.vo.AjaxResult;
 import com.muchinfo.mtp3common.utils.JsonUtils;
 import com.muchinfo.mtp3common.vo.PageResult;
 import com.muchinfo.mtp3interface.mapper.ISystemmanagerMapper;
-import com.muchinfo.mtp3pojos.entity.Systemmanager;
 import com.muchinfo.mtp3pojos.vo.bankaccountsign.*;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -37,8 +36,8 @@ public class BankAccountController {
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     @RequestMapping(method = RequestMethod.GET, value = "/query")
     @ResponseBody
-    public PageResult<AccountSignQueryResult> query(AccountSignQueryParam taAccountQueryParam) {
-        return iBankAccountSignService.query(taAccountQueryParam);
+    public PageResult<AccountSignQueryResult> query(AccountSignQueryParam taAccountQueryParam, HttpServletRequest request) {
+        return iBankAccountSignService.query(taAccountQueryParam, request);
     }
 
     @ApiOperation("资金账户管理-->处理银行签约")
@@ -48,19 +47,18 @@ public class BankAccountController {
     public AjaxResult dealAccountSign(@RequestBody String param, HttpServletRequest request) {
         try {
             AccountSignParam insertParam = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(param, request), AccountSignParam.class);
-            Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
-            return iBankAccountSignService.dealAccountSign(systemmanager, insertParam);
+            return iBankAccountSignService.dealAccountSign(request, insertParam);
         } catch (Exception e) {
             log.error("银行签约新增签约失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
     @ApiOperation("获取签约银行详细信息")
     @RequestMapping(method = RequestMethod.GET, value = "/getSignBankById")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<BankAccountsignResult> getSignBankById(String accountcode, String cusbankid, String applyexchticket) {
-        return iBankAccountSignService.getSignBankById(accountcode, cusbankid, applyexchticket);
+    private AjaxResult<BankAccountsignResult> getSignBankById(String accountcode, String cusbankid, String applyexchticket, HttpServletRequest request) {
+        return iBankAccountSignService.getSignBankById(accountcode, cusbankid, applyexchticket, request);
     }
 
     @ApiOperation("银行业务/查询管理-->出入金查询")
@@ -75,7 +73,7 @@ public class BankAccountController {
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     @RequestMapping(method = RequestMethod.GET, value = "/queryPutOrInDetail")
     @ResponseBody
-    public AjaxResult<PutOrInAmountQueryResultDetail> queryPutOrInDetail(String accountcode,String cusbankid,String tradedate,String exchticket) {
-        return iBankAccountSignService.queryPutOrInDetail(accountcode,cusbankid,tradedate,exchticket);
+    public AjaxResult<PutOrInAmountQueryResultDetail> queryPutOrInDetail(String accountcode, String cusbankid, String tradedate, String exchticket, HttpServletRequest request) {
+        return iBankAccountSignService.queryPutOrInDetail(accountcode, cusbankid, tradedate, exchticket, request);
     }
 }

+ 33 - 36
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/CommonController.java

@@ -5,10 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.service.IOrganService;
 import com.muchinfo.mtp3century.utils.RedisServiceUtil;
-import com.muchinfo.mtp3common.enumtype.Constants;
-import com.muchinfo.mtp3common.enumtype.RedisConstants;
-import com.muchinfo.mtp3common.enumtype.SysConstants;
-import com.muchinfo.mtp3common.enumtype.SysEnums;
+import com.muchinfo.mtp3common.enumtype.*;
 import com.muchinfo.mtp3common.utils.*;
 import com.muchinfo.mtp3common.vo.AjaxResult;
 import com.muchinfo.mtp3common.vo.PageResult;
@@ -74,19 +71,19 @@ public class CommonController {
     private AjaxResult checkToken(HttpServletRequest request) {
         Claims claims = null;
         Integer code = Constants.Success_Code_Design;
-        String message = Constants.Deal_Success_Message;
+        String message = MessageType.MESSAGE_CODE_SYSTEM001.getCode();
         try {
             claims = JwtUtil.parseToken(request.getHeader(JwtUtil.TOKEN_HEADER).substring(JwtUtil.TOKEN_PREFIX.length()));
             // 校验token是否过期
             if (JwtUtil.isExpiration(claims)) {
                 code = Constants.Token_failure_code;
-                message = Constants.Token_failure_code_msg;
+                message = MessageType.MESSAGE_ERROR_CODE_SYSTEM001.getCode();
             }
         } catch (ExpiredJwtException e) {
             code = Constants.Token_failure_code;
-            message = Constants.Token_failure_code_msg;
+            message = MessageType.MESSAGE_ERROR_CODE_SYSTEM001.getCode();
         }
-        return AjaxResult.success(code, message);
+        return AjaxResult.success(code, message, request.getHeader("Accept-Language"));
     }
 
     @ApiOperation("获取签名sign")
@@ -96,7 +93,7 @@ public class CommonController {
         String sign = EncryptionUtils.encryptSHA(CommonUtil.getIpAddress(request) + APP_SECRET + NONCE_KEY + DateTimeUtils.getSysTimestamp());
         //存入redis
         redisServiceUtil.setCacheObject(request.getHeader("Sign-Id"), sign, RedisConstants.LOGIN_CODE_TTL, TimeUnit.DAYS);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, sign);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), sign);
     }
 
     @ApiOperation("机构下拉查询加载 会员、经纪人")
@@ -104,7 +101,7 @@ public class CommonController {
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     public AjaxResult<OrganSelectResult> queryOrganSelect(OrganSelectParam vo, HttpServletRequest request) {
         try {
-           Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
+            Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
             vo.setAccountname(vo.getSearchcode());
             if (StringUtils.isEmpty(vo.getUsertype())) {
                 vo.setUsertype("2");
@@ -122,19 +119,19 @@ public class CommonController {
                     vo.setParentuserid(systemmanager.getAreauserid());
                 }
             }
-            return iCommonService.queryOrganSelect(vo);
+            return iCommonService.queryOrganSelect(vo, request);
         } catch (Exception e) {
             log.error("机构下拉查询加载 会员、经纪人信息失败,失败原因:" + e);
-            return AjaxResult.success(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
     @ApiOperation("获取省、市、县信息")
     @RequestMapping(method = RequestMethod.GET, value = "/getProvince")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<Division> getProvince(Long autoId, String divisionLevel) {
+    private AjaxResult<Division> getProvince(Long autoId, String divisionLevel, HttpServletRequest request) {
         List<Division> province = iDivisionMapper.getProvince(autoId, divisionLevel);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, province);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), province);
     }
 
     @ApiOperation("上传图片、文件")
@@ -147,8 +144,8 @@ public class CommonController {
     @ApiOperation("获取枚举信息")
     @RequestMapping(method = RequestMethod.GET, value = "/enumType")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<Enumdicitem> getEnumType(String typeCode) {
-        return iCommonService.getEnumType(typeCode);
+    private AjaxResult<Enumdicitem> getEnumType(String typeCode, HttpServletRequest request) {
+        return iCommonService.getEnumType(typeCode, request);
     }
 
     @ApiOperation("子机构开户下拉查询推荐人 / 出入金(交易商列表查询)")
@@ -168,35 +165,35 @@ public class CommonController {
         } else {
             investorSelectParam.setAreaIds(systemmanager.getAreauserid().toString());
         }
-        return iCommonService.queryInvestorSelect(investorSelectParam);
+        return iCommonService.queryInvestorSelect(investorSelectParam, request);
     }
 
     @ApiOperation("获取所有签约银行信息")
     @RequestMapping(method = RequestMethod.GET, value = "/getSignBank")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<BankAccountsign> getSignBank() {
-        return iCommonService.getSignBank();
+    private AjaxResult<BankAccountsign> getSignBank(HttpServletRequest request) {
+        return iCommonService.getSignBank(request);
     }
 
     @ApiOperation("查询托管银行")
     @RequestMapping(method = RequestMethod.GET, value = "/getAllBankCus")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<BankCusbankinfo> getAllBankCus() {
-        return iCommonService.getAllBankCus();
+    private AjaxResult<BankCusbankinfo> getAllBankCus(HttpServletRequest request) {
+        return iCommonService.getAllBankCus(request);
     }
 
     @ApiOperation("查询已签约银行")
     @RequestMapping(method = RequestMethod.GET, value = "/getBankAccountSign")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<BankAccountsign> getBankAccountSign(Long accountcode, Integer signstatus) {
-        return iCommonService.getBankAccountSign(accountcode, signstatus);
+    private AjaxResult<BankAccountsign> getBankAccountSign(Long accountcode, Integer signstatus, HttpServletRequest request) {
+        return iCommonService.getBankAccountSign(accountcode, signstatus, request);
     }
 
     @ApiOperation("查询托管银行支持银行")
     @RequestMapping(method = RequestMethod.GET, value = "/getBankInfoByCusBank")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<CusBankInfoResult> getBankInfoByCusBank(String cusBankId, String bankName) {
-        return iCommonService.getBankInfoByCusBank(cusBankId, bankName);
+    private AjaxResult<CusBankInfoResult> getBankInfoByCusBank(String cusBankId, String bankName, HttpServletRequest request) {
+        return iCommonService.getBankInfoByCusBank(cusBankId, bankName, request);
     }
 
     @ApiOperation("资金账户下拉框 平台查所有,经纪会员/子机构查自己及下级,其它角色查自己")
@@ -204,14 +201,14 @@ public class CommonController {
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     private AjaxResult<TAAccountChildrenResult> queryTAAccountChildren(HttpServletRequest request, String searchCode) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
-        return iCommonService.queryTAAccountChildren(searchCode, systemmanager.getAreauserid());
+        return iCommonService.queryTAAccountChildren(searchCode, systemmanager.getAreauserid(), request);
     }
 
     @ApiOperation("商品查询下拉框")
     @RequestMapping(method = RequestMethod.GET, value = "/queryGoodsSelect")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<GoodsSelectResult> queryGoodsSelect(String goodsStatusIds, String marketId, String searchCode) {
-        return iCommonService.queryGoodsSelect(goodsStatusIds, marketId, searchCode);
+    private AjaxResult<GoodsSelectResult> queryGoodsSelect(String goodsStatusIds, String marketId, String searchCode, HttpServletRequest request) {
+        return iCommonService.queryGoodsSelect(goodsStatusIds, marketId, searchCode, request);
     }
 
     @ApiOperation("获取市场下拉列表")
@@ -243,7 +240,7 @@ public class CommonController {
                 }
             }
         }
-        return iCommonService.getOrderListAll(markets);
+        return iCommonService.getOrderListAll(markets, request);
     }
 
     @ApiOperation("获取机构下拉列表(查询管理专用)")
@@ -259,28 +256,28 @@ public class CommonController {
         if (("," + orgztypes + ",").contains(",2,")) {
             userId = 0L;
         }
-        return iCommonService.getOrganListAll(userId, searchCode);
+        return iCommonService.getOrganListAll(userId, searchCode, request);
     }
 
     @ApiOperation("出入金、银行签约扩展信息是否展示")
     @RequestMapping(method = RequestMethod.GET, value = "/queryBooleanForAmount")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<BankCusBankExtendResult> queryBooleanForAmount(String cusbankid, Integer extendbiztype, Integer usabletype) {
-        return iCommonService.queryBooleanForAmount(cusbankid, extendbiztype, usabletype);
+    private AjaxResult<BankCusBankExtendResult> queryBooleanForAmount(String cusbankid, Integer extendbiztype, Integer usabletype, HttpServletRequest request) {
+        return iCommonService.queryBooleanForAmount(cusbankid, extendbiztype, usabletype, request);
     }
 
     @ApiOperation("菜单通用信息查询")
     @RequestMapping(method = RequestMethod.GET, value = "/queryCommonFlag")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<CommonResult> queryCommonFlag(CommonParam commonParam) {
-        return iCommonService.queryCommonFlag(commonParam);
+    private AjaxResult<CommonResult> queryCommonFlag(CommonParam commonParam, HttpServletRequest request) {
+        return iCommonService.queryCommonFlag(commonParam, request);
     }
 
     @ApiOperation("获取可用金额")
     @RequestMapping(method = RequestMethod.GET, value = "/queryMoney")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult queryMoney(Long accountid, Integer type, Integer mtype) {
-        return iCommonService.queryMoney(accountid, type, mtype);
+    private AjaxResult queryMoney(Long accountid, Integer type, Integer mtype, HttpServletRequest request) {
+        return iCommonService.queryMoney(accountid, type, mtype, request);
     }
 
     @ApiOperation("子机构管理-->获取机构及所有子机构")

+ 15 - 13
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/FuncmenulistController.java

@@ -5,6 +5,7 @@ import com.muchinfo.mtp3century.service.IFuncmenulistService;
 import com.muchinfo.mtp3century.utils.CenturyDecryptUtil;
 import com.muchinfo.mtp3century.vo.TreeNode;
 import com.muchinfo.mtp3common.enumtype.Constants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.vo.AjaxResult;
 import com.muchinfo.mtp3common.utils.JsonUtils;
 import io.swagger.annotations.Api;
@@ -42,12 +43,13 @@ public class FuncmenulistController {
 
     /**
      * 获取菜单树
+     *
      * @return
      */
     @ApiOperation("获取角色授权菜单列表信息")
     @ApiResponse(code = 200, message = "成功", response = TreeNode.class)
     @RequestMapping(method = RequestMethod.GET, value = "/getMenus")
-    private AjaxResult<TreeNode> menuList(Integer menuType) {
+    private AjaxResult<TreeNode> menuList(Integer menuType, HttpServletRequest request) {
         List<String> authorityNames = new ArrayList<>();
         Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
         Collection<? extends GrantedAuthority> authorities = authentication.getAuthorities();
@@ -55,39 +57,39 @@ public class FuncmenulistController {
             authorityNames.add(authority.getAuthority());
         }
         List<TreeNode> list = iFuncmenulistService.fingByAuthorities(authorityNames, menuType);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message,list);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), list);
     }
 
     @ApiOperation("处理菜单列表信息")
     @RequestMapping(method = RequestMethod.POST, value = "/dealMenus")
-    private AjaxResult dealMenus(@RequestBody String treeNode, HttpServletRequest request){
+    private AjaxResult dealMenus(@RequestBody String treeNode, HttpServletRequest request) {
         try {
-            TreeNode currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(treeNode,request), TreeNode.class);
-            return iFuncmenulistService.dealMenus(currentVo,request);
+            TreeNode currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(treeNode, request), TreeNode.class);
+            return iFuncmenulistService.dealMenus(currentVo, request);
         } catch (Exception e) {
-            log.error("处理菜单列表信息失败,失败原因:"+e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            log.error("处理菜单列表信息失败,失败原因:" + e);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
     @ApiOperation("删除菜单列表信息")
     @RequestMapping(method = RequestMethod.POST, value = "/deleteMenus")
-    private AjaxResult deleteMenus(@RequestBody  String treeNode ,HttpServletRequest request){
+    private AjaxResult deleteMenus(@RequestBody String treeNode, HttpServletRequest request) {
         try {
             TreeNode currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(treeNode, request), TreeNode.class);
-            return iFuncmenulistService.deleteMenus(currentVo);
+            return iFuncmenulistService.deleteMenus(currentVo, request);
         } catch (Exception e) {
-            log.error("删除菜单列表信息失败,失败原因:"+e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            log.error("删除菜单列表信息失败,失败原因:" + e);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
     @ApiOperation("获取所有菜单列表信息")
     @ApiResponse(code = 200, message = "成功", response = TreeNode.class)
     @RequestMapping(method = RequestMethod.GET, value = "/getAllMenus")
-    private AjaxResult<TreeNode> menuAllList(Integer menuType) {
+    private AjaxResult<TreeNode> menuAllList(Integer menuType, HttpServletRequest request) {
         List<TreeNode> list = iFuncmenulistService.menuAllList(menuType);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message,list);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), list);
     }
 }
 

+ 20 - 19
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/InvestorController.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.muchinfo.mtp3century.service.*;
 import com.muchinfo.mtp3century.utils.CenturyDecryptUtil;
 import com.muchinfo.mtp3common.enumtype.Constants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.enumtype.SysConstants;
 import com.muchinfo.mtp3common.vo.AjaxResult;
 import com.muchinfo.mtp3common.utils.EncryptionUtils;
@@ -64,7 +65,7 @@ public class InvestorController {
                 investorQueryParam.setUserState(investorQueryParam.getUserState());
             }
         }
-        return iWskhUserinfoService.queryInvestorPage(investorQueryParam);
+        return iWskhUserinfoService.queryInvestorPage(investorQueryParam, request);
     }
 
     @ApiOperation("交易商管理-->开户管理-->获取交易商开户详情信息")
@@ -83,13 +84,13 @@ public class InvestorController {
             WskhUserinfo currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(wskhUserInfo, request), WskhUserinfo.class);
             Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
             if (currentVo.getUserid() != null) {
-                return iWskhUserinfoService.editWskhUserinfo(currentVo, systemmanager);
+                return iWskhUserinfoService.editWskhUserinfo(currentVo, systemmanager, request);
             } else {
-                return iWskhUserinfoService.addWskhUserinfo(currentVo, systemmanager);
+                return iWskhUserinfoService.addWskhUserinfo(currentVo, systemmanager, request);
             }
         } catch (Exception e) {
             log.error("交易商开户失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -97,11 +98,11 @@ public class InvestorController {
     @ResponseBody
     @ApiOperation("交易商管理-->开户管理-->交易商初审/复审")
     public AjaxResult investorProcess(InvestorProcessParam param, HttpServletRequest request) {
-        try{
+        try {
             return iWskhUserinfoService.investorProcess(param, request);
-        }catch (Exception e){
+        } catch (Exception e) {
             log.error("交易商初审/复审,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -132,19 +133,19 @@ public class InvestorController {
     @RequestMapping(method = RequestMethod.POST, value = "/investorEdit")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     public AjaxResult investorEdit(@RequestBody DetailBeforeResult param, HttpServletRequest request) {
-        try{
+        try {
             return iUseraccountService.investorEdit(param, request);
-        }catch (Exception e){
+        } catch (Exception e) {
             log.error("交易商修改失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
     @ApiOperation("交易商管理-->交易商管理-->查询个性化设置")
     @ResponseBody
     @RequestMapping(method = RequestMethod.GET, value = "/accountQuery")
-    public AjaxResult<InvestorPersonalizationResult> accountQuery(Long goodsid, Long accountid) {
-        return iUseraccountService.accountQuery(goodsid, accountid);
+    public AjaxResult<InvestorPersonalizationResult> accountQuery(Long goodsid, Long accountid, HttpServletRequest request) {
+        return iUseraccountService.accountQuery(goodsid, accountid, request);
     }
 
     @ApiOperation("交易商管理-->交易商管理-->注销")
@@ -171,8 +172,8 @@ public class InvestorController {
     @ApiOperation("交易商管理-->交易商管理-->资金账户、资金账户详情(userid不传)")
     @ResponseBody
     @RequestMapping(method = RequestMethod.GET, value = "/showAccount")
-    public PageResult<Taaccount> showAccount(Long userid, String accountid, Integer pageNo, Integer pageSize) {
-        return iTaaccountService.showAccount(userid, accountid, pageNo, pageSize);
+    public PageResult<Taaccount> showAccount(Long userid, String accountid, Integer pageNo, Integer pageSize, HttpServletRequest request) {
+        return iTaaccountService.showAccount(userid, accountid, pageNo, pageSize, request);
     }
 
     @ApiOperation("交易商管理-->交易商管理-->资金账户-->修改")
@@ -184,22 +185,22 @@ public class InvestorController {
             return iTaaccountService.edit(updateParam, request);
         } catch (Exception e) {
             log.error("交易商开户失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
     @ApiOperation("交易商管理-->交易商管理-->登录账户列表查询")
     @ResponseBody
     @RequestMapping(method = RequestMethod.GET, value = "/queryInvestor")
-    public PageResult<InvestorLoginQueryResult> queryInvestor(InvestorLoginQueryParam param) {
-        return iDealLoginService.queryInvestor(param);
+    public PageResult<InvestorLoginQueryResult> queryInvestor(InvestorLoginQueryParam param, HttpServletRequest request) {
+        return iDealLoginService.queryInvestor(param, request);
     }
 
     @ApiOperation("交易商管理-->交易商管理-->登录账户列表查询-->查看登录流水")
     @ResponseBody
     @RequestMapping(method = RequestMethod.GET, value = "/queryLoginLog")
-    public PageResult<Userloginflow> queryLoginLog(Long loginid, Integer pageNo, Integer pageSize) {
-        return iDealLoginService.queryLoginLog(loginid, pageNo, pageSize);
+    public PageResult<Userloginflow> queryLoginLog(Long loginid, Integer pageNo, Integer pageSize, HttpServletRequest request) {
+        return iDealLoginService.queryLoginLog(loginid, pageNo, pageSize, request);
     }
 
     @ApiOperation("交易商管理-->交易商管理-->登录账户列表查询-->重置密码")

+ 2 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/MarketRunManagerController.java

@@ -27,13 +27,13 @@ public class MarketRunManagerController {
     @RequestMapping(method = RequestMethod.GET, value = "/queryUserLogin")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     private PageResult<MarketRunLoginUserResult> queryUserLogin(String loginid, Integer pageNum, Integer pageSize, HttpServletRequest request) {
-        return iMarketRunManageService.queryUserLogin(loginid,pageNum,pageSize,request);
+        return iMarketRunManageService.queryUserLogin(loginid, pageNum, pageSize, request);
     }
 
     @ApiOperation("市场运行管理-->监控管理-->在线用户查询-->强制下线/强制所有用户下线loginid==null")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     @RequestMapping(method = RequestMethod.GET, value = "/downonline")
     private AjaxResult downonline(Long loginid, HttpServletRequest request) {
-        return iMarketRunManageService.downonline(loginid,request);
+        return iMarketRunManageService.downonline(loginid, request);
     }
 }

+ 1 - 1
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/OrganDetailController.java

@@ -25,7 +25,7 @@ public class OrganDetailController {
     @RequestMapping(method = RequestMethod.GET, value = "/query")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     private PageResult<UserAccountVo> query(UserAccountReqParam userInfoReqParam, HttpServletRequest request) {
-        return iOrganService.queryByPage(userInfoReqParam,request);
+        return iOrganService.queryByPage(userInfoReqParam, request);
     }
 
     @ApiOperation("会员机构管理-->机构管理-->机构资料管理-->获取机构资料详情信息")

+ 20 - 21
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/OrganSonController.java

@@ -4,6 +4,7 @@ import com.muchinfo.mtp3century.service.IOrganService;
 import com.muchinfo.mtp3century.service.ITaaccountService;
 import com.muchinfo.mtp3century.utils.CenturyDecryptUtil;
 import com.muchinfo.mtp3common.enumtype.Constants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.vo.AjaxResult;
 import com.muchinfo.mtp3common.utils.JsonUtils;
 import com.muchinfo.mtp3common.vo.PageResult;
@@ -28,42 +29,40 @@ public class OrganSonController {
     private final Logger log = LoggerFactory.getLogger(this.getClass());
     @Resource
     private IOrganService iOrganService;
-    @Resource
-    private ITaaccountService iTaaccountService;
 
     @ApiOperation("会员机构管理-->子机构管理-->获取机构列表")
     @RequestMapping(method = RequestMethod.GET, value = "/query")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     private PageResult<UserAccountVo> querySon(UserAccountReqParam param, HttpServletRequest request) {
-        return iOrganService.querySon(param,request);
+        return iOrganService.querySon(param, request);
     }
 
     @ApiOperation("会员机构管理-->子机构管理-->机构详情")
     @RequestMapping(method = RequestMethod.GET, value = "/viewson")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     private AjaxResult<OrganSonDetailResult> viewson(Long areaid, Integer modifystatus, HttpServletRequest request) {
-        return iOrganService.viewson(areaid,modifystatus,request);
+        return iOrganService.viewson(areaid, modifystatus, request);
     }
 
     @ApiOperation("会员机构管理-->子机构管理-->撤回")
     @RequestMapping(method = RequestMethod.GET, value = "/rebackChange")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     private AjaxResult rebackChange(Long areaid, HttpServletRequest request) {
-        return iOrganService.rebackChange(areaid,request);
+        return iOrganService.rebackChange(areaid, request);
     }
 
     @ApiOperation("会员机构管理-->子机构管理-->注销")
     @RequestMapping(method = RequestMethod.GET, value = "/delete")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     private AjaxResult delete(Long areaid, HttpServletRequest request) {
-        return iOrganService.delete(areaid,request);
+        return iOrganService.delete(areaid, request);
     }
 
     @ApiOperation("会员机构管理-->子机构管理-->恢复")
     @RequestMapping(method = RequestMethod.GET, value = "/recover")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     private AjaxResult recover(Long areaid, HttpServletRequest request) {
-        return iOrganService.recover(areaid,request);
+        return iOrganService.recover(areaid, request);
     }
 
     @ApiOperation("会员机构管理-->子机构管理-->新增")
@@ -71,11 +70,11 @@ public class OrganSonController {
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     private AjaxResult addsonorgan(@RequestBody String param, HttpServletRequest request) {
         try {
-            OrganParam current = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(param,request), OrganParam.class);
-            return iOrganService.addsonorgan(current,request);
+            OrganParam current = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(param, request), OrganParam.class);
+            return iOrganService.addsonorgan(current, request);
         } catch (Exception e) {
-            log.error("子机构管理新增失败,失败原因:"+e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            log.error("子机构管理新增失败,失败原因:" + e);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -83,12 +82,12 @@ public class OrganSonController {
     @RequestMapping(method = RequestMethod.POST, value = "/editsonorgan")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     private AjaxResult editsonorgan(@RequestBody String param, HttpServletRequest request) {
-        try{
-            OrganParam current = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(param,request), OrganParam.class);
-            return iOrganService.editsonorgan(current,request);
-        }catch (Exception e){
+        try {
+            OrganParam current = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(param, request), OrganParam.class);
+            return iOrganService.editsonorgan(current, request);
+        } catch (Exception e) {
             log.error("子机构管理修改失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -96,12 +95,12 @@ public class OrganSonController {
     @RequestMapping(method = RequestMethod.POST, value = "/edit")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     private AjaxResult edit(@RequestBody String param, HttpServletRequest request) {
-        try{
-            OrganParam current = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(param,request), OrganParam.class);
-            return iOrganService.edit(current,request);
-        }catch (Exception e){
+        try {
+            OrganParam current = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(param, request), OrganParam.class);
+            return iOrganService.edit(current, request);
+        } catch (Exception e) {
             log.error("子机构管理修改失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 }

+ 4 - 4
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/ProfitSharController.java

@@ -70,8 +70,8 @@ public class ProfitSharController {
     @ApiOperation("分润管理-->机构分润配置-->子机构分组管理-->会员列表-->删除")
     @RequestMapping(method = RequestMethod.GET, value = "/deleteMember")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult deleteMember(Long userid) {
-        return iProfitSharService.deleteMember(userid);
+    private AjaxResult deleteMember(Long userid,HttpServletRequest request) {
+        return iProfitSharService.deleteMember(userid,request);
     }
 
     @ApiOperation("分润管理-->机构分润配置-->子机构分润配置-->获取所有已配置信息")
@@ -91,7 +91,7 @@ public class ProfitSharController {
     @ApiOperation("分润管理-->机构分润配置-->子机构分组管理-->删除")
     @RequestMapping(method = RequestMethod.GET, value = "/deleteSOrganSec")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult deleteSOrganSec(Integer dividefeetype,Long marketid,Long subareagroupid) {
-        return iProfitSharService.deleteSOrganSec(dividefeetype,marketid,subareagroupid);
+    private AjaxResult deleteSOrganSec(Integer dividefeetype,Long marketid,Long subareagroupid,HttpServletRequest request) {
+        return iProfitSharService.deleteSOrganSec(dividefeetype,marketid,subareagroupid,request);
     }
 }

+ 32 - 32
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/QueryController.java

@@ -41,31 +41,31 @@ public class QueryController {
     @ApiOperation("内部订单查询--> 委托单查询、斩仓记录查询")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<CommissionSheetResult> commissionSheetQuery(CommissionSheetParam commissionSheetParam, HttpServletRequest request) {
-        return iQueryService.commissionSheetQuery(commissionSheetParam,request);
+        return iQueryService.commissionSheetQuery(commissionSheetParam, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/commissionExport")
     @ResponseBody
     @ApiOperation("内部订单查询--> 委托单导出")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    public AjaxResult commissionExport(CommissionSheetParam commissionSheetParam ,HttpServletRequest request) {
-       return iQueryService.commissionExport(commissionSheetParam,request);
+    public AjaxResult commissionExport(CommissionSheetParam commissionSheetParam, HttpServletRequest request) {
+        return iQueryService.commissionExport(commissionSheetParam, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/commissionSheetDetail")
     @ResponseBody
     @ApiOperation("内部订单查询--> 委托单详情查询")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    public AjaxResult<CommissionSheetResultDetail> commissionSheetQueryDetail(String orderId, Integer isHis, String tradeDate) {
-        return iQueryService.commissionSheetQueryDetail(orderId,isHis,tradeDate);
+    public AjaxResult<CommissionSheetResultDetail> commissionSheetQueryDetail(String orderId, Integer isHis, String tradeDate, HttpServletRequest request) {
+        return iQueryService.commissionSheetQueryDetail(orderId, isHis, tradeDate, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/contractSheet")
     @ResponseBody
     @ApiOperation("内部订单查询--> 成交单查询")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
-    public PageResult<ContractSheetResult> contractSheetQuery(ContractSheetParam contractSheetParam,HttpServletRequest request) {
-        return iQueryService.contractSheetQuery(contractSheetParam,request);
+    public PageResult<ContractSheetResult> contractSheetQuery(ContractSheetParam contractSheetParam, HttpServletRequest request) {
+        return iQueryService.contractSheetQuery(contractSheetParam, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/contractExport")
@@ -73,15 +73,15 @@ public class QueryController {
     @ApiOperation("内部订单查询--> 成交单导出")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     public AjaxResult contractExport(ContractSheetParam contractSheetParam, HttpServletRequest request) {
-        return iQueryService.contractExport(contractSheetParam,request);
+        return iQueryService.contractExport(contractSheetParam, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/contractSheetDetail")
     @ResponseBody
     @ApiOperation("内部订单查询--> 成交单详情查询")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    public AjaxResult<ContractSheetResultDetail> contractSheetQueryDetail(String tradeid, Integer buyorsell, Integer ishis) {
-        return iQueryService.contractSheetQueryDetail(tradeid,buyorsell,ishis);
+    public AjaxResult<ContractSheetResultDetail> contractSheetQueryDetail(String tradeid, Integer buyorsell, Integer ishis, HttpServletRequest request) {
+        return iQueryService.contractSheetQueryDetail(tradeid, buyorsell, ishis, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/positionSheet")
@@ -89,7 +89,7 @@ public class QueryController {
     @ApiOperation("内部订单查询--> 持仓单查询")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<PositionSheetResult> positionSheetQuery(PositionSheetParam positionSheetParam, HttpServletRequest request) {
-        return iQueryService.positionSheetQuery(positionSheetParam,request);
+        return iQueryService.positionSheetQuery(positionSheetParam, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/positionExport")
@@ -97,15 +97,15 @@ public class QueryController {
     @ApiOperation("内部订单查询--> 持仓单导出")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     public AjaxResult positionExport(PositionSheetParam positionSheetParam, HttpServletRequest request) {
-        return iQueryService.positionExport(positionSheetParam,request);
+        return iQueryService.positionExport(positionSheetParam, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/positionSheetDetail")
     @ResponseBody
     @ApiOperation("内部订单查询--> 持仓单详情查询")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    public AjaxResult<PositionSheetResultDetail> positionSheetDetail(String tradeid, Integer buyorsell, Integer ishis, String histradedate,HttpServletRequest request) {
-        return iQueryService.positionSheetDetail(tradeid,buyorsell,ishis,histradedate,request);
+    public AjaxResult<PositionSheetResultDetail> positionSheetDetail(String tradeid, Integer buyorsell, Integer ishis, String histradedate, HttpServletRequest request) {
+        return iQueryService.positionSheetDetail(tradeid, buyorsell, ishis, histradedate, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/positionSumSheet")
@@ -113,7 +113,7 @@ public class QueryController {
     @ApiOperation("内部订单查询--> 持仓单汇总查询")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<PositionSumSheetResult> positionSumSheet(PositionSumSheetParam param, HttpServletRequest request) {
-        return iQueryService.positionSumSheet(param,request);
+        return iQueryService.positionSumSheet(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/positionSumSheetExport")
@@ -121,7 +121,7 @@ public class QueryController {
     @ApiOperation("内部订单查询--> 持仓单汇总导出")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     public AjaxResult positionSumSheetExport(PositionSumSheetParam param, HttpServletRequest request) {
-        return iQueryService.positionSumSheetExport(param,request);
+        return iQueryService.positionSumSheetExport(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/warehouseQuery")
@@ -129,7 +129,7 @@ public class QueryController {
     @ApiOperation("仓单类订单查询--> 委托单查询 --> 获取列表")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<WarehouseCommissionResult> warehouseQuery(WarehouseCommissionParam param, HttpServletRequest request) {
-        return iQueryService.warehouseQuery(param,request);
+        return iQueryService.warehouseQuery(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/warehouseExport")
@@ -137,7 +137,7 @@ public class QueryController {
     @ApiOperation("仓单类订单查询--> 委托单查询 --> 导出")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     public AjaxResult warehouseExport(WarehouseCommissionParam param, HttpServletRequest request) {
-        return iQueryService.warehouseExport(param,request);
+        return iQueryService.warehouseExport(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/tradeOrderView")
@@ -145,7 +145,7 @@ public class QueryController {
     @ApiOperation("仓单类订单查询--> 委托单查询 --> 详情")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     public AjaxResult<WarehouseCommissionResultDetail> tradeOrderView(Long wrtradeorderid, Integer ishis, HttpServletRequest request) {
-        return iQueryService.tradeOrderView(wrtradeorderid,ishis,request);
+        return iQueryService.tradeOrderView(wrtradeorderid, ishis, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/queryTradeOrder")
@@ -153,7 +153,7 @@ public class QueryController {
     @ApiOperation("仓单类订单查询--> 成交单查询 --> 获取列表")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<WarehouseContractResult> queryTradeOrder(WarehouseContractParam param, HttpServletRequest request) {
-        return iQueryService.queryTradeOrder(param,request);
+        return iQueryService.queryTradeOrder(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/tradeOrderExport")
@@ -161,23 +161,23 @@ public class QueryController {
     @ApiOperation("仓单类订单查询--> 成交单查询 --> 导出")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     public AjaxResult tradeOrderExport(WarehouseContractParam param, HttpServletRequest request) {
-        return iQueryService.tradeOrderExport(param,request);
+        return iQueryService.tradeOrderExport(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/tradeTradedView")
     @ResponseBody
     @ApiOperation("仓单类订单查询--> 成交单查询 --> 详情")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    public AjaxResult<WarehouseContractDetailParam> tradeTradedView(Long wrtradeorderid, Integer ishis,Integer wrtradetype, HttpServletRequest request) {
-        return iQueryService.tradeTradedView(wrtradeorderid,ishis,wrtradetype,request);
+    public AjaxResult<WarehouseContractDetailParam> tradeTradedView(Long wrtradeorderid, Integer ishis, Integer wrtradetype, HttpServletRequest request) {
+        return iQueryService.tradeTradedView(wrtradeorderid, ishis, wrtradetype, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/initWarehouse")
     @ResponseBody
     @ApiOperation("仓单查询--> 仓单汇总查询查询 --> 初始化仓单标准以及仓库")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    public AjaxResult<WarehouseInitResult> initWarehouse() {
-        return iQueryService.initWarehouse();
+    public AjaxResult<WarehouseInitResult> initWarehouse(HttpServletRequest request) {
+        return iQueryService.initWarehouse(request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/summaryQuery")
@@ -185,7 +185,7 @@ public class QueryController {
     @ApiOperation("仓单查询--> 仓单汇总查询查询 --> 获取列表")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<WarehouseSumResult> warehouseSum(WarehouseSumParam param, HttpServletRequest request) {
-        return iQueryService.warehouseSum(param,request);
+        return iQueryService.warehouseSum(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/summaryQueryDetail")
@@ -193,7 +193,7 @@ public class QueryController {
     @ApiOperation("仓单查询--> 仓单汇总查询查询 --> 详情")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<WarehouseSumDetailResult> summaryQueryDetail(WarehouseSumDetailParam param, HttpServletRequest request) {
-        return iQueryService.summaryQueryDetail(param,request);
+        return iQueryService.summaryQueryDetail(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/accountTransactions")
@@ -201,7 +201,7 @@ public class QueryController {
     @ApiOperation("内部订单查询--> 账户成交汇总 --> 获取列表 ")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<AccountTransactionQueryResult> accountTransactions(AccountTransactionQueryParam param, HttpServletRequest request) {
-        return iQueryService.accountTransactions(param,request);
+        return iQueryService.accountTransactions(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/accountExport")
@@ -209,7 +209,7 @@ public class QueryController {
     @ApiOperation("内部订单查询--> 账户成交汇总 --> 导出 ")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     public AjaxResult accountExport(AccountTransactionQueryParam param, HttpServletRequest request) {
-        return iQueryService.accountExport(param,request);
+        return iQueryService.accountExport(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/queryInvestor")
@@ -217,7 +217,7 @@ public class QueryController {
     @ApiOperation("内部订单查询--> 机构成交汇总 --> 获取列表 ")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<InvestorSumQueryResult> queryInvestorSum(InvestorSumQueryParam param, HttpServletRequest request) {
-        return iQueryService.queryInvestorSum(param,request);
+        return iQueryService.queryInvestorSum(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/queryGoodsTrade")
@@ -225,7 +225,7 @@ public class QueryController {
     @ApiOperation("内部订单查询--> 商品成交汇总 --> 获取列表 ")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<GoodsTradeQueryResult> queryGoodsTrade(GoodsTradeQueryParam param, HttpServletRequest request) {
-        return iQueryService.queryGoodsTrade(param,request);
+        return iQueryService.queryGoodsTrade(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/queryGoodsTradeExport")
@@ -233,7 +233,7 @@ public class QueryController {
     @ApiOperation("内部订单查询--> 商品成交汇总 --> 导出 ")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public AjaxResult queryGoodsTradeExport(GoodsTradeQueryParam param, HttpServletRequest request) {
-        return iQueryService.queryGoodsTradeExport(param,request);
+        return iQueryService.queryGoodsTradeExport(param, request);
     }
 
 }

+ 14 - 14
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/ReportFormController.java

@@ -28,49 +28,49 @@ public class ReportFormController {
     @ApiOperation("报表管理-->分润报表")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<ShareAmountQueryResult> selectShareAmount(ShareAmountQueryParam param, HttpServletRequest request) {
-        return iReportFormService.selectShareAmount(param,request);
+        return iReportFormService.selectShareAmount(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/queryRefUserSelect")
     @ApiOperation("报表管理-->推荐成交报表-->推荐人信息")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     public AjaxResult<RefUserResult> queryRefUserSelect(String searchcode, HttpServletRequest request) {
-        return iReportFormService.queryRefUserSelect(searchcode,request);
+        return iReportFormService.queryRefUserSelect(searchcode, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/trade")
     @ApiOperation("报表管理-->推荐成交报表")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
-    public PageResult<TradeQueryResult> queryTrade(TradeQueryParam param) {
-        return iReportFormService.queryTrade(param);
+    public PageResult<TradeQueryResult> queryTrade(TradeQueryParam param, HttpServletRequest request) {
+        return iReportFormService.queryTrade(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/orgReportQuery")
     @ApiOperation("报表管理-->经纪会员报表")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<OrgReportQueryResult> orgReportQuery(OrgReportQueryParam param, HttpServletRequest request) {
-        return iReportFormService.orgReportQuery(param,request);
+        return iReportFormService.orgReportQuery(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/orgReportQueryExport")
     @ApiOperation("报表管理-->经纪会员报表-->导出")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public AjaxResult orgReportQueryExport(OrgReportQueryParam param, HttpServletRequest request) {
-        return iReportFormService.orgReportQueryExport(param,request);
+        return iReportFormService.orgReportQueryExport(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/investorReportQuery")
     @ApiOperation("报表管理-->交易商资金报表")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<InvestorReportQueryResult> investorReportQuery(InvestorReportQueryParam param, HttpServletRequest request) {
-        return iReportFormService.investorReportQuery(param,request);
+        return iReportFormService.investorReportQuery(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/queryTAAccountChildrenSelect")
     @ApiOperation("报表管理-->资金账户报表-->资金账户下拉列表")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    public AjaxResult<TAAccountChildrenSelect> queryTAAccountChildrenSelect(String searchcode,HttpServletRequest request) {
-        return iReportFormService.queryTAAccountChildrenSelect(searchcode,request);
+    public AjaxResult<TAAccountChildrenSelect> queryTAAccountChildrenSelect(String searchcode, HttpServletRequest request) {
+        return iReportFormService.queryTAAccountChildrenSelect(searchcode, request);
     }
 
 
@@ -78,34 +78,34 @@ public class ReportFormController {
     @ApiOperation("报表管理-->资金账户报表-->资金信息")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public AjaxResult<ReportTaaccount> taaccountReportQuery(TaAccountReportParam param, HttpServletRequest request) {
-        return iReportFormService.taaccountReportQuery(param,request);
+        return iReportFormService.taaccountReportQuery(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/holdertotalquery")
     @ApiOperation("报表管理-->资金账户报表-->持仓汇总表")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<HolderTotalResult> holdertotalquery(TaAccountReportParam param, HttpServletRequest request) {
-        return iReportFormService.holdertotalquery(param,request);
+        return iReportFormService.holdertotalquery(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/wrpositionquery")
     @ApiOperation("报表管理-->资金账户报表-->仓单汇总表")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<WrPositionResult> wrpositionquery(TaAccountReportParam param, HttpServletRequest request) {
-        return iReportFormService.wrpositionquery(param,request);
+        return iReportFormService.wrpositionquery(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/tradequery")
     @ApiOperation("报表管理-->资金账户报表-->成交汇总表")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public PageResult<TradeReportQueryResult> tradequery(TaAccountReportParam param, HttpServletRequest request) {
-        return iReportFormService.tradequery(param,request);
+        return iReportFormService.tradequery(param, request);
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "/accountppquery")
     @ApiOperation("报表管理-->资金账户报表-->履约汇总表")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     public AjaxResult<ReportPlateformpp> accountppquery(TaAccountReportParam param, HttpServletRequest request) {
-        return iReportFormService.accountppquery(param,request);
+        return iReportFormService.accountppquery(param, request);
     }
 }

+ 8 - 8
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/SettlementController.java

@@ -28,35 +28,35 @@ public class SettlementController {
     @ApiOperation("结算管理-->二级分润付款确认-->获取列表(tradedate时间格式yyyymmdd,reletype = 1 areatype传null)")
     @RequestMapping(method = RequestMethod.GET, value = "/sharedayquery")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
-    private PageResult<SecondProfitSharResult> sharedayquery(String tradedate,Integer areatype, Integer pageNum, Integer pageSize, HttpServletRequest request) {
-        return iSettlementService.sharedayquery(tradedate,areatype,pageNum,pageSize,request);
+    private PageResult<SecondProfitSharResult> sharedayquery(String tradedate, Integer areatype, Integer pageNum, Integer pageSize, HttpServletRequest request) {
+        return iSettlementService.sharedayquery(tradedate, areatype, pageNum, pageSize, request);
     }
 
     @ApiOperation("结算管理-->二级分润付款确认-->导出(交易所管理员才有此功能)")
     @RequestMapping(method = RequestMethod.GET, value = "/export")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     private AjaxResult export(String tradedate, HttpServletRequest request) {
-        return iSettlementService.export(tradedate,request);
+        return iSettlementService.export(tradedate, request);
     }
 
     @ApiOperation("结算管理-->二级分润付款确认-->查看交易日详情")
     @RequestMapping(method = RequestMethod.GET, value = "/viewTradingDay")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     private PageResult<SecondProfitSharDetailResult> view(SecondProfitSharDetailParam param, HttpServletRequest request) {
-        return iSettlementService.view(param,request);
+        return iSettlementService.view(param, request);
     }
 
     @ApiOperation("结算管理-->二级分润付款确认-->查看交易日详情-->详情")
     @RequestMapping(method = RequestMethod.GET, value = "/detail")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<ReckonDaydividecount> detail(String tradedate,Integer areatype,Long areaid) {
-        return iSettlementService.detail(tradedate,areatype,areaid);
+    private AjaxResult<ReckonDaydividecount> detail(String tradedate, Integer areatype, Long areaid, HttpServletRequest request) {
+        return iSettlementService.detail(tradedate, areatype, areaid, request);
     }
 
     @ApiOperation("结算管理-->二级分润付款确认-->查看交易日详情-->批量确认")
     @RequestMapping(method = RequestMethod.GET, value = "/batchPay")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult batchPay(String areaids,Integer tradedate, HttpServletRequest request) {
-        return iSettlementService.batchPay(areaids,tradedate,request);
+    private AjaxResult batchPay(String areaids, Integer tradedate, HttpServletRequest request) {
+        return iSettlementService.batchPay(areaids, tradedate, request);
     }
 }

+ 6 - 5
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/SystemRoleController.java

@@ -4,6 +4,7 @@ package com.muchinfo.mtp3century.controller;
 import com.muchinfo.mtp3century.service.ISystemRoleService;
 import com.muchinfo.mtp3century.utils.CenturyDecryptUtil;
 import com.muchinfo.mtp3common.enumtype.Constants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.utils.JsonUtils;
 import com.muchinfo.mtp3common.vo.PageResult;
 import com.muchinfo.mtp3pojos.vo.SystemRoleVo;
@@ -40,7 +41,7 @@ public class SystemRoleController {
             return iSystemRoleService.dealRoleMenus(currentVo, request);
         } catch (Exception e) {
             log.error("处理角色菜单信息失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -50,10 +51,10 @@ public class SystemRoleController {
     private AjaxResult deleteRoleMenus(@RequestBody String systemRoleVo, HttpServletRequest request) {
         try {
             SystemRoleVo currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(systemRoleVo, request), SystemRoleVo.class);
-            return iSystemRoleService.deleteRoleMenus(currentVo);
+            return iSystemRoleService.deleteRoleMenus(currentVo, request);
         } catch (Exception e) {
             log.error("删除角色菜单信息失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -77,8 +78,8 @@ public class SystemRoleController {
     @ResponseBody
     @RequestMapping(method = RequestMethod.GET, value = "/queryDetail")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<SystemRoleVo> queryDetail(Integer autoId) {
-        return iSystemRoleService.queryDetail(autoId);
+    private AjaxResult<SystemRoleVo> queryDetail(Integer autoId, HttpServletRequest request) {
+        return iSystemRoleService.queryDetail(autoId, request);
     }
 
 

+ 3 - 3
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/SystemSetUpController.java

@@ -32,7 +32,7 @@ public class SystemSetUpController {
     @RequestMapping(method = RequestMethod.GET, value = "/queryLog")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     private PageResult<SystemUserLogResult> query(SystemUserLogParam param, HttpServletRequest request) {
-        return iSystemSetUpService.queryByPage(param,request);
+        return iSystemSetUpService.queryByPage(param, request);
     }
 
     @ApiOperation("系统设置管理-->系统运行管理-->登录异常流水查询-->获取列表")
@@ -40,7 +40,7 @@ public class SystemSetUpController {
     @RequestMapping(method = RequestMethod.GET, value = "/queryError")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     private PageResult<SystemLoginErrorResult> queryError(SystemLoginErrorParam param, HttpServletRequest request) {
-        return iSystemSetUpService.queryError(param,request);
+        return iSystemSetUpService.queryError(param, request);
     }
 
     @ApiOperation("系统设置管理-->系统运行管理-->登录异常流水查询-->导出")
@@ -48,6 +48,6 @@ public class SystemSetUpController {
     @RequestMapping(method = RequestMethod.GET, value = "/export")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
     private AjaxResult export(SystemLoginErrorParam param, HttpServletRequest request) {
-        return iSystemSetUpService.export(param,request);
+        return iSystemSetUpService.export(param, request);
     }
 }

+ 24 - 23
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/SystemmanagerController.java

@@ -7,6 +7,7 @@ import com.muchinfo.mtp3century.vo.LoginCodeVo;
 import com.muchinfo.mtp3century.vo.systemlogin.LoginReq;
 import com.muchinfo.mtp3century.vo.systemlogin.LoginRsp;
 import com.muchinfo.mtp3common.enumtype.Constants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.enumtype.SysConstantsEnum;
 import com.muchinfo.mtp3common.vo.AjaxResult;
 import com.muchinfo.mtp3common.utils.JsonUtils;
@@ -59,7 +60,7 @@ public class SystemmanagerController {
     @ResponseBody
     public AjaxResult<LoginRsp> loginIn(@Valid @RequestBody String loginReq, HttpServletRequest request) {
         try {
-            LoginReq currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(loginReq,request), LoginReq.class);
+            LoginReq currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(loginReq, request), LoginReq.class);
             Systemmanager systemmanagers = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", currentVo.getAccountCode()));
             AjaxResult ajaxResult = iSystemmanagerService.loginIn(currentVo, request, systemmanagers);
             //增加登录流水
@@ -75,8 +76,8 @@ public class SystemmanagerController {
             iUserloginflowMapper.insert(userloginflow);
             return ajaxResult;
         } catch (Exception e) {
-            log.error("登录失败,失败原因:"+e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            log.error("登录失败,失败原因:" + e);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -87,8 +88,8 @@ public class SystemmanagerController {
     @ResponseBody
     @ApiOperation("获取验证码")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    public AjaxResult<LoginCodeVo> getVerifyCode() {
-        return iSystemmanagerService.getVerifyCode();
+    public AjaxResult<LoginCodeVo> getVerifyCode(HttpServletRequest request) {
+        return iSystemmanagerService.getVerifyCode(request);
     }
 
 
@@ -98,10 +99,10 @@ public class SystemmanagerController {
     @ResponseBody
     public PageResult<SystemUserResResult> query(@RequestBody String systemUserReqParam, HttpServletRequest request) {
         try {
-            SystemUserReqParam currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(systemUserReqParam,request), SystemUserReqParam.class);
-            return iSystemmanagerService.queryUserMsg(request,currentVo);
+            SystemUserReqParam currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(systemUserReqParam, request), SystemUserReqParam.class);
+            return iSystemmanagerService.queryUserMsg(request, currentVo);
         } catch (Exception e) {
-            log.error("管理员查询信息失败,失败原因:"+e);
+            log.error("管理员查询信息失败,失败原因:" + e);
             PageResult<SystemUserResResult> pageResult = new PageResult<>();
             pageResult.setCode(Constants.Error_Code_Design);
             pageResult.setMessage(Constants.Error_Code_Message);
@@ -113,33 +114,33 @@ public class SystemmanagerController {
     @ResponseBody
     @RequestMapping(method = RequestMethod.GET, value = "/queryDetail")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<SystemUserResResult> queryDetail(Integer autoId){
-        return iSystemmanagerService.queryDetail(autoId);
+    private AjaxResult<SystemUserResResult> queryDetail(Integer autoId, HttpServletRequest request) {
+        return iSystemmanagerService.queryDetail(autoId, request);
     }
 
     @ApiOperation("处理管理员信息")
     @RequestMapping(method = RequestMethod.POST, value = "/dealUserMsg")
     @ResponseBody
-    private AjaxResult dealUserMsg(@RequestBody String systemUserVo, HttpServletRequest request){
+    private AjaxResult dealUserMsg(@RequestBody String systemUserVo, HttpServletRequest request) {
         try {
-            SystemUserVo currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(systemUserVo,request), SystemUserVo.class);
-            return iSystemmanagerService.dealUserMsg(currentVo,request);
+            SystemUserVo currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(systemUserVo, request), SystemUserVo.class);
+            return iSystemmanagerService.dealUserMsg(currentVo, request);
         } catch (Exception e) {
-            log.error("处理管理员信息失败,失败原因:"+e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            log.error("处理管理员信息失败,失败原因:" + e);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
     @ApiOperation("处理管理员状态")
     @RequestMapping(method = RequestMethod.POST, value = "/dealUserStatus")
     @ResponseBody
-    private AjaxResult dealUserStatus(@RequestBody String systemUserVo , HttpServletRequest request){
+    private AjaxResult dealUserStatus(@RequestBody String systemUserVo, HttpServletRequest request) {
         try {
-            SystemUserVo currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(systemUserVo,request), SystemUserVo.class);
+            SystemUserVo currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(systemUserVo, request), SystemUserVo.class);
             return iSystemmanagerService.dealUserStatus(currentVo, request);
         } catch (Exception e) {
-            log.error("处理管理员状态失败,失败原因:"+e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            log.error("处理管理员状态失败,失败原因:" + e);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -154,13 +155,13 @@ public class SystemmanagerController {
     @ApiOperation("修改密码")
     @ResponseBody
     @RequestMapping(method = RequestMethod.POST, value = "/updatePwd")
-    private AjaxResult updatePwd(@RequestBody String systemUserPwdParam , HttpServletRequest request) {
+    private AjaxResult updatePwd(@RequestBody String systemUserPwdParam, HttpServletRequest request) {
         try {
-            SystemUserPwdParam currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(systemUserPwdParam,request), SystemUserPwdParam.class);
+            SystemUserPwdParam currentVo = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(systemUserPwdParam, request), SystemUserPwdParam.class);
             return iSystemmanagerService.updatePwd(currentVo, request);
         } catch (Exception e) {
-            log.error("修改密码失败,失败原因:"+e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            log.error("修改密码失败,失败原因:" + e);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 }

+ 13 - 12
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/TaAccountController.java

@@ -3,6 +3,7 @@ package com.muchinfo.mtp3century.controller;
 import com.muchinfo.mtp3century.service.ITaaccountService;
 import com.muchinfo.mtp3century.utils.CenturyDecryptUtil;
 import com.muchinfo.mtp3common.enumtype.Constants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.vo.AjaxResult;
 import com.muchinfo.mtp3common.utils.JsonUtils;
 import com.muchinfo.mtp3common.vo.PageResult;
@@ -31,7 +32,7 @@ public class TaAccountController {
     @RequestMapping(method = RequestMethod.GET, value = "/query")
     @ResponseBody
     public PageResult<TaAccountQueryResult> query(TaAccountQueryParam taAccountQueryParam, HttpServletRequest request) {
-        return iTaaccountService.queryUserMsg(request,taAccountQueryParam);
+        return iTaaccountService.queryUserMsg(request, taAccountQueryParam);
     }
 
     @ApiOperation("资金账户管理-->资金账户详情信息")
@@ -39,15 +40,15 @@ public class TaAccountController {
     @RequestMapping(method = RequestMethod.GET, value = "/queryDetail")
     @ResponseBody
     public AjaxResult<TaAccountQueryResultDetail> queryDetail(Long accountId, HttpServletRequest request) {
-        return iTaaccountService.queryDetail(request,accountId);
+        return iTaaccountService.queryDetail(request, accountId);
     }
 
     @ApiOperation("资金账户管理-->资金账户信息修改")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     @RequestMapping(method = RequestMethod.POST, value = "/updateTaAccount")
     @ResponseBody
-    public AjaxResult updateTaAccount(@RequestBody TaAccountUpdateParam param ,HttpServletRequest request) {
-        return iTaaccountService.updateTaAccount(param,request);
+    public AjaxResult updateTaAccount(@RequestBody TaAccountUpdateParam param, HttpServletRequest request) {
+        return iTaaccountService.updateTaAccount(param, request);
     }
 
     @ApiOperation("资金账户管理-->资金流水信息列表查询/查询管理-->资金流水信息列表查询")
@@ -55,15 +56,15 @@ public class TaAccountController {
     @RequestMapping(method = RequestMethod.GET, value = "/queryAmountStream")
     @ResponseBody
     public PageResult<TaAccountAmountStreamResult> queryAmountStream(TaAccountAmountStreamParam taAccountAmountStreamParam, HttpServletRequest request) {
-        return iTaaccountService.queryAmountStream(request,taAccountAmountStreamParam);
+        return iTaaccountService.queryAmountStream(request, taAccountAmountStreamParam);
     }
 
     @ApiOperation("资金账户管理-->资金流水信息导出")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     @RequestMapping(method = RequestMethod.GET, value = "/queryAmountStreamExport")
     @ResponseBody
-    public AjaxResult queryAmountStreamExport(TaAccountAmountStreamParam taAccountAmountStreamParam ,HttpServletRequest request) {
-        return iTaaccountService.queryAmountStreamExport(taAccountAmountStreamParam,request);
+    public AjaxResult queryAmountStreamExport(TaAccountAmountStreamParam taAccountAmountStreamParam, HttpServletRequest request) {
+        return iTaaccountService.queryAmountStreamExport(taAccountAmountStreamParam, request);
     }
 
     @ApiOperation("资金账户管理-->资金账户修改密码")
@@ -73,10 +74,10 @@ public class TaAccountController {
     public AjaxResult updatePwd(@RequestBody String pwd, HttpServletRequest request) {
         try {
             TaAccountPwd taAccountPwd = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(pwd, request), TaAccountPwd.class);
-            return iTaaccountService.updatePwd(request,taAccountPwd);
+            return iTaaccountService.updatePwd(request, taAccountPwd);
         } catch (Exception e) {
             log.error("处理开户信息新增、修改失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -84,13 +85,13 @@ public class TaAccountController {
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
     @RequestMapping(method = RequestMethod.POST, value = "/inOrOutAmount")
     @ResponseBody
-    public AjaxResult inOrOutAmount(@RequestBody String param ,HttpServletRequest request) {
+    public AjaxResult inOrOutAmount(@RequestBody String param, HttpServletRequest request) {
         try {
             TaAccountInOrOutAmountParam taAccountPwd = JsonUtils.toBean(CenturyDecryptUtil.decryptForJson(param, request), TaAccountInOrOutAmountParam.class);
-            return iTaaccountService.inOrOutAmount(taAccountPwd,request);
+            return iTaaccountService.inOrOutAmount(taAccountPwd, request);
         } catch (Exception e) {
             log.error("网上出入金申请,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 }

+ 14 - 13
mtp3-century/src/main/java/com/muchinfo/mtp3century/controller/WskhUserinfoController.java

@@ -6,6 +6,7 @@ import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.service.IWskhUserinfoService;
 import com.muchinfo.mtp3century.utils.CenturyDecryptUtil;
 import com.muchinfo.mtp3common.enumtype.Constants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.vo.AjaxResult;
 import com.muchinfo.mtp3common.utils.JsonUtils;
 import com.muchinfo.mtp3common.vo.PageResult;
@@ -47,16 +48,16 @@ public class WskhUserinfoController {
     @ResponseBody
     @RequestMapping(method = RequestMethod.GET, value = "/query")
     @ApiResponse(code = 200, message = "成功", response = PageResult.class)
-    private PageResult<WskhUserinfo> query(String username, Integer pageNum, Integer pageSize) {
-        return iWskhUserinfoService.queryByPage(username, pageNum, pageSize);
+    private PageResult<WskhUserinfo> query(String username, Integer pageNum, Integer pageSize, HttpServletRequest request) {
+        return iWskhUserinfoService.queryByPage(username, pageNum, pageSize, request);
     }
 
     @ApiOperation("会员机构管理-->机构管理-->机构开户申请-->获取机构开户列表详情信息")
     @ResponseBody
     @RequestMapping(method = RequestMethod.GET, value = "/queryDetail")
     @ApiResponse(code = 200, message = "成功", response = AjaxResult.class)
-    private AjaxResult<WskhUserinfo> queryDetail(Long userId) {
-        return iWskhUserinfoService.queryDetail(userId);
+    private AjaxResult<WskhUserinfo> queryDetail(Long userId, HttpServletRequest request) {
+        return iWskhUserinfoService.queryDetail(userId, request);
     }
 
     @ApiOperation("会员机构管理-->机构管理-->机构开户申请-->处理开户信息  新增、修改")
@@ -68,28 +69,28 @@ public class WskhUserinfoController {
             //获取当前登录用户
             Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
             if (currentVo.getUserid() != null) {
-                return iWskhUserinfoService.updateAreainfo(currentVo, systemmanager);
+                return iWskhUserinfoService.updateAreainfo(currentVo, systemmanager, request);
             } else {
-                return iWskhUserinfoService.addAreainfo(currentVo, systemmanager);
+                return iWskhUserinfoService.addAreainfo(currentVo, systemmanager, request);
             }
         } catch (Exception e) {
             log.error("处理开户信息新增、修改失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
     @ApiOperation("会员机构管理-->机构管理-->机构开户申请-->撤回提交的待审核信息")
     @ResponseBody
     @RequestMapping(method = RequestMethod.GET, value = "/reBack")
-    private AjaxResult reBack(Long userid) {
-        return iWskhUserinfoService.reBack(userid);
+    private AjaxResult reBack(Long userid, HttpServletRequest request) {
+        return iWskhUserinfoService.reBack(userid, request);
     }
 
     @ApiOperation("会员机构管理-->机构管理-->机构开户申请-->删除待提交的开户申请")
     @ResponseBody
     @RequestMapping(method = RequestMethod.GET, value = "/delete")
-    private AjaxResult delete(Long userid) {
-        return iWskhUserinfoService.delete(userid);
+    private AjaxResult delete(Long userid, HttpServletRequest request) {
+        return iWskhUserinfoService.delete(userid, request);
     }
 
     @ApiOperation("会员机构管理-->机构管理-->机构开户申请-->审核通过")
@@ -102,13 +103,13 @@ public class WskhUserinfoController {
             //获取当前登录用户
             if (currentVo.getAllocated() == null || currentVo.getAllocated() != 1) {
                 if (systemmanager.getReletype() != 1) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
                 }
             }
             return iWskhUserinfoService.approved(currentVo, request);
         } catch (Exception e) {
             log.error("审核通过操作失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 }

+ 4 - 4
mtp3-century/src/main/java/com/muchinfo/mtp3century/exception/GlobalExceptionHandler.java

@@ -35,7 +35,7 @@ public class GlobalExceptionHandler {
     public AjaxResult exceptionHandler(Exception e){
         e.printStackTrace();
         log.error(e+"");
-        return AjaxResult.error(GlobalExceptionEnum.ERROR.getCode(), GlobalExceptionEnum.ERROR.getMessage());
+        return AjaxResult.error(GlobalExceptionEnum.ERROR.getCode(), GlobalExceptionEnum.ERROR.getMessage(),"");
     }
 
     /**
@@ -51,7 +51,7 @@ public class GlobalExceptionHandler {
     public AjaxResult globalExceptionHandler(GlobalException e){
         e.printStackTrace();
         log.error(e+"");
-        return AjaxResult.error(e.getCode(), e.getGlobalMessage());
+        return AjaxResult.error(e.getCode(), e.getGlobalMessage(),"");
     }
 
 
@@ -72,7 +72,7 @@ public class GlobalExceptionHandler {
         // Collectors.joining(","):joining只对字符串生效,用其他类型会报错,把所有的得到的字符串使用逗号进行隔开并组合成一个字符串
         String messages = errors.stream().map(ObjectError::getDefaultMessage).collect(Collectors.joining(","));
 
-        return AjaxResult.error(GlobalExceptionEnum.PARAM_ERROR.getCode(), messages);
+        return AjaxResult.error(GlobalExceptionEnum.PARAM_ERROR.getCode(), messages,"");
     }
 
     /**
@@ -84,6 +84,6 @@ public class GlobalExceptionHandler {
     public AjaxResult globalExceptionHandler(ConstraintViolationException e){
         e.printStackTrace();
         log.error(e+"");
-        return AjaxResult.error(GlobalExceptionEnum.PARAM_ERROR.getCode(), e.getMessage());
+        return AjaxResult.error(GlobalExceptionEnum.PARAM_ERROR.getCode(), e.getMessage(),"");
     }
 }

+ 4 - 4
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IBankAccountSignService.java

@@ -8,15 +8,15 @@ import com.muchinfo.mtp3pojos.vo.bankaccountsign.*;
 import javax.servlet.http.HttpServletRequest;
 
 public interface IBankAccountSignService {
-    PageResult<AccountSignQueryResult> query(AccountSignQueryParam taAccountQueryParam);
+    PageResult<AccountSignQueryResult> query(AccountSignQueryParam taAccountQueryParam, HttpServletRequest request);
 
     PageResult<PutOrInAmountQueryResult> queryPutOrIn(PutOrInAmountQueryParam param, HttpServletRequest request);
 
-    AjaxResult<PutOrInAmountQueryResultDetail> queryPutOrInDetail(String accountcode,String cusbankid,String tradedate,String exchticket);
+    AjaxResult<PutOrInAmountQueryResultDetail> queryPutOrInDetail(String accountcode, String cusbankid, String tradedate, String exchticket, HttpServletRequest request);
 
     AjaxResult queryPutOrInExport(PutOrInAmountQueryParam param, HttpServletRequest request);
 
-    AjaxResult<BankAccountsignResult> getSignBankById(String accountcode, String cusbankid , String applyexchticket);
+    AjaxResult<BankAccountsignResult> getSignBankById(String accountcode, String cusbankid, String applyexchticket, HttpServletRequest request);
 
-    AjaxResult dealAccountSign(Systemmanager systemmanager, AccountSignParam param);
+    AjaxResult dealAccountSign(HttpServletRequest request, AccountSignParam param);
 }

+ 16 - 16
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ICommonService.java

@@ -15,33 +15,33 @@ public interface ICommonService {
 
     String getSystemParam(String redisHeaderSysparam, String sysparamCodeDefaultPwd);
 
-    AjaxResult<OrganSelectResult> queryOrganSelect(OrganSelectParam vo);
+    AjaxResult<OrganSelectResult> queryOrganSelect(OrganSelectParam vo, HttpServletRequest request);
 
-    AjaxResult<FileMetaVo> uploadFile(HttpServletRequest request );
+    AjaxResult<FileMetaVo> uploadFile(HttpServletRequest request);
 
-    AjaxResult getEnumType(String typeCode);
+    AjaxResult getEnumType(String typeCode, HttpServletRequest request);
 
-    AjaxResult<InvestorSelectResult> queryInvestorSelect(InvestorSelectParam investorSelectParam);
+    AjaxResult<InvestorSelectResult> queryInvestorSelect(InvestorSelectParam investorSelectParam, HttpServletRequest request);
 
-    AjaxResult<BankAccountsign> getSignBank();
+    AjaxResult<BankAccountsign> getSignBank(HttpServletRequest request);
 
-    AjaxResult<CusBankInfoResult> getBankInfoByCusBank(String cusBankId, String bankName);
+    AjaxResult<CusBankInfoResult> getBankInfoByCusBank(String cusBankId, String bankName, HttpServletRequest request);
 
-    AjaxResult<TAAccountChildrenResult> queryTAAccountChildren(String accountName,Long areaUserId);
+    AjaxResult<TAAccountChildrenResult> queryTAAccountChildren(String accountName, Long areaUserId, HttpServletRequest request);
 
-    AjaxResult<GoodsSelectResult> queryGoodsSelect(String goodsStatusIds, String marketId, String searchCode);
+    AjaxResult<GoodsSelectResult> queryGoodsSelect(String goodsStatusIds, String marketId, String searchCode, HttpServletRequest request);
 
-    AjaxResult<Market> getOrderListAll(List<Long> markets);
+    AjaxResult<Market> getOrderListAll(List<Long> markets, HttpServletRequest request);
 
-    AjaxResult<InvestorSelectResult> getOrganListAll(Long userId,String searchCode);
+    AjaxResult<InvestorSelectResult> getOrganListAll(Long userId, String searchCode, HttpServletRequest request);
 
     String getSysparmById(String number);
 
     BigDecimal calcFloaPL(String quoteGoodsCode, BigDecimal agreeUnit, Integer buyorsell, Integer holderqty, BigDecimal holderamount);
 
-    AjaxResult<BankCusbankinfo> getAllBankCus();
+    AjaxResult<BankCusbankinfo> getAllBankCus(HttpServletRequest request);
 
-    AjaxResult<BankCusBankExtendResult> queryBooleanForAmount(String cusbankid, Integer extendbiztype,Integer usabletype);
+    AjaxResult<BankCusBankExtendResult> queryBooleanForAmount(String cusbankid, Integer extendbiztype, Integer usabletype, HttpServletRequest request);
 
     boolean checkUserAccountRole(Systemmanager sm, Long userid);
 
@@ -49,11 +49,11 @@ public interface ICommonService {
 
     boolean checkIsAreaSon2(Long areauserid, Long userid);
 
-    AjaxResult<CommonResult> queryCommonFlag(CommonParam commonParam);
+    AjaxResult<CommonResult> queryCommonFlag(CommonParam commonParam, HttpServletRequest request);
 
-    Boolean checkOranCardNumOrMobile(int type, String message,Long userid);
+    Boolean checkOranCardNumOrMobile(int type, String message, Long userid);
 
-    AjaxResult<BankAccountsign> getBankAccountSign(Long accountcode, Integer signstatus);
+    AjaxResult<BankAccountsign> getBankAccountSign(Long accountcode, Integer signstatus, HttpServletRequest request);
 
-    AjaxResult queryMoney(Long accountid, Integer type, Integer mtype);
+    AjaxResult queryMoney(Long accountid, Integer type, Integer mtype, HttpServletRequest request);
 }

+ 3 - 3
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IDealLoginService.java

@@ -9,11 +9,11 @@ import com.muchinfo.mtp3pojos.vo.investor.InvestorLoginQueryResult;
 
 import javax.servlet.http.HttpServletRequest;
 
-public interface IDealLoginService  {
+public interface IDealLoginService {
 
-    PageResult<InvestorLoginQueryResult> queryInvestor(InvestorLoginQueryParam param);
+    PageResult<InvestorLoginQueryResult> queryInvestor(InvestorLoginQueryParam param, HttpServletRequest request);
 
-    PageResult<Userloginflow> queryLoginLog(Long loginid, Integer pageNo, Integer pageSize);
+    PageResult<Userloginflow> queryLoginLog(Long loginid, Integer pageNo, Integer pageSize, HttpServletRequest request);
 
     AjaxResult resetPwd(Long loginid, HttpServletRequest request);
 

+ 2 - 1
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IFuncmenulistService.java

@@ -30,11 +30,12 @@ public interface IFuncmenulistService extends IService<Funcmenulist> {
      * @return
      */
     AjaxResult dealMenus(TreeNode treeNode, HttpServletRequest request);
+
     /**
      * @param resourceCode
      * @return
      */
-    AjaxResult deleteMenus(TreeNode resourceCode);
+    AjaxResult deleteMenus(TreeNode resourceCode, HttpServletRequest request);
 
     List<TreeNode> menuAllList(Integer menuType);
 }

+ 1 - 1
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IOrganService.java

@@ -18,7 +18,7 @@ public interface IOrganService {
 
     AjaxResult<UserAccountVo> getAreaAndAllChilds(HttpServletRequest request);
 
-    AjaxResult<OrganSonDetailResult>  viewson(Long areaid, Integer modifystatus, HttpServletRequest request);
+    AjaxResult<OrganSonDetailResult> viewson(Long areaid, Integer modifystatus, HttpServletRequest request);
 
     AjaxResult rebackChange(Long areaid, HttpServletRequest request);
 

+ 2 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IProfitSharService.java

@@ -19,11 +19,11 @@ public interface IProfitSharService {
 
     AjaxResult memberAdd(ProfitSharMemberParam param, HttpServletRequest request);
 
-    AjaxResult deleteMember(Long userid);
+    AjaxResult deleteMember(Long userid, HttpServletRequest request);
 
     AjaxResult<ProfitSharInitResult> initProfitShar(HttpServletRequest request);
 
     AjaxResult delSOrganSec(ProfitSharSorgansecParam param, HttpServletRequest request);
 
-    AjaxResult deleteSOrganSec(Integer dividefeetype, Long marketid, Long subareagroupid);
+    AjaxResult deleteSOrganSec(Integer dividefeetype, Long marketid, Long subareagroupid, HttpServletRequest request);
 }

+ 8 - 8
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IQueryService.java

@@ -22,21 +22,21 @@ import javax.servlet.http.HttpServletRequest;
 public interface IQueryService {
     PageResult<CommissionSheetResult> commissionSheetQuery(CommissionSheetParam commissionSheetParam, HttpServletRequest request);
 
-    AjaxResult commissionExport(CommissionSheetParam commissionSheetParam ,HttpServletRequest request);
+    AjaxResult commissionExport(CommissionSheetParam commissionSheetParam, HttpServletRequest request);
 
-    AjaxResult<CommissionSheetResultDetail> commissionSheetQueryDetail(String orderId, Integer isHis, String tradeDate);
+    AjaxResult<CommissionSheetResultDetail> commissionSheetQueryDetail(String orderId, Integer isHis, String tradeDate, HttpServletRequest request);
 
-    PageResult<ContractSheetResult> contractSheetQuery(ContractSheetParam contractSheetParam,HttpServletRequest request);
+    PageResult<ContractSheetResult> contractSheetQuery(ContractSheetParam contractSheetParam, HttpServletRequest request);
 
-    AjaxResult contractExport(ContractSheetParam contractSheetParam , HttpServletRequest request);
+    AjaxResult contractExport(ContractSheetParam contractSheetParam, HttpServletRequest request);
 
-    AjaxResult<ContractSheetResultDetail> contractSheetQueryDetail(String tradeid, Integer buyorsell, Integer ishis);
+    AjaxResult<ContractSheetResultDetail> contractSheetQueryDetail(String tradeid, Integer buyorsell, Integer ishis, HttpServletRequest request);
 
     PageResult<PositionSheetResult> positionSheetQuery(PositionSheetParam positionSheetParam, HttpServletRequest request);
 
     AjaxResult positionExport(PositionSheetParam positionSheetParam, HttpServletRequest request);
 
-    AjaxResult<PositionSheetResultDetail> positionSheetDetail(String tradeid, Integer buyorsell, Integer ishis, String histradedate,HttpServletRequest request);
+    AjaxResult<PositionSheetResultDetail> positionSheetDetail(String tradeid, Integer buyorsell, Integer ishis, String histradedate, HttpServletRequest request);
 
     PageResult<PositionSumSheetResult> positionSumSheet(PositionSumSheetParam param, HttpServletRequest request);
 
@@ -52,9 +52,9 @@ public interface IQueryService {
 
     AjaxResult tradeOrderExport(WarehouseContractParam param, HttpServletRequest request);
 
-    AjaxResult<WarehouseContractDetailParam> tradeTradedView(Long wrtradeorderid, Integer ishis,Integer wrtradetype, HttpServletRequest request);
+    AjaxResult<WarehouseContractDetailParam> tradeTradedView(Long wrtradeorderid, Integer ishis, Integer wrtradetype, HttpServletRequest request);
 
-    AjaxResult<WarehouseInitResult> initWarehouse();
+    AjaxResult<WarehouseInitResult> initWarehouse(HttpServletRequest request);
 
     PageResult<WarehouseSumResult> warehouseSum(WarehouseSumParam param, HttpServletRequest request);
 

+ 2 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IReportFormService.java

@@ -13,7 +13,7 @@ public interface IReportFormService {
 
     AjaxResult<RefUserResult> queryRefUserSelect(String searchcode, HttpServletRequest request);
 
-    PageResult<TradeQueryResult> queryTrade(TradeQueryParam param);
+    PageResult<TradeQueryResult> queryTrade(TradeQueryParam param, HttpServletRequest request);
 
     PageResult<OrgReportQueryResult> orgReportQuery(OrgReportQueryParam param, HttpServletRequest request);
 
@@ -31,5 +31,5 @@ public interface IReportFormService {
 
     AjaxResult<ReportPlateformpp> accountppquery(TaAccountReportParam param, HttpServletRequest request);
 
-    AjaxResult<TAAccountChildrenSelect> queryTAAccountChildrenSelect(String searchcode , HttpServletRequest request);
+    AjaxResult<TAAccountChildrenSelect> queryTAAccountChildrenSelect(String searchcode, HttpServletRequest request);
 }

+ 1 - 1
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ISendMsgService.java

@@ -15,7 +15,7 @@ public interface ISendMsgService {
 
     void sendMsg(byte[] byteArray, String topic, Integer funcode);
 
-    void sendSMSConnetion(Integer templateId,String recPhone,List<String> params);
+    void sendSMSConnetion(Integer templateId, String recPhone, List<String> params);
 
     void sendLoginMsg(Set<Long> set_msg, Integer type, Integer ntfmode);
 

+ 2 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ISettlementService.java

@@ -10,13 +10,13 @@ import com.muchinfo.mtp3pojos.vo.settlement.SecondProfitSharResult;
 import javax.servlet.http.HttpServletRequest;
 
 public interface ISettlementService {
-    PageResult<SecondProfitSharResult> sharedayquery(String tradedate,Integer areatype, Integer pageNum, Integer pageSize, HttpServletRequest request);
+    PageResult<SecondProfitSharResult> sharedayquery(String tradedate, Integer areatype, Integer pageNum, Integer pageSize, HttpServletRequest request);
 
     PageResult<SecondProfitSharDetailResult> view(SecondProfitSharDetailParam param, HttpServletRequest request);
 
     AjaxResult export(String tradedate, HttpServletRequest request);
 
-    AjaxResult<ReckonDaydividecount> detail(String tradedate, Integer areatype, Long areaid);
+    AjaxResult<ReckonDaydividecount> detail(String tradedate, Integer areatype, Long areaid, HttpServletRequest request);
 
     AjaxResult batchPay(String areaids, Integer tradedate, HttpServletRequest request);
 }

+ 2 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ISystemRoleService.java

@@ -9,11 +9,11 @@ import javax.servlet.http.HttpServletRequest;
 public interface ISystemRoleService {
     AjaxResult dealRoleMenus(SystemRoleVo systemRoleVo, HttpServletRequest request);
 
-    AjaxResult deleteRoleMenus(SystemRoleVo systemRoleVo);
+    AjaxResult deleteRoleMenus(SystemRoleVo systemRoleVo, HttpServletRequest request);
 
     PageResult<SystemRoleVo> query(Integer type, Integer pageNum, Integer pageSize, HttpServletRequest request);
 
-    AjaxResult<SystemRoleVo> queryDetail(Integer autoId);
+    AjaxResult<SystemRoleVo> queryDetail(Integer autoId, HttpServletRequest request);
 
     AjaxResult<SystemRoleVo> queryByAdd(HttpServletRequest httpServletRequest);
 }

+ 3 - 3
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ISystemmanagerService.java

@@ -22,17 +22,17 @@ import javax.servlet.http.HttpServletRequest;
  */
 public interface ISystemmanagerService extends IService<Systemmanager> {
 
-    AjaxResult getVerifyCode();
+    AjaxResult getVerifyCode(HttpServletRequest request);
 
     AjaxResult loginIn(LoginReq loginReq, HttpServletRequest request, Systemmanager systemmanager);
 
     PageResult<SystemUserResResult> queryUserMsg(HttpServletRequest request, SystemUserReqParam systemUserReqParam);
 
-    AjaxResult<SystemUserResResult> queryDetail(Integer autoId);
+    AjaxResult<SystemUserResResult> queryDetail(Integer autoId, HttpServletRequest request);
 
     AjaxResult dealUserMsg(SystemUserVo systemUserVo, HttpServletRequest request);
 
-    AjaxResult dealUserStatus(SystemUserVo systemUserVo , HttpServletRequest request);
+    AjaxResult dealUserStatus(SystemUserVo systemUserVo, HttpServletRequest request);
 
     AjaxResult<Systemmanager> queryRoleUser(Integer autoId, HttpServletRequest request);
 

+ 2 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/ITaaccountService.java

@@ -26,13 +26,13 @@ public interface ITaaccountService extends IService<Taaccount> {
 
     PageResult<TaAccountAmountStreamResult> queryAmountStream(HttpServletRequest request, TaAccountAmountStreamParam param);
 
-    AjaxResult queryAmountStreamExport(TaAccountAmountStreamParam taAccountAmountStreamParam,HttpServletRequest request);
+    AjaxResult queryAmountStreamExport(TaAccountAmountStreamParam taAccountAmountStreamParam, HttpServletRequest request);
 
     AjaxResult inOrOutAmount(TaAccountInOrOutAmountParam param, HttpServletRequest request);
 
     AjaxResult updateTaAccount(TaAccountUpdateParam param, HttpServletRequest request);
 
-    PageResult<Taaccount> showAccount(Long userid, String accountid,Integer pageNo,Integer pageSize);
+    PageResult<Taaccount> showAccount(Long userid, String accountid, Integer pageNo, Integer pageSize, HttpServletRequest request);
 
     AjaxResult edit(InvestorTaAccountUpdateParam updateParam, HttpServletRequest request);
 

+ 1 - 1
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IUseraccountService.java

@@ -28,7 +28,7 @@ public interface IUseraccountService extends IService<Useraccount> {
 
     PageResult<InvestorModifyResult> queryModifyPage(InvestorModifyParam param, HttpServletRequest request);
 
-    AjaxResult<InvestorPersonalizationResult> accountQuery(Long goodsid, Long accountid);
+    AjaxResult<InvestorPersonalizationResult> accountQuery(Long goodsid, Long accountid, HttpServletRequest request);
 
     AjaxResult modifyAudit(InvestorModifyAuditParam param, HttpServletRequest request);
 

+ 9 - 9
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/IWskhUserinfoService.java

@@ -23,27 +23,27 @@ import java.sql.SQLException;
  */
 public interface IWskhUserinfoService extends IService<WskhUserinfo> {
 
-    PageResult<WskhUserinfo> queryByPage(String username , Integer pageNum, Integer pageSize );
+    PageResult<WskhUserinfo> queryByPage(String username, Integer pageNum, Integer pageSize, HttpServletRequest request);
 
-    AjaxResult<WskhUserinfo> queryDetail(Long userId);
+    AjaxResult<WskhUserinfo> queryDetail(Long userId, HttpServletRequest request);
 
-    AjaxResult addAreainfo(WskhUserinfo wskhUserinfoVo, Systemmanager systemmanager);
+    AjaxResult addAreainfo(WskhUserinfo wskhUserinfoVo, Systemmanager systemmanager, HttpServletRequest request);
 
-    AjaxResult updateAreainfo(WskhUserinfo wskhUserinfoVo, Systemmanager systemmanager);
+    AjaxResult updateAreainfo(WskhUserinfo wskhUserinfoVo, Systemmanager systemmanager, HttpServletRequest request);
 
-    AjaxResult reBack(Long userid);
+    AjaxResult reBack(Long userid, HttpServletRequest request);
 
-    AjaxResult delete(Long userid);
+    AjaxResult delete(Long userid, HttpServletRequest request);
 
     AjaxResult approved(WskhUserinfo vo, HttpServletRequest request);
 
     AjaxResult<WskhUserinfo> querySunDetail(Long userId, HttpServletRequest request);
 
-    PageResult<InvestorQueryResult> queryInvestorPage(InvestorQueryParam investorQueryParam);
+    PageResult<InvestorQueryResult> queryInvestorPage(InvestorQueryParam investorQueryParam, HttpServletRequest request);
 
-    AjaxResult editWskhUserinfo(WskhUserinfo currentVo, Systemmanager systemmanager);
+    AjaxResult editWskhUserinfo(WskhUserinfo currentVo, Systemmanager systemmanager, HttpServletRequest request);
 
-    AjaxResult addWskhUserinfo(WskhUserinfo currentVo, Systemmanager systemmanager);
+    AjaxResult addWskhUserinfo(WskhUserinfo currentVo, Systemmanager systemmanager, HttpServletRequest request);
 
     AjaxResult investorProcess(InvestorProcessParam param, HttpServletRequest request) throws SQLException;
 }

+ 48 - 46
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/BankAccountSignServiceImpl.java

@@ -13,6 +13,7 @@ import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.utils.RedisServiceUtil;
 import com.muchinfo.mtp3common.enumtype.Constants;
 import com.muchinfo.mtp3common.enumtype.FunCodeConstants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.enumtype.SysConstants;
 import com.muchinfo.mtp3common.utils.*;
 import com.muchinfo.mtp3common.vo.*;
@@ -67,12 +68,12 @@ public class BankAccountSignServiceImpl implements IBankAccountSignService {
 
 
     @Override
-    public PageResult<AccountSignQueryResult> query(AccountSignQueryParam accountSignQueryParam) {
-        IPage<AccountSignQueryResult> page = new Page<>(accountSignQueryParam.getPageNum(),accountSignQueryParam.getPageSize());
+    public PageResult<AccountSignQueryResult> query(AccountSignQueryParam accountSignQueryParam,HttpServletRequest request) {
+        IPage<AccountSignQueryResult> page = new Page<>(accountSignQueryParam.getPageNum(), accountSignQueryParam.getPageSize());
         IPage<AccountSignQueryResult> queryResultIPage = iBankAccountsignMapper.selectByParam(page, accountSignQueryParam);
         PageResult<AccountSignQueryResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(queryResultIPage.getPages());
         pageResult.setCurrent(queryResultIPage.getCurrent());
         pageResult.setTotal(queryResultIPage.getTotal());
@@ -84,17 +85,17 @@ public class BankAccountSignServiceImpl implements IBankAccountSignService {
     @Override
     public PageResult<PutOrInAmountQueryResult> queryPutOrIn(PutOrInAmountQueryParam param, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
-        if(systemmanager.getReletype() == 1){
+        if (systemmanager.getReletype() == 1) {
             // 平台,设置areauser 为 null
             param.setAreauserid(null);
-        }else{
+        } else {
             param.setAreauserid(systemmanager.getAreauserid());
         }
-        IPage<PutOrInAmountQueryResult> page = new Page<>(param.getPageNum(),param.getPageSize());
-        IPage<PutOrInAmountQueryResult> resultIPage = iBankAccountoutinapplyMapper.queryPutOrIn(page,param);
+        IPage<PutOrInAmountQueryResult> page = new Page<>(param.getPageNum(), param.getPageSize());
+        IPage<PutOrInAmountQueryResult> resultIPage = iBankAccountoutinapplyMapper.queryPutOrIn(page, param);
         PageResult<PutOrInAmountQueryResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -104,8 +105,8 @@ public class BankAccountSignServiceImpl implements IBankAccountSignService {
     }
 
     @Override
-    public AjaxResult<PutOrInAmountQueryResultDetail> queryPutOrInDetail(String accountcode, String cusbankid, String tradedate, String exchticket) {
-        PutOrInAmountQueryResultDetail resultDetail = iBankAccountoutinapplyMapper.queryById(accountcode,cusbankid,tradedate,exchticket);
+    public AjaxResult<PutOrInAmountQueryResultDetail> queryPutOrInDetail(String accountcode, String cusbankid, String tradedate, String exchticket, HttpServletRequest request) {
+        PutOrInAmountQueryResultDetail resultDetail = iBankAccountoutinapplyMapper.queryById(accountcode, cusbankid, tradedate, exchticket);
         if (StringUtils.isNotBlank(resultDetail.getExtendinfo())) {
             BankSignExtendInfo info = JSON.parseObject(resultDetail.getExtendinfo(), BankSignExtendInfo.class);
             if (info.getCertificate_photo_url() != null && info.getCertificate_photo_url().trim().equals("")) {
@@ -113,7 +114,7 @@ public class BankAccountSignServiceImpl implements IBankAccountSignService {
             }
             resultDetail.setBankSignExtendInfo(info);
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, resultDetail);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), resultDetail);
     }
 
     @Override
@@ -121,33 +122,33 @@ public class BankAccountSignServiceImpl implements IBankAccountSignService {
         try {
             String fileName = "出入金查询_" + DateTimeUtils.getDateTime("yyyyMMdd");
             Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
-            if(systemmanager.getReletype() == 1){
+            if (systemmanager.getReletype() == 1) {
                 // 平台,设置areauser 为 null
                 param.setAreauserid(null);
-            }else{
+            } else {
                 param.setAreauserid(systemmanager.getAreauserid());
             }
             List<PutOrInAmountQueryResult> results = iBankAccountoutinapplyMapper.queryPutOrIn(param);
             ExportResult exportResult = ExportUtil.write(fileName, PutOrInAmountQueryResult.class, results);
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message,exportResult);
-        }catch (Exception e){
-            log.error("出入金查询导出失败,失败原因:"+e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), exportResult);
+        } catch (Exception e) {
+            log.error("出入金查询导出失败,失败原因:" + e);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
     @Override
-    public AjaxResult<BankAccountsignResult> getSignBankById(String accountcode, String cusbankid, String applyexchticket) {
+    public AjaxResult<BankAccountsignResult> getSignBankById(String accountcode, String cusbankid, String applyexchticket, HttpServletRequest request) {
         BankAccountsignResult result = new BankAccountsignResult();
         BankAccountsign bankAccountsign = iBankAccountsignMapper.selectOne(new QueryWrapper<BankAccountsign>()
-                .eq(StringUtils.isNotBlank(accountcode),"ACCOUNTCODE",accountcode)
-                .eq(StringUtils.isNotBlank(cusbankid),"CUSBANKID",cusbankid)
-                .eq(StringUtils.isNotBlank(applyexchticket),"APPLYEXCHTICKET",applyexchticket)
+                .eq(StringUtils.isNotBlank(accountcode), "ACCOUNTCODE", accountcode)
+                .eq(StringUtils.isNotBlank(cusbankid), "CUSBANKID", cusbankid)
+                .eq(StringUtils.isNotBlank(applyexchticket), "APPLYEXCHTICKET", applyexchticket)
         );
-        BankCusbankinfo cus = iBankCusbankinfoMapper.selectOne(new QueryWrapper<BankCusbankinfo>().eq("cusbankid",bankAccountsign.getCusbankid()));
+        BankCusbankinfo cus = iBankCusbankinfoMapper.selectOne(new QueryWrapper<BankCusbankinfo>().eq("cusbankid", bankAccountsign.getCusbankid()));
 
         bankAccountsign.setCusbankname(cus.getCusbankname());
-        bankAccountsign.setBankname(iBankBankinfoMapper.selectOne(new QueryWrapper<BankBankinfo>().eq("BANKID",bankAccountsign.getBankid())).getBankname());
+        bankAccountsign.setBankname(iBankBankinfoMapper.selectOne(new QueryWrapper<BankBankinfo>().eq("BANKID", bankAccountsign.getBankid())).getBankname());
         result.setBankAccountsign(bankAccountsign);
         //处理扩展信息
         String ei = bankAccountsign.getExtendinfo();
@@ -160,11 +161,12 @@ public class BankAccountSignServiceImpl implements IBankAccountSignService {
         //是否可修改签约信息 ---银行卡
         result.setCanmodifysigninfo(cus.getCanmodifysigninfo());
 
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message,result);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), result);
     }
 
     @Override
-    public AjaxResult dealAccountSign(Systemmanager systemmanager, AccountSignParam sign) {
+    public AjaxResult dealAccountSign(HttpServletRequest request, AccountSignParam sign) {
+        Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         Map<String, Object> result = new HashMap<String, Object>();
         Long uuid = SerialNumberUtils.getNewSerialNumber(SerialNumberUtils.prefix_bank);
 
@@ -175,8 +177,8 @@ public class BankAccountSignServiceImpl implements IBankAccountSignService {
             //签约 修改 解绑 绑卡    Operatetype 1-增加; 2-修改; 4-绑卡; 5-解绑; 6-换卡]
             //签约信息修改   调用签约相同接口 变更类型固定为2(operatetype)
             BankAccountsign bankaccountsign = iBankAccountsignMapper.selectOne(new QueryWrapper<BankAccountsign>()
-                    .eq("accountcode",sign.getAccountcode())
-                    .eq("cusbankid",sign.getCusbankid()));
+                    .eq("accountcode", sign.getAccountcode())
+                    .eq("cusbankid", sign.getCusbankid()));
 
             Integer operatetype = sign.getOperatetype();
             if (operatetype == null) {
@@ -195,11 +197,11 @@ public class BankAccountSignServiceImpl implements IBankAccountSignService {
             String manageid = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "001");
             builder.setExchId(manageid);
             builder.setAccountCode(sign.getAccountcode());
-            Taaccount ta = iTaaccountMapper.selectOne(new QueryWrapper<Taaccount>().eq("ACCOUNTID",Long.valueOf(sign.getAccountcode())));
+            Taaccount ta = iTaaccountMapper.selectOne(new QueryWrapper<Taaccount>().eq("ACCOUNTID", Long.valueOf(sign.getAccountcode())));
             // 换为userinfo表的customername签约 -20231031 - dyp
-            Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",ta.getUserid()));
+            Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", ta.getUserid()));
             //builder.setAccountName(ua.getAccountname());
-            Userinfo ui = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid",ta.getUserid()));
+            Userinfo ui = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid", ta.getUserid()));
             builder.setAccountName(ui.getCustomername());
 
             builder.setCusBankID(sign.getCusbankid());
@@ -207,8 +209,8 @@ public class BankAccountSignServiceImpl implements IBankAccountSignService {
             builder.setIsForce(sign.getIsforce() == null ? 0 : sign.getIsforce());
             if (ta.getCurrencyid() != null) {
                 Enumdicitem item = iEnumdicitemMapper.selectOne(new QueryWrapper<Enumdicitem>()
-                        .eq("enumdiccode","currency")
-                        .eq("enumitemname",Long.valueOf(ta.getCurrencyid())));
+                        .eq("enumdiccode", "currency")
+                        .eq("enumitemname", Long.valueOf(ta.getCurrencyid())));
                 builder.setCurrency(item == null ? "" : item.getBankmappedvalue());
             }
             //转换代码
@@ -231,8 +233,8 @@ public class BankAccountSignServiceImpl implements IBankAccountSignService {
             } else {
                 builder.setBankAccountNo(sign.getBankaccountno());
                 builder.setBankAccountName(sign.getBankaccountname());
-                builder.setCertID(sign.getCertid() != null ? sign.getCertid() : "" );
-                builder.setCertType(sign.getCerttype() != null ? String.valueOf(sign.getCerttype()) :"");
+                builder.setCertID(sign.getCertid() != null ? sign.getCertid() : "");
+                builder.setCertType(sign.getCerttype() != null ? String.valueOf(sign.getCerttype()) : "");
                 builder.setMobilePhone(sign.getMobilephone());
             }
 
@@ -269,8 +271,8 @@ public class BankAccountSignServiceImpl implements IBankAccountSignService {
             //解约
             BankMI1.t2bBankCancelSignReq.Builder builder = BankMI1.t2bBankCancelSignReq.newBuilder();
             BankAccountsign bankaccountsign = iBankAccountsignMapper.selectOne(new QueryWrapper<BankAccountsign>()
-                    .eq("accountcode",sign.getAccountcode())
-                    .eq("cusbankid",sign.getCusbankid()));
+                    .eq("accountcode", sign.getAccountcode())
+                    .eq("cusbankid", sign.getCusbankid()));
             Common.MessageHead.Builder hd = Common.MessageHead.newBuilder();
             hd.setUUID(uuid.toString());
             hd.setAccountID(Long.valueOf(sign.getAccountcode()));
@@ -303,25 +305,25 @@ public class BankAccountSignServiceImpl implements IBankAccountSignService {
                             if (rsp_.getStatus() == 0) {
                                 writelog(sign, 0, systemmanager);
                                 if (sign.getOperatetype() != null && sign.getOperatetype() == 2) {
-                                    return AjaxResult.success(Constants.Success_Code_Design, "修改成功", rsp_.getNetAddr());
+                                    return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"), rsp_.getNetAddr());
                                 } else {
-                                    return AjaxResult.success(Constants.Success_Code_Design, "签约成功", rsp_.getNetAddr());
+                                    return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM004.getCode(), request.getHeader("Accept-Language"), rsp_.getNetAddr());
                                 }
                             } else if (rsp_.getStatus() == 6007 || rsp_.getStatus() == 6001) {
-                                return AjaxResult.success(Constants.Success_Code_Design, ProtoErrorCodes.resultMsg(rsp_.getStatus()), rsp_.getNetAddr());
+                                return AjaxResult.success(rsp_.getStatus(), ProtoErrorCodes.resultMsg(rsp_.getStatus()), "", rsp_.getNetAddr());
                             } else {
-                                return AjaxResult.error(Constants.Error_Code_Design,ProtoErrorCodes.resultMsg(rsp_.getStatus()) + ";" + rsp_.getCenterErrMsg(), rsp_.getNetAddr());
+                                return AjaxResult.error(Constants.Error_Code_Design, ProtoErrorCodes.resultMsg(rsp_.getStatus()) + ";" + rsp_.getCenterErrMsg(), "", rsp_.getNetAddr());
                             }
                         }
                         case 1: {
                             BankMI1.t2bBankCancelSignRsp rsp_ = (BankMI1.t2bBankCancelSignRsp) rsp;
                             if (rsp_.getStatus() == 0) {
                                 writelog(sign, 1, systemmanager);
-                                return AjaxResult.success(Constants.Success_Code_Design, "解约成功", rsp_.getNetAddr());
+                                return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM005.getCode(), request.getHeader("Accept-Language"), rsp_.getNetAddr());
                             } else if (rsp_.getStatus() == 6007 || rsp_.getStatus() == 6001) {
-                                return AjaxResult.success(Constants.Success_Code_Design, ProtoErrorCodes.resultMsg(rsp_.getStatus()), rsp_.getNetAddr());
+                                return AjaxResult.success(rsp_.getStatus(), ProtoErrorCodes.resultMsg(rsp_.getStatus()), "", rsp_.getNetAddr());
                             } else {
-                                return AjaxResult.error(Constants.Error_Code_Design,ProtoErrorCodes.resultMsg(rsp_.getStatus()) + ";" + rsp_.getCenterErrMsg(), rsp_.getNetAddr());
+                                return AjaxResult.error(Constants.Error_Code_Design, ProtoErrorCodes.resultMsg(rsp_.getStatus()) + ";" + rsp_.getCenterErrMsg(), "", rsp_.getNetAddr());
                             }
                         }
                         default:
@@ -329,11 +331,11 @@ public class BankAccountSignServiceImpl implements IBankAccountSignService {
                     }
 
                 } else {
-                    return AjaxResult.error(Constants.Error_Code_Design, "您的申请已提交,请稍后查询结果。");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM005.getCode(), request.getHeader("Accept-Language"));
                 }
             } catch (InterruptedException e) {
                 e.printStackTrace();
-                log.error("处理银行签约信息失败,失败信息:"+e);
+                log.error("处理银行签约信息失败,失败信息:" + e);
             } finally {
                 SerialNumberUtils.lockMap.remove(uuid);
             }
@@ -363,7 +365,7 @@ public class BankAccountSignServiceImpl implements IBankAccountSignService {
             syslog.setRemark("");
             iSystemmanagerlogMapper.insert(syslog);
         } catch (Exception ex) {
-            log.error("资金账户管理--> 银行签约模块报错。失败原因:"+ex.getMessage());
+            log.error("资金账户管理--> 银行签约模块报错。失败原因:" + ex.getMessage());
         }
     }
 }

+ 32 - 35
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/CommonServiceImpl.java

@@ -7,9 +7,7 @@ import com.muchinfo.mtp.proto.Common;
 import com.muchinfo.mtp.proto.QuoteMI1;
 import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.utils.RedisServiceUtil;
-import com.muchinfo.mtp3common.enumtype.Constants;
-import com.muchinfo.mtp3common.enumtype.SysConstants;
-import com.muchinfo.mtp3common.enumtype.SysEnums;
+import com.muchinfo.mtp3common.enumtype.*;
 import com.muchinfo.mtp3common.vo.AjaxResult;
 import com.muchinfo.mtp3common.utils.JwtUtil;
 import com.muchinfo.mtp3interface.mapper.*;
@@ -27,7 +25,6 @@ import org.springframework.amqp.core.MessageProperties;
 import org.springframework.amqp.rabbit.core.RabbitTemplate;
 import org.springframework.stereotype.Service;
 import com.muchinfo.mtp3common.utils.SerialNumberUtils;
-import com.muchinfo.mtp3common.enumtype.FunCodeConstants;
 import com.muchinfo.mtp3common.vo.Calculator;
 import com.muchinfo.mtp3common.vo.ProtoHelper;
 import org.springframework.util.FileCopyUtils;
@@ -117,9 +114,9 @@ public class CommonServiceImpl implements ICommonService {
     }
 
     @Override
-    public AjaxResult<OrganSelectResult> queryOrganSelect(OrganSelectParam vo) {
+    public AjaxResult<OrganSelectResult> queryOrganSelect(OrganSelectParam vo, HttpServletRequest request) {
         List<OrganSelectResult> organSelectVo = iUseraccountMapper.queryOrganSelect(vo);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, organSelectVo);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), organSelectVo);
     }
 
     @Override
@@ -161,9 +158,9 @@ public class CommonServiceImpl implements ICommonService {
             }
         } catch (Exception e) {
             logger.error("文件上传失败,失败原因=" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.File_Error_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM004.getCode(), request.getHeader("Accept-Language"));
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, res);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), res);
     }
 
     /**
@@ -173,43 +170,43 @@ public class CommonServiceImpl implements ICommonService {
      */
 
     @Override
-    public AjaxResult getEnumType(String typeCode) {
+    public AjaxResult getEnumType(String typeCode, HttpServletRequest request) {
         List<Enumdicitem> enumdicitems = iEnumdicitemMapper.selectList(new QueryWrapper<Enumdicitem>().eq("ENUMDICCODE", typeCode));
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, enumdicitems);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), enumdicitems);
     }
 
     @Override
-    public AjaxResult<InvestorSelectResult> queryInvestorSelect(InvestorSelectParam investorSelectParam) {
+    public AjaxResult<InvestorSelectResult> queryInvestorSelect(InvestorSelectParam investorSelectParam, HttpServletRequest request) {
         List<InvestorSelectResult> investorSelectResults = iUseraccountMapper.queryInvestorSelect(investorSelectParam);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, investorSelectResults);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), investorSelectResults);
     }
 
     @Override
-    public AjaxResult<BankAccountsign> getSignBank() {
+    public AjaxResult<BankAccountsign> getSignBank(HttpServletRequest request) {
         List<BankAccountsign> bankAccountsignList = iBankAccountsignMapper.selectList(new QueryWrapper<>());
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, bankAccountsignList);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), bankAccountsignList);
     }
 
     @Override
-    public AjaxResult<CusBankInfoResult> getBankInfoByCusBank(String cusBankId, String bankName) {
+    public AjaxResult<CusBankInfoResult> getBankInfoByCusBank(String cusBankId, String bankName, HttpServletRequest request) {
         List<CusBankInfoResult> cusBankInfoResults = iBankCusbankinfoMapper.getBankInfoByCusBank(cusBankId, bankName);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, cusBankInfoResults);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), cusBankInfoResults);
     }
 
     @Override
-    public AjaxResult<TAAccountChildrenResult> queryTAAccountChildren(String accountName, Long areaUserId) {
+    public AjaxResult<TAAccountChildrenResult> queryTAAccountChildren(String accountName, Long areaUserId, HttpServletRequest request) {
         List<TAAccountChildrenResult> results = iTaaccountMapper.queryTAAccountChildren(accountName, areaUserId);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, results);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), results);
     }
 
     @Override
-    public AjaxResult<GoodsSelectResult> queryGoodsSelect(String goodsStatusIds, String marketId, String searchCode) {
+    public AjaxResult<GoodsSelectResult> queryGoodsSelect(String goodsStatusIds, String marketId, String searchCode, HttpServletRequest request) {
         List<GoodsSelectResult> goodsSelectResults = iGoodsMapper.queryGoodsSelect(goodsStatusIds, marketId, searchCode);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, goodsSelectResults);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), goodsSelectResults);
     }
 
     @Override
-    public AjaxResult<Market> getOrderListAll(List<Long> markets) {
+    public AjaxResult<Market> getOrderListAll(List<Long> markets, HttpServletRequest request) {
         QueryWrapper<Market> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("markettype", 2)
                 .eq("marketstatus", SysEnums.EnumMarketStatus.NORMAL.getType());
@@ -220,13 +217,13 @@ public class CommonServiceImpl implements ICommonService {
         }
         //收益权  所有权  期权 币交易
         List<Market> marketList = iMarketMapper.selectList(queryWrapper);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, marketList);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), marketList);
     }
 
     @Override
-    public AjaxResult<InvestorSelectResult> getOrganListAll(Long userId, String searchCode) {
+    public AjaxResult<InvestorSelectResult> getOrganListAll(Long userId, String searchCode, HttpServletRequest request) {
         List<InvestorSelectResult> results = iUseraccountMapper.getOrganListAll(userId, searchCode);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, results);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), results);
     }
 
     @Override
@@ -296,15 +293,15 @@ public class CommonServiceImpl implements ICommonService {
     }
 
     @Override
-    public AjaxResult<BankCusbankinfo> getAllBankCus() {
+    public AjaxResult<BankCusbankinfo> getAllBankCus(HttpServletRequest request) {
         List<BankCusbankinfo> cusbankinfos = iBankCusbankinfoMapper.selectList(new QueryWrapper<>());
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, cusbankinfos);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), cusbankinfos);
     }
 
     @Override
-    public AjaxResult<BankCusBankExtendResult> queryBooleanForAmount(String cusbankid, Integer extendbiztype, Integer usabletype) {
+    public AjaxResult<BankCusBankExtendResult> queryBooleanForAmount(String cusbankid, Integer extendbiztype, Integer usabletype, HttpServletRequest request) {
         List<BankCusBankExtendResult> biztypeList = iBankCusbankinfoMapper.queryFieldById(cusbankid, extendbiztype, usabletype);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, biztypeList);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), biztypeList);
     }
 
     //生成新的文件名
@@ -384,7 +381,7 @@ public class CommonServiceImpl implements ICommonService {
     }
 
     @Override
-    public AjaxResult<BankAccountsign> getBankAccountSign(Long accountcode, Integer signstatus) {
+    public AjaxResult<BankAccountsign> getBankAccountSign(Long accountcode, Integer signstatus, HttpServletRequest request) {
         List<BankAccountsign> bankAccountsign = iBankAccountsignMapper.selectList(new QueryWrapper<BankAccountsign>()
                 .eq(accountcode != null, "ACCOUNTCODE", accountcode)
                 .eq(signstatus != null, "signstatus", signstatus)
@@ -393,11 +390,11 @@ public class CommonServiceImpl implements ICommonService {
             a.setCusbankname(iBankCusbankinfoMapper.selectOne(new QueryWrapper<BankCusbankinfo>().eq("cusbankid", a.getCusbankid())).getCusbankname());
             a.setBankname(iBankBankinfoMapper.selectOne(new QueryWrapper<BankBankinfo>().eq("BANKID", a.getBankid())).getBankname());
         });
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, bankAccountsign);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), bankAccountsign);
     }
 
     @Override
-    public AjaxResult queryMoney(Long accountid, Integer type, Integer mtype) {
+    public AjaxResult queryMoney(Long accountid, Integer type, Integer mtype, HttpServletRequest request) {
         Map<String, Object> result = new HashMap<>();
         Long id = accountid;
         if (type == 2) {
@@ -450,13 +447,13 @@ public class CommonServiceImpl implements ICommonService {
                 SerialNumberUtils.lockMap.remove(uuid);
             }
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, result);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), result);
     }
 
     @Override
-    public AjaxResult<CommonResult> queryCommonFlag(CommonParam commonParam) {
+    public AjaxResult<CommonResult> queryCommonFlag(CommonParam commonParam, HttpServletRequest request) {
         CommonResult commonResult = new CommonResult();
-        if(commonParam.getAccountid() != null){
+        if (commonParam.getAccountid() != null) {
             //获取资金管理银行签约账户类型控制枚举
             Taaccount ta = iTaaccountMapper.selectOne(new QueryWrapper<Taaccount>().eq("accountid", commonParam.getAccountid()));
             // 客户信息放条件外 -- 20231009 对未签约信息修改时,若修改了用户信息,证件号等还是会取未签约里的内容
@@ -470,6 +467,6 @@ public class CommonServiceImpl implements ICommonService {
         //获取市场交易日期
         Marketrun mr = iMarketrunMapper.selectOne(new QueryWrapper<Marketrun>().eq("marketid", 0L));
         commonResult.setTradedate(mr.getTradedate());
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, commonResult);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), commonResult);
     }
 }

+ 22 - 21
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/DealLoginServiceImpl.java

@@ -12,6 +12,7 @@ import com.muchinfo.mtp3century.service.ISendMsgService;
 import com.muchinfo.mtp3century.utils.RedisServiceUtil;
 import com.muchinfo.mtp3common.enumtype.Constants;
 import com.muchinfo.mtp3common.enumtype.FunCodeConstants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.enumtype.SysConstants;
 import com.muchinfo.mtp3common.utils.*;
 import com.muchinfo.mtp3common.vo.AjaxResult;
@@ -66,14 +67,14 @@ public class DealLoginServiceImpl implements IDealLoginService {
 
 
     @Override
-    public PageResult<InvestorLoginQueryResult> queryInvestor(InvestorLoginQueryParam param) {
+    public PageResult<InvestorLoginQueryResult> queryInvestor(InvestorLoginQueryParam param, HttpServletRequest request) {
         param.setLoginusertype(1);
         IPage<InvestorLoginQueryResult> page = new Page<>(param.getPageNo(), param.getPageSize());
         IPage<InvestorLoginQueryResult> resultIPage = iLoginaccountMapper.queryLoginAccountPage(page, param);
         //返回列表
         PageResult<InvestorLoginQueryResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -83,13 +84,13 @@ public class DealLoginServiceImpl implements IDealLoginService {
     }
 
     @Override
-    public PageResult<Userloginflow> queryLoginLog(Long loginid, Integer pageNo, Integer pageSize) {
+    public PageResult<Userloginflow> queryLoginLog(Long loginid, Integer pageNo, Integer pageSize, HttpServletRequest request) {
         IPage<Userloginflow> page = new Page<>(pageNo, pageSize);
         IPage<Userloginflow> resultPage = iUserloginflowMapper.selectPage(page, new QueryWrapper<Userloginflow>().eq("loginid", loginid));
         //返回列表
         PageResult<Userloginflow> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultPage.getPages());
         pageResult.setCurrent(resultPage.getCurrent());
         pageResult.setTotal(resultPage.getTotal());
@@ -103,19 +104,19 @@ public class DealLoginServiceImpl implements IDealLoginService {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         Loginaccount la = iLoginaccountMapper.selectOne(new QueryWrapper<Loginaccount>().eq("loginid", loginid));
         if (!checkLoginaccountRole(systemmanager, loginid)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
         dealPwd(loginid, redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "046"), systemmanager, la);
         //发送消息
         sendMsg(la, 2);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
     public AjaxResult lockAccount(Long loginid, Integer status, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (!checkLoginaccountRole(systemmanager, loginid)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
 
         Loginaccount la = iLoginaccountMapper.selectOne(new QueryWrapper<Loginaccount>().eq("loginid", loginid));
@@ -156,12 +157,12 @@ public class DealLoginServiceImpl implements IDealLoginService {
                     if (rsp != null) {
                         SystemMI1.LoginStatusOperRsp rsp_ = (SystemMI1.LoginStatusOperRsp) rsp;
                         if (rsp_.getRetCode() == 0) {
-                            return AjaxResult.success(Constants.Success_Code_Design, "修改成功");
+                            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
                         } else {
-                            return AjaxResult.error(Constants.Error_Code_Design, ProtoErrorCodes.resultMsg(rsp_.getRetCode()));
+                            return AjaxResult.error(Constants.Error_Code_Design, ProtoErrorCodes.resultMsg(rsp_.getRetCode()), "");
                         }
                     } else {
-                        return AjaxResult.error(Constants.Error_Code_Design, "请求超时,请稍后重试");
+                        return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM006.getCode(), request.getHeader("Accept-Language"));
                     }
                 } catch (InterruptedException e) {
                     e.printStackTrace();
@@ -178,14 +179,14 @@ public class DealLoginServiceImpl implements IDealLoginService {
     public AjaxResult deleteAccount(Long loginid, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (!checkLoginaccountRole(systemmanager, loginid)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
         Loginaccount la = iLoginaccountMapper.selectOne(new QueryWrapper<Loginaccount>().eq("loginid", loginid));
         if (Objects.nonNull(la)) {
             la.setLoginstatus(3);
             la.setModifierid(systemmanager.getAutoid());
             la.setModifytime(new Date());
-            iLoginaccountMapper.update(la,new QueryWrapper<Loginaccount>().eq("loginid", la.getLoginid()));
+            iLoginaccountMapper.update(la, new QueryWrapper<Loginaccount>().eq("loginid", la.getLoginid()));
             writelog(la, systemmanager, SysConstants.BUTTON_CODE_DEL);
         }
 
@@ -193,23 +194,23 @@ public class DealLoginServiceImpl implements IDealLoginService {
         List<Userauthinfo> userauthinfo = iUserauthinfoMapper.selectList(new QueryWrapper<Userauthinfo>().eq("loginid", loginid));
         userauthinfo.forEach(a -> {
             a.setIsvalid(0);
-            iUserauthinfoMapper.update(a,new QueryWrapper<Userauthinfo>()
-                    .eq("authid",a.getAuthid())
-                    .eq("authtype",a.getAuthtype()));
+            iUserauthinfoMapper.update(a, new QueryWrapper<Userauthinfo>()
+                    .eq("authid", a.getAuthid())
+                    .eq("authtype", a.getAuthtype()));
         });
 
         // 删除”LoginTAAccount”表相关记录
         iLogintaaccountMapper.delete(new QueryWrapper<Logintaaccount>().eq("loginid", loginid));
         //发送消息
         sendMsg(la, 1);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
     public AjaxResult restoreAccount(Long loginid, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (!checkLoginaccountRole(systemmanager, loginid)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
 
         Loginaccount la = iLoginaccountMapper.selectOne(new QueryWrapper<Loginaccount>().eq("loginid", loginid));
@@ -217,7 +218,7 @@ public class DealLoginServiceImpl implements IDealLoginService {
             la.setLoginstatus(1);
             la.setModifierid(systemmanager.getAutoid());
             la.setModifytime(new Date());
-            iLoginaccountMapper.update(la,new QueryWrapper<Loginaccount>().eq("loginid", la.getLoginid()));
+            iLoginaccountMapper.update(la, new QueryWrapper<Loginaccount>().eq("loginid", la.getLoginid()));
             writelog(la, systemmanager, SysConstants.BUTTON_CODE_ACTIVE);
         }
 
@@ -241,7 +242,7 @@ public class DealLoginServiceImpl implements IDealLoginService {
                 iUserauthinfoMapper.insert(newObj);
             }
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
@@ -270,7 +271,7 @@ public class DealLoginServiceImpl implements IDealLoginService {
         userAuthInfo.setOpentype(sysParam != null ? sysParam : "0");
         //记录日志
         systemmanagerService.saveMGLog(systemmanager, SysConstants.PART_INVESTOR_MANAGE, userId);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, userAuthInfo);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), userAuthInfo);
     }
 
     private void sendMsg(Loginaccount la, int type) {
@@ -303,7 +304,7 @@ public class DealLoginServiceImpl implements IDealLoginService {
             la.setModifierid(user.getAutoid());
             la.setModifytime(new Date());
 
-            iLoginaccountMapper.update(la,new QueryWrapper<Loginaccount>().eq("loginid", la.getLoginid()));
+            iLoginaccountMapper.update(la, new QueryWrapper<Loginaccount>().eq("loginid", la.getLoginid()));
             writelog(la, user, SysConstants.BUTTON_CODE_RESET);
         }
 

+ 15 - 14
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/FuncmenulistServiceImpl.java

@@ -6,6 +6,7 @@ import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.service.IFuncmenulistService;
 import com.muchinfo.mtp3century.vo.TreeNode;
 import com.muchinfo.mtp3common.enumtype.Constants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.enumtype.SysConstantsEnum;
 import com.muchinfo.mtp3common.vo.AjaxResult;
 import com.muchinfo.mtp3interface.mapper.IFuncmenulistMapper;
@@ -57,8 +58,8 @@ public class FuncmenulistServiceImpl extends ServiceImpl<IFuncmenulistMapper, Fu
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
 
         //处理菜单数据,存在修改,不存在新增
-        Funcmenulist currentFuncmenulist = iFuncmenulistMapper.selectOne(new QueryWrapper<Funcmenulist>().eq("RESOURCECODE",treeNode.getResourceCode()));
-        if(Objects.isNull(currentFuncmenulist)){
+        Funcmenulist currentFuncmenulist = iFuncmenulistMapper.selectOne(new QueryWrapper<Funcmenulist>().eq("RESOURCECODE", treeNode.getResourceCode()));
+        if (Objects.isNull(currentFuncmenulist)) {
             Funcmenulist funcmenulist = Funcmenulist.builder()
                     .resourcecode(treeNode.getResourceCode())
                     .parentcode(treeNode.getParentCode())
@@ -86,7 +87,7 @@ public class FuncmenulistServiceImpl extends ServiceImpl<IFuncmenulistMapper, Fu
                         .build();
                 iRolefuncmenuMapper.insert(rolefuncmenu);
 
-                if(systemmanager.getReletype() != 1){
+                if (systemmanager.getReletype() != 1) {
                     Rolefuncmenu current = Rolefuncmenu.builder()
                             .roleid(1L)
                             .resourcecode(treeNode.getResourceCode())
@@ -94,7 +95,7 @@ public class FuncmenulistServiceImpl extends ServiceImpl<IFuncmenulistMapper, Fu
                     iRolefuncmenuMapper.insert(current);
                 }
             }
-        }else{
+        } else {
             currentFuncmenulist.setResourcename(treeNode.getTitle());
             currentFuncmenulist.setMenutype(SysConstantsEnum.SYS_TYPE_MANAGE_NEW.getCode());
             currentFuncmenulist.setParentcode(treeNode.getParentCode());
@@ -107,20 +108,20 @@ public class FuncmenulistServiceImpl extends ServiceImpl<IFuncmenulistMapper, Fu
             currentFuncmenulist.setAuthtype(treeNode.getAuthType());
             currentFuncmenulist.setRemark(treeNode.getRemark());
             currentFuncmenulist.setHidden(treeNode.getShow());
-            iFuncmenulistMapper.update(currentFuncmenulist,new QueryWrapper<Funcmenulist>().eq("RESOURCECODE",currentFuncmenulist.getResourcecode()));
+            iFuncmenulistMapper.update(currentFuncmenulist, new QueryWrapper<Funcmenulist>().eq("RESOURCECODE", currentFuncmenulist.getResourcecode()));
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
-    public AjaxResult deleteMenus(TreeNode treeNode) {
+    public AjaxResult deleteMenus(TreeNode treeNode, HttpServletRequest request) {
         deleteAllMenus(treeNode);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
     public List<TreeNode> menuAllList(Integer menuType) {
-        List<Funcmenulist> funcmenulists = iFuncmenulistMapper.selectList(new QueryWrapper<Funcmenulist>().eq("MENUTYPE",menuType));
+        List<Funcmenulist> funcmenulists = iFuncmenulistMapper.selectList(new QueryWrapper<Funcmenulist>().eq("MENUTYPE", menuType));
         return changeMenuToTreeNode(funcmenulists);
     }
 
@@ -131,12 +132,12 @@ public class FuncmenulistServiceImpl extends ServiceImpl<IFuncmenulistMapper, Fu
         Collection<? extends GrantedAuthority> authorities = authentication.getAuthorities();
         for (GrantedAuthority authority : authorities) {
             iRolefuncmenuMapper.delete(new QueryWrapper<Rolefuncmenu>()
-                    .eq("ROLEID",Long.parseLong(authority.getAuthority()))
+                    .eq("ROLEID", Long.parseLong(authority.getAuthority()))
                     .eq("RESOURCECODE", treeNode.getResourceCode()));
         }
 
-        List<Funcmenulist> funcmenulist = iFuncmenulistMapper.selectList(new QueryWrapper<Funcmenulist>().eq("PARENTCODE",treeNode.getResourceCode()));
-        if(!CollectionUtils.isEmpty(funcmenulist)){
+        List<Funcmenulist> funcmenulist = iFuncmenulistMapper.selectList(new QueryWrapper<Funcmenulist>().eq("PARENTCODE", treeNode.getResourceCode()));
+        if (!CollectionUtils.isEmpty(funcmenulist)) {
             funcmenulist.forEach(a -> {
                 deleteAllMenus(TreeNode.builder().resourceCode(a.getResourcecode()).build());
             });
@@ -183,7 +184,7 @@ public class FuncmenulistServiceImpl extends ServiceImpl<IFuncmenulistMapper, Fu
                 //添加菜单
                 if (node_.getChildren() != null && !node_.getChildren().isEmpty()) {
                     node.add(node_);
-                }else if(StringUtils.isEmpty(node_.getParentCode())){
+                } else if (StringUtils.isEmpty(node_.getParentCode())) {
                     node.add(node_);
                 }
             }
@@ -228,7 +229,7 @@ public class FuncmenulistServiceImpl extends ServiceImpl<IFuncmenulistMapper, Fu
                 nodechilds.add(node);
             }
             parent.setChildren(nodechilds);
-        }else {
+        } else {
             parent.setChildren(new ArrayList<>());
         }
     }

+ 37 - 39
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/IOrganServiceImpl.java

@@ -14,11 +14,8 @@ import com.muchinfo.mtp3century.service.IOrganService;
 import com.muchinfo.mtp3century.service.ISendMsgService;
 import com.muchinfo.mtp3century.utils.RedisServiceUtil;
 import com.muchinfo.mtp3century.utils.SequenceIDGeneratorUtils;
-import com.muchinfo.mtp3common.enumtype.Constants;
-import com.muchinfo.mtp3common.enumtype.SysConstants;
+import com.muchinfo.mtp3common.enumtype.*;
 import com.muchinfo.mtp3common.utils.*;
-import com.muchinfo.mtp3common.enumtype.FunCodeConstants;
-import com.muchinfo.mtp3common.enumtype.SysEnums;
 import com.muchinfo.mtp3common.vo.AjaxResult;
 import com.muchinfo.mtp3common.vo.PageResult;
 import com.muchinfo.mtp3common.vo.ProtoHelper;
@@ -111,7 +108,7 @@ public class IOrganServiceImpl implements IOrganService {
         }
         PageResult<UserAccountVo> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(userAccountVos.getPages());
         pageResult.setCurrent(userAccountVos.getCurrent());
         pageResult.setTotal(userAccountVos.getTotal());
@@ -143,7 +140,7 @@ public class IOrganServiceImpl implements IOrganService {
         IPage<UserAccountVo> userAccountVos = iUseraccountMapper.querySonOrganPage(page, param);
         PageResult<UserAccountVo> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(userAccountVos.getPages());
         pageResult.setCurrent(userAccountVos.getCurrent());
         pageResult.setTotal(userAccountVos.getTotal());
@@ -165,7 +162,7 @@ public class IOrganServiceImpl implements IOrganService {
             userAccountVo.setMaxLevel(Math.min(7, Integer.parseInt(maxLev.toString())));
             userAccountVo.setParentid(systemmanager.getAreauserid());
 
-            Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",systemmanager.getAreauserid()));
+            Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", systemmanager.getAreauserid()));
             Integer level = iUseraccountMapper.querySonOrganLevel(ua.getUserid(), ua.getMemberuserid());
             userAccountVo.setSubarealevel(level);
             userAccountVo.setCuruserid(ua.getUserid());
@@ -184,7 +181,7 @@ public class IOrganServiceImpl implements IOrganService {
                 userAccountVo.setPathname(iDivisionMapper.selectAreaPathName(userinfo.getDistrictid()) + userinfo.getAddress());
             }
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, result);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), result);
     }
 
     @Override
@@ -215,10 +212,10 @@ public class IOrganServiceImpl implements IOrganService {
                 && "1".equals(sp1)) {
             result.setOldResult(getUserAccountDetail(areaid, result));
             result.setNewResult(getModifyInvestorDetail(areaid));
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, result);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), result);
         } else {
             result.setOldResult(getUserAccountDetail(areaid, result));
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, result);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), result);
         }
     }
 
@@ -226,7 +223,7 @@ public class IOrganServiceImpl implements IOrganService {
     public AjaxResult rebackChange(Long areaid, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (!iCommonService.checkUserAccountRole(systemmanager, areaid)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
 
         iDraftUseraccountNewMapper.delete(new QueryWrapper<DraftUseraccountNew>().eq("userid", areaid));
@@ -247,7 +244,7 @@ public class IOrganServiceImpl implements IOrganService {
             systemmanagerService.writeOperateLog(SysConstants.PART_INVESTOR_MANAGE, "撤回id=" + organ.getUserid(), systemmanager, null, null, null);
         }
 
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
@@ -258,7 +255,7 @@ public class IOrganServiceImpl implements IOrganService {
         if (org.getUsertype() != 5) {
             List<Arearole> list2 = iArearoleMapper.selectList(new QueryWrapper<Arearole>().eq("userid", areaid));
             if (CollectionUtils.isNotEmpty(list2)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "已分配角色,无法注销");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_001.getCode(), request.getHeader("Accept-Language"));
             }
 
             List<Useraccount> list = iUseraccountMapper.selectList(new QueryWrapper<Useraccount>()
@@ -267,7 +264,7 @@ public class IOrganServiceImpl implements IOrganService {
                     .in("usertype", 3, 4)
             );
             if (CollectionUtils.isNotEmpty(list)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "存在下级机构,无法注销");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_002.getCode(), request.getHeader("Accept-Language"));
             }
             if (org.getUsertype() == 4) {
                 list = iUseraccountMapper.selectList(new QueryWrapper<Useraccount>()
@@ -275,7 +272,7 @@ public class IOrganServiceImpl implements IOrganService {
                         .eq("broker", areaid)
                         .eq("accountstatus", 4));
                 if (CollectionUtils.isNotEmpty(list)) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "存在下级投资者,无法注销");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_003.getCode(), request.getHeader("Accept-Language"));
                 }
             } else {
                 list = iUseraccountMapper.selectList(new QueryWrapper<Useraccount>()
@@ -283,7 +280,7 @@ public class IOrganServiceImpl implements IOrganService {
                         .eq("accountstatus", 4)
                         .eq("usertype", 5));
                 if (CollectionUtils.isNotEmpty(list)) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "存在下级投资者,无法注销");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_003.getCode(), request.getHeader("Accept-Language"));
                 }
             }
         } else {
@@ -292,11 +289,11 @@ public class IOrganServiceImpl implements IOrganService {
                     .gt("currentbalance", 0)
             );
             if (CollectionUtils.isNotEmpty(taList)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "有剩余资金,无法注销");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_004.getCode(), request.getHeader("Accept-Language"));
             }
             List<Tradeposition> tpList = iTradepositionMapper.queryAmount(areaid);
             if (CollectionUtils.isNotEmpty(tpList)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "有剩余持仓,无法注销");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
             }
         }
 
@@ -375,14 +372,14 @@ public class IOrganServiceImpl implements IOrganService {
                 .eq("ismain", 1));
         iSendMsgService.sendM2BUnregistCustomerInfo(tas);
 
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
     public AjaxResult recover(Long areaid, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (!iCommonService.checkUserAccountRole(systemmanager, areaid)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
         Useraccount org = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", areaid));
         Userinfo ui = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid", areaid));
@@ -390,23 +387,23 @@ public class IOrganServiceImpl implements IOrganService {
         List<Userinfo> uiList = iUserinfoMapper.selectList(new QueryWrapper<Userinfo>()
                 .eq("userstatus", 1)
                 .ne("userid", ui.getUserid())
-                .and(a -> a.eq("cardnum", ui.getCardnum()).or().eq(StringUtils.isNotBlank( ui.getMobile()),"mobile", ui.getMobile()))
+                .and(a -> a.eq("cardnum", ui.getCardnum()).or().eq(StringUtils.isNotBlank(ui.getMobile()), "mobile", ui.getMobile()))
         );
         if (CollectionUtils.isNotEmpty(uiList)) {
             for (int i = 0; i < uiList.size(); i++) {
                 if (uiList.get(i).getCardnum().equals(ui.getCardnum())) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在正常记录,无法恢复");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
                 }
                 //5 投资者
                 if (org.getUsertype() == 5 && uiList.get(i).getMobile().equals(ui.getMobile())) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "手机号已存在正常记录,无法恢复");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_007.getCode(), request.getHeader("Accept-Language"));
                 }
             }
         }
         if (org.getParentuserid() != 0) {
             Useraccount p = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", org.getParentuserid()));
             if (p.getAccountstatus() != 4) {
-                return AjaxResult.error(Constants.Error_Code_Design, "上级机构为非正常状态,无法恢复");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_008.getCode(), request.getHeader("Accept-Language"));
             }
         }
         //所属会员是否有经纪角色
@@ -415,7 +412,7 @@ public class IOrganServiceImpl implements IOrganService {
                     .eq("roletype", 7)
                     .eq("userid", org.getMemberuserid()));
             if (ar == null) {
-                return AjaxResult.error(Constants.Error_Code_Design, "所属会员没有经纪角色,无法恢复");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_009.getCode(), request.getHeader("Accept-Language"));
             }
         }
         // todo allocated != null && allocated == 1
@@ -451,7 +448,7 @@ public class IOrganServiceImpl implements IOrganService {
         } else if (org.getUsertype() == 5)
             systemmanagerService.writeOperateLog(SysConstants.PART_INVESTOR_MANAGE, "恢复投资者id=" + org.getUserid(), systemmanager, null, null, null);
 
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
@@ -459,20 +456,20 @@ public class IOrganServiceImpl implements IOrganService {
         //校验唯一性
         List<Useraccount> c2 = iUseraccountMapper.selectList(new QueryWrapper<Useraccount>().eq("userid", createUserid(param.getParentuserid(), param.getUserid(), 4)));
         if (CollectionUtils.isNotEmpty(c2)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "代码或机构代码重复");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_010.getCode(), request.getHeader("Accept-Language"));
         }
         // 机构开户证件号码是否唯一
         String areacardflag = iCommonService.getSystemParam(Constants.REDIS_HEADER_SYSPARAM, Constants.SYSPARAM_CARD_NO);
         //验证证件号码是否存在
         Boolean checkFlag1 = iCommonService.checkOranCardNumOrMobile(1, EncryptionUtils.encryptByAES(param.getCardnum().trim()), null);
         if (areacardflag != null && areacardflag.equals("1") && checkFlag1) {
-            return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
         }
         List<WskhBlacklist> wskhBlacklists = iWskhBlacklistMapper.selectList(new QueryWrapper<WskhBlacklist>()
                 .eq("CARDTYPE", param.getCardtypeid())
                 .eq("CARDNUM", EncryptionUtils.encryptByAES(param.getCardnum().trim())));
         if (!CollectionUtils.isEmpty(wskhBlacklists)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在黑名单中,不能开户");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_012.getCode(), request.getHeader("Accept-Language"));
         }
         if (param.getUserinfotype() == 2) {
             //机构类型为企业需 名称唯一
@@ -480,12 +477,12 @@ public class IOrganServiceImpl implements IOrganService {
                     .eq("customername", param.getCustomername().trim())
                     .eq("userinfotype", 2));
             if (CollectionUtils.isNotEmpty(c3)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "名称已存在");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_013.getCode(), request.getHeader("Accept-Language"));
             }
         }
         List<Systemmanager> list = iSystemmanagerMapper.selectList(new QueryWrapper<Systemmanager>().eq("logincode", param.getLogincode().trim()));
         if (CollectionUtils.isNotEmpty(list)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "管理员登录帐号重复");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_014.getCode(), request.getHeader("Accept-Language"));
         }
         try {
             Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
@@ -496,9 +493,10 @@ public class IOrganServiceImpl implements IOrganService {
                 // userAccountSercive.addBroker(param, rsp.getUser());
             }
         } catch (Exception e) {
-            return AjaxResult.error(Constants.Error_Code_Design, "新增失败,失败原因;" + e.getMessage());
+            log.info("新增失败,失败原因:" + e);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_015.getCode(), request.getHeader("Accept-Language"));
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
@@ -521,7 +519,7 @@ public class IOrganServiceImpl implements IOrganService {
             if (CollectionUtils.isNotEmpty(uiList)) {
                 String sysparm = iCommonService.getSysparmById(Constants.SYSPARAM_CARD_NOTWO);
                 if (sysparm == null || "1".equals(sysparm)) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
                 }
             }
         }
@@ -533,7 +531,7 @@ public class IOrganServiceImpl implements IOrganService {
                     .eq("mobile", mobile)
                     .eq("userid", param.getUserid()));
             if (CollectionUtils.isNotEmpty(uiList)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "手机号已存在");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_016.getCode(), request.getHeader("Accept-Language"));
             }
         }
 
@@ -621,7 +619,7 @@ public class IOrganServiceImpl implements IOrganService {
         } else if (organ.getUsertype() == 5) {
             systemmanagerService.writeOperateLog(SysConstants.PART_INVESTOR_MANAGE, "修改交易商id=" + organ.getUserid() + "并提交审核", systemmanager, null, jsonObjUi.toString(), jsonObj.toString());
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
@@ -668,7 +666,7 @@ public class IOrganServiceImpl implements IOrganService {
                         .eq("userid", param.getUserid()));
                 if (CollectionUtils.isNotEmpty(uiList)) {
                     if ((sysparm == null) || ("1".equals(sysparm))) {
-                        return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
+                        return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
                     }
                 }
 
@@ -681,7 +679,7 @@ public class IOrganServiceImpl implements IOrganService {
                     .eq("customername", param.getCustomername().trim())
                     .eq("userinfotype", 2));
             if (CollectionUtils.isNotEmpty(uiList)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "企业名称已存在");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_017.getCode(), request.getHeader("Accept-Language"));
             }
         }
         ui.setAddress(param.getAddress());
@@ -740,7 +738,7 @@ public class IOrganServiceImpl implements IOrganService {
             }
         }
 
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Transactional(rollbackFor = Exception.class)

+ 19 - 17
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/MarketRunManageServiceImpl.java

@@ -10,6 +10,7 @@ import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.service.IMarketRunManageService;
 import com.muchinfo.mtp3common.enumtype.Constants;
 import com.muchinfo.mtp3common.enumtype.FunCodeConstants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.enumtype.SysConstants;
 import com.muchinfo.mtp3common.utils.*;
 import com.muchinfo.mtp3common.vo.AjaxResult;
@@ -41,18 +42,19 @@ public class MarketRunManageServiceImpl implements IMarketRunManageService {
     private SystemmanagerServiceImpl systemmanagerService;
     @Resource
     private RabbitTemplate rabbitTemplate;
+
     @Override
     public PageResult<MarketRunLoginUserResult> queryUserLogin(String loginid, Integer pageNum, Integer pageSize, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         Long memberuserid = null;
         Long parentuserid = null;
-        if(systemmanager.getReletype() == 2){
+        if (systemmanager.getReletype() == 2) {
             memberuserid = systemmanager.getAreauserid();
-        }else if(systemmanager.getReletype() == 3){
+        } else if (systemmanager.getReletype() == 3) {
             parentuserid = systemmanager.getAreauserid();
         }
-        IPage<MarketRunLoginUserResult> page = new Page<>(pageNum,pageSize);
-        IPage<MarketRunLoginUserResult> queryResultIPage = iSystemmanagerMapper.queryUserOnlineByPage(page, loginid,memberuserid,parentuserid);
+        IPage<MarketRunLoginUserResult> page = new Page<>(pageNum, pageSize);
+        IPage<MarketRunLoginUserResult> queryResultIPage = iSystemmanagerMapper.queryUserOnlineByPage(page, loginid, memberuserid, parentuserid);
         PageResult<MarketRunLoginUserResult> result = new PageResult<>();
         result.setCode(Constants.Success_Code_Design);
         result.setMessage(Constants.Deal_Success_Message);
@@ -75,38 +77,38 @@ public class MarketRunManageServiceImpl implements IMarketRunManageService {
         hd.setResponseTopic(SysConstants.RabbitUserNtfKey);
         hd.setFunCode(FunCodeConstants.FunCode_Trade_ManageKickoffReq);
         builder.setHeader(hd);
-        if(loginid != null){
+        if (loginid != null) {
             builder.addLoginIDs(loginid);
         }
-        if (loginid == null){
+        if (loginid == null) {
             systemmanagerService.writeOperateLog(SysConstants.CLIENT_ONLINE_QUERY, "强制所有用户下线", systemmanager, null, null, null);
-        }else{
+        } else {
             systemmanagerService.writeOperateLog(SysConstants.CLIENT_ONLINE_QUERY, "强制用户下线:" + loginid, systemmanager, null, null, null);
         }
 
-        log.debug("强制下线:{}",builder.build());
+        log.debug("强制下线:{}", builder.build());
         Calculator ca = new Calculator(uuid);
         SerialNumberUtils.lockMap.put(uuid, ca);
         byte[] body = ProtoHelper.getNTAS(builder.build().toByteArray(), FunCodeConstants.FunCode_Trade_ManageKickoffReq);
         rabbitTemplate.send(SysConstants.RabbitUserNtfKey, new Message(body, new MessageProperties()));
 
-        synchronized(ca){
+        synchronized (ca) {
             try {
                 ca.wait(5000);
                 Object rsp = ca.obj;
-                if(rsp!=null){
+                if (rsp != null) {
                     SystemMI1.ManageKickoffRsp rsp_ = (SystemMI1.ManageKickoffRsp) rsp;
-                    if(rsp_.getRetCode()==0){
-                        return AjaxResult.success(Constants.Success_Code_Design, "强制下线已发送");
-                    }else{
-                        return AjaxResult.error(Constants.Error_Code_Design, ProtoErrorCodes.resultMsg(rsp_.getRetCode()));
+                    if (rsp_.getRetCode() == 0) {
+                        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MARKET_RUN_MESSAGE_001.getCode(), request.getHeader("Accept-Language"));
+                    } else {
+                        return AjaxResult.error(Constants.Error_Code_Design, ProtoErrorCodes.resultMsg(rsp_.getRetCode()), "");
                     }
-                }else{
-                    return AjaxResult.success(Constants.Success_Code_Design, "强制下线已发送");
+                } else {
+                    return AjaxResult.success(Constants.Success_Code_Design, MessageType.MARKET_RUN_MESSAGE_001.getCode(), request.getHeader("Accept-Language"));
                 }
             } catch (InterruptedException e) {
                 e.printStackTrace();
-            }finally {
+            } finally {
                 SerialNumberUtils.lockMap.remove(uuid);
             }
         }

+ 46 - 48
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/ProfitSharServiceImpl.java

@@ -8,6 +8,7 @@ import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.service.IProfitSharService;
 import com.muchinfo.mtp3century.utils.RedisServiceUtil;
 import com.muchinfo.mtp3common.enumtype.Constants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.vo.AjaxResult;
 import com.muchinfo.mtp3common.vo.PageResult;
 import com.muchinfo.mtp3interface.mapper.*;
@@ -78,23 +79,23 @@ public class ProfitSharServiceImpl implements IProfitSharService {
             gvo.setCreatetime(new Date());
             iSubareagroupMapper.insert(gvo);
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
     public AjaxResult delete(Long groupId, HttpServletRequest request) {
         List<Subdivideconfig> subdivideconfigList = iSubdivideconfigMapper.selectList(new QueryWrapper<Subdivideconfig>().eq("subareagroupid", groupId));
         if (CollectionUtils.isNotEmpty(subdivideconfigList)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "请先删除分润配置");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.PROFIT_SHAR_ERROR_CODE_001.getCode(), request.getHeader("Accept-Language"));
         }
 
         List<Subareagroupdetail> subareagroupdetailList = iSubareagroupdetailMapper.selectList(new QueryWrapper<Subareagroupdetail>().eq("subareagroupid", groupId));
         if (CollectionUtils.isNotEmpty(subareagroupdetailList)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "请先删除分组人员");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.PROFIT_SHAR_ERROR_CODE_002.getCode(), request.getHeader("Accept-Language"));
         }
 
         iSubareagroupMapper.deleteById(groupId);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
@@ -116,7 +117,7 @@ public class ProfitSharServiceImpl implements IProfitSharService {
     public AjaxResult<ProfitSharGroupOrganResult> groupOrgan(HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         List<ProfitSharGroupOrganResult> results = iUseraccountMapper.getNoGroupSubOrgan(systemmanager.getAreauserid());
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message,results);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), results);
     }
 
     @Override
@@ -128,13 +129,13 @@ public class ProfitSharServiceImpl implements IProfitSharService {
         gduser.setOperatorid(systemmanager.getAutoid());
         gduser.setUpdatetime(new Date());
         iSubareagroupdetailMapper.insert(gduser);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
-    public AjaxResult deleteMember(Long userid) {
+    public AjaxResult deleteMember(Long userid, HttpServletRequest request) {
         iSubareagroupdetailMapper.deleteById(new QueryWrapper<Subareagroupdetail>().eq("userid", userid));
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
@@ -142,10 +143,10 @@ public class ProfitSharServiceImpl implements IProfitSharService {
         ProfitSharInitResult profitSharInitResult = new ProfitSharInitResult();
         Long uid = null;
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
-        if(systemmanager.getReletype()==3){
-            Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",systemmanager.getAreauserid()));
+        if (systemmanager.getReletype() == 3) {
+            Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", systemmanager.getAreauserid()));
             uid = ua.getMemberuserid();
-        }else{
+        } else {
             uid = systemmanager.getAreauserid();
         }
         //获取经纪会员的市场
@@ -153,19 +154,16 @@ public class ProfitSharServiceImpl implements IProfitSharService {
                 .eq("enumitemstatus", 1)
                 .eq("enumdiccode", "trademode"));
         Map<Integer, Integer> trademodeMap = new HashMap<Integer, Integer>();
-        if (CollectionUtils.isNotEmpty(enumDicItemList))
-        {
-            for (Enumdicitem enumDicItem : enumDicItemList)
-            {
-                if (enumDicItem.getParam2() != null && enumDicItem.getParam2().trim().equals("1"))
-                {
+        if (CollectionUtils.isNotEmpty(enumDicItemList)) {
+            for (Enumdicitem enumDicItem : enumDicItemList) {
+                if (enumDicItem.getParam2() != null && enumDicItem.getParam2().trim().equals("1")) {
                     trademodeMap.put(enumDicItem.getEnumitemname(), enumDicItem.getEnumitemname());
                 }
             }
         }
         List<Market> mks = iMarketMapper.selectList(new QueryWrapper<Market>().eq("userid", uid).eq("roletype", 7));
-        for(int i=0; i<mks.size(); i++){
-            if(mks.get(i).getMarketid() < 1000 || !trademodeMap.containsKey(mks.get(i).getTrademode())){
+        for (int i = 0; i < mks.size(); i++) {
+            if (mks.get(i).getMarketid() < 1000 || !trademodeMap.containsKey(mks.get(i).getTrademode())) {
                 mks.remove(i);
                 i--;
             }
@@ -175,41 +173,41 @@ public class ProfitSharServiceImpl implements IProfitSharService {
         //1:交易手续费-投资者会员部分 (201, 202) -- 投资者类 (投资管理系统-101,102)
         //6:交割手续费-投资者会员部分 (20 5,206) -- 投资者类
         //9:递延费2(投资者-会员部分) (211,212) -- 投资者类
-        Map<String, Object> dt = redisServiceUtil.getCacheMap(Constants.REDIS_HEADER_DICT+"dividefeetype");
-        for(Map.Entry<String, Object> entry:dt.entrySet()){
-            if("1".equals(entry.getKey())){
+        Map<String, Object> dt = redisServiceUtil.getCacheMap(Constants.REDIS_HEADER_DICT + "dividefeetype");
+        for (Map.Entry<String, Object> entry : dt.entrySet()) {
+            if ("1".equals(entry.getKey())) {
                 profitSharInitResult.setDividefeetype1(1);
-            }else if("6".equals(entry.getKey())){
+            } else if ("6".equals(entry.getKey())) {
                 profitSharInitResult.setDividefeetype6(1);
-            }else if("9".equals(entry.getKey())){
+            } else if ("9".equals(entry.getKey())) {
                 profitSharInitResult.setDividefeetype9(1);
             }
         }
 
         //交易、交割、递延
         List<ProfitSharInitConfigResult> list = iSubareagroupMapper.getDivideConfigPage(systemmanager.getAreauserid());
-        if(CollectionUtils.isNotEmpty(list)){
+        if (CollectionUtils.isNotEmpty(list)) {
             Map<Long, List<ProfitSharInitConfigResult>> ft1 = new HashMap<>();
             List<ProfitSharInitConfigResult> ft2 = new ArrayList<>();
             Map<Long, List<ProfitSharInitConfigResult>> ft3 = new HashMap<>();
-            for(int i=0;i<list.size();i++){
-                if(list.get(i).getDividefeetype()==1){
-                    if(ft1.containsKey(list.get(i).getMarketid())){
+            for (int i = 0; i < list.size(); i++) {
+                if (list.get(i).getDividefeetype() == 1) {
+                    if (ft1.containsKey(list.get(i).getMarketid())) {
                         ft1.get(list.get(i).getMarketid()).add(list.get(i));
-                    }else{
+                    } else {
                         List<ProfitSharInitConfigResult> ft1_ = new ArrayList<>();
                         ft1_.add(list.get(i));
-                        ft1.put(list.get(i).getMarketid(),ft1_);
+                        ft1.put(list.get(i).getMarketid(), ft1_);
                     }
-                }else if(list.get(i).getDividefeetype()==6){
+                } else if (list.get(i).getDividefeetype() == 6) {
                     ft2.add(list.get(i));
-                }else if(list.get(i).getDividefeetype()==9){
-                    if(ft3.containsKey(list.get(i).getMarketid())){
+                } else if (list.get(i).getDividefeetype() == 9) {
+                    if (ft3.containsKey(list.get(i).getMarketid())) {
                         ft3.get(list.get(i).getMarketid()).add(list.get(i));
-                    }else{
+                    } else {
                         List<ProfitSharInitConfigResult> ft3_ = new ArrayList<>();
                         ft3_.add(list.get(i));
-                        ft3.put(list.get(i).getMarketid(),ft3_);
+                        ft3.put(list.get(i).getMarketid(), ft3_);
                     }
                 }
             }
@@ -220,48 +218,48 @@ public class ProfitSharServiceImpl implements IProfitSharService {
             //递延
             profitSharInitResult.setFt3(ft3);
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message,profitSharInitResult);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), profitSharInitResult);
     }
 
     @Override
     public AjaxResult delSOrganSec(ProfitSharSorgansecParam param, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
-        if(param.getIsedit() == 0){
+        if (param.getIsedit() == 0) {
             List<Subdivideconfig> list = iSubdivideconfigMapper.selectList(new QueryWrapper<Subdivideconfig>()
                     .eq("dividefeetype", param.getDividefeetype())
                     .eq("subareagroupid", param.getSubareagroupid())
                     .eq("marketid", param.getMarketid()));
-            if(CollectionUtils.isNotEmpty(list)){
-                return AjaxResult.error(Constants.Error_Code_Design, "该费用类型已存在分润配置");
+            if (CollectionUtils.isNotEmpty(list)) {
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.PROFIT_SHAR_ERROR_CODE_003.getCode(), request.getHeader("Accept-Language"));
             }
             Subdivideconfig config = getSubdivideconfig(param, systemmanager);
             iSubdivideconfigMapper.insert(config);
-        }else{
-            Subdivideconfig sd =  iSubdivideconfigMapper.selectOne(new QueryWrapper<Subdivideconfig>()
+        } else {
+            Subdivideconfig sd = iSubdivideconfigMapper.selectOne(new QueryWrapper<Subdivideconfig>()
                     .eq("dividefeetype", param.getDividefeetype())
                     .eq("subareagroupid", param.getSubareagroupid())
                     .eq("marketid", param.getMarketid())
                     .eq("goodsid", 0L));
             sd.setDividemode(param.getDividemode());
             sd.setDividetype(param.getDividetype());
-            if(param.getDividetype()==1){
+            if (param.getDividetype() == 1) {
                 BigDecimal bw = new BigDecimal(100);
                 sd.setDividevalue(param.getDividevalue().divide(bw));
-            }else{
+            } else {
                 sd.setDividevalue(param.getDividevalue());
             }
-            iSubdivideconfigMapper.update(new QueryWrapper<Subdivideconfig>().eq("subareagroupid",sd.getSubareagroupid()));
+            iSubdivideconfigMapper.update(new QueryWrapper<Subdivideconfig>().eq("subareagroupid", sd.getSubareagroupid()));
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
-    public AjaxResult deleteSOrganSec(Integer dividefeetype, Long marketid, Long subareagroupid) {
+    public AjaxResult deleteSOrganSec(Integer dividefeetype, Long marketid, Long subareagroupid, HttpServletRequest request) {
         iSubdivideconfigMapper.delete(new QueryWrapper<Subdivideconfig>()
                 .eq("dividefeetype", dividefeetype)
                 .eq("subareagroupid", subareagroupid)
                 .eq("marketid", marketid));
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     private Subdivideconfig getSubdivideconfig(ProfitSharSorgansecParam param, Systemmanager systemmanager) {
@@ -275,7 +273,7 @@ public class ProfitSharServiceImpl implements IProfitSharService {
         config.setCreatetime(new Date());
         config.setCreatorid(systemmanager.getAutoid());
         config.setGoodsid(0L);
-        if(param.getDividetype()==1){
+        if (param.getDividetype() == 1) {
             BigDecimal bw = new BigDecimal(100);
             config.setDividevalue(param.getDividevalue().divide(bw));
         }

+ 70 - 69
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/QueryServiceImpl.java

@@ -11,6 +11,7 @@ import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.service.IQueryService;
 import com.muchinfo.mtp3century.utils.RedisServiceUtil;
 import com.muchinfo.mtp3common.enumtype.Constants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.enumtype.SysConstants;
 import com.muchinfo.mtp3common.enumtype.SysEnums;
 import com.muchinfo.mtp3common.vo.AjaxResult;
@@ -128,7 +129,7 @@ public class QueryServiceImpl implements IQueryService {
             filterTrademodeList.add(99);
             commissionSheetParam.setFilterTrademodeList(filterTrademodeList);
         }
-        if(StringUtils.isNotBlank(commissionSheetParam.getExcludeAccountIdsStr())){
+        if (StringUtils.isNotBlank(commissionSheetParam.getExcludeAccountIdsStr())) {
             commissionSheetParam.setExcludeAccountIds(commissionSheetParam.getExcludeAccountIdsStr().split(","));
         }
         IPage<CommissionSheetResult> page = new Page<>(commissionSheetParam.getPageNum(), commissionSheetParam.getPageSize());
@@ -139,7 +140,7 @@ public class QueryServiceImpl implements IQueryService {
             resultIPage = iTradeOrderdetailMapper.queryCommissionSheet(page, commissionSheetParam);
         }
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -154,19 +155,19 @@ public class QueryServiceImpl implements IQueryService {
             Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
             //校验
             if (commissionSheetParam.getMarketId() == -1) {
-                return AjaxResult.error(Constants.Error_Code_Design, "请选择市场查询");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_001.getCode(), request.getHeader("Accept-Language"));
             }
             if (commissionSheetParam.getIsHis() == 1 && Strings.isNullOrEmpty(String.valueOf(commissionSheetParam.getStartDateHis()))) {
-                return AjaxResult.error(Constants.Error_Code_Design, "历史查询请选择开始日期");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_002.getCode(), request.getHeader("Accept-Language"));
             }
             if (commissionSheetParam.getIsHis() == 1 && Strings.isNullOrEmpty(String.valueOf(commissionSheetParam.getEndDateHis()))) {
-                return AjaxResult.error(Constants.Error_Code_Design, "历史查询请选择结束日期");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_003.getCode(), request.getHeader("Accept-Language"));
             }
             boolean marketFlag = checkMarketAuth(systemmanager, commissionSheetParam.getMarketId(), commissionSheetParam.getOrgztypes());
             if (marketFlag) {
                 commissionSheetParam.setAreaUserid(systemmanager.getAreauserid());
             } else {
-                return AjaxResult.error(Constants.Error_Code_Design, "没有此权限");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_004.getCode(), request.getHeader("Accept-Language"));
             }
             if (StringUtils.isNotBlank(commissionSheetParam.getTradeDate())) {
                 try {
@@ -190,7 +191,7 @@ public class QueryServiceImpl implements IQueryService {
             String fileName = reportName + "_" + DateTimeUtils.getDateTime("yyyyMMdd");
             List<CommissionSheetResult> list = iTradeOrderdetailMapper.queryCommissionSheet(commissionSheetParam);
             if (CollectionUtils.isEmpty(list)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "无数据可导出");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
             }
             ExportResult exportResult;
             if (commissionSheetParam.getOperateType() != null && commissionSheetParam.getOperateType() == 2) {
@@ -240,15 +241,15 @@ public class QueryServiceImpl implements IQueryService {
                     exportResult = ExportUtil.write(fileName, CommissionResult.class, commissionResults);
                 }
             }
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, exportResult);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), exportResult);
         } catch (Exception e) {
             log.error("委托单或斩仓记录导出失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, "导出失败,请联系管理员!");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
     @Override
-    public AjaxResult<CommissionSheetResultDetail> commissionSheetQueryDetail(String orderId, Integer isHis, String tradeDate) {
+    public AjaxResult<CommissionSheetResultDetail> commissionSheetQueryDetail(String orderId, Integer isHis, String tradeDate, HttpServletRequest request) {
         tradeDate = tradeDate.replace("-", "");
         CommissionSheetResultDetail detail = iTradeOrderdetailMapper.commissionSheetQueryDetail(orderId, isHis, tradeDate);
         detail.setMemberaccountname(iTradeOrderdetailMapper.selectMemberUserName(detail.getAccountid()));
@@ -256,7 +257,7 @@ public class QueryServiceImpl implements IQueryService {
         List<TradeHisResult> tradeHisResultList = iTradeOrderdetailMapper.queryHisTradeList(orderId);
         detail.setTradeResultList(tradeResultList);
         detail.setTradeHisResultList(tradeHisResultList);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, detail);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), detail);
     }
 
     @Override
@@ -316,7 +317,7 @@ public class QueryServiceImpl implements IQueryService {
         IPage<ContractSheetResult> page = new Page<>(contractSheetParam.getPageNum(), contractSheetParam.getPageSize());
         IPage<ContractSheetResult> resultIPage = iTradeOrderdetailMapper.queryContractSheet(page, contractSheetParam);
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -331,13 +332,13 @@ public class QueryServiceImpl implements IQueryService {
             Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
             //校验
             if (contractSheetParam.getMarketId() == -1) {
-                return AjaxResult.error(Constants.Error_Code_Design, "请选择市场查询");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_001.getCode(), request.getHeader("Accept-Language"));
             }
             if (contractSheetParam.getIsHis() == 1 && Strings.isNullOrEmpty(String.valueOf(contractSheetParam.getStartDateHis()))) {
-                return AjaxResult.error(Constants.Error_Code_Design, "历史查询请选择开始日期");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_002.getCode(), request.getHeader("Accept-Language"));
             }
             if (contractSheetParam.getIsHis() == 1 && Strings.isNullOrEmpty(String.valueOf(contractSheetParam.getEndDateHis()))) {
-                return AjaxResult.error(Constants.Error_Code_Design, "历史查询请选择结束日期");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_003.getCode(), request.getHeader("Accept-Language"));
             }
             boolean marketFlag = checkMarketAuth(systemmanager, contractSheetParam.getMarketId(), contractSheetParam.getOrgztypes());
             if (marketFlag) {
@@ -349,7 +350,7 @@ public class QueryServiceImpl implements IQueryService {
                 }
                 contractSheetParam.setAreaUserid(systemmanager.getAreauserid());
             } else {
-                return AjaxResult.error(Constants.Error_Code_Design, "没有此权限");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_004.getCode(), request.getHeader("Accept-Language"));
             }
             if (StringUtils.isNotBlank(contractSheetParam.getTradeDate())) {
                 try {
@@ -374,7 +375,7 @@ public class QueryServiceImpl implements IQueryService {
             String fileName = "成交单_" + DateTimeUtils.getDateTime("yyyyMMdd");
             List<ContractSheetResult> list = iTradeOrderdetailMapper.queryContractSheet(contractSheetParam);
             if (CollectionUtils.isEmpty(list)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "无数据可导出");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
             }
             ExportResult exportResult;
             if (contractSheetParam.getTradeMode() == 46) {
@@ -389,15 +390,15 @@ public class QueryServiceImpl implements IQueryService {
                 }
                 exportResult = ExportUtil.write(fileName, CommissionResult.class, contractResults);
             }
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, exportResult);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), exportResult);
         } catch (Exception e) {
             log.error("成交单导出失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, "导出失败,请联系管理员!");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
     @Override
-    public AjaxResult<ContractSheetResultDetail> contractSheetQueryDetail(String tradeid, Integer buyorsell, Integer ishis) {
+    public AjaxResult<ContractSheetResultDetail> contractSheetQueryDetail(String tradeid, Integer buyorsell, Integer ishis, HttpServletRequest request) {
         ContractSheetResultDetail resultDetail = iTradeOrderdetailMapper.contractSheetQueryDetail(tradeid, buyorsell, ishis);
         resultDetail.setMembername(iTradeOrderdetailMapper.selectMemberUserName(resultDetail.getAccountid()));
         Object c = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "084");
@@ -411,7 +412,7 @@ public class QueryServiceImpl implements IQueryService {
         resultDetail.setTradetype3(Integer.valueOf(string));
         List<ContractTradeResult> contractTradeResults = iTradeOrderdetailMapper.queryTradeClose(tradeid, buyorsell, ishis);
         resultDetail.setResultList(contractTradeResults);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, resultDetail);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), resultDetail);
     }
 
     @Override
@@ -475,7 +476,7 @@ public class QueryServiceImpl implements IQueryService {
                 }
             }
             pageResult.setCode(Constants.Success_Code_Design);
-            pageResult.setMessage(Constants.Deal_Success_Message);
+            pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
             pageResult.setPages(resultIPage.getPages());
             pageResult.setCurrent(resultIPage.getCurrent());
             pageResult.setTotal(resultIPage.getTotal());
@@ -509,7 +510,7 @@ public class QueryServiceImpl implements IQueryService {
             }
         }
         if (param.getMarketId() == -1) {
-            return AjaxResult.error(Constants.Error_Code_Design, "请选择市场查询");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_001.getCode(), request.getHeader("Accept-Language"));
         }
         if (param.getFilterTrademodeList() == null || param.getFilterTrademodeList().size() <= 0) {
             List<Integer> filterTrademodeList = new ArrayList<Integer>();
@@ -588,13 +589,13 @@ public class QueryServiceImpl implements IQueryService {
                         }
                     }
                 }
-                return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, exportResult);
+                return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), exportResult);
             } catch (Exception e) {
                 log.error("持仓单查询导出失败,失败原因:" + e);
-                return AjaxResult.error(Constants.Error_Code_Design, "导出失败,请联系管理员!");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
             }
         } else {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有此权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_004.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -603,9 +604,9 @@ public class QueryServiceImpl implements IQueryService {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         PositionSheetResultDetail resultDetail = iTradeOrderdetailMapper.queryTradeHolderDetailById(ishis, tradeid, buyorsell, histradedate);
         if (!iCommonService.checkTaAccountReport(systemmanager, resultDetail.getAccountid())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有此权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_004.getCode(), request.getHeader("Accept-Language"));
         } else {
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, resultDetail);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), resultDetail);
         }
     }
 
@@ -628,7 +629,7 @@ public class QueryServiceImpl implements IQueryService {
         //处理金额
         dealSunAmount(resultIPage.getRecords());
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -643,15 +644,15 @@ public class QueryServiceImpl implements IQueryService {
             String fileName = "持仓汇总查询_" + DateTimeUtils.getDateTime("yyyyMMdd");
             List<PositionSumSheetResult> resultIPage = iTradeOrderdetailMapper.queryTradePositionPage(param);
             if (CollectionUtils.isEmpty(resultIPage)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "无数据可导出");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
             }
             //处理金额
             dealSunAmount(resultIPage);
             ExportResult exportResult = ExportUtil.write(fileName, PositionSumSheetResult.class, resultIPage);
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, exportResult);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), exportResult);
         } catch (Exception e) {
             log.error("持仓汇总查询导出失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -665,7 +666,7 @@ public class QueryServiceImpl implements IQueryService {
         IPage<WarehouseCommissionResult> resultIPage = iWrtradeOrderdetailMapper.getAllWrTradeOrderMap(page, param);
         PageResult<WarehouseCommissionResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -684,13 +685,13 @@ public class QueryServiceImpl implements IQueryService {
             String fileName = "仓单贸易委托单数据_" + DateTimeUtils.getDateTime("yyyyMMdd");
             List<WarehouseCommissionResult> resultIPage = iWrtradeOrderdetailMapper.getAllWrTradeOrderMap(param);
             if (CollectionUtils.isEmpty(resultIPage)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "无数据可导出");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
             }
             ExportResult exportResult = ExportUtil.write(fileName, WarehouseCommissionResult.class, resultIPage);
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, exportResult);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), exportResult);
         } catch (Exception e) {
             log.error("仓单贸易委托单数据导出失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -714,9 +715,9 @@ public class QueryServiceImpl implements IQueryService {
         }
         //校验
         if (!iCommonService.checkTaAccountReport(systemmanager, dto.getWrTradeOrderDetail().getAccountid())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有此权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_004.getCode(), request.getHeader("Accept-Language"));
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, dto);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), dto);
     }
 
     @Override
@@ -729,7 +730,7 @@ public class QueryServiceImpl implements IQueryService {
         IPage<WarehouseContractResult> resultIPage = iWrtradeOrderdetailMapper.queryTradeDetail(page, param);
         PageResult<WarehouseContractResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -748,13 +749,13 @@ public class QueryServiceImpl implements IQueryService {
             String fileName = "仓单贸易成交单数据_" + DateTimeUtils.getDateTime("yyyyMMdd");
             List<WarehouseContractResult> resultIPage = iWrtradeOrderdetailMapper.queryTradeDetail(param);
             if (CollectionUtils.isEmpty(resultIPage)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "无数据可导出");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
             }
             ExportResult exportResult = ExportUtil.write(fileName, WarehouseContractResult.class, resultIPage);
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, exportResult);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), exportResult);
         } catch (Exception e) {
             log.error("仓单贸易成交单数据导出失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -825,17 +826,17 @@ public class QueryServiceImpl implements IQueryService {
         if (tradeDetail.getRealfirstamount() != null) {
             tradeDetail.setRealfirstamount(tradeDetail.getRealfirstamount().setScale(2, RoundingMode.HALF_UP));
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, tradeDetail);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), tradeDetail);
     }
 
     @Override
-    public AjaxResult<WarehouseInitResult> initWarehouse() {
+    public AjaxResult<WarehouseInitResult> initWarehouse(HttpServletRequest request) {
         WarehouseInitResult result = new WarehouseInitResult();
         List<Wrstandard> wrstandards = iWrstandardMapper.selectList(new QueryWrapper<Wrstandard>().eq("isvalid", 1));
         result.setWrStandardList(wrstandards);
         List<Warehouseinfo> warehouseinfos = iWarehouseinfoMapper.selectList(new QueryWrapper<Warehouseinfo>().eq("isvalid", 1));
         result.setWarehouseInfoList(warehouseinfos);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, result);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), result);
     }
 
     @Override
@@ -848,7 +849,7 @@ public class QueryServiceImpl implements IQueryService {
         IPage<WarehouseSumResult> resultIPage = iWrtradeOrderdetailMapper.querySum(page, param);
         PageResult<WarehouseSumResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -867,7 +868,7 @@ public class QueryServiceImpl implements IQueryService {
         IPage<WarehouseSumDetailResult> resultIPage = iWrtradeOrderdetailMapper.summaryQueryDetail(page, param);
         PageResult<WarehouseSumDetailResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -887,16 +888,16 @@ public class QueryServiceImpl implements IQueryService {
         }
         IPage<AccountTransactionQueryResult> page = new Page<>(param.getPageNum(), param.getPageSize());
         IPage<AccountTransactionQueryResult> resultIPage;
-        if (param.getSummode() == 1){
+        if (param.getSummode() == 1) {
             // 1:按账户汇总
-            resultIPage = iTradeOrderdetailMapper.queryByAccount(page,param);
-        }else{
+            resultIPage = iTradeOrderdetailMapper.queryByAccount(page, param);
+        } else {
             // 2:按账户+日期汇总
-            resultIPage = iTradeOrderdetailMapper.queryByAccountDate(page,param);
+            resultIPage = iTradeOrderdetailMapper.queryByAccountDate(page, param);
         }
         PageResult<AccountTransactionQueryResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -916,22 +917,22 @@ public class QueryServiceImpl implements IQueryService {
                 param.setExcludeAccountIds(param.getExcludeaccountidsstr().split(","));
             }
             List<AccountTransactionQueryResult> results;
-            if (param.getSummode() == 1){
+            if (param.getSummode() == 1) {
                 // 1:按账户汇总
                 results = iTradeOrderdetailMapper.queryByAccount(param);
-            }else{
+            } else {
                 // 2:按账户+日期汇总
                 results = iTradeOrderdetailMapper.queryByAccountDate(param);
             }
             String fileName = "账户成交汇总_" + DateTimeUtils.getDateTime("yyyyMMdd");
             if (CollectionUtils.isEmpty(results)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "无数据可导出");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
             }
             ExportResult exportResult = ExportUtil.write(fileName, AccountTransactionQueryResult.class, results);
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, exportResult);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), exportResult);
         } catch (Exception e) {
             log.error("账户成交汇总导出失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -945,7 +946,7 @@ public class QueryServiceImpl implements IQueryService {
         IPage<InvestorSumQueryResult> resultIPage = iTradeOrderdetailMapper.queryInvestorSumList(page, param);
         PageResult<InvestorSumQueryResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -965,16 +966,16 @@ public class QueryServiceImpl implements IQueryService {
         }
         IPage<GoodsTradeQueryResult> page = new Page<>(param.getPageNum(), param.getPageSize());
         IPage<GoodsTradeQueryResult> resultIPage;
-        if (param.getSummode() == 1){
+        if (param.getSummode() == 1) {
             // 1:按商品汇总
-            resultIPage = iTradeOrderdetailMapper.queryByAGoods(page,param);
-        }else{
+            resultIPage = iTradeOrderdetailMapper.queryByAGoods(page, param);
+        } else {
             // 2:按商品+日期汇总
-            resultIPage = iTradeOrderdetailMapper.queryByAGoodsDate(page,param);
+            resultIPage = iTradeOrderdetailMapper.queryByAGoodsDate(page, param);
         }
         PageResult<GoodsTradeQueryResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -994,22 +995,22 @@ public class QueryServiceImpl implements IQueryService {
                 param.setExcludeAccountIds(param.getExcludeaccountidsstr().split(","));
             }
             List<GoodsTradeQueryResult> results;
-            if (param.getSummode() == 1){
+            if (param.getSummode() == 1) {
                 // 1:按商品汇总
                 results = iTradeOrderdetailMapper.queryByAGoods(param);
-            }else{
+            } else {
                 // 2:按商品+日期汇总
                 results = iTradeOrderdetailMapper.queryByAGoodsDate(param);
             }
             String fileName = "商品成交汇总_" + DateTimeUtils.getDateTime("yyyyMMdd");
             if (CollectionUtils.isEmpty(results)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "无数据可导出");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
             }
             ExportResult exportResult = ExportUtil.write(fileName, GoodsTradeQueryResult.class, results);
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, exportResult);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), exportResult);
         } catch (Exception e) {
             log.error("商品成交汇总导出失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -1068,7 +1069,7 @@ public class QueryServiceImpl implements IQueryService {
         dto.setWrTradeOrderDetail(wr);
         if (dto.getWrTradeOrderDetail().getFirstratio() != null) {
             BigDecimal firstRation = dto.getWrTradeOrderDetail().getFirstratio();
-            dto.getWrTradeOrderDetail().setFirstratio(firstRation.multiply(new BigDecimal(100)).setScale(2,RoundingMode.HALF_UP));
+            dto.getWrTradeOrderDetail().setFirstratio(firstRation.multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP));
         }
         dto.setWrTradeGoodsConfigs(iWrtradeOrderdetailMapper.getWRTradeGoodsConfigById(wr.getWrtradeorderid()));
         dto.setWrTradeMatchDetails(iWrtradeOrderdetailMapper.getWRTradeMatchDetailById(wr.getWrtradeorderid()));

+ 3 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/RedisInitServiceImpl.java

@@ -68,10 +68,11 @@ public class RedisInitServiceImpl implements IRedisInitService {
 
         logger.info("加载 REDIS 静态缓存 完成--------------------");
     }
+
     private void loadError() {
         List<Errorcode> list = iErrorcodeMapper.selectList(new QueryWrapper<>());
-        if(!CollectionUtils.isEmpty(list)){
-            for(Errorcode p:list){
+        if (!CollectionUtils.isEmpty(list)) {
+            for (Errorcode p : list) {
                 ProtoErrorCodes.errorMap.put(p.getErrorcode(), p.getDescription());
             }
         }

+ 32 - 25
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/ReportFormServiceImpl.java

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.service.IReportFormService;
 import com.muchinfo.mtp3century.utils.RedisServiceUtil;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.utils.DateTimeUtils;
 import com.muchinfo.mtp3common.utils.ExportUtil;
 import com.muchinfo.mtp3common.vo.AjaxResult;
@@ -30,6 +31,7 @@ import java.math.RoundingMode;
 import java.text.ParseException;
 import java.util.Date;
 import java.util.List;
+import java.util.Objects;
 
 @Service
 public class ReportFormServiceImpl implements IReportFormService {
@@ -94,7 +96,7 @@ public class ReportFormServiceImpl implements IReportFormService {
         }
         PageResult<ShareAmountQueryResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -109,11 +111,11 @@ public class ReportFormServiceImpl implements IReportFormService {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         Long refereeuserid = systemmanager.getAreauserid();
         List<RefUserResult> results = iTaaccountMapper.queryRefUserSelect(searchcode, refereeuserid);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, results);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), results);
     }
 
     @Override
-    public PageResult<TradeQueryResult> queryTrade(TradeQueryParam param) {
+    public PageResult<TradeQueryResult> queryTrade(TradeQueryParam param, HttpServletRequest request) {
         if (param.getCycletype() == 4) {
             // 周数不足两位前面补0 #5732 推荐成交报表-周报表查不到数据 -- 重构成公共函数
             param.setCycletime(DateTimeUtils.getYearWeekNum(param.getCycletime()));
@@ -124,7 +126,7 @@ public class ReportFormServiceImpl implements IReportFormService {
         IPage<TradeQueryResult> resultIPage = detailMapper.queryTrade(page, param);
         PageResult<TradeQueryResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -157,7 +159,7 @@ public class ReportFormServiceImpl implements IReportFormService {
         }
         PageResult<OrgReportQueryResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -190,13 +192,13 @@ public class ReportFormServiceImpl implements IReportFormService {
                 resultIPage = detailMapper.queryOrgReportSum(param);
             }
             if (CollectionUtils.isEmpty(resultIPage)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "无数据可导出");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
             }
             ExportResult exportResult = ExportUtil.write(fileName, OrgReportQueryResult.class, resultIPage);
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, exportResult);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), exportResult);
         } catch (Exception e) {
             log.error("经纪会员报表导出失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -224,7 +226,7 @@ public class ReportFormServiceImpl implements IReportFormService {
         }
         PageResult<InvestorReportQueryResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -247,14 +249,16 @@ public class ReportFormServiceImpl implements IReportFormService {
             ReportTaaccount result = iReportTaaccountMapper.selectOne(new QueryWrapper<ReportTaaccount>()
                     .eq(param.getAccountid() != null, "accountid", param.getAccountid())
                     .eq(StringUtils.isNotBlank(param.getCycletime()), "cycletime", param.getCycletime())
-                    .eq(param.getCycletype() != null,"cycletype", param.getCycletype()));
-            BeanUtils.copyProperties(result, reportTaaccount);
+                    .eq(param.getCycletype() != null, "cycletype", param.getCycletype()));
+            if (Objects.nonNull(result)) BeanUtils.copyProperties(result, reportTaaccount);
         } else {
             ReckonDaytaaccount result = iReckonDaytaaccountMapper.selectOne(new QueryWrapper<ReckonDaytaaccount>()
                     .eq(param.getAccountid() != null, "accountid", param.getAccountid())
                     .eq(StringUtils.isNotBlank(param.getCycletime()), "reckondate", param.getCycletime()));
-            BeanUtils.copyProperties(result, reportTaaccount);
-            reportTaaccount.setCycletime(result.getReckondate());
+            if (Objects.nonNull(result)) {
+                BeanUtils.copyProperties(result, reportTaaccount);
+                reportTaaccount.setCycletime(result.getReckondate());
+            }
         }
         String value = iCommonService.getSysparmById("082") == null ? "0" : iCommonService.getSysparmById("082");
         /**  #68530
@@ -269,9 +273,10 @@ public class ReportFormServiceImpl implements IReportFormService {
             BigDecimal otherpay = dealNull(reportTaaccount.getOtherpay()).subtract(pay);
             reportTaaccount.setOtherpay(otherpay);
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, reportTaaccount);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), reportTaaccount);
     }
-    public BigDecimal dealNull(BigDecimal bigDecimal){
+
+    public BigDecimal dealNull(BigDecimal bigDecimal) {
         return bigDecimal == null ? BigDecimal.ZERO : bigDecimal.setScale(2, RoundingMode.HALF_UP);
     }
 
@@ -289,7 +294,7 @@ public class ReportFormServiceImpl implements IReportFormService {
         IPage<HolderTotalResult> resultIPage = detailMapper.tradeposition(page, param);
         PageResult<HolderTotalResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -311,7 +316,7 @@ public class ReportFormServiceImpl implements IReportFormService {
         IPage<WrPositionResult> resultIPage = detailMapper.wrposition(page, param);
         PageResult<WrPositionResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -333,7 +338,7 @@ public class ReportFormServiceImpl implements IReportFormService {
         IPage<TradeReportQueryResult> resultIPage = detailMapper.tradequery(page, param);
         PageResult<TradeReportQueryResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(resultIPage.getPages());
         pageResult.setCurrent(resultIPage.getCurrent());
         pageResult.setTotal(resultIPage.getTotal());
@@ -356,22 +361,24 @@ public class ReportFormServiceImpl implements IReportFormService {
             ReportPlateformpp result = iReportPlateformppMapper.selectOne(new QueryWrapper<ReportPlateformpp>()
                     .eq(StringUtils.isNotBlank(param.getCycletime()), "cycletime", param.getCycletime())
                     .eq(param.getCycletype() != null, "cycletype", param.getCycletype()));
-            BeanUtils.copyProperties(result, reportPlateformpp);
+            if (Objects.nonNull(result)) BeanUtils.copyProperties(result, reportPlateformpp);
         } else {
             ReckonDayaccountpp result = iReckonDayaccountppMapper.selectOne(new QueryWrapper<ReckonDayaccountpp>()
-                            .eq(param.getAccountid() != null, "accountid", param.getAccountid())
-                            .eq(StringUtils.isNotBlank(param.getCycletime()), "reckondate", param.getCycletime()));
-            BeanUtils.copyProperties(result, reportPlateformpp);
-            reportPlateformpp.setCycletime(result.getReckondate());
+                    .eq(param.getAccountid() != null, "accountid", param.getAccountid())
+                    .eq(StringUtils.isNotBlank(param.getCycletime()), "reckondate", param.getCycletime()));
+            if (Objects.nonNull(result)) {
+                BeanUtils.copyProperties(result, reportPlateformpp);
+                reportPlateformpp.setCycletime(result.getReckondate());
+            }
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, reportPlateformpp);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), reportPlateformpp);
     }
 
     @Override
     public AjaxResult<TAAccountChildrenSelect> queryTAAccountChildrenSelect(String searchcode, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         List<TAAccountChildrenSelect> result = iTaaccountMapper.queryChildren(searchcode, systemmanager.getAreauserid());
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, result);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), result);
     }
 
     private String formatDate(Integer cycletype, String cycletime, Integer quarter) {

+ 2 - 2
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SendMsgServiceImpl.java

@@ -75,7 +75,7 @@ public class SendMsgServiceImpl implements ISendMsgService {
             uBuilder.setLegalName(StringUtils.isBlank(ui.getLegalpersonname()) ? "" : ui.getLegalpersonname());
             uBuilder.setContactUserTel(StringUtils.isBlank(ui.getMobile()) ? "" : EncryptionUtils.decryptForAES(ui.getMobile()));
 
-            Useraccount userAcc = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",ui.getUserid()));
+            Useraccount userAcc = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", ui.getUserid()));
             JSONObject jsonObj = new JSONObject();
             jsonObj.put("broker_code", userAcc.getMemberuserid());
             jsonObj.put("user_code", userAcc.getUserid());
@@ -85,7 +85,7 @@ public class SendMsgServiceImpl implements ISendMsgService {
                 jsonObj.put("card_bank_no", ui.getBankid());
             }
             if (userAcc.getUsertype() == 5 || userAcc.getUsertype() == 3) {
-                Useraccount memAcc = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",userAcc.getMemberuserid()));
+                Useraccount memAcc = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", userAcc.getMemberuserid()));
                 uBuilder.setRelatedAcc(memAcc.getReckonaccountid() == null ? "" : memAcc.getReckonaccountid().toString());
             } else if (userAcc.getUsertype() == 2) {
                 uBuilder.setRelatedAcc(userAcc.getReckonaccountid() == null ? "" : userAcc.getReckonaccountid().toString());

+ 9 - 8
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SettlementServiceImpl.java

@@ -10,6 +10,7 @@ import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.service.ISettlementService;
 import com.muchinfo.mtp3common.enumtype.Constants;
 import com.muchinfo.mtp3common.enumtype.FunCodeConstants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.enumtype.SysConstants;
 import com.muchinfo.mtp3common.utils.*;
 import com.muchinfo.mtp3common.vo.*;
@@ -101,23 +102,23 @@ public class SettlementServiceImpl implements ISettlementService {
             List<SecondProfitSharResult> results = iReckonDaydividecountMapper.queryShareDayList(null, null, tradedate);
 
             if (CollectionUtils.isEmpty(results)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "无数据可导出");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
             }
             ExportResult exportResult = ExportUtil.write(fileName, SecondProfitSharResult.class, results);
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, exportResult);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), exportResult);
         } catch (Exception e) {
             log.error("分润付款确认信息导出失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
     @Override
-    public AjaxResult<ReckonDaydividecount> detail(String tradedate, Integer areatype, Long areaid) {
+    public AjaxResult<ReckonDaydividecount> detail(String tradedate, Integer areatype, Long areaid, HttpServletRequest request) {
         ReckonDaydividecount reckonDaydividecount = iReckonDaydividecountMapper.selectOne(new QueryWrapper<ReckonDaydividecount>()
                 .eq("tradedate", tradedate)
                 .eq("areatype", areatype)
                 .eq("areaid", areaid));
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, reckonDaydividecount);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), reckonDaydividecount);
     }
 
     @Override
@@ -138,7 +139,7 @@ public class SettlementServiceImpl implements ISettlementService {
                         .eq("areatype", areatype)
                         .eq("areaid", areaid));
                 if (reckonDaydividecount.getPaystatus() != 1) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "数据有变更,请刷新重试");
+                    return AjaxResult.error(Constants.Error_Code_Design,  MessageType.SETTLEMENT_MESSAGE_002.getCode(), request.getHeader("Accept-Language"));
                 }
 
                 map = confirmPay(reckonDaydividecount, systemmanager);
@@ -152,9 +153,9 @@ public class SettlementServiceImpl implements ISettlementService {
                 fail++;
             }
         }
+        Object[] param = {success, fail};
 
-
-        return AjaxResult.success(Constants.Success_Code_Design, "确认付款完成: " + success + " 条成功," + fail + " 条失败");
+        return AjaxResult.success(Constants.Success_Code_Design,MessageType.SETTLEMENT_MESSAGE_001.getCode(),param,request.getHeader("Accept-Language"));
     }
 
     private Map<String, Object> confirmPay(ReckonDaydividecount rd, Systemmanager systemmanager) {

+ 3 - 3
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SysUserDetailsServiceImpl.java

@@ -34,8 +34,8 @@ public class SysUserDetailsServiceImpl implements ISysUserDetailsService {
         Long[] roleCodeArray = roleuserList.stream().map(Roleuser::getRoleid).toArray(Long[]::new);
 
         return User.withUsername(systemmanager.getLogincode())
-                    .password(systemmanager.getPassword())
-                    .authorities(Arrays.toString(roleCodeArray))
-                    .build();
+                .password(systemmanager.getPassword())
+                .authorities(Arrays.toString(roleCodeArray))
+                .build();
     }
 }

+ 10 - 9
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SystemRoleServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.service.IRolefuncmenuService;
 import com.muchinfo.mtp3century.service.ISystemRoleService;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.vo.PageResult;
 import com.muchinfo.mtp3interface.mapper.IFuncmenulistMapper;
 import com.muchinfo.mtp3pojos.entity.Funcmenulist;
@@ -59,7 +60,7 @@ public class SystemRoleServiceImpl implements ISystemRoleService {
         Systemmanagerrole role = iSystemmanagerroleMapper.selectOne(new QueryWrapper<Systemmanagerrole>().eq("ROLENAME", systemRoleVo.getRolename()));
         if (StringUtils.isEmpty(systemRoleVo.getAutoid())) {
             if (Objects.nonNull(role)) {
-                return AjaxResult.success(Constants.Error_Code_Design, "角色名已存在!");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ROLE_ERROR_CODE_001.getCode(), request.getHeader("Accept-Language"));
             }
             Systemmanagerrole systemmanagerrole = new Systemmanagerrole();
             getSystemManagerRole(systemRoleVo, systemmanagerrole, systemmanager);
@@ -76,15 +77,15 @@ public class SystemRoleServiceImpl implements ISystemRoleService {
             //重新插入菜单权限信息
             insertRoleMenu(systemRoleVo, currentRole.getAutoid());
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
-    public AjaxResult deleteRoleMenus(SystemRoleVo systemRoleVo) {
+    public AjaxResult deleteRoleMenus(SystemRoleVo systemRoleVo, HttpServletRequest request) {
         //获取当前登录用户
         iSystemmanagerroleMapper.delete(new QueryWrapper<Systemmanagerrole>().eq("autoid", systemRoleVo.getAutoid()));
         iRolefuncmenuMapper.delete(new QueryWrapper<Rolefuncmenu>().eq("ROLEID", systemRoleVo.getAutoid()));
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
@@ -96,7 +97,7 @@ public class SystemRoleServiceImpl implements ISystemRoleService {
         systemRoleVo.setType(type);
         systemRoleVo.setAreauserid(systemmanager.getAreauserid());
         IPage<SystemRoleVo> page = new Page<>(pageNum, pageSize);
-        IPage<SystemRoleVo> systemRoleVoPage = iSystemmanagerroleMapper.selectByPage(page,systemRoleVo);
+        IPage<SystemRoleVo> systemRoleVoPage = iSystemmanagerroleMapper.selectByPage(page, systemRoleVo);
 
         systemRoleVoPage.getRecords().forEach(a -> {
             a.setModifiername(systemmanager.getUsername());
@@ -104,7 +105,7 @@ public class SystemRoleServiceImpl implements ISystemRoleService {
         //列表返回
         PageResult<SystemRoleVo> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(systemRoleVoPage.getPages());
         pageResult.setCurrent(systemRoleVoPage.getCurrent());
         pageResult.setTotal(systemRoleVoPage.getTotal());
@@ -114,7 +115,7 @@ public class SystemRoleServiceImpl implements ISystemRoleService {
     }
 
     @Override
-    public AjaxResult<SystemRoleVo> queryDetail(Integer autoId) {
+    public AjaxResult<SystemRoleVo> queryDetail(Integer autoId, HttpServletRequest request) {
         Systemmanagerrole systemmanagerrole = iSystemmanagerroleMapper.selectOne(new QueryWrapper<Systemmanagerrole>().eq("autoid", autoId));
         SystemRoleVo systemRoleVo = new SystemRoleVo();
         BeanUtils.copyProperties(systemmanagerrole, systemRoleVo);
@@ -124,7 +125,7 @@ public class SystemRoleServiceImpl implements ISystemRoleService {
         //获取所有菜单
         List<String> nameList = funcmenulists.stream().map(Funcmenulist::getResourcecode).collect(Collectors.toList());
         systemRoleVo.setMenuids(nameList);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, systemRoleVo);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), systemRoleVo);
     }
 
     @Override
@@ -138,7 +139,7 @@ public class SystemRoleServiceImpl implements ISystemRoleService {
         systemRoleVoList.forEach(a -> {
             a.setModifiername(systemmanager.getUsername());
         });
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, systemRoleVoList);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), systemRoleVoList);
     }
 
     private void insertRoleMenu(SystemRoleVo systemRoleVo, Long autoId) {

+ 19 - 18
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SystemSetUpServiceImpl.java

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.service.ISystemSetUpService;
 import com.muchinfo.mtp3common.enumtype.Constants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.enumtype.SysConstants;
 import com.muchinfo.mtp3common.enumtype.SysEnums;
 import com.muchinfo.mtp3common.vo.AjaxResult;
@@ -47,23 +48,23 @@ public class SystemSetUpServiceImpl implements ISystemSetUpService {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         //如果不是平台管理员
         PageResult<SystemUserLogResult> pageResult = new PageResult<>();
-        if(!SysConstants.SYS_TYPE_MANAGE.equals(systemmanager.getReletype())){
+        if (!SysConstants.SYS_TYPE_MANAGE.equals(systemmanager.getReletype())) {
             param.setAreauserid(systemmanager.getAreauserid());
-            String roles = ","+param.getOrgztypes()+"," ;
+            String roles = "," + param.getOrgztypes() + ",";
             //如果是经纪会员
-            if(roles.contains(","+ SysEnums.OrganRole.broker.getCode()+",")){
+            if (roles.contains("," + SysEnums.OrganRole.broker.getCode() + ",")) {
                 //经纪会员或者子机构 可以查下级,那么要判断传入的机构是否 就是他的下级
-                log.debug("parentuserid={},userid={}",systemmanager.getAreauserid(), param.getAreauserid());
-                if(param.getAreaids()!=null && !"".equals(param.getAreaids().trim())){
+                log.debug("parentuserid={},userid={}", systemmanager.getAreauserid(), param.getAreauserid());
+                if (param.getAreaids() != null && !"".equals(param.getAreaids().trim())) {
                     String[] aids = param.getAreaids().split(",");
-                    for(String aid : aids){
+                    for (String aid : aids) {
                         //当前登录账号的所属会员与要查的会员相同
-                        if(systemmanager.getAreauserid().toString().equals(aid))
+                        if (systemmanager.getAreauserid().toString().equals(aid))
                             continue;
                         List<Useraccount> l = iUseraccountMapper.selectList(new QueryWrapper<Useraccount>()
                                 .eq("userid", systemmanager.getAreauserid())
                                 .eq("parentuserid", Long.parseLong(aid)));
-                        if(CollectionUtils.isEmpty(l)){
+                        if (CollectionUtils.isEmpty(l)) {
                             pageResult.setCode(Constants.Error_Code_Design);
                             pageResult.setMessage("无查询权限");
                             return pageResult;
@@ -71,19 +72,19 @@ public class SystemSetUpServiceImpl implements ISystemSetUpService {
                     }
                 }
             }
-        } else if(param.getAreauserid() == null){
+        } else if (param.getAreauserid() == null) {
             //如果是平台管理员,默认只查平台的日志
             param.setAreauserid(systemmanager.getAreauserid());
         }
 
-        if(StringUtils.isNotBlank(param.getStarttime())){
+        if (StringUtils.isNotBlank(param.getStarttime())) {
             param.setStarttime(param.getStarttime() + " 00:00:00");
         }
-        if(StringUtils.isNotBlank(param.getEndtime())){
+        if (StringUtils.isNotBlank(param.getEndtime())) {
             param.setEndtime(param.getEndtime() + " 23:59:59");
         }
 
-        IPage<SystemUserLogResult> page = new Page<>(param.getPageNum(),param.getPageSize());
+        IPage<SystemUserLogResult> page = new Page<>(param.getPageNum(), param.getPageSize());
         IPage<SystemUserLogResult> queryResultIPage = iSystemmanagerMapper.selectLogByParam(page, param);
         PageResult<SystemUserLogResult> result = new PageResult<>();
         result.setCode(Constants.Success_Code_Design);
@@ -101,9 +102,9 @@ public class SystemSetUpServiceImpl implements ISystemSetUpService {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         //如果不是平台管理员
         if (!SysConstants.SYS_TYPE_MANAGE.equals(systemmanager.getReletype())) {
-            param.setParentuserid( systemmanager.getAreauserid());
+            param.setParentuserid(systemmanager.getAreauserid());
         }
-        IPage<SystemLoginErrorResult> page = new Page<>(param.getPageNum(),param.getPageSize());
+        IPage<SystemLoginErrorResult> page = new Page<>(param.getPageNum(), param.getPageSize());
         IPage<SystemLoginErrorResult> queryResultIPage = iSystemmanagerMapper.queryUserLoginFlow(page, param);
         PageResult<SystemLoginErrorResult> result = new PageResult<>();
         result.setCode(Constants.Success_Code_Design);
@@ -123,18 +124,18 @@ public class SystemSetUpServiceImpl implements ISystemSetUpService {
             Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
             //如果不是平台管理员
             if (!SysConstants.SYS_TYPE_MANAGE.equals(systemmanager.getReletype())) {
-                param.setParentuserid( systemmanager.getAreauserid());
+                param.setParentuserid(systemmanager.getAreauserid());
             }
             List<SystemLoginErrorResult> results = iSystemmanagerMapper.queryUserLoginFlow(param);
 
             if (CollectionUtils.isEmpty(results)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "无数据可导出");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
             }
             ExportResult exportResult = ExportUtil.write(fileName, SystemLoginErrorResult.class, results);
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, exportResult);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), exportResult);
         } catch (Exception e) {
             log.error("登录异常流水_导出失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
         }
     }
 

+ 28 - 28
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/SystemmanagerServiceImpl.java

@@ -64,7 +64,7 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
      * @return message 验证码
      */
     @Override
-    public AjaxResult getVerifyCode() {
+    public AjaxResult getVerifyCode(HttpServletRequest request) {
         // 算术类型
         ArithmeticCaptcha captcha = new ArithmeticCaptcha(111, 36);
         // 几位数运算,默认是两位
@@ -80,7 +80,7 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
         UUID key = UUID.randomUUID();
         //存储验证码信息到redis中,60秒过期
         redisServiceUtil.setCacheObject(RedisConstants.LOGIN_CODE + key, result, RedisConstants.LOGIN_CODE_TIME, TimeUnit.SECONDS);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.get_vcodeError_msg, new LoginCodeVo(captcha.toBase64(), key.toString()));
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM006.getCode(), request.getHeader("Accept-Language"), new LoginCodeVo(captcha.toBase64(), key.toString()));
     }
 
     @Override
@@ -89,7 +89,7 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
         if (systemmanager.getManagertype() != 1) {
             rsp.setCode(Constants.loginTradeManage);
             rsp.setMessage(Constants.loginTradeManage_msg);
-            return AjaxResult.error(Constants.loginTradeManage, rsp.getMessage(), rsp);
+            return AjaxResult.error(Constants.loginTradeManage, MessageType.LOGIN_ERROR_CODE_001.getCode(), request.getHeader("Accept-Language"), rsp);
         }
         //校验验证码
         /*if (!verifyCode(loginReq.getKey(), loginReq.getVerifyCode())) {
@@ -104,7 +104,7 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
             log.debug("code:{},ip:{}", loginReq.getAccountCode(), loginReq.getLoginIp());
             rsp.setCode(Constants.loginCountError);
             rsp.setMessage(Constants.loginCountError_msg);
-            return AjaxResult.error(Constants.loginCountError, rsp.getMessage(), rsp);
+            return AjaxResult.error(Constants.loginCountError, MessageType.LOGIN_ERROR_CODE_002.getCode(), request.getHeader("Accept-Language"), rsp);
         }
         // 如果用户被锁定,判断锁定时长 超过时常可以登陆
         if (SysEnums.SysStatus.lock.getCode().equals(systemmanager.getManagerstatus())) {
@@ -120,7 +120,7 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
             if (DateTimeUtils.getDoubleMin(new Date(), systemmanager.getLogintime()) < defaultMin) {
                 rsp.setCode(Constants.userlock);
                 rsp.setMessage(Constants.loginlock_msg);
-                return AjaxResult.error(Constants.userlock, rsp.getMessage(), rsp);
+                return AjaxResult.error(Constants.userlock, MessageType.LOGIN_ERROR_CODE_003.getCode(), request.getHeader("Accept-Language"), rsp);
             } else {
                 //超过时间更新失败次数
                 systemmanager.setManagerstatus(SysEnums.SysStatus.ok.getCode());
@@ -131,7 +131,7 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
             log.debug("manager status={}", systemmanager.getManagerstatus());
             rsp.setCode(Constants.unOk);
             rsp.setMessage(Constants.loginStop_msg);
-            return AjaxResult.error(Constants.unOk, rsp.getMessage(), rsp);
+            return AjaxResult.error(Constants.unOk, MessageType.LOGIN_ERROR_CODE_004.getCode(), request.getHeader("Accept-Language"), rsp);
         }
 
         Object o = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "975");
@@ -160,7 +160,7 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
             rsp.setActive(size == null ? 0 : size);
         }
         rsp.setReleType(systemmanager.getReletype());
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.loginSuccess_mag, rsp);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM007.getCode(), request.getHeader("Accept-Language"), rsp);
     }
 
     private Set<String> getStrings(List<Systemmanagerrole> systemmanagerroles) {
@@ -197,13 +197,13 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
         }
         IPage<SystemUserResResult> page = new Page<>(systemUserReqParam.getPageNum(), systemUserReqParam.getPageSize());
         IPage<SystemUserResResult> systemUserResResultIPage = iSystemmanagerMapper.selectByPageVo(page, systemUserReqParam);
-        return getSystemUserResResultPageResult(systemUserResResultIPage);
+        return getSystemUserResResultPageResult(systemUserResResultIPage, request);
     }
 
-    private PageResult<SystemUserResResult> getSystemUserResResultPageResult(IPage<SystemUserResResult> systemUserVoPage) {
+    private PageResult<SystemUserResResult> getSystemUserResResultPageResult(IPage<SystemUserResResult> systemUserVoPage, HttpServletRequest request) {
         PageResult<SystemUserResResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(systemUserVoPage.getPages());
         pageResult.setCurrent(systemUserVoPage.getCurrent());
         pageResult.setTotal(systemUserVoPage.getTotal());
@@ -213,14 +213,14 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
     }
 
     @Override
-    public AjaxResult<SystemUserResResult> queryDetail(Integer autoId) {
+    public AjaxResult<SystemUserResResult> queryDetail(Integer autoId, HttpServletRequest request) {
         StringBuilder stringBuilder = new StringBuilder();
         StringBuilder idStr = new StringBuilder();
         //基本信息
         Systemmanager user = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("AUTOID", autoId));
         //是否有查询权限
         if (user.getReletype() != 1) {
-            return AjaxResult.error(Constants.Error_Code_Design, "权限不足");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_004.getCode(), request.getHeader("Accept-Language"));
         }
         SystemUserResResult userResResult = new SystemUserResResult();
         BeanUtils.copyProperties(user, userResResult);
@@ -250,7 +250,7 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
         if (user.getAreauserid() != 0) {
             userResResult.setAreaName(iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("USERID", user.getAreauserid())).getAccountname());
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, userResResult);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), userResResult);
     }
 
     @Override
@@ -262,7 +262,7 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
         //判断当前管理员信息是否存在,存在则更改
         if (StringUtils.isEmpty(systemUserVo.getAutoid())) {
             if (Objects.nonNull(addUser)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "登录账号已存在!");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.LOGIN_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
             }
             String lPwd = iCommonService.getSystemParam(Constants.REDIS_HEADER_SYSPARAM, SysConstants.SYSPARAM_CODE_DEFAULT_PWD);
             Systemmanager user = new Systemmanager();
@@ -281,7 +281,7 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
             user.setManagertype(1);
             iSystemmanagerMapper.insert(user);
             //添加角色信息
-            ajaxResult = dealRoleMsg(systemUserVo, user);
+            ajaxResult = dealRoleMsg(systemUserVo, user, request);
         } else {
             addUser.setLogincode(systemUserVo.getLogincode());
             addUser.setUsername(systemUserVo.getUsername());
@@ -292,7 +292,7 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
             //删除当前角色信息
             iRoleuserMapper.delete(new QueryWrapper<Roleuser>().eq("MANAGERID", systemUserVo.getAutoid()));
             //添加角色信息
-            ajaxResult = dealRoleMsg(systemUserVo, addUser);
+            ajaxResult = dealRoleMsg(systemUserVo, addUser, request);
         }
         return ajaxResult;
     }
@@ -303,13 +303,13 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         Systemmanager currentUser = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("AUTOID", systemUserVo.getAutoid()));
         if (Objects.isNull(currentUser)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "该用户不存在,请联系管理人员处理!");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.LOGIN_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
         }
         if (systemmanager.getReletype() != 1 && !iCommonService.checkIsAreaSon2(systemmanager.getAreauserid(), currentUser.getAreauserid())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "权限不足");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_004.getCode(), request.getHeader("Accept-Language"));
         }
         if (systemUserVo.getType() == 1 && systemmanager.getAutoid().intValue() == systemUserVo.getAutoid().intValue()) {
-            return AjaxResult.error(Constants.Error_Code_Design, "不允许停用当前登录账户");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.LOGIN_ERROR_CODE_007.getCode(), request.getHeader("Accept-Language"));
         }
 
         switch (systemUserVo.getType()) {
@@ -328,7 +328,7 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
             default:
                 break;
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
@@ -336,26 +336,26 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         Systemmanagerrole systemmanagerrole = iSystemmanagerroleMapper.selectOne(new QueryWrapper<Systemmanagerrole>().eq("autoid", autoId));
         if (systemmanagerrole != null && systemmanager.getAreauserid().compareTo(systemmanagerrole.getAreauserid()) != 0) {
-            return AjaxResult.error(Constants.Error_Code_Design, "权限不足!");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_004.getCode(), request.getHeader("Accept-Language"));
         }
         List<Systemmanager> systemManagers = iSystemmanagerMapper.getSystemManagerByRole(autoId);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, systemManagers);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), systemManagers);
     }
 
     @Override
     public AjaxResult updatePwd(SystemUserPwdParam systemUserPwdParam, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (systemUserPwdParam.getOldPwd().equals(systemUserPwdParam.getNewPwd())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "不能与旧密码相同");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.LOGIN_ERROR_CODE_008.getCode(), request.getHeader("Accept-Language"));
         }
         if (!systemmanager.getPassword().equals(systemUserPwdParam.getOldPwd())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "旧密码错误");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.LOGIN_ERROR_CODE_009.getCode(), request.getHeader("Accept-Language"));
         }
         String expday = iCommonService.getSystemParam(Constants.REDIS_HEADER_SYSPARAM, SysConstants.SYSPARAM_CODE_EXPDAY);
         systemmanager.setPassword(systemUserPwdParam.getNewPwd());
         systemmanager.setPwdexpdate(DateTimeUtils.addDay(new Date(), Integer.parseInt(expday.trim())));
         iSystemmanagerMapper.update(systemmanager, new QueryWrapper<Systemmanager>().eq("AUTOID", systemmanager.getAutoid()));
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
@@ -425,7 +425,7 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
         iSystemmanagerlogMapper.insert(syslog);
     }
 
-    private AjaxResult dealRoleMsg(SystemUserVo systemUserVo, Systemmanager addUser) {
+    private AjaxResult dealRoleMsg(SystemUserVo systemUserVo, Systemmanager addUser, HttpServletRequest request) {
         if (!StringUtils.isEmpty(systemUserVo.getRoleId())) {
             String r[] = systemUserVo.getRoleId().split(",");
             for (String s : r) {
@@ -437,11 +437,11 @@ public class SystemmanagerServiceImpl extends ServiceImpl<ISystemmanagerMapper,
                     ur.setRoletype(addUser.getReletype());
                     iRoleuserMapper.insert(ur);
                 } else {
-                    return AjaxResult.error(Constants.Error_Code_Design, "角色信息有误");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.LOGIN_ERROR_CODE_010.getCode(), request.getHeader("Accept-Language"));
                 }
             }
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     private boolean verifyCode(String key, String code) {

+ 61 - 54
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/TaaccountServiceImpl.java

@@ -12,10 +12,7 @@ import com.muchinfo.mtp3century.service.ICommonService;
 import com.muchinfo.mtp3century.service.ISendMsgService;
 import com.muchinfo.mtp3century.service.ITaaccountService;
 import com.muchinfo.mtp3century.utils.RedisServiceUtil;
-import com.muchinfo.mtp3common.enumtype.Constants;
-import com.muchinfo.mtp3common.enumtype.FunCodeConstants;
-import com.muchinfo.mtp3common.enumtype.SysConstants;
-import com.muchinfo.mtp3common.enumtype.SysEnums;
+import com.muchinfo.mtp3common.enumtype.*;
 import com.muchinfo.mtp3common.utils.*;
 import com.muchinfo.mtp3common.vo.*;
 import com.muchinfo.mtp3interface.mapper.*;
@@ -97,7 +94,7 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
         IPage<TaAccountQueryResult> queryResultIPage = iTaaccountMapper.queryTaAccountPage(page, taAccountQueryParam);
         PageResult<TaAccountQueryResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(queryResultIPage.getPages());
         pageResult.setCurrent(queryResultIPage.getCurrent());
         pageResult.setTotal(queryResultIPage.getTotal());
@@ -114,7 +111,7 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
         Taaccount taaccount = iTaaccountMapper.selectOne(new QueryWrapper<Taaccount>().eq("ACCOUNTID", accountId));
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (systemmanager.getReletype() != 1 && !iCommonService.checkIsAreaSon2(systemmanager.getAreauserid(), taaccount.getUserid())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
         //计算金额
         dealAmount(taaccount);
@@ -145,7 +142,7 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
         if (Objects.nonNull(ar)) {
             taAccountQueryResult.setIsSelf(1);
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, taAccountQueryResult);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), taAccountQueryResult);
     }
 
     @Override
@@ -153,30 +150,30 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         //校验
         if (!iCommonService.checkTaAccountReport(systemmanager, vo.getAccountId())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
         if (StringUtils.isBlank(vo.getOldPwd())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "请填写旧密码");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.PWD_ERROR_CODE_001.getCode(), request.getHeader("Accept-Language"));
         }
         if (StringUtils.isBlank(vo.getNewPwd())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "请填写新密码");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.PWD_ERROR_CODE_002.getCode(), request.getHeader("Accept-Language"));
         }
         if (StringUtils.isBlank(vo.getConfirmPassword())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "请填写新密码确认");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.PWD_ERROR_CODE_003.getCode(), request.getHeader("Accept-Language"));
         }
         if (!vo.getNewPwd().equals(vo.getConfirmPassword())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "两次密码不一致");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.PWD_ERROR_CODE_004.getCode(), request.getHeader("Accept-Language"));
         }
         Taaccount ta = iTaaccountMapper.selectOne(new QueryWrapper<Taaccount>().eq("ACCOUNTID", vo.getAccountId()));
         if (!vo.getOldPwd().equals(ta.getPassword())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "旧密码错误");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.PWD_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
         }
         ta.setPassword(vo.getNewPwd());
         iTaaccountMapper.update(ta, new QueryWrapper<Taaccount>().eq("ACCOUNTID", ta.getAccountid()));
         //记录日志
         systemmanagerService.writeOperateLog(SysConstants.OPERATION_TAA,
                 "修改资金账户id=" + vo.getAccountId() + "的密码", systemmanager, null, null, null);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
@@ -210,7 +207,7 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
         IPage<TaAccountAmountStreamResult> listStream = iTaaccountMapper.selectAmountStream(page, param);
         PageResult<TaAccountAmountStreamResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(listStream.getPages());
         pageResult.setCurrent(listStream.getCurrent());
         pageResult.setTotal(listStream.getTotal());
@@ -233,13 +230,13 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
             List<TaAccountAmountStreamResult> results = iTaaccountMapper.selectAmountStream(param);
 
             if (CollectionUtils.isEmpty(results)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "无数据可导出");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
             }
             ExportResult exportResult = ExportUtil.write(fileName, DealerQueryResult.class, results);
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, exportResult);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), exportResult);
         } catch (Exception e) {
             log.error("资金流水查询导出失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -249,10 +246,10 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         Taaccount ta = iTaaccountMapper.selectOne(new QueryWrapper<Taaccount>().eq("ACCOUNTID", param.getAccountcode()));
         if (systemmanager.getAreauserid().compareTo(ta.getUserid()) != 0) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
         if (param.getMoney() == null || param.getMoney().compareTo(BigDecimal.ZERO) <= 0) {
-            return AjaxResult.error(Constants.Error_Code_Design, "金额为 0,不做处理!");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.AMOUNT_ERROR_CODE_001.getCode(), request.getHeader("Accept-Language"));
         }
         //出入金
         Long uuid = SerialNumberUtils.getNewSerialNumber(SerialNumberUtils.prefix_bank);
@@ -329,28 +326,28 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
                         case 1: {
                             BankMI1.t2bBankWithdrawRsp rsp_ = (BankMI1.t2bBankWithdrawRsp) rsp;
                             if (rsp_.getStatus() == 0) {
-                                return AjaxResult.success(Constants.Success_Code_Design, "出金成功", rsp_.getNetAddr());
+                                return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM008.getCode(), request.getHeader("Accept-Language"), rsp_.getNetAddr());
                             } else if (rsp_.getStatus() == 6007) {
-                                return AjaxResult.success(Constants.Success_Code_Design, ProtoErrorCodes.resultMsg(rsp_.getStatus()), rsp_.getNetAddr());
+                                return AjaxResult.success(rsp_.getStatus(), ProtoErrorCodes.resultMsg(rsp_.getStatus()), "", rsp_.getNetAddr());
                             } else {
-                                return AjaxResult.error(Constants.Error_Code_Design, ProtoErrorCodes.resultMsg(rsp_.getStatus()) + ";" + rsp_.getCenterErrMsg(), rsp_.getNetAddr());
+                                return AjaxResult.error(Constants.Error_Code_Design, ProtoErrorCodes.resultMsg(rsp_.getStatus()) + ";" + rsp_.getCenterErrMsg(), "", rsp_.getNetAddr());
                             }
                         }
                         case 2: {
                             BankMI1.t2bBankDepositRsp rsp_ = (BankMI1.t2bBankDepositRsp) rsp;
                             if (rsp_.getStatus() == 0) {
-                                return AjaxResult.success(Constants.Success_Code_Design, "入金成功", rsp_.getNetAddr());
+                                return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM009.getCode(), request.getHeader("Accept-Language"), rsp_.getNetAddr());
                             } else if (rsp_.getStatus() == 6007) {
-                                return AjaxResult.success(Constants.Success_Code_Design, ProtoErrorCodes.resultMsg(rsp_.getStatus()), rsp_.getNetAddr());
+                                return AjaxResult.success(rsp_.getStatus(), ProtoErrorCodes.resultMsg(rsp_.getStatus()), "", rsp_.getNetAddr());
                             } else {
-                                return AjaxResult.error(Constants.Error_Code_Design, ProtoErrorCodes.resultMsg(rsp_.getStatus()) + ";" + rsp_.getCenterErrMsg(), rsp_.getNetAddr());
+                                return AjaxResult.error(Constants.Error_Code_Design, ProtoErrorCodes.resultMsg(rsp_.getStatus()) + ";" + rsp_.getCenterErrMsg(), "", rsp_.getNetAddr());
                             }
                         }
                         default:
                             break;
                     }
                 } else {
-                    return AjaxResult.error(Constants.Error_Code_Design, "您的申请已提交,请稍后查询结果。");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM005.getCode(), request.getHeader("Accept-Language"));
                 }
             } catch (Exception e) {
                 e.printStackTrace();
@@ -369,7 +366,7 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
         Taaccount ta = iTaaccountMapper.selectOne(new QueryWrapper<Taaccount>().eq("ACCOUNTID", param.getAccountId()));
         if (systemmanager.getReletype() != 1) {
             if (!iCommonService.checkIsAreaSon2(systemmanager.getAreauserid(), ta.getUserid())) {
-                return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
             }
         }
         //处理当前登录账户资金权限
@@ -397,11 +394,11 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
         }
         //记录操作日志
         writeOperateLog(param, ta, systemmanager);
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
-    public PageResult<Taaccount> showAccount(Long userid, String accountid, Integer pageNo, Integer pageSize) {
+    public PageResult<Taaccount> showAccount(Long userid, String accountid, Integer pageNo, Integer pageSize, HttpServletRequest request) {
         QueryWrapper<Taaccount> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("accountid", accountid);
         if (userid != null) {
@@ -419,7 +416,7 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
         //返回列表
         PageResult<Taaccount> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(taaccountIPage.getPages());
         pageResult.setCurrent(taaccountIPage.getCurrent());
         pageResult.setTotal(taaccountIPage.getTotal());
@@ -434,7 +431,7 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
         Taaccount old = iTaaccountMapper.selectOne(new QueryWrapper<Taaccount>().eq("accountid", updateParam.getAccountid()));
         if (systemmanager.getReletype() != 1) {
             if (!iCommonService.checkIsAreaSon2(systemmanager.getAreauserid(), old.getUserid())) {
-                return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
             }
         }
         //原来的状态
@@ -462,27 +459,27 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
             e.printStackTrace();
             log.error("资金账户-->修改 发送用户信息修改失败,code=" + FunCodeConstants.FunCode_Trade_UserChangeNtf + ",请检查!,失败原因:" + e);
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
     public AjaxResult logOff(Long areaid, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (!iCommonService.checkUserAccountRole(systemmanager, areaid)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
         Taaccount ta = iTaaccountMapper.selectOne(new QueryWrapper<Taaccount>().eq("userid", areaid));
         if (Objects.isNull(ta)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有找到资金账户");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.INVESTOR_ERROR_CODE_001.getCode(), request.getHeader("Accept-Language"));
         }
         Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", areaid));
         if (ua.getUsertype() != 5) {
-            return AjaxResult.error(Constants.Error_Code_Design, "非投资者账户,不能销户审核.");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.INVESTOR_ERROR_CODE_002.getCode(), request.getHeader("Accept-Language"));
         }
         //判断资金账户签约信息
         BankAccountsign sign = iBankAccountsignMapper.selectOne(new QueryWrapper<BankAccountsign>().eq("accountcode", ta.getAccountid()));
         if (sign != null && sign.getSignstatus() != 1 && sign.getSignstatus() != 7) {
-            return AjaxResult.error(Constants.Error_Code_Design, "资金账户未解约,不能销户.");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.INVESTOR_ERROR_CODE_003.getCode(), request.getHeader("Accept-Language"));
         }
         //判断是否是干净账户
         if (ta.getTradestatus() != 7) {
@@ -513,13 +510,13 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
                             if (accountrsp.getIsCleanAccount() == 1) {
                                 //干净账户
                             } else {
-                                return AjaxResult.error(Constants.Error_Code_Design, "账户存在资金、持仓等相关信息,不能注销.");
+                                return AjaxResult.error(Constants.Error_Code_Design, MessageType.INVESTOR_ERROR_CODE_004.getCode(), request.getHeader("Accept-Language"));
                             }
                         } else {
-                            return AjaxResult.error(Constants.Error_Code_Design, "[" + accountrsp.getRetCode() + "]" + ProtoErrorCodes.resultMsg(accountrsp.getRetCode()));
+                            return AjaxResult.error(Constants.Error_Code_Design, "[" + accountrsp.getRetCode() + "]" + ProtoErrorCodes.resultMsg(accountrsp.getRetCode()), "");
                         }
                     } else {
-                        return AjaxResult.error(Constants.Error_Code_Design, "资金账户请求没有回应.");
+                        return AjaxResult.error(Constants.Error_Code_Design, MessageType.INVESTOR_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
                     }
                 } catch (InterruptedException e) {
                     e.printStackTrace();
@@ -571,24 +568,24 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
                     .eq("ismain", 1));
             iSendMsgService.sendM2BUnregistCustomerInfo(tas);
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
     public AjaxResult recover(Long areaid, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (!iCommonService.checkUserAccountRole(systemmanager, areaid)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
         //allocated==null
-        return refUserAccount(areaid, systemmanager);
+        return refUserAccount(areaid, systemmanager, request);
     }
 
     @Override
     public AjaxResult rebackChange(Long areaid, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (!iCommonService.checkUserAccountRole(systemmanager, areaid)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
 
         iDraftUseraccountNewMapper.delete(new QueryWrapper<DraftUseraccountNew>().eq("USERID", areaid));
@@ -609,10 +606,10 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
             systemmanagerService.writeOperateLog(SysConstants.PART_INVESTOR_MANAGE, "撤回id=" + organ.getUserid(), systemmanager, null, null, null);
         }
 
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
-    private AjaxResult refUserAccount(Long areaid, Systemmanager systemmanager) {
+    private AjaxResult refUserAccount(Long areaid, Systemmanager systemmanager, HttpServletRequest request) {
         Useraccount org = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", areaid)); //areaid就是userid
         Userinfo ui = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid", areaid));
         List<Userinfo> uiList = iUserinfoMapper.selectList(new QueryWrapper<Userinfo>()
@@ -624,18 +621,18 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
         if (CollectionUtils.isNotEmpty(uiList)) {
             for (int i = 0; i < uiList.size(); i++) {
                 if (uiList.get(i).getCardnum().equals(ui.getCardnum())) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在正常记录,无法恢复");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
                 }
                 //5投资者
                 if (org.getUsertype() == 5 && uiList.get(i).getMobile().equals(ui.getMobile())) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "手机号已存在正常记录,无法恢复");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_007.getCode(), request.getHeader("Accept-Language"));
                 }
             }
         }
         if (org.getParentuserid() != 0) {
             Useraccount p = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", org.getParentuserid()));
             if (p.getAccountstatus() != 4) {
-                return AjaxResult.error(Constants.Error_Code_Design, "上级机构为非正常状态,无法恢复");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_008.getCode(), request.getHeader("Accept-Language"));
             }
         }
         if (org.getUsertype() == 5) {
@@ -643,11 +640,11 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
             Arearole ar = iArearoleMapper.selectOne(new QueryWrapper<Arearole>().eq("roletype", 7)
                     .eq("userid", org.getMemberuserid()));
             if (Objects.nonNull(ar)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "所属会员没有经纪角色,无法恢复");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_009.getCode(), request.getHeader("Accept-Language"));
             }
         }
 
-        AjaxResult ajaxResult = checkOrgan(org);
+        AjaxResult ajaxResult = checkOrgan(org, request);
         if (ajaxResult.getCode() == 500) {
             return ajaxResult;
         }
@@ -711,7 +708,7 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
         return ajaxResult;
     }
 
-    private AjaxResult checkOrgan(Useraccount ua) {
+    private AjaxResult checkOrgan(Useraccount ua, HttpServletRequest request) {
         if (ua.getUsertype() == 2) {
             return null;
         }
@@ -730,11 +727,21 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
         if (CollectionUtils.isNotEmpty(organ)) {
             for (Useraccount ua_ : organ) {
                 if (ua_.getAccountstatus() != 4) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "所属" + (ua_.getUsertype() == 2 ? "会员" : (ua_.getUsertype() == 3 ? "机构" : "经纪人")) + "为非正常状态,无法恢复");
+                    if (ua.getAccountstatus() == 4) {
+                        break;
+                    }
+
+                    if (ua.getUsertype() == 2) {
+                        return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_023.getCode(), request.getHeader("Accept-Language"));
+                    } else if (ua.getUsertype() == 3) {
+                        return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_024.getCode(), request.getHeader("Accept-Language"));
+                    } else {
+                        return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_025.getCode(), request.getHeader("Accept-Language"));
+                    }
                 }
             }
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     private Map<String, Object> logoutInvestor(Long areaid, Systemmanager systemmanager, Taaccount ta) {

+ 95 - 94
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/UseraccountServiceImpl.java

@@ -15,6 +15,7 @@ import com.muchinfo.mtp3century.service.ISystemmanagerService;
 import com.muchinfo.mtp3century.service.IUseraccountService;
 import com.muchinfo.mtp3century.utils.RedisServiceUtil;
 import com.muchinfo.mtp3common.enumtype.Constants;
+import com.muchinfo.mtp3common.enumtype.MessageType;
 import com.muchinfo.mtp3common.enumtype.SysConstants;
 import com.muchinfo.mtp3common.enumtype.SysEnums;
 import com.muchinfo.mtp3common.utils.*;
@@ -98,14 +99,14 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
             dealerQueryParam.setParentUserId(systemmanager.getAreauserid());
         }
         IPage<DealerQueryResult> page = new Page<>(dealerQueryParam.getPageNum(), dealerQueryParam.getPageSize());
-        IPage<DealerQueryResult> dealerQueryResults = iUseraccountMapper.queryInvestorPage(page,dealerQueryParam);
-        return getDealerQueryResultPageResult(dealerQueryResults);
+        IPage<DealerQueryResult> dealerQueryResults = iUseraccountMapper.queryInvestorPage(page, dealerQueryParam);
+        return getDealerQueryResultPageResult(dealerQueryResults, request);
     }
 
-    private PageResult<DealerQueryResult> getDealerQueryResultPageResult(IPage<DealerQueryResult> dealerQueryResults) {
+    private PageResult<DealerQueryResult> getDealerQueryResultPageResult(IPage<DealerQueryResult> dealerQueryResults, HttpServletRequest request) {
         PageResult<DealerQueryResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(dealerQueryResults.getPages());
         pageResult.setCurrent(dealerQueryResults.getCurrent());
         pageResult.setTotal(dealerQueryResults.getTotal());
@@ -128,7 +129,7 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
                 );
                 if (Objects.nonNull(areaRoleJj)) {
                     if (!iCommonService.checkUserAccountRole(sm, dealerQueryDetailParam.getUserid())) {
-                        return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+                        return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
                     }
                 } else {
                     //没有经纪会员角色 再判断是否有营销中心角色
@@ -141,19 +142,19 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
                         Useraccount userAccount = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", dealerQueryDetailParam.getUserid()));
                         Useraccount userAccountOther = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", userAccount.getMemberuserid()));
                         if (userAccountOther.getParentuserid().compareTo(sm.getAreauserid()) != 0) {
-                            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+                            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
                         }
                     } else {
-                        return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+                        return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
                     }
                 }
             } else if (sm.getReletype() == 3) {
                 //子机构
                 if (!iCommonService.checkUserAccountRole(sm, dealerQueryDetailParam.getUserid())) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
                 }
             } else {
-                return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
             }
         }
         //异步插入操作记录
@@ -168,10 +169,10 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
         if (dealerQueryDetailParam.getModifyFlag() != null && dealerQueryDetailParam.getModifyFlag() >= 2 && dealerQueryDetailParam.getModifyFlag() < 5) {
             detailResult.setOldResult(getUserAccountDetail(dealerQueryDetailParam.getUserid()));
             detailResult.setNewResult(getModifyInvestorDetail(dealerQueryDetailParam.getUserid()));
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message,detailResult);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), detailResult);
         } else {
             detailResult.setOldResult(getUserAccountDetail(dealerQueryDetailParam.getUserid()));
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message,detailResult);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), detailResult);
         }
     }
 
@@ -190,7 +191,7 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
         detailResult.setUserAccountDetailVo(userAccountDetailVo);
         UserinfoDetailVo userinfoDetailVo = iUserinfoMapper.getUserinfoDetail(userid);
         detailResult.setUserinfoDetailVo(userinfoDetailVo);
-        return  detailResult;
+        return detailResult;
     }
 
     @Override
@@ -205,13 +206,13 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
             }
             List<DealerQueryResult> dealerQueryResults = iUseraccountMapper.queryInvestorPage(dealerQueryParam);
             if (CollectionUtils.isEmpty(dealerQueryResults)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "无数据可导出");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_005.getCode(), request.getHeader("Accept-Language"));
             }
             ExportResult exportResult = ExportUtil.write(fileName, DealerQueryResult.class, dealerQueryResults);
-            return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message,exportResult);
-        }catch (Exception e){
-            log.error("交易商管理_导出失败,失败原因:"+e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), exportResult);
+        } catch (Exception e) {
+            log.error("交易商管理_导出失败,失败原因:" + e);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.QUERY_ERROR_CODE_006.getCode(), request.getHeader("Accept-Language"));
         }
     }
 
@@ -234,11 +235,11 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
         map.put("areauserid", memberuserid);
 
         // 1008 掉期是否签署电子合同 默认为0,麦顿为1
-        String mid = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM,"1008");
-        if (StringUtils.isNotEmpty(mid) && mid.equals("1")){
+        String mid = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "1008");
+        if (StringUtils.isNotEmpty(mid) && mid.equals("1")) {
             //需要电子签的状态为1:未签署
             map.put("protocolstatus", 1);
-        }else{
+        } else {
             //不需要电子签的状态为4:已审核
             map.put("protocolstatus", 4);
         }
@@ -254,10 +255,10 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
             param.setMemberuserid(systemmanager.getAreauserid());
         }
         IPage<InvestorModifyResult> page = new Page<>(param.getPageNo(), param.getPageSize());
-        IPage<InvestorModifyResult> modifyPage = iUseraccountMapper.queryModifyPage(page,param);
+        IPage<InvestorModifyResult> modifyPage = iUseraccountMapper.queryModifyPage(page, param);
         PageResult<InvestorModifyResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(modifyPage.getPages());
         pageResult.setCurrent(modifyPage.getCurrent());
         pageResult.setTotal(modifyPage.getTotal());
@@ -267,59 +268,59 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
     }
 
     @Override
-    public AjaxResult<InvestorPersonalizationResult> accountQuery(Long goodsid, Long accountid) {
+    public AjaxResult<InvestorPersonalizationResult> accountQuery(Long goodsid, Long accountid, HttpServletRequest request) {
         InvestorPersonalizationResult result = new InvestorPersonalizationResult();
         try {
             TodayAccountmargin mr = iTodayAccountmarginMapper.selectOne(new QueryWrapper<TodayAccountmargin>()
-                    .eq("accountid",accountid)
-                    .eq("goodsid",goodsid));
+                    .eq("accountid", accountid)
+                    .eq("goodsid", goodsid));
             TodayAccounttraderule tr = iTodayAccounttraderuleMapper.selectOne(new QueryWrapper<TodayAccounttraderule>()
-                    .eq("accountid",accountid)
-                    .eq("goodsid",goodsid));
+                    .eq("accountid", accountid)
+                    .eq("goodsid", goodsid));
             TodayAccounttradefee tf = iTodayAccounttradefeeMapper.selectOne(new QueryWrapper<TodayAccounttradefee>()
-                    .eq("accountid",accountid)
-                    .eq("goodsid",goodsid));
+                    .eq("accountid", accountid)
+                    .eq("goodsid", goodsid));
             //当没有个性化,查询账户id=0的即商品默认的配置
-            if(Objects.isNull(mr)){
+            if (Objects.isNull(mr)) {
                 mr = iTodayAccountmarginMapper.selectOne(new QueryWrapper<TodayAccountmargin>()
-                        .eq("accountid",accountid)
-                        .eq("goodsid",0L));
+                        .eq("accountid", accountid)
+                        .eq("goodsid", 0L));
             }
-            if(Objects.isNull(tr)){
+            if (Objects.isNull(tr)) {
                 tr = iTodayAccounttraderuleMapper.selectOne(new QueryWrapper<TodayAccounttraderule>()
-                        .eq("accountid",accountid)
-                        .eq("goodsid",0L));
+                        .eq("accountid", accountid)
+                        .eq("goodsid", 0L));
             }
-            if(Objects.isNull(tf)){
-                tf =  iTodayAccounttradefeeMapper.selectOne(new QueryWrapper<TodayAccounttradefee>()
-                        .eq("accountid",accountid)
-                        .eq("goodsid",0L));
+            if (Objects.isNull(tf)) {
+                tf = iTodayAccounttradefeeMapper.selectOne(new QueryWrapper<TodayAccounttradefee>()
+                        .eq("accountid", accountid)
+                        .eq("goodsid", 0L));
             }
             List<Long> id_list = new ArrayList<Long>();
-            if(mr!=null){
+            if (mr != null) {
                 ServiceMemoryCache.MarginInfoStruct marginInfo = ServiceMemoryCache.MarginInfoStruct.newBuilder().
                         mergeFrom((Message) mr.getInfocontent()).build();
                 result.setMarginalgorithm(marginInfo.getMarginAlgorithm());
                 result.setLockmarginvalue(marginInfo.getLockMarginValue());
-                result.setMarketmarginvalue( marginInfo.getMarketMarginValue());
+                result.setMarketmarginvalue(marginInfo.getMarketMarginValue());
                 result.setReckonmarginvalue(marginInfo.getReckonMarginValue());
             }
-            if(tr!=null){
+            if (tr != null) {
                 ServiceMemoryCache.TradeRuleInfoStruct traderuleinfo = ServiceMemoryCache.TradeRuleInfoStruct.newBuilder().
                         mergeFrom((Message) tr.getInfocontent()).build();
 
                 List<ServiceMemoryCache.TradeRule> ruleList = traderuleinfo.getTradeRulesList();
                 Map<Integer, Object> temp = new HashMap<Integer, Object>();
 
-                ruleList.forEach(p->{
+                ruleList.forEach(p -> {
                     id_list.add(Long.valueOf(p.getRuleID()));
                     temp.put(p.getRuleID(), p.getParamValue());
                 });
 
                 List<Traderuledescription> rds = iTraderuledescriptionMapper.selectList(new QueryWrapper<Traderuledescription>()
-                        .in("ruleid",id_list));
+                        .in("ruleid", id_list));
                 List<InvestorExtendRule> rules = new ArrayList<>();
-                rds.forEach(p->{
+                rds.forEach(p -> {
                     InvestorExtendRule investorExtendRule = new InvestorExtendRule();
                     investorExtendRule.setRuleid(p.getRuleid());
                     investorExtendRule.setRulename(p.getRulename());
@@ -328,7 +329,7 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
                 });
                 result.setExtendRule(rules);
             }
-            if(tf!=null){
+            if (tf != null) {
                 ServiceMemoryCache.TradeFeeInfoStruct tradefeeinfo = ServiceMemoryCache.TradeFeeInfoStruct.newBuilder().
                         mergeFrom((Message) tf.getInfocontent()).build();
                 List<InvestorExtendFee> feeStruct = new ArrayList<>();
@@ -337,17 +338,17 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
 
                 List<ServiceMemoryCache.TradeFee> feeList = tradefeeinfo.getTradeFeesList();
                 id_list.clear();
-                feeList.forEach(p->{
+                feeList.forEach(p -> {
                     id_list.add(Long.valueOf(p.getFeeID()));
                     ftemp.put(p.getFeeID(), p);
                 });
-                Goods goods = iGoodsMapper.selectOne(new QueryWrapper<Goods>().eq("goodsid",goodsid));
-                Market mar = iMarketMapper.selectOne(new QueryWrapper<Market>().eq("MARKETID",goods.getMarketid()));
+                Goods goods = iGoodsMapper.selectOne(new QueryWrapper<Goods>().eq("goodsid", goodsid));
+                Market mar = iMarketMapper.selectOne(new QueryWrapper<Market>().eq("MARKETID", goods.getMarketid()));
                 result.setTradeProperty(mar.getTradeproperty());
                 result.setMarginformula(mar.getMarginformula());
 
-                List<Tradefeedescription> fds = iTradefeedescriptionMapper.query(id_list,mar.getTradeproperty());
-                fds.forEach(p->{
+                List<Tradefeedescription> fds = iTradefeedescriptionMapper.query(id_list, mar.getTradeproperty());
+                fds.forEach(p -> {
                     InvestorExtendFee extendFee = new InvestorExtendFee();
                     extendFee.setFeeid(p.getTradefeeid());
                     extendFee.setFeename(p.getTradefeename());
@@ -360,54 +361,54 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
             }
         } catch (Exception e) {
             e.printStackTrace();
-            log.error("查询个性化设置信息失败,失败原因:"+e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            log.error("查询个性化设置信息失败,失败原因:" + e);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message,result);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), result);
     }
 
     @Override
     public AjaxResult modifyAudit(InvestorModifyAuditParam param, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (!iCommonService.checkUserAccountRole(systemmanager, param.getAuditid())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
 
         DraftUseraccountNew dua = iDraftUseraccountNewMapper.selectOne(new QueryWrapper<DraftUseraccountNew>().eq("userid", param.getAuditid()));
         if (dua == null) {
-            return AjaxResult.error(Constants.Error_Code_Design, "该机构信息已变更,请刷新数据");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_018.getCode(), request.getHeader("Accept-Language"));
         }
 
         Integer usertype = 0;
         if (Objects.equals(systemmanager.getReletype(), SysConstants.SYS_TYPE_MANAGE)) {
             //交易所审核
             if (dua.getModifystatus() != 3 && dua.getModifystatus() != 4) {
-                return AjaxResult.error(Constants.Error_Code_Design, "该机构信息已变更,请刷新数据");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_018.getCode(), request.getHeader("Accept-Language"));
             }
-            Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",param.getAuditid()));
+            Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", param.getAuditid()));
             boolean flag = 1 == ua.getHasauth();
             usertype = ua.getUsertype();
             if (param.getAuditflag() == 1) {
                 //交易所审核通过
-                DraftUserinfo dui = iDraftUserinfoMapper.selectOne(new QueryWrapper<DraftUserinfo>().eq("userid",param.getAuditid()));
+                DraftUserinfo dui = iDraftUserinfoMapper.selectOne(new QueryWrapper<DraftUserinfo>().eq("userid", param.getAuditid()));
                 // 机构或子机构
                 if (dua.getUsertype().equals(2) || dua.getUsertype().equals(3)) {
                     // 机构开户证件号码是否唯一
                     String areacardflag = iCommonService.getSystemParam(Constants.REDIS_HEADER_SYSPARAM, Constants.SYSPARAM_CARD_NO);
                     //验证证件号码是否存在
-                    if (areacardflag != null && areacardflag.equals("1") && !iCommonService.checkOranCardNumOrMobile(1, dui.getCardnum(),dui.getUserid())) {
-                        return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
+                    if (areacardflag != null && areacardflag.equals("1") && !iCommonService.checkOranCardNumOrMobile(1, dui.getCardnum(), dui.getUserid())) {
+                        return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
                     }
                 }
                 String newMobile = dui.getMobile();
 
                 //验证手机号是否存在
-                if (!iCommonService.checkOranCardNumOrMobile(2,newMobile, dua.getUserid())) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "手机号已存在");
+                if (!iCommonService.checkOranCardNumOrMobile(2, newMobile, dua.getUserid())) {
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_016.getCode(), request.getHeader("Accept-Language"));
                 }
 
                 if (ua.getParentuserid().compareTo(dua.getParentuserid()) != 0) {
-                    Useraccount pua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",dua.getParentuserid()));
+                    Useraccount pua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", dua.getParentuserid()));
                     dua.setSubarealevelpath(pua.getSubarealevelpath() + ua.getUserid() + ",");
                 }
 
@@ -427,15 +428,15 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
                     ua.setHasauth(newDua.getHasauth());
                 }
 
-                iUseraccountMapper.update(ua,new QueryWrapper<Useraccount>().eq("userid",ua.getUserid()));
+                iUseraccountMapper.update(ua, new QueryWrapper<Useraccount>().eq("userid", ua.getUserid()));
                 iDraftUseraccountNewMapper.deleteById(dua);
 
-                Userinfo ui = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid",param.getAuditid()));
+                Userinfo ui = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid", param.getAuditid()));
                 Integer needinvoice = ui.getNeedinvoice();
                 String oldMobile = ui.getMobile();
 
                 BeanUtils.copyProperties(dui, ui, new String[]{"userid", "halfbodyphotourl",
-                        "cardfrontphotourl", "cardbackphotourl", "mobile", "bankid","bankaccount", "bankcardfrontphotourl"});
+                        "cardfrontphotourl", "cardbackphotourl", "mobile", "bankid", "bankaccount", "bankcardfrontphotourl"});
                 if (dui.getHalfbodyphotourl() != null && !"".equals(dui.getHalfbodyphotourl().trim())) {
                     ui.setHalfbodyphotourl(dui.getHalfbodyphotourl());
                 }
@@ -461,8 +462,8 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
                 }
 
                 ui.setNeedinvoice(needinvoice);
-                iUserinfoMapper.update(ui,new QueryWrapper<Userinfo>().eq("userid",ui.getUserid()));
-                iDraftUserinfoMapper.delete(new QueryWrapper<DraftUserinfo>().eq("userid",dui.getUserid()));
+                iUserinfoMapper.update(ui, new QueryWrapper<Userinfo>().eq("userid", ui.getUserid()));
+                iDraftUserinfoMapper.delete(new QueryWrapper<DraftUserinfo>().eq("userid", dui.getUserid()));
 
                 //发送用户变更通知
                 try {
@@ -482,7 +483,7 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
                     }
                 } catch (Exception e) {
                     e.printStackTrace();
-                    log.error("发送用户变更通知失败,失败原因:"+e);
+                    log.error("发送用户变更通知失败,失败原因:" + e);
                 }
 
                 Object o = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "075");
@@ -532,9 +533,9 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
                     }
                 }
 
-            //31	审核拒绝的,尊敬的:XXXx,您提交的实名认证信息未通过,原因:xxxxx,请登录{尚志贸易通}重新提交认证信息,详情请咨询{4007-444-555}
-            //30	审核通过的,尊敬的:XXXx,您在{尚志贸易通}提交的实名认证信息已通过,详情请咨询{4007-444-555}
-            //sendMsgService.sendSMSConnetion(templateId, recPhone, params);
+                //31	审核拒绝的,尊敬的:XXXx,您提交的实名认证信息未通过,原因:xxxxx,请登录{尚志贸易通}重新提交认证信息,详情请咨询{4007-444-555}
+                //30	审核通过的,尊敬的:XXXx,您在{尚志贸易通}提交的实名认证信息已通过,详情请咨询{4007-444-555}
+                //sendMsgService.sendSMSConnetion(templateId, recPhone, params);
             } else {
                 boolean isSend = false;
                 dua.setModifystatus(1);
@@ -548,12 +549,12 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
                     ua.setHasauth(3);
                     isSend = true;
                 }
-                iUseraccountMapper.update(ua,new QueryWrapper<Useraccount>().eq("userid",ua.getUserid()));
+                iUseraccountMapper.update(ua, new QueryWrapper<Useraccount>().eq("userid", ua.getUserid()));
                 //发送
                 if (isSend) {
                     Object o = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "075");
                     if (o != null && o.toString().startsWith("1")) {
-                        Userinfo ui = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid",ua.getUserid()));
+                        Userinfo ui = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid", ua.getUserid()));
                         try {
                             List<String> params = new ArrayList<>();
                             String p[] = o.toString().split(",");
@@ -571,26 +572,26 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
         } else {
             //经纪会员审核
             if (dua.getModifystatus() != 3) {
-                return AjaxResult.error(Constants.Error_Code_Design, "该机构信息已变更,请刷新数据");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_018.getCode(), request.getHeader("Accept-Language"));
             }
-            Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",param.getAuditid()));
+            Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", param.getAuditid()));
             usertype = ua.getUsertype();
             if (param.getAuditflag() == 1) {
-                DraftUserinfo dui = iDraftUserinfoMapper.selectOne(new QueryWrapper<DraftUserinfo>().eq("userid",param.getAuditid()));
+                DraftUserinfo dui = iDraftUserinfoMapper.selectOne(new QueryWrapper<DraftUserinfo>().eq("userid", param.getAuditid()));
                 // 机构或子机构
                 if (dua.getUsertype().equals(2) || dua.getUsertype().equals(3)) {
                     // 机构开户证件号码是否唯一
                     String areacardflag = iCommonService.getSystemParam(Constants.REDIS_HEADER_SYSPARAM, Constants.SYSPARAM_CARD_NO);
                     //验证证件号码是否存在
                     //验证证件号码是否存在
-                    if (areacardflag != null && areacardflag.equals("1") && !iCommonService.checkOranCardNumOrMobile(1, dui.getCardnum(),dui.getUserid())) {
-                        return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
+                    if (areacardflag != null && areacardflag.equals("1") && !iCommonService.checkOranCardNumOrMobile(1, dui.getCardnum(), dui.getUserid())) {
+                        return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
                     }
                 }
 
                 //经纪会员审核通过
                 ua.setModifystatus(4);
-                iUseraccountMapper.update(ua,new QueryWrapper<Useraccount>().eq("userid",ua.getUserid()));
+                iUseraccountMapper.update(ua, new QueryWrapper<Useraccount>().eq("userid", ua.getUserid()));
 
                 dua.setModifystatus(4);
                 iDraftUseraccountNewMapper.updateById(dua);
@@ -607,12 +608,12 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
                     isSend = true;
                 }
 
-                iUseraccountMapper.update(ua,new QueryWrapper<Useraccount>().eq("userid",ua.getUserid()));
+                iUseraccountMapper.update(ua, new QueryWrapper<Useraccount>().eq("userid", ua.getUserid()));
 
                 if (isSend) {
                     Object o = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "075");
                     if (o != null && o.toString().startsWith("1")) {
-                        Userinfo ui = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid",ua.getUserid()));
+                        Userinfo ui = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid", ua.getUserid()));
                         try {
                             List<String> params = new ArrayList<>();
                             String p[] = o.toString().split(",");
@@ -634,18 +635,18 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
         else
             systemmanagerService.writeOperateLog(SysConstants.PART_INVESTOR_MODIFY, "审核确认id={\"auditid\":" + param.getAuditid() + "}", systemmanager, null, null, null);
 
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
     public AjaxResult investorEdit(DetailBeforeResult param, HttpServletRequest request) throws Exception {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (!iCommonService.checkUserAccountRole(systemmanager, param.getUserAccountDetailVo().getUserId())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
 
         DraftUseraccountNew dua = new DraftUseraccountNew();
-        Useraccount useraccount = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",param.getUserAccountDetailVo().getUserId()));
+        Useraccount useraccount = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", param.getUserAccountDetailVo().getUserId()));
         BeanUtils.copyProperties(useraccount, dua);
 
         String card = param.getUserinfoDetailVo().getCardNum();
@@ -653,14 +654,14 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
         if (StringUtils.isNotBlank(card) || StringUtils.isNotBlank(mobile)) {
             card = EncryptionUtils.encryptByAES(param.getUserinfoDetailVo().getCardNum());
             List<Userinfo> uiList = iUserinfoMapper.selectList(new QueryWrapper<Userinfo>()
-                    .eq(StringUtils.isNotBlank(card),"cardnum", card)
-                    .eq(StringUtils.isNotBlank(mobile),"mobile", mobile)
+                    .eq(StringUtils.isNotBlank(card), "cardnum", card)
+                    .eq(StringUtils.isNotBlank(mobile), "mobile", mobile)
                     .eq("userid", param.getUserAccountDetailVo().getUserId())
                     .eq("usertype", 5));
             if (CollectionUtils.isNotEmpty(uiList)) {
                 String sysparam = iCommonService.getSysparmById(Constants.SYSPARAM_CARD_NOTWO);
                 if ((sysparam == null) || ("1".equals(sysparam))) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "证件号码或手机号已存在");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_019.getCode(), request.getHeader("Accept-Language"));
                 }
             }
         }
@@ -684,9 +685,9 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
         useraccount.setModifystatus(param.getUserAccountDetailVo().getModifyStatus());
         useraccount.setModifierid(systemmanager.getAutoid());
         useraccount.setModifytime(new Date());
-        iUseraccountMapper.update(useraccount,new QueryWrapper<Useraccount>().eq("userid",useraccount.getUserid()));
+        iUseraccountMapper.update(useraccount, new QueryWrapper<Useraccount>().eq("userid", useraccount.getUserid()));
 
-        Userinfo ui = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid",param.getUserAccountDetailVo().getUserId()));
+        Userinfo ui = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid", param.getUserAccountDetailVo().getUserId()));
         DraftUserinfo dui = new DraftUserinfo();
         BeanUtils.copyProperties(ui, dui);
         dui.setAddress(param.getUserinfoDetailVo().getAddress());
@@ -755,7 +756,7 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
             systemmanagerService.writeOperateLog(SysConstants.PART_INVESTOR_MANAGE, "修改交易商id=" + useraccount.getUserid() + "并提交审核", systemmanager, null, jsonObjUi.toString(), jsonObj.toString());
         }
 
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     private Integer getUserESignRecordCount(Long userid, Long areauserid) {
@@ -764,8 +765,8 @@ public class UseraccountServiceImpl extends ServiceImpl<IUseraccountMapper, User
         map.put("userid", userid);
         map.put("areauserid", areauserid);
         List<Useresignrecord> records = iUseresignrecordMapper.selectList(new QueryWrapper<Useresignrecord>()
-                .eq("userid",userid)
-                .eq("areauserid",areauserid));
+                .eq("userid", userid)
+                .eq("areauserid", areauserid));
         if (records != null && records.size() > 0) {
             return records.size();
         }

+ 102 - 97
mtp3-century/src/main/java/com/muchinfo/mtp3century/service/impl/WskhUserinfoServiceImpl.java

@@ -15,10 +15,7 @@ import com.muchinfo.mtp3century.service.IUseraccountService;
 import com.muchinfo.mtp3century.service.IWskhUserinfoService;
 import com.muchinfo.mtp3century.utils.RedisServiceUtil;
 import com.muchinfo.mtp3century.utils.SequenceIDGeneratorUtils;
-import com.muchinfo.mtp3common.enumtype.Constants;
-import com.muchinfo.mtp3common.enumtype.FunCodeConstants;
-import com.muchinfo.mtp3common.enumtype.SysConstants;
-import com.muchinfo.mtp3common.enumtype.SysEnums;
+import com.muchinfo.mtp3common.enumtype.*;
 import com.muchinfo.mtp3common.utils.*;
 import com.muchinfo.mtp3common.vo.AjaxResult;
 import com.muchinfo.mtp3common.vo.PageResult;
@@ -104,16 +101,16 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
     private IDivisionMapper iDivisionMapper;
 
     @Override
-    public PageResult<WskhUserinfo> queryByPage(String username, Integer pageNum, Integer pageSize) {
+    public PageResult<WskhUserinfo> queryByPage(String username, Integer pageNum, Integer pageSize, HttpServletRequest request) {
         WskhUserinfo wskhUserinfoVo = new WskhUserinfo();
         wskhUserinfoVo.setUsername(username);
         wskhUserinfoVo.setUsertype(2);
         //列表返回
         IPage<WskhUserinfo> page = new Page<>(pageNum, pageSize);
-        IPage<WskhUserinfo> wskhUserinfoVos = iWskhUserinfoMapper.selectByPage(page,wskhUserinfoVo);
+        IPage<WskhUserinfo> wskhUserinfoVos = iWskhUserinfoMapper.selectByPage(page, wskhUserinfoVo);
         PageResult<WskhUserinfo> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(wskhUserinfoVos.getPages());
         pageResult.setCurrent(wskhUserinfoVos.getCurrent());
         pageResult.setTotal(wskhUserinfoVos.getTotal());
@@ -123,7 +120,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
     }
 
     @Override
-    public AjaxResult<WskhUserinfo> queryDetail(Long userId) {
+    public AjaxResult<WskhUserinfo> queryDetail(Long userId, HttpServletRequest request) {
         //获取解密的key
         WskhUserinfo wskhUserinfo = iWskhUserinfoMapper.selectOne(new QueryWrapper<WskhUserinfo>().eq("USERID", userId));
         if (StringUtils.isNotBlank(wskhUserinfo.getBankid())) {
@@ -144,32 +141,32 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
                 wskhUserinfo.setReferralname(referral.getAccountname());
             }
         }
-        if(wskhUserinfo.getBrokerid() != null)
+        if (wskhUserinfo.getBrokerid() != null)
             wskhUserinfo.setBrokername(iUseraccountMapper.selectOrganName(Long.valueOf(wskhUserinfo.getBrokerid())));
-        if(wskhUserinfo.getAreaid() != null)
+        if (wskhUserinfo.getAreaid() != null)
             wskhUserinfo.setAreaname(iUseraccountMapper.selectOrganName(wskhUserinfo.getAreaid()));
-        if(wskhUserinfo.getMemberareaid() != null)
+        if (wskhUserinfo.getMemberareaid() != null)
             wskhUserinfo.setMemberusername(iUseraccountMapper.selectOrganName(wskhUserinfo.getMemberareaid()));
         if (wskhUserinfo.getDistrictid() != null)
             wskhUserinfo.setPathname(iDivisionMapper.selectAreaPathName(wskhUserinfo.getDistrictid()) + wskhUserinfo.getCardaddress());
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, wskhUserinfo);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), wskhUserinfo);
     }
 
     @Override
-    public AjaxResult addAreainfo(WskhUserinfo vo, Systemmanager systemmanager) {
+    public AjaxResult addAreainfo(WskhUserinfo vo, Systemmanager systemmanager, HttpServletRequest request) {
         List<WskhBlacklist> wskhBlacklists = iWskhBlacklistMapper.selectList(new QueryWrapper<WskhBlacklist>().eq("CARDTYPE", vo.getCardtype()).eq("CARDNUM", vo.getCardnum()));
         if (!CollectionUtils.isEmpty(wskhBlacklists)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在黑名单中,不能开户");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_012.getCode(), request.getHeader("Accept-Language"));
         }
         // 机构开户证件号码是否唯一
         String areaCardFlag = iCommonService.getSystemParam(Constants.REDIS_HEADER_SYSPARAM, Constants.SYSPARAM_CARD_NO);
         // 验证证件号码是否存在
-        if (areaCardFlag != null && areaCardFlag.equals("1") && iCommonService.checkOranCardNumOrMobile(1, vo.getCardnum(),null)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
+        if (areaCardFlag != null && areaCardFlag.equals("1") && iCommonService.checkOranCardNumOrMobile(1, vo.getCardnum(), null)) {
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
         }
         // 验证手机号是否存在
-        if (StringUtils.isNotBlank(vo.getMobilephone()) && iCommonService.checkOranCardNumOrMobile(2, vo.getMobilephone(),null)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "手机号已存在");
+        if (StringUtils.isNotBlank(vo.getMobilephone()) && iCommonService.checkOranCardNumOrMobile(2, vo.getMobilephone(), null)) {
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_016.getCode(), request.getHeader("Accept-Language"));
         }
         //入库重新加密
         encrypt(vo);
@@ -190,18 +187,18 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
             iWskhUserinfoMapper.insert(vo);
         } catch (Exception e) {
             log.error("添加开户信息失败,请检查!失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
-    public AjaxResult updateAreainfo(WskhUserinfo vo, Systemmanager systemmanager) {
+    public AjaxResult updateAreainfo(WskhUserinfo vo, Systemmanager systemmanager, HttpServletRequest request) {
         List<WskhBlacklist> wskhBlacklists = iWskhBlacklistMapper.selectList(new QueryWrapper<WskhBlacklist>()
                 .eq("CARDTYPE", vo.getCardtype())
                 .eq("CARDNUM", vo.getCardnum()));
         if (CollectionUtils.isNotEmpty(wskhBlacklists)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在黑名单中,不能开户");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_012.getCode(), request.getHeader("Accept-Language"));
         }
         try {
             // 机构开户证件号码是否唯一
@@ -210,7 +207,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
                     .eq("CARDNUM", vo.getCardnum())
                     .eq("USERID", vo.getUserid()));
             if (areacardflag != null && areacardflag.equals("1") && CollectionUtils.isNotEmpty(wskhUserinfoList)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
             }
             WskhUserinfo base = iWskhUserinfoMapper.selectOne(new QueryWrapper<WskhUserinfo>().eq("USERID", vo.getUserid()));
             BeanUtils.copyProperties(vo, base);
@@ -220,28 +217,28 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
             iWskhUserinfoMapper.update(base, new QueryWrapper<WskhUserinfo>().eq("USERID", vo.getUserid()));
         } catch (Exception e) {
             log.error("修改开户信息失败,请检查!失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
-    public AjaxResult reBack(Long userid) {
+    public AjaxResult reBack(Long userid, HttpServletRequest request) {
         WskhUserinfo wskhUserinfo = iWskhUserinfoMapper.selectOne(new QueryWrapper<WskhUserinfo>().eq("USERID", userid));
         if (wskhUserinfo != null) {
             if (wskhUserinfo.getUserstate() != 2 && wskhUserinfo.getUserstate() != 4) {
-                return AjaxResult.error(Constants.Error_Code_Design, "非待审核状态,无法撤回");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_022.getCode(), request.getHeader("Accept-Language"));
             }
             wskhUserinfo.setUserstate(1);
             iWskhUserinfoMapper.update(wskhUserinfo, new QueryWrapper<WskhUserinfo>().eq("USERID", userid));
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
-    public AjaxResult delete(Long userid) {
+    public AjaxResult delete(Long userid, HttpServletRequest request) {
         iWskhUserinfoMapper.delete(new QueryWrapper<WskhUserinfo>().eq("USERID", userid));
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
@@ -252,27 +249,27 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
             Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
             WskhUserinfo wui = iWskhUserinfoMapper.selectOne(new QueryWrapper<WskhUserinfo>().eq("USERID", vo.getUserid()));
             if (Objects.isNull(wui)) {
-                return AjaxResult.error(Constants.Error_Code_Design, "该机构信息已更新,请刷新数据");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_018.getCode(), request.getHeader("Accept-Language"));
             }
             if (wui.getUserstate() != 2 && wui.getUserstate() != 4) {
-                return AjaxResult.error(Constants.Error_Code_Design, "该机构信息已更新,请刷新数据");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_018.getCode(), request.getHeader("Accept-Language"));
             }
             if (vo.getAuditflag() != 1) {
                 //不通过
                 wui.setUserstate(3);
                 if (vo.getRemark().length() > 80) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "审核拒绝原因不能超过80个字");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_020.getCode(), request.getHeader("Accept-Language"));
                 }
                 wui.setRemark(vo.getRemark());
                 iWskhUserinfoMapper.update(wui, new QueryWrapper<WskhUserinfo>().eq("USERID", vo.getUserid()));
             } else {
                 Useraccount isUa = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("USERID", Long.valueOf(vo.getAreacode())));
                 if (Objects.nonNull(isUa)) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "机构代码重复");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_010.getCode(), request.getHeader("Accept-Language"));
                 }
                 //验证证件号码是否存在
-                if (!iCommonService.checkOranCardNumOrMobile(1, vo.getCardnum(),null)) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
+                if (!iCommonService.checkOranCardNumOrMobile(1, vo.getCardnum(), null)) {
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
                 }
                 if (wui.getUserinfotype() == 2) {
                     //机构类型为企业需 名称唯一,1:个人,2:企业
@@ -280,12 +277,12 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
                             .eq("customername", wui.getCustomername().trim())
                             .eq("userinfotype", 2));
                     if (CollectionUtils.isNotEmpty(userinfoList)) {
-                        return AjaxResult.error(Constants.Error_Code_Design, "名称已存在");
+                        return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_013.getCode(), request.getHeader("Accept-Language"));
                     }
                 }
                 List<Systemmanager> list = iSystemmanagerMapper.selectList(new QueryWrapper<Systemmanager>().eq("logincode", vo.getSmlogincode().trim()));
                 if (CollectionUtils.isNotEmpty(list)) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "管理员登录帐号重复");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_014.getCode(), request.getHeader("Accept-Language"));
                 }
                 //新增用户信息
                 List<Taaccount> taaccountList = insertUserAccount(vo, wui, systemmanager);
@@ -301,7 +298,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
                     if (vo.getAuditflag() == 1) {
                         //审核通过
                         for (Taaccount taaccount : taaccountList) {
-                            iSendMsgService.sendCustomerInfo(userinfo,taaccount.getAccountid(), "1", 3);
+                            iSendMsgService.sendCustomerInfo(userinfo, taaccount.getAccountid(), "1", 3);
                             iSendMsgService.sendUserChangeMsg(taaccount.getAccountid(), taaccount.getUserid(),
                                     SysEnums.UserOperateTypeEnum.ADD.getType(),
                                     SysEnums.AccountOperateTypeEnum.ADD.getType(),
@@ -310,24 +307,24 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
                     }
                 } catch (Exception e) {
                     e.printStackTrace();
-                    log.error("网上开户审核发送消息失败,失败原因:"+e);
+                    log.error("网上开户审核发送消息失败,失败原因:" + e);
                 }
             }
         } catch (Exception e) {
             log.error("审核提交失败,失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
-    public PageResult<InvestorQueryResult> queryInvestorPage(InvestorQueryParam investorQueryParam) {
+    public PageResult<InvestorQueryResult> queryInvestorPage(InvestorQueryParam investorQueryParam, HttpServletRequest request) {
         //列表返回
         IPage<InvestorQueryResult> page = new Page<>(investorQueryParam.getPageNum(), investorQueryParam.getPageSize());
-        IPage<InvestorQueryResult> investorQueryResults = iWskhUserinfoMapper.queryInvestorPage(page,investorQueryParam);
+        IPage<InvestorQueryResult> investorQueryResults = iWskhUserinfoMapper.queryInvestorPage(page, investorQueryParam);
         PageResult<InvestorQueryResult> pageResult = new PageResult<>();
         pageResult.setCode(Constants.Success_Code_Design);
-        pageResult.setMessage(Constants.Deal_Success_Message);
+        pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
         pageResult.setPages(investorQueryResults.getPages());
         pageResult.setCurrent(investorQueryResults.getCurrent());
         pageResult.setTotal(investorQueryResults.getTotal());
@@ -340,34 +337,34 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
     public AjaxResult<WskhUserinfo> querySunDetail(Long userId, HttpServletRequest request) {
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (checkWskhAccountRole(systemmanager, userId)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
-        return queryDetail(userId);
+        return queryDetail(userId, request);
     }
 
     @Override
-        public AjaxResult editWskhUserinfo(WskhUserinfo currentVo, Systemmanager systemmanager) {
+    public AjaxResult editWskhUserinfo(WskhUserinfo currentVo, Systemmanager systemmanager, HttpServletRequest request) {
         WskhUserinfo base = iWskhUserinfoMapper.selectOne(new QueryWrapper<WskhUserinfo>().eq("USERID", currentVo.getUserid()));
         if (checkWskhAccountRole(systemmanager, currentVo.getUserid())) {
-            return AjaxResult.success(Constants.Error_Code_Design, "没有该用户的操作权限");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
         List<WskhBlacklist> wskhBlacklists = iWskhBlacklistMapper.selectList(new QueryWrapper<WskhBlacklist>()
                 .eq("CARDTYPE", currentVo.getCardtype())
                 .eq("CARDNUM", currentVo.getCardnum()));
         if (CollectionUtils.isNotEmpty(wskhBlacklists)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在黑名单中,不能开户");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_012.getCode(), request.getHeader("Accept-Language"));
         }
         Systemparam sysParam = iSystemparamMapper.selectOne(new QueryWrapper<Systemparam>().eq("PARAMCODE", Constants.SYSPARAM_CARD_NOTWO));
         //验证证件号码是否唯一
         if (!base.getCardnum().equals(EncryptionUtils.encryptByAES(currentVo.getCardnum()))) {
             if (iCommonService.checkOranCardNumOrMobile(1, EncryptionUtils.encryptByAES(currentVo.getCardnum()), currentVo.getUserid()) && (sysParam == null) || "1".equals(sysParam.getParamvalue())) {
-                return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
             }
         }
         // 验证手机号是否唯一
         if (!base.getMobilephone().equals(EncryptionUtils.encryptByAES(currentVo.getMobilephone()))) {
-            if (iCommonService.checkOranCardNumOrMobile(2, EncryptionUtils.encryptByAES(currentVo.getMobilephone()),currentVo.getUserid())) {
-                return AjaxResult.error(Constants.Error_Code_Design, "手机号码已存在");
+            if (iCommonService.checkOranCardNumOrMobile(2, EncryptionUtils.encryptByAES(currentVo.getMobilephone()), currentVo.getUserid())) {
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_016.getCode(), request.getHeader("Accept-Language"));
             }
         }
         try {
@@ -376,20 +373,20 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
             encrypt(currentVo);
             base = (WskhUserinfo) SensitiveEncryptUtil.sensitiveEncrypt(base, null);
             iWskhUserinfoMapper.update(base, new QueryWrapper<WskhUserinfo>().eq("USERID", currentVo.getUserid()));
-        }catch (Exception e) {
+        } catch (Exception e) {
             log.error("修改开户信息失败,请检查!失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
-    public AjaxResult addWskhUserinfo(WskhUserinfo currentVo, Systemmanager systemmanager) {
+    public AjaxResult addWskhUserinfo(WskhUserinfo currentVo, Systemmanager systemmanager, HttpServletRequest request) {
         List<WskhBlacklist> wskhBlacklists = iWskhBlacklistMapper.selectList(new QueryWrapper<WskhBlacklist>()
                 .eq("CARDTYPE", currentVo.getCardtype())
                 .eq("CARDNUM", currentVo.getCardnum()));
         if (CollectionUtils.isNotEmpty(wskhBlacklists)) {
-            return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在黑名单中,不能开户");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_012.getCode(), request.getHeader("Accept-Language"));
         }
         Systemparam sysParm = iSystemparamMapper.selectOne(new QueryWrapper<Systemparam>().eq("PARAMCODE", Constants.SYSPARAM_CARD_NOTWO));
         //校验唯一性
@@ -403,14 +400,14 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
                 if (sysParm == null || "1".equals(sysParm.getParamvalue())) {
                     if (StringUtils.isNotBlank(userinfo.getCardnum()) &&
                             userinfo.getCardnum().equals(EncryptionUtils.encryptByAES(currentVo.getCardnum()))) {
-                        return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
+                        return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
                     }
                 }
 
                 if (StringUtils.isNotBlank(userinfo.getMobile()) &&
                         userinfo.getMobile().equals(
                                 EncryptionUtils.encryptByAES(currentVo.getMobilephone()))) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "手机号已存在");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_016.getCode(), request.getHeader("Accept-Language"));
                 }
             }
         }
@@ -424,14 +421,14 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
                 if (sysParm == null || "1".equals(sysParm.getParamvalue())) {
                     if (StringUtils.isNotBlank(wskhUserinfo.getCardnum()) &&
                             wskhUserinfo.getCardnum().equals(EncryptionUtils.encryptByAES(currentVo.getCardnum()))) {
-                        return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
+                        return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
                     }
                 }
 
                 if (StringUtils.isNotBlank(wskhUserinfo.getMobilephone()) &&
                         wskhUserinfo.getMobilephone().equals(
                                 EncryptionUtils.encryptByAES(currentVo.getMobilephone()))) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "手机号已存在");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_016.getCode(), request.getHeader("Accept-Language"));
                 }
             }
         }
@@ -462,26 +459,26 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
             iWskhUserinfoMapper.insert(currentVo);
         } catch (Exception e) {
             log.error("新增开户信息失败,请检查!失败原因:" + e);
-            return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Override
-    public AjaxResult investorProcess(InvestorProcessParam param, HttpServletRequest request){
-        WskhUserinfo wui = iWskhUserinfoMapper.selectOne(new QueryWrapper<WskhUserinfo>().eq("userid",param.getAuditid()));
+    public AjaxResult investorProcess(InvestorProcessParam param, HttpServletRequest request) {
+        WskhUserinfo wui = iWskhUserinfoMapper.selectOne(new QueryWrapper<WskhUserinfo>().eq("userid", param.getAuditid()));
         if (wui == null) {
-            return AjaxResult.error(Constants.Error_Code_Design, "该投资者"+wui.getUsername()+"信息已更新,请刷新数据.");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_021.getCode(), request.getHeader("Accept-Language"));
         }
 
         Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
         if (!checkWskhAccountRole(systemmanager, param.getAuditid())) {
-            return AjaxResult.error(Constants.Error_Code_Design, "没有该用户"+wui.getUsername()+"的操作权限,");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
         }
         //已实名认证
         param.setHasauth(1);
-        String sp1006 = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM,"1006");
-        if (!Strings.isNullOrEmpty(sp1006) && sp1006.equals("0")){
+        String sp1006 = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "1006");
+        if (!Strings.isNullOrEmpty(sp1006) && sp1006.equals("0")) {
             // 1006 管理端开交易商是否默认已实名 默认为1, 中融为0(接的爱签四要素实名)
             param.setHasauth(0);
         }
@@ -497,12 +494,12 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
             }
         }
         if (!sysFlag) {
-            return AjaxResult.error(Constants.Error_Code_Design, "系统维护中,请稍后再试.");
+            return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM007.getCode(), request.getHeader("Accept-Language"));
         }
 
         //错误 #59041 投资者开户关联了推荐人,复审时,把推荐人注销,审核通过后,推荐人也得到了现金红包
         if (!"".equals(wui.getReferral()) && null != wui.getReferral()) {
-            Userinfo userinfo = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid",Long.parseLong(wui.getReferral())));
+            Userinfo userinfo = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid", Long.parseLong(wui.getReferral())));
             if (userinfo != null && userinfo.getUserstatus() == 2) {
                 //如果已经注销
                 wui.setReferral("");
@@ -513,7 +510,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
             Systemparam sysParm = iSystemparamMapper.selectOne(new QueryWrapper<Systemparam>().eq("PARAMCODE", Constants.SYSPARAM_CARD_NOTWO));
             //校验唯一性
             List<Userinfo> userinfoList = iUserinfoMapper.selectList(new QueryWrapper<Userinfo>()
-                        .eq("cardnum", EncryptionUtils.encryptByAES(wui.getCardnum()))
+                    .eq("cardnum", EncryptionUtils.encryptByAES(wui.getCardnum()))
                     .or()
                     .eq("mobile", EncryptionUtils.encryptByAES(wui.getMobilephone()))
                     .and(a -> a.eq("userstatus", 1)));
@@ -522,13 +519,13 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
                     if (sysParm == null || "1".equals(sysParm.getParamvalue())) {
                         if (StringUtils.isNotBlank(userinfo.getCardnum()) &&
                                 userinfo.getCardnum().equals(EncryptionUtils.encryptByAES(wui.getCardnum()))) {
-                            return AjaxResult.error(Constants.Error_Code_Design, "该用户"+wui.getUsername()+"证件号码已存在");
+                            return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
                         }
                     }
                     if (StringUtils.isNotBlank(userinfo.getMobile()) &&
                             userinfo.getMobile().equals(
                                     EncryptionUtils.encryptByAES(wui.getMobilephone()))) {
-                        return AjaxResult.error(Constants.Error_Code_Design, "该用户"+wui.getUsername()+"手机号已存在");
+                        return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_016.getCode(), request.getHeader("Accept-Language"));
                     }
                 }
             }
@@ -536,11 +533,11 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
 
         if (systemmanager.getReletype() == 1) {
             if (wui.getUserstate() != 2 && wui.getUserstate() != 4) {
-                return AjaxResult.error(Constants.Error_Code_Design, "该投资者"+wui.getUsername()+"信息已更新,请刷新数据");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_021.getCode(), request.getHeader("Accept-Language"));
             }
             //平台管理员审核
             if (param.getAuditflag() == 1) {
-                AjaxResult result = checkOrgan(wui);
+                AjaxResult result = checkOrgan(wui, request);
                 if (result != null) {
                     return result;
                 }
@@ -555,7 +552,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
                 //不通过
                 wui.setUserstate(5);
                 if (param.getMsg().length() > 80) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "不通过原因不能超过80个字");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_020.getCode(), request.getHeader("Accept-Language"));
                 }
                 //不通过原因
                 wui.setRemark(param.getMsg());
@@ -564,10 +561,10 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
             }
         } else {
             if (wui.getUserstate() != 2 && wui.getUserstate() != 4) {
-                return AjaxResult.error(Constants.Error_Code_Design, "该投资者"+wui.getUsername()+"信息已更新,请刷新数据");
+                return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_021.getCode(), request.getHeader("Accept-Language"));
             }
             if (param.getAuditflag() == 1) {
-                AjaxResult result = checkOrgan(wui);
+                AjaxResult result = checkOrgan(wui, request);
                 if (result != null) {
                     return result;
                 }
@@ -576,7 +573,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
             } else {
                 wui.setUserstate(3);
                 if (param.getMsg().length() > 80) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "不通过原因不能超过80个字");
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_020.getCode(), request.getHeader("Accept-Language"));
                 }
                 //不通过原因
                 wui.setRemark(param.getMsg());
@@ -584,11 +581,11 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
                 iWskhUserinfoMapper.updateById(wui);
             }
         }
-        return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
+        return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
     }
 
     @Transactional(rollbackFor = Exception.class)
-    public void passauto(WskhUserinfo wui, Long userid, String countStr, Systemmanager user, InvestorProcessParam param){
+    public void passauto(WskhUserinfo wui, Long userid, String countStr, Systemmanager user, InvestorProcessParam param) {
 
         String lpwd = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "046");
         String zpwd = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "047");
@@ -609,7 +606,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
         ua.setCreatetime(new Date());
         ua.setCreatorid(user.getAutoid());
         ua.setParentuserid(wui.getAreaid());
-        Useraccount parentUser = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",wui.getAreaid()));
+        Useraccount parentUser = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", wui.getAreaid()));
         if (parentUser != null) {
             ua.setSubarealevelpath(parentUser.getSubarealevelpath() + userid.toString() + ",");
         }
@@ -660,7 +657,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
             Enumdicitem item = iEnumdicitemMapper.selectOne(new QueryWrapper<Enumdicitem>()
                     .eq("enumdiccode", "certificatetype")
                     .eq("enumitemname", Long.valueOf(wui.getCardtype())));
-            Certificatetypeconfig config = iCertificatetypeconfigMapper.selectOne(new QueryWrapper<Certificatetypeconfig>().eq("enumdicitemid",item.getAutoid()));
+            Certificatetypeconfig config = iCertificatetypeconfigMapper.selectOne(new QueryWrapper<Certificatetypeconfig>().eq("enumdicitemid", item.getAutoid()));
             if (config != null) {
                 ui.setUserinfotype(config.getIsperson() == 2 ? 2 : 1);
             } else {
@@ -786,7 +783,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
         }
 
         if (wui.getOpenmode() == 11 || wui.getOpenmode() == 12) {
-            WskhUserauthinfo wuai = iWskhUserauthinfoMapper.selectOne(new QueryWrapper<WskhUserauthinfo>().eq("userid",wui.getUserid()));
+            WskhUserauthinfo wuai = iWskhUserauthinfoMapper.selectOne(new QueryWrapper<WskhUserauthinfo>().eq("userid", wui.getUserid()));
 
             Userauthinfo uai = new Userauthinfo();
             uai.setAuthid(wuai.getAuthid());
@@ -815,7 +812,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
             smsbuilder.addParamValues(loginid.toString());
             smsbuilder.addParamValues(lpwd);
             smsbuilder.addParamValues(zpwd);
-            smsbuilder.addParamValues(iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",ua.getParentuserid())).
+            smsbuilder.addParamValues(iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", ua.getParentuserid())).
                     getAccountname().replaceAll("\\*", "-"));
 
             // 添加消息头
@@ -834,11 +831,11 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
     }
 
     private Long getOrganMaxinvestornum(Long memberareaid) {
-        Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",memberareaid));
+        Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", memberareaid));
         if (Objects.nonNull(ua)) {
             long num = ua.getMaxinvestornum() == null ? 0 : ua.getMaxinvestornum();
             ua.setMaxinvestornum(num + 1);
-            iUseraccountMapper.update(ua,new QueryWrapper<Useraccount>().eq("userid",ua.getUserid()));
+            iUseraccountMapper.update(ua, new QueryWrapper<Useraccount>().eq("userid", ua.getUserid()));
             return ua.getMaxinvestornum();
         }
         return 0L;
@@ -855,7 +852,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
             smsbuilder.addRecvPhone(EncryptionUtils.decryptForAES(wui.getMobilephone()));
             smsbuilder.addParamValues(wui.getUsername().replaceAll("\\*", "-")); //用户名称
             smsbuilder.addParamValues(wui.getRemark().replaceAll("\\*", "-"));
-            smsbuilder.addParamValues(iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",wui.getAreaid())).
+            smsbuilder.addParamValues(iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", wui.getAreaid())).
                     getAccountname().replaceAll("\\*", "-"));
 
             // 添加消息头
@@ -871,7 +868,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
     }
 
 
-    public AjaxResult checkOrgan(WskhUserinfo wui) {
+    public AjaxResult checkOrgan(WskhUserinfo wui, HttpServletRequest request) {
         Long[] ids = new Long[3];
         if (wui.getMemberareaid() != null) {
             ids[0] = wui.getMemberareaid();
@@ -885,13 +882,21 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
         Map<String, Object> result = new HashMap<String, Object>();
         result.put("userid", ids);
         List<Useraccount> organ = iUseraccountMapper.selectList(new QueryWrapper<Useraccount>()
-                .in("userid",ids));
+                .in("userid", ids));
 
-        if (organ != null && !organ.isEmpty()) {
+        if (CollectionUtils.isNotEmpty(organ)) {
             for (Useraccount ua : organ) {
-                if (ua.getAccountstatus() != 4) {
-                    return AjaxResult.error(Constants.Error_Code_Design, "所属" + (ua.getUsertype() == 2 ? "会员" :
-                            (ua.getUsertype() == 3 ? "机构" : "经纪人")) + "为非正常状态,无法审核通过");
+
+                if (ua.getAccountstatus() == 4) {
+                    break;
+                }
+
+                if (ua.getUsertype() == 2) {
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_023.getCode(), request.getHeader("Accept-Language"));
+                } else if (ua.getUsertype() == 3) {
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_024.getCode(), request.getHeader("Accept-Language"));
+                } else {
+                    return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_025.getCode(), request.getHeader("Accept-Language"));
                 }
             }
         }
@@ -991,7 +996,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
         }
     }
 
-    private List<Taaccount>  insertUserAccount(WskhUserinfo vo, WskhUserinfo wui, Systemmanager systemmanager){
+    private List<Taaccount> insertUserAccount(WskhUserinfo vo, WskhUserinfo wui, Systemmanager systemmanager) {
         List<Taaccount> taaccountList = new ArrayList<>();
         Useraccount ua = new Useraccount();
         ua.setUserid(Long.valueOf(vo.getAreacode()));

+ 85 - 0
mtp3-century/src/main/resources/message_en.properties

@@ -0,0 +1,85 @@
+message_code_system001=Operation successful
+message_code_system003=Modified successfully
+message_code_system004=Signed successfully
+message_code_system005=Termination successful
+message_code_system006=Successfully obtained verification code
+message_code_system007=Login succeeded
+message_code_system008=Successful withdrawal of funds
+message_code_system009=Deposit successful
+
+message_error_code_system001=Token invalid, please log in again!
+message_error_code_system002=operation failed
+message_error_code_system003=The user does not have operational permissions
+message_error_code_system004=File upload failed, please contact the management personnel for handling!
+message_error_code_system005=Your application has been submitted, please check the results later。
+message_error_code_system006=Request timed out, please try again later
+message_error_code_system007=System maintenance in progress, please try again later
+
+login_error_code_001=Account or password error
+login_error_code_002=Unauthorized access is not allowed! Please contact the administrator to handle it!
+login_error_code_003=Login locked!
+login_error_code_004=The account has been deactivated, please contact the administrator
+login_error_code_005=Login account already exists
+login_error_code_006=The user does not exist, please contact the management personnel for handling
+login_error_code_007=Do not allow disabling the current login account
+login_error_code_008=Cannot be the same as the old password
+login_error_code_009=Old password incorrect
+login_error_code_010=Character information is incorrect
+
+role_error_code_001=The role name already exists
+
+market_run_message_001=Forced offline sent
+
+organ_error_code_001=The role has been assigned and cannot be unregistered
+organ_error_code_002=There are subordinate institutions that cannot be deregistered
+organ_error_code_003=There are subordinate investors and cannot be cancelled
+organ_error_code_004=There are remaining funds that cannot be cancelled
+organ_error_code_005=There are remaining positions that cannot be cancelled
+organ_error_code_006=The ID number already has a normal record and cannot be restored
+organ_error_code_007=The phone number already has a normal record and cannot be restored
+organ_error_code_008=The higher-level organization is in an abnormal state and cannot be restored
+organ_error_code_009=The member does not have a broker role and cannot be restored
+organ_error_code_010=Duplicate code or institutional code
+organ_error_code_011=The ID number already exists
+organ_error_code_012=The ID number is already on the blacklist and cannot be used to open an account
+organ_error_code_013=The name already exists
+organ_error_code_014=Duplicate administrator login accounts
+organ_error_code_015=Addition failed, please contact the administrator
+organ_error_code_016=The phone number already exists
+organ_error_code_017=The company name already exists
+organ_error_code_018=The institution information has been changed, please refresh the data
+organ_error_code_019=The ID number or mobile phone number already exists
+organ_error_code_020=The reason for rejection cannot exceed 80 words
+organ_error_code_021=The investor's information has been changed, please refresh the data
+organ_error_code_022=Non pending review status, unable to withdraw
+organ_error_code_023=The member is in an abnormal state and cannot be approved for review
+organ_error_code_024=The affiliated institution is in an abnormal state and cannot be approved for review
+organ_error_code_025=The broker is in an abnormal state and cannot be approved for review
+
+profit_shar_error_code_001=Please delete the profit sharing configuration first
+profit_shar_error_code_002=Please delete the group members first
+profit_shar_error_code_003=This expense type already has a profit sharing configuration
+
+query_error_code_001=Please select market inquiry
+query_error_code_002=Please select the start date for historical queries
+query_error_code_003=Please select the end date for historical queries
+query_error_code_004=Do not have this permission
+query_error_code_005=No data available for export
+query_error_code_006=Export failed, please contact the administrator!
+
+settlement_message_001=Confirm payment completion: {0} Successful entry, {1} Article failed
+settlement_message_002=Data has changed, please refresh and try again
+
+pwd_error_code_001=Please fill in the old password
+pwd_error_code_002=Please fill in a new password
+pwd_error_code_003=Please fill in the new password for confirmation
+pwd_error_code_004=Two passwords are inconsistent
+pwd_error_code_005=Old password incorrect
+
+amount_error_code_001=The amount is 0, no processing will be done!
+
+investor_error_code_001=No funds account found
+investor_error_code_002=Non investor accounts cannot be closed for review
+investor_error_code_003=The fund account cannot be closed as it has not been terminated
+investor_error_code_004=The account contains relevant information such as funds and positions, and cannot be cancelled
+investor_error_code_005=The fund account request has not been responded to.

+ 85 - 0
mtp3-century/src/main/resources/message_th.properties

@@ -0,0 +1,85 @@
+message_code_system001=ความสำเร็จในการดำเนินงาน
+message_code_system003=แก้ไขสำเร็จ
+message_code_system004=ความสำเร็จในการลงทะเบียน
+message_code_system005=ความสำเร็จในการยกเลิกสัญญา
+message_code_system006=รับ CAPTCHA สำเร็จ
+message_code_system007=เข้าสู่ระบบสำเร็จ
+message_code_system008=ความสำเร็จในการออกคิม
+message_code_system009=ความสำเร็จในการลงทุน
+
+message_error_code_system001=โทเค็นล้มเหลวโปรดเข้าสู่ระบบอีกครั้ง!
+message_error_code_system002=การดำเนินการล้มเหลว!
+message_error_code_system003=ไม่มีสิทธิ์ในการดำเนินงานของผู้ใช้รายนี้!
+message_error_code_system004=การอัพโหลดไฟล์ล้มเหลว กรุณาติดต่อเจ้าหน้าที่เพื่อดำเนินการ!
+message_error_code_system005=ส่งใบสมัครของคุณแล้ว โปรดตรวจสอบผลลัพธ์ในภายหลัง。
+message_error_code_system006=ขอหมดเวลาโปรดลองอีกครั้งในภายหลัง
+message_error_code_system007=ในระหว่างการบำรุงรักษาระบบ โปรดลองอีกครั้งในภายหลัง
+
+login_error_code_001=บัญชีหรือรหัสผ่านไม่ถูกต้อง
+login_error_code_002=ไม่สามารถเข้าถึงได้โดยไม่ได้รับอนุญาต! กรุณาติดต่อผู้ดูแลระบบเพื่อจัดการ!
+login_error_code_003=ล็อกอิน!
+login_error_code_004=บัญชีถูกปิดใช้งานโปรดติดต่อผู้ดูแลระบบ
+login_error_code_005=หมายเลขบัญชีล็อกอินมีอยู่แล้ว
+login_error_code_006=ผู้ใช้รายนี้ไม่มีอยู่จริงโปรดติดต่อผู้ดูแลระบบเพื่อจัดการ
+login_error_code_007=ไม่อนุญาตให้ปิดการใช้งานบัญชีที่ล็อกอินปัจจุบัน
+login_error_code_008=ไม่สามารถใช้รหัสผ่านเดิมได้
+login_error_code_009=รหัสผ่านเก่าผิดพลาด
+login_error_code_010=ข้อมูลตัวละครผิดพลาด
+
+role_error_code_001=ชื่อตัวละครมีอยู่แล้ว
+
+market_run_message_001=บังคับให้ออฟไลน์ถูกส่งแล้ว
+
+organ_error_code_001=บทบาทที่ได้รับมอบหมายและไม่สามารถออกจากระบบได้
+organ_error_code_002=มีหน่วยงานระดับล่างไม่สามารถออกจากระบบได้
+organ_error_code_003=มีนักลงทุนระดับล่างไม่สามารถออกจากระบบได้
+organ_error_code_004=มีเงินเหลือและไม่สามารถออกจากระบบได้
+organ_error_code_005=มีสถานะที่เหลือและไม่สามารถออกจากระบบได้
+organ_error_code_006=หมายเลขเอกสารได้รับการบันทึกตามปกติและไม่สามารถกู้คืนได้
+organ_error_code_007=หมายเลขโทรศัพท์มือถือมีการบันทึกปกติและไม่สามารถกู้คืนได้
+organ_error_code_008=หน่วยงานที่เหนือกว่าอยู่ในสภาพที่ไม่ปกติและไม่สามารถกู้คืนได้
+organ_error_code_009=สมาชิกที่สังกัดไม่มีบทบาทเป็นนายหน้าและไม่สามารถกู้คืนได้
+organ_error_code_010=รหัสหรือรหัสสถาบันซ้ำ
+organ_error_code_011=หมายเลขเอกสารมีอยู่แล้ว
+organ_error_code_012=หมายเลขเอกสารอยู่ในบัญชีดำและไม่สามารถเปิดบัญชีได้
+organ_error_code_013=มีชื่ออยู่แล้ว
+organ_error_code_014=ผู้ดูแลระบบ เข้าสู่ระบบ หมายเลขบัญชี ทำซ้ำ
+organ_error_code_015=เพิ่มล้มเหลว ติดต่อผู้ดูแลระบบ
+organ_error_code_016=มีหมายเลขโทรศัพท์มือถืออยู่แล้ว
+organ_error_code_017=ชื่อธุรกิจมีอยู่แล้ว
+organ_error_code_018=ข้อมูลของหน่วยงานมีการเปลี่ยนแปลง กรุณารีเฟรชข้อมูล
+organ_error_code_019=มีหมายเลขเอกสารหรือหมายเลขโทรศัพท์มือถืออยู่แล้ว
+organ_error_code_020=ตรวจสอบปฏิเสธเหตุผล ไม่เกิน 80 คำ
+organ_error_code_021=ข้อมูลนักลงทุนมีการเปลี่ยนแปลงโปรดรีเฟรชข้อมูล
+organ_error_code_022=ไม่มีสถานะรอการตรวจสอบและไม่สามารถถอนได้
+organ_error_code_023=สมาชิกที่สังกัดอยู่ในสถานะไม่ปกติและไม่สามารถตรวจสอบผ่าน
+organ_error_code_024=หน่วยงานที่สังกัดอยู่ในสถานะไม่ปกติไม่สามารถตรวจสอบผ่าน
+organ_error_code_025=โบรกเกอร์ที่อยู่ในสถานะไม่ปกติและไม่สามารถตรวจสอบได้ ผ่าน
+
+profit_shar_error_code_001=กรุณาลบการกำหนดค่าการแบ่งงานก่อน
+profit_shar_error_code_002=กรุณาลบคนกลุ่มออกก่อน
+profit_shar_error_code_003=มีการกำหนดค่าการแบ่งประเภทของค่าธรรมเนียมนี้อยู่แล้ว
+
+query_error_code_001=กรุณาเลือกสอบถามข้อมูลตลาด
+query_error_code_002=สอบถามประวัติ กรุณาเลือกวันที่เริ่มต้น
+query_error_code_003=สอบถามประวัติ กรุณาเลือกวันสิ้นสุด
+query_error_code_004=ไม่มีสิทธิ์นี้
+query_error_code_005=ไม่มีข้อมูลที่จะส่งออก
+query_error_code_006=ส่งออกล้มเหลว, ติดต่อผู้ดูแลระบบ!
+
+settlement_message_001=ยืนยันการชำระเงินเสร็จสิ้น: {0} ความสำเร็จของบาร์, {1} แถบล้มเหลว
+settlement_message_002=ข้อมูลมีการเปลี่ยนแปลงโปรดรีเฟรชลองอีกครั้ง
+
+pwd_error_code_001=กรุณากรอกรหัสผ่านเก่า
+pwd_error_code_002=กรุณากรอกรหัสผ่านใหม่
+pwd_error_code_003=กรุณากรอกรหัสผ่านใหม่เพื่อยืนยัน
+pwd_error_code_004=รหัสผ่านไม่สอดคล้องกันสองครั้ง
+pwd_error_code_005=รหัสผ่านเก่าผิดพลาด
+
+amount_error_code_001=จำนวนเงินเป็น 0 ไม่มีการประมวลผล!
+
+investor_error_code_001=ไม่พบบัญชีเงิน
+investor_error_code_002=บัญชีที่ไม่ใช่นักลงทุนและไม่สามารถตรวจสอบได้โดยผู้ขาย
+investor_error_code_003=บัญชีเงินไม่ถูกยกเลิก ขายไม่ออก
+investor_error_code_004=บัญชีมีข้อมูลที่เกี่ยวข้อง เช่น เงินทุน การเปิดโพซิชั่น และไม่สามารถออกจากระบบได้
+investor_error_code_005=ไม่มีการตอบสนองต่อการร้องขอบัญชีเงินทุน.

+ 85 - 0
mtp3-century/src/main/resources/message_zh-CN.properties

@@ -0,0 +1,85 @@
+message_code_system001=操作成功
+message_code_system003=修改成功
+message_code_system004=签约成功
+message_code_system005=解约成功
+message_code_system006=获取验证码成功
+message_code_system007=登录成功
+message_code_system008=出金成功
+message_code_system009=入金成功
+
+message_error_code_system001=令牌失效,请重新登录!
+message_error_code_system002=操作失败
+message_error_code_system003=没有该用户的操作权限!
+message_error_code_system004=文件上传失败,请联系管理人员处理!
+message_error_code_system005=您的申请已提交,请稍后查询结果。
+message_error_code_system006=请求超时,请稍后重试
+message_error_code_system007=系统维护中,请稍后再试
+
+login_error_code_001=账户或密码错误
+login_error_code_002=未经允许,不可访问!请联系管理员处理!
+login_error_code_003=登录锁定!
+login_error_code_004=账户已停用,请联系管理员
+login_error_code_005=登录账号已存在
+login_error_code_006=该用户不存在,请联系管理人员处理
+login_error_code_007=不允许停用当前登录账户
+login_error_code_008=不能与旧密码相同
+login_error_code_009=旧密码错误
+login_error_code_010=角色信息有误
+
+role_error_code_001=角色名已存在
+
+market_run_message_001=强制下线已发送
+
+organ_error_code_001=已分配角色,无法注销
+organ_error_code_002=存在下级机构,无法注销
+organ_error_code_003=存在下级投资者,无法注销
+organ_error_code_004=有剩余资金,无法注销
+organ_error_code_005=有剩余持仓,无法注销
+organ_error_code_006=证件号码已存在正常记录,无法恢复
+organ_error_code_007=手机号已存在正常记录,无法恢复
+organ_error_code_008=上级机构为非正常状态,无法恢复
+organ_error_code_009=所属会员没有经纪角色,无法恢复
+organ_error_code_010=代码或机构代码重复
+organ_error_code_011=证件号码已存在
+organ_error_code_012=证件号码已存在黑名单中,不能开户
+organ_error_code_013=名称已存在
+organ_error_code_014=管理员登录帐号重复
+organ_error_code_015=新增失败,请联系管理员
+organ_error_code_016=手机号已存在
+organ_error_code_017=企业名称已存在
+organ_error_code_018=该机构信息已变更,请刷新数据
+organ_error_code_019=证件号码或手机号已存在
+organ_error_code_020=审核拒绝原因不能超过80个字
+organ_error_code_021=该投资者信息已变更,请刷新数据
+organ_error_code_022=非待审核状态,无法撤回
+organ_error_code_023=所属会员为非正常状态,无法审核通过
+organ_error_code_024=所属机构为非正常状态,无法审核通过
+organ_error_code_025=所属经纪人为非正常状态,无法审核通过
+
+profit_shar_error_code_001=请先删除分润配置
+profit_shar_error_code_002=请先删除分组人员
+profit_shar_error_code_003=该费用类型已存在分润配置
+
+query_error_code_001=请选择市场查询
+query_error_code_002=历史查询请选择开始日期
+query_error_code_003=历史查询请选择结束日期
+query_error_code_004=没有此权限
+query_error_code_005=无数据可导出
+query_error_code_006=导出失败,请联系管理员!
+
+settlement_message_001=确认付款完成: {0} 条成功, {1} 条失败
+settlement_message_002=数据有变更,请刷新重试
+
+pwd_error_code_001=请填写旧密码
+pwd_error_code_002=请填写新密码
+pwd_error_code_003=请填写新密码确认
+pwd_error_code_004=两次密码不一致
+pwd_error_code_005=旧密码错误
+
+amount_error_code_001=金额为 0,不做处理!
+
+investor_error_code_001=没有找到资金账户
+investor_error_code_002=非投资者账户,不能销户审核.
+investor_error_code_003=资金账户未解约,不能销户.
+investor_error_code_004=账户存在资金、持仓等相关信息,不能注销.
+investor_error_code_005=资金账户请求没有回应.

+ 103 - 0
mtp3-common/src/main/java/com/muchinfo/mtp3common/enumtype/MessageType.java

@@ -0,0 +1,103 @@
+package com.muchinfo.mtp3common.enumtype;
+
+import lombok.Getter;
+
+@Getter
+public enum MessageType {
+
+    MESSAGE_CODE_SYSTEM001("message_code_system001", "操作成功"),
+    MESSAGE_CODE_SYSTEM003("message_code_system003", "修改成功"),
+    MESSAGE_CODE_SYSTEM004("message_code_system004", "签约成功"),
+    MESSAGE_CODE_SYSTEM005("message_code_system005", "解约成功"),
+    MESSAGE_CODE_SYSTEM006("message_code_system006", "获取验证码成功"),
+    MESSAGE_CODE_SYSTEM007("message_code_system007", "登录成功"),
+    MESSAGE_CODE_SYSTEM008("message_code_system008", "出金成功"),
+    MESSAGE_CODE_SYSTEM009("message_code_system009", "入金成功"),
+
+    MESSAGE_ERROR_CODE_SYSTEM001("message_error_code_system001","令牌失效,请重新登录!"),
+    MESSAGE_ERROR_CODE_SYSTEM002("message_error_code_system002","操作失败"),
+    MESSAGE_ERROR_CODE_SYSTEM003("message_error_code_system003","没有该用户的操作权限"),
+    MESSAGE_ERROR_CODE_SYSTEM004("message_error_code_system004","文件上传失败,请联系管理人员处理"),
+    MESSAGE_ERROR_CODE_SYSTEM005("message_error_code_system005","您的申请已提交,请稍后查询结果"),
+    MESSAGE_ERROR_CODE_SYSTEM006("message_error_code_system006","请求超时,请稍后重试"),
+    MESSAGE_ERROR_CODE_SYSTEM007("message_error_code_system007","系统维护中,请稍后再试"),
+
+    LOGIN_ERROR_CODE_001("login_error_code_001","账户或密码错误"),
+    LOGIN_ERROR_CODE_002("login_error_code_002","未经允许,不可访问!请联系管理员处理"),
+    LOGIN_ERROR_CODE_003("login_error_code_003","登录锁定"),
+    LOGIN_ERROR_CODE_004("login_error_code_004","账户已停用,请联系管理员"),
+    LOGIN_ERROR_CODE_005("login_error_code_005","登录账号已存在"),
+    LOGIN_ERROR_CODE_006("login_error_code_006","该用户不存在,请联系管理人员处理"),
+    LOGIN_ERROR_CODE_007("login_error_code_007","不允许停用当前登录账户"),
+    LOGIN_ERROR_CODE_008("login_error_code_008","不能与旧密码相同"),
+    LOGIN_ERROR_CODE_009("login_error_code_009","旧密码错误"),
+    LOGIN_ERROR_CODE_010("login_error_code_010","角色信息有误"),
+
+    ROLE_ERROR_CODE_001("role_error_code_001","角色信息有误"),
+
+    ORGAN_ERROR_CODE_001("organ_error_code_001","已分配角色,无法注销"),
+    ORGAN_ERROR_CODE_002("organ_error_code_002","存在下级机构,无法注销"),
+    ORGAN_ERROR_CODE_003("organ_error_code_003","存在下级投资者,无法注销"),
+    ORGAN_ERROR_CODE_004("organ_error_code_004","有剩余资金,无法注销"),
+    ORGAN_ERROR_CODE_005("organ_error_code_005","有剩余持仓,无法注销"),
+    ORGAN_ERROR_CODE_006("organ_error_code_006","证件号码已存在正常记录,无法恢复"),
+    ORGAN_ERROR_CODE_007("organ_error_code_007","手机号已存在正常记录,无法恢复"),
+    ORGAN_ERROR_CODE_008("organ_error_code_008","上级机构为非正常状态,无法恢复"),
+    ORGAN_ERROR_CODE_009("organ_error_code_009","所属会员没有经纪角色,无法恢复"),
+    ORGAN_ERROR_CODE_010("organ_error_code_010","代码或机构代码重复"),
+    ORGAN_ERROR_CODE_011("organ_error_code_011","证件号码已存在"),
+    ORGAN_ERROR_CODE_012("organ_error_code_012","证件号码已存在黑名单中,不能开户"),
+    ORGAN_ERROR_CODE_013("organ_error_code_013","名称已存在"),
+    ORGAN_ERROR_CODE_014("organ_error_code_014","管理员登录帐号重复"),
+    ORGAN_ERROR_CODE_015("organ_error_code_015","新增失败,请联系管理员"),
+    ORGAN_ERROR_CODE_016("organ_error_code_016","手机号已存在"),
+    ORGAN_ERROR_CODE_017("organ_error_code_017","企业名称已存在"),
+    ORGAN_ERROR_CODE_018("organ_error_code_018","该机构信息已变更,请刷新数据"),
+    ORGAN_ERROR_CODE_019("organ_error_code_019","证件号码或手机号已存在"),
+    ORGAN_ERROR_CODE_020("organ_error_code_020","审核拒绝原因不能超过80个字"),
+    ORGAN_ERROR_CODE_021("organ_error_code_021","该投资者信息已变更,请刷新数据"),
+    ORGAN_ERROR_CODE_022("organ_error_code_022","非待审核状态,无法撤回"),
+    ORGAN_ERROR_CODE_023("organ_error_code_023","所属会员为非正常状态,无法审核通过"),
+    ORGAN_ERROR_CODE_024("organ_error_code_024","所属机构为非正常状态,无法审核通过"),
+    ORGAN_ERROR_CODE_025("organ_error_code_025","所属经纪人为非正常状态,无法审核通过"),
+
+    PROFIT_SHAR_ERROR_CODE_001("profit_shar_error_code_001","请先删除分润配置"),
+    PROFIT_SHAR_ERROR_CODE_002("profit_shar_error_code_002","请先删除分组人员"),
+    PROFIT_SHAR_ERROR_CODE_003("profit_shar_error_code_003","该费用类型已存在分润配置"),
+
+    QUERY_ERROR_CODE_001("query_error_code_001","请选择市场查询"),
+    QUERY_ERROR_CODE_002("query_error_code_002","历史查询请选择开始日期"),
+    QUERY_ERROR_CODE_003("query_error_code_003","历史查询请选择结束日期"),
+    QUERY_ERROR_CODE_004("query_error_code_004","没有此权限"),
+    QUERY_ERROR_CODE_005("query_error_code_005","无数据可导出"),
+    QUERY_ERROR_CODE_006("query_error_code_006","导出失败,请联系管理员!"),
+
+    MARKET_RUN_MESSAGE_001("market_run_message_001","强制下线已发送"),
+
+    SETTLEMENT_MESSAGE_001("settlement_message_001","确认付款完成: {0} 条成功, {1} 条失败"),
+    SETTLEMENT_MESSAGE_002("settlement_message_002","数据有变更,请刷新重试"),
+
+    PWD_ERROR_CODE_001("pwd_error_code_001","请填写旧密码"),
+    PWD_ERROR_CODE_002("pwd_error_code_002","请填写新密码"),
+    PWD_ERROR_CODE_003("pwd_error_code_003","请填写新密码确认"),
+    PWD_ERROR_CODE_004("pwd_error_code_004","两次密码不一致"),
+    PWD_ERROR_CODE_005("pwd_error_code_005","旧密码错误"),
+
+    AMOUNT_ERROR_CODE_001("amount_error_code_001","金额为 0,不做处理!"),
+
+    INVESTOR_ERROR_CODE_001("investor_error_code_001","没有找到资金账户"),
+    INVESTOR_ERROR_CODE_002("investor_error_code_002","非投资者账户,不能销户审核."),
+    INVESTOR_ERROR_CODE_003("investor_error_code_003","资金账户未解约,不能销户."),
+    INVESTOR_ERROR_CODE_004("investor_error_code_004","账户存在资金、持仓等相关信息,不能注销."),
+    INVESTOR_ERROR_CODE_005("investor_error_code_005","资金账户请求没有回应."),
+    ;
+
+    private String code;
+    private String message;
+
+    // 3. 字段的构造方法
+    MessageType(String code, String message) {
+        this.code = code;
+        this.message = message;
+    }
+}

+ 67 - 5
mtp3-common/src/main/java/com/muchinfo/mtp3common/vo/AjaxResult.java

@@ -1,11 +1,16 @@
 package com.muchinfo.mtp3common.vo;
 
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.muchinfo.mtp3common.enumtype.GlobalExceptionEnum;
 import io.swagger.annotations.ApiModel;
 import lombok.Data;
 
+import java.text.MessageFormat;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
 @Data
-@ApiModel(value="AjaxResult对象", description="公共响应对象")
+@ApiModel(value = "AjaxResult对象", description = "公共响应对象")
 public class AjaxResult<T> {
 
     // 默认成功
@@ -46,14 +51,26 @@ public class AjaxResult<T> {
         return new AjaxResult();
     }
 
-    public static AjaxResult success(Integer code, String message) {
+    public static AjaxResult success(Integer code, String message, String languages) {
+        message = dealMsg(message, languages);
         AjaxResult ajaxResult = new AjaxResult();
         ajaxResult.setMessage(message);
         ajaxResult.setCode(code);
         return ajaxResult;
     }
 
-    public static AjaxResult success(Integer code, String message, Object data) {
+    public static AjaxResult success(Integer code, String message, Object[] parameters, String languages) {
+        message = dealMsgForParam(message, languages, parameters);
+        AjaxResult ajaxResult = new AjaxResult();
+        ajaxResult.setMessage(message);
+        ajaxResult.setCode(code);
+        return ajaxResult;
+    }
+
+    public static AjaxResult success(Integer code, String message, String languages, Object data) {
+        if (code == 200) {
+            message = dealMsg(message, languages);
+        }
         AjaxResult ajaxResult = new AjaxResult();
         ajaxResult.setMessage(message);
         ajaxResult.setCode(code);
@@ -75,7 +92,10 @@ public class AjaxResult<T> {
         return ajaxResult;
     }
 
-    public static AjaxResult error(Integer code, String message) {
+    public static AjaxResult error(Integer code, String message, String languages) {
+        if (StringUtils.isNotBlank(languages)) {
+            message = dealMsg(message, languages);
+        }
         AjaxResult ajaxResult = new AjaxResult();
         ajaxResult.setSuccess(false);
         ajaxResult.setMessage(message);
@@ -83,7 +103,10 @@ public class AjaxResult<T> {
         return ajaxResult;
     }
 
-    public static AjaxResult error(Integer code, String message, Object data) {
+    public static AjaxResult error(Integer code, String message, String languages, Object data) {
+        if (StringUtils.isNotBlank(languages)) {
+            message = dealMsg(message, languages);
+        }
         AjaxResult ajaxResult = new AjaxResult();
         ajaxResult.setSuccess(false);
         ajaxResult.setMessage(message);
@@ -112,4 +135,43 @@ public class AjaxResult<T> {
         this.data = data;
         return this;
     }
+
+    public static String dealMsg(String message, String languages) {
+        try {
+            //处理语种
+            String[] split = languages.split("-");
+            if (split.length > 1 && !split[0].equals("zh")) {
+                languages = split[0];
+            }
+
+            Locale spanish = new Locale(languages);
+            // 加载资源文件
+            ResourceBundle bundle = ResourceBundle.getBundle("message", spanish);
+            // 获取并打印文本
+            String string = bundle.getString(message);
+            byte[] arr = string.getBytes("ISO-8859-1");
+            return new String(arr, "UTF-8");
+        } catch (Exception e) {
+            return null;
+        }
+    }
+
+    public static String dealMsgForParam(String message, String languages, Object[] parameters) {
+        //处理语种
+        String[] split = languages.split("-");
+        if (split.length > 1 && !split[0].equals("zh")) {
+            languages = split[0];
+        }
+
+        try {
+            Locale spanish = new Locale(languages);
+            ResourceBundle bundle = ResourceBundle.getBundle("message", spanish);
+            String messageTemplate = bundle.getString(message);
+            byte[] arr = messageTemplate.getBytes("ISO-8859-1");
+            messageTemplate = new String(arr, "UTF-8");
+            return MessageFormat.format(messageTemplate, parameters);
+        } catch (Exception e) {
+            return null;
+        }
+    }
 }

+ 1 - 1
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/reportform/HolderTotalResult.java

@@ -26,7 +26,7 @@ public class HolderTotalResult {
     @ApiModelProperty(value = "买期初持仓数量")
     private Integer buypositionqty;
 
-    @ApiModelProperty(value = "买当前持仓总数量")
+    @ApiModelProperty(value = "买持仓期初总金额")
     private BigDecimal buyholderamount;
 
     @ApiModelProperty(value = "买当前持仓总数量")