diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/common/CommonController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/common/CommonController.java index 97ea214b..87fa6aa1 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/common/CommonController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/common/CommonController.java @@ -5,6 +5,7 @@ import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import com.fastbee.common.utils.MessageUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; @@ -55,7 +56,7 @@ public class CommonController { if (!FileUtils.checkAllowDownload(fileName)) { - throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName)); + throw new Exception(StringUtils.format(MessageUtils.message("download.filename.not.valid"), fileName)); } String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1); String filePath = RuoYiConfig.getDownloadPath() + fileName; @@ -151,7 +152,7 @@ public class CommonController { if (!FileUtils.checkAllowDownload(resource)) { - throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource)); + throw new Exception(StringUtils.format(MessageUtils.message("download.resource.not.valid"), resource)); } // 本地资源路径 String localPath = RuoYiConfig.getProfile(); diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysConfigController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysConfigController.java index 7b48f986..73e727d9 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysConfigController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysConfigController.java @@ -1,8 +1,11 @@ package com.fastbee.web.controller.system; import java.util.List; +import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; +import com.fastbee.common.utils.MessageUtils; +import com.fastbee.common.utils.StringUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -36,7 +39,7 @@ import com.fastbee.system.service.ISysConfigService; @RequestMapping("/system/config") public class SysConfigController extends BaseController { - @Autowired + @Resource private ISysConfigService configService; /** @@ -95,7 +98,7 @@ public class SysConfigController extends BaseController { if (!configService.checkConfigKeyUnique(config)) { - return error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在"); + return error(StringUtils.format(MessageUtils.message("sysConfig.add.param.fail.name.exist"), config.getConfigName())); } config.setCreateBy(getUsername()); return toAjax(configService.insertConfig(config)); @@ -112,7 +115,7 @@ public class SysConfigController extends BaseController { if (!configService.checkConfigKeyUnique(config)) { - return error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在"); + return error(StringUtils.format(MessageUtils.message("sysConfig.update.param.fail.name.exist"), config.getConfigName())); } config.setUpdateBy(getUsername()); return toAjax(configService.updateConfig(config)); diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDeptController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDeptController.java index b14bf5bf..81ab7d81 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDeptController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDeptController.java @@ -5,6 +5,7 @@ import java.util.stream.Collectors; import com.fastbee.common.core.domain.model.LoginUser; import com.fastbee.common.exception.ServiceException; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.SecurityUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -29,6 +30,8 @@ import com.fastbee.common.enums.BusinessType; import com.fastbee.common.utils.StringUtils; import com.fastbee.system.service.ISysDeptService; +import javax.servlet.http.HttpServletRequest; + /** * 部门信息 * @@ -98,11 +101,11 @@ public class SysDeptController extends BaseController @PreAuthorize("@ss.hasPermi('system:dept:add')") @Log(title = "部门管理", businessType = BusinessType.INSERT) @PostMapping - public AjaxResult add(@Validated @RequestBody SysDept dept) + public AjaxResult add(HttpServletRequest request, @Validated @RequestBody SysDept dept) { if (!deptService.checkDeptNameUnique(dept)) { - return error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在"); + return error(StringUtils.format(MessageUtils.message("dept.add.failed.name.exists"), dept.getDeptName())); } dept.setCreateBy(getUsername()); return toAjax(deptService.insertDept(dept)); @@ -121,15 +124,15 @@ public class SysDeptController extends BaseController deptService.checkDeptDataScope(deptId); if (!deptService.checkDeptNameUnique(dept)) { - return error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在"); + return error(StringUtils.format(MessageUtils.message("dept.update.failed.name.exists"), dept.getDeptName())); } else if (dept.getParentId().equals(deptId)) { - return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己"); + return error(StringUtils.format(MessageUtils.message("dept.update.failed.parent.not.valid"), dept.getDeptName())); } else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()) && deptService.selectNormalChildrenDeptById(deptId) > 0) { - return error("该部门包含未停用的子部门!"); + return error(MessageUtils.message("dept.update.failed.child.not.valid")); } dept.setUpdateBy(getUsername()); return toAjax(deptService.updateDept(dept)); @@ -146,11 +149,11 @@ public class SysDeptController extends BaseController { if (deptService.hasChildByDeptId(deptId)) { - return warn("存在下级部门,不允许删除"); + return warn(MessageUtils.message("dept.delete.failed.child.exists")); } if (deptService.checkDeptExistUser(deptId)) { - return warn("部门存在用户,不允许删除"); + return warn(MessageUtils.message("dept.delete.failed.user.exists")); } deptService.checkDeptDataScope(deptId); return toAjax(deptService.deleteDeptById(deptId)); diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictDataController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictDataController.java index 7fa03d78..6bfc33b6 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictDataController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictDataController.java @@ -78,7 +78,7 @@ public class SysDictDataController extends BaseController List data = dictTypeService.selectDictDataByType(dictType); if (StringUtils.isNull(data)) { - data = new ArrayList(); + data = new ArrayList<>(); } return success(data); } diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictTypeController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictTypeController.java index 40bac930..bcf04e83 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictTypeController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysDictTypeController.java @@ -3,6 +3,8 @@ package com.fastbee.web.controller.system; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.fastbee.common.utils.MessageUtils; +import com.fastbee.common.utils.StringUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -82,7 +84,7 @@ public class SysDictTypeController extends BaseController { if (!dictTypeService.checkDictTypeUnique(dict)) { - return error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在"); + return error(StringUtils.format(MessageUtils.message("dict.add.failed.type.exists"), dict.getDictName())); } dict.setCreateBy(getUsername()); return toAjax(dictTypeService.insertDictType(dict)); @@ -99,7 +101,7 @@ public class SysDictTypeController extends BaseController { if (!dictTypeService.checkDictTypeUnique(dict)) { - return error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在"); + return error(StringUtils.format(MessageUtils.message("dict.update.failed.type.exists"), dict.getDictName())); } dict.setUpdateBy(getUsername()); return toAjax(dictTypeService.updateDictType(dict)); diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysIndexController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysIndexController.java index 1920037e..d662c8dd 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysIndexController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysIndexController.java @@ -1,5 +1,6 @@ package com.fastbee.web.controller.system; +import com.fastbee.common.utils.MessageUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -24,6 +25,6 @@ public class SysIndexController @RequestMapping("/") public String index() { - return StringUtils.format("欢迎使用{}后台管理框架,当前版本:v{},请通过前端地址访问。", ruoyiConfig.getName(), ruoyiConfig.getVersion()); + return StringUtils.format(MessageUtils.message("index.welcome.message"), ruoyiConfig.getName(), ruoyiConfig.getVersion()); } } diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysLoginController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysLoginController.java index 75a9a8c9..58ab97ac 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysLoginController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysLoginController.java @@ -17,9 +17,12 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; +import javax.servlet.http.HttpServletRequest; import java.util.List; import java.util.Set; +import static com.fastbee.common.constant.Constants.LANGUAGE; + /** * 登录验证 * @@ -47,12 +50,12 @@ public class SysLoginController * @return 结果 */ @PostMapping("/login") - public AjaxResult login(@RequestBody LoginBody loginBody) + public AjaxResult login(HttpServletRequest request, @RequestBody LoginBody loginBody) { AjaxResult ajax = AjaxResult.success(); // 生成令牌 String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), - loginBody.getUuid()); + loginBody.getUuid(), request.getHeader(LANGUAGE)); ajax.put(Constants.TOKEN, token); return ajax; } @@ -89,10 +92,10 @@ public class SysLoginController * @return 路由信息 */ @GetMapping("getRouters") - public AjaxResult getRouters() + public AjaxResult getRouters(HttpServletRequest request) { Long userId = SecurityUtils.getUserId(); - List menus = menuService.selectMenuTreeByUserId(userId); + List menus = menuService.selectMenuTreeByUserId(userId, request.getHeader(LANGUAGE)); return AjaxResult.success(menuService.buildMenus(menus)); } } diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysMenuController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysMenuController.java index ff557654..25b3b1c9 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysMenuController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysMenuController.java @@ -2,6 +2,7 @@ package com.fastbee.web.controller.system; import java.util.List; +import com.fastbee.common.utils.MessageUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -96,11 +97,11 @@ public class SysMenuController extends BaseController { if (!menuService.checkMenuNameUnique(menu)) { - return error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在"); + return error(StringUtils.format(MessageUtils.message("menu.add.failed.name.exists"), menu.getMenuName())); } else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath())) { - return error("新增菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头"); + return error(StringUtils.format(MessageUtils.message("menu.add.failed.path.not.valid"), menu.getMenuName())); } menu.setCreateBy(getUsername()); return toAjax(menuService.insertMenu(menu)); @@ -117,15 +118,15 @@ public class SysMenuController extends BaseController { if (!menuService.checkMenuNameUnique(menu)) { - return error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在"); + return error(StringUtils.format(MessageUtils.message("menu.update.failed.name.exists"), menu.getMenuName())); } else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath())) { - return error("修改菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头"); + return error(StringUtils.format(MessageUtils.message("menu.update.failed.path.not.valid"), menu.getMenuName())); } else if (menu.getMenuId().equals(menu.getParentId())) { - return error("修改菜单'" + menu.getMenuName() + "'失败,上级菜单不能选择自己"); + return error(StringUtils.format(MessageUtils.message("menu.update.failed.parent.not.valid"), menu.getMenuName())); } menu.setUpdateBy(getUsername()); return toAjax(menuService.updateMenu(menu)); @@ -142,11 +143,11 @@ public class SysMenuController extends BaseController { if (menuService.hasChildByMenuId(menuId)) { - return warn("存在子菜单,不允许删除"); + return warn(MessageUtils.message("menu.delete.failed.child.exists")); } if (menuService.checkMenuExistRole(menuId)) { - return warn("菜单已分配,不允许删除"); + return warn(MessageUtils.message("menu.delete.failed.role.exists")); } return toAjax(menuService.deleteMenuById(menuId)); } diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysPostController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysPostController.java index 77d87b7b..455e3797 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysPostController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysPostController.java @@ -3,6 +3,8 @@ package com.fastbee.web.controller.system; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.fastbee.common.utils.MessageUtils; +import com.fastbee.common.utils.StringUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -85,11 +87,11 @@ public class SysPostController extends BaseController { if (!postService.checkPostNameUnique(post)) { - return error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在"); + return error(StringUtils.format(MessageUtils.message("post.add.failed.name.exists"), post.getPostName())); } else if (!postService.checkPostCodeUnique(post)) { - return error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在"); + return error(StringUtils.format(MessageUtils.message("post.add.failed.code.exists"), post.getPostName())); } post.setCreateBy(getUsername()); return toAjax(postService.insertPost(post)); @@ -106,11 +108,11 @@ public class SysPostController extends BaseController { if (!postService.checkPostNameUnique(post)) { - return error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在"); + return error(StringUtils.format(MessageUtils.message("post.update.failed.name.exists"), post.getPostName())); } else if (!postService.checkPostCodeUnique(post)) { - return error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在"); + return error(StringUtils.format(MessageUtils.message("post.update.failed.code.exists"), post.getPostName())); } post.setUpdateBy(getUsername()); return toAjax(postService.updatePost(post)); diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysProfileController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysProfileController.java index a6a735ae..25857cac 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysProfileController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysProfileController.java @@ -9,6 +9,7 @@ import com.fastbee.common.core.domain.entity.SysUser; import com.fastbee.common.core.domain.model.LoginUser; import com.fastbee.common.enums.BusinessType; import com.fastbee.common.enums.SocialPlatformType; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.SecurityUtils; import com.fastbee.common.utils.StringUtils; import com.fastbee.common.utils.file.FileUploadUtils; @@ -86,11 +87,11 @@ public class SysProfileController extends BaseController currentUser.setSex(user.getSex()); if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(currentUser)) { - return error("修改用户'" + user.getUserName() + "'失败,手机号码已存在"); + return error(StringUtils.format(MessageUtils.message("user.update.failed.phone.exists"), user.getUserName())); } if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(currentUser)) { - return error("修改用户'" + loginUser.getUsername() + "'失败,邮箱账号已存在"); + return error(StringUtils.format(MessageUtils.message("user.update.failed.email.exists"), user.getUserName())); } if (userService.updateUserProfile(currentUser) > 0) { @@ -98,7 +99,7 @@ public class SysProfileController extends BaseController tokenService.setLoginUser(loginUser); return success(); } - return error("修改个人信息异常,请联系管理员"); + return error(MessageUtils.message("user.update.failed")); } /** @@ -116,11 +117,11 @@ public class SysProfileController extends BaseController String password = loginUser.getPassword(); if (!SecurityUtils.matchesPassword(oldPassword, password)) { - return error("修改密码失败,旧密码错误"); + return error(MessageUtils.message("user.update.failed.password.wrong")); } if (SecurityUtils.matchesPassword(newPassword, password)) { - return error("新密码不能与旧密码相同"); + return error(MessageUtils.message("user.update.failed.password.same")); } newPassword = SecurityUtils.encryptPassword(newPassword); if (userService.resetUserPwd(userName, newPassword) > 0) @@ -130,7 +131,7 @@ public class SysProfileController extends BaseController tokenService.setLoginUser(loginUser); return success(); } - return error("修改密码异常,请联系管理员"); + return error(MessageUtils.message("user.update.password.failed")); } /** @@ -155,6 +156,6 @@ public class SysProfileController extends BaseController return ajax; } } - return error("上传图片异常,请联系管理员"); + return error(MessageUtils.message("user.upload.avatar.failed")); } } diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysRegisterController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysRegisterController.java index 2bb1c580..22fa30bd 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysRegisterController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysRegisterController.java @@ -1,5 +1,6 @@ package com.fastbee.web.controller.system; +import com.fastbee.common.utils.MessageUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -13,6 +14,8 @@ import com.fastbee.common.utils.StringUtils; import com.fastbee.framework.web.service.SysRegisterService; import com.fastbee.system.service.ISysConfigService; +import javax.annotation.Resource; + /** * 注册验证 * @@ -22,10 +25,10 @@ import com.fastbee.system.service.ISysConfigService; @RestController public class SysRegisterController extends BaseController { - @Autowired + @Resource private SysRegisterService registerService; - @Autowired + @Resource private ISysConfigService configService; @ApiOperation("注册账号") @@ -34,7 +37,7 @@ public class SysRegisterController extends BaseController { if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser")))) { - return error("当前系统没有开启注册功能!"); + return error(MessageUtils.message("sysRegister.fail.not.enable.register")); } String msg = registerService.register(user); return StringUtils.isEmpty(msg) ? success() : error(msg); diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysRoleController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysRoleController.java index 19656800..5870eff0 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysRoleController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysRoleController.java @@ -3,6 +3,7 @@ package com.fastbee.web.controller.system; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.fastbee.common.utils.MessageUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -104,11 +105,11 @@ public class SysRoleController extends BaseController { if (!roleService.checkRoleNameUnique(role)) { - return error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在"); + return error(StringUtils.format(MessageUtils.message("role.add.failed.name.exists"), role.getRoleName())); } else if (!roleService.checkRoleKeyUnique(role)) { - return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在"); + return error(StringUtils.format(MessageUtils.message("role.add.failed.key.exists"), role.getRoleName())); } role.setCreateBy(getUsername()); return toAjax(roleService.insertRole(role)); @@ -128,11 +129,11 @@ public class SysRoleController extends BaseController roleService.checkRoleDataScope(role.getRoleId()); if (!roleService.checkRoleNameUnique(role)) { - return error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在"); + return error(StringUtils.format(MessageUtils.message("role.update.failed.name.exists"), role.getRoleName())); } else if (!roleService.checkRoleKeyUnique(role)) { - return error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在"); + return error(StringUtils.format(MessageUtils.message("role.update.failed.key.exists"), role.getRoleName())); } role.setUpdateBy(getUsername()); @@ -148,7 +149,7 @@ public class SysRoleController extends BaseController } return success(); } - return error("修改角色'" + role.getRoleName() + "'失败,请联系管理员"); + return error(StringUtils.format(MessageUtils.message("role.update.failed"), role.getRoleName())); } /** diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysTranslateController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysTranslateController.java new file mode 100644 index 00000000..298253bd --- /dev/null +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysTranslateController.java @@ -0,0 +1,80 @@ +package com.fastbee.web.controller.system; + +import com.fastbee.common.core.domain.AjaxResult; +import com.fastbee.common.core.controller.BaseController; +import com.fastbee.common.utils.poi.ExcelUtil; +import com.fastbee.common.utils.MessageUtils; +import com.fastbee.common.utils.StringUtils; +import com.fastbee.system.domain.SysTranslate; +import com.fastbee.system.service.ISysTranslateService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 翻译表管理 + * + * @author ruoyi + */ +@Api(tags = "翻译表管理") +@RestController +@RequestMapping("/system/translate") +public class SysTranslateController extends BaseController +{ + @Autowired + private ISysTranslateService sysTranslateService; + + /** + * 导入翻译列表 + */ + @ApiOperation("导入翻译列表") + @PreAuthorize("@ss.hasPermi('system:translate:import')") + @PostMapping("/import") + public AjaxResult importSysTranslate(MultipartFile file, String type, Long productId) throws Exception { + if (null == file) { + return error(MessageUtils.message("import.failed.file.null")); + } + if (StringUtils.isEmpty(type)) { + return error(); + } + ExcelUtil util = new ExcelUtil<>(SysTranslate.class); + List list = util.importExcel(file.getInputStream()); + if (CollectionUtils.isEmpty(list)) { + return error(MessageUtils.message("import.failed.data.null")); + } + sysTranslateService.importSysTranslate(list, type, productId); + return success(MessageUtils.message("import.success")); + } + + /** + * 导出翻译列表 + */ + @ApiOperation("导出翻译列表") + @PreAuthorize("@ss.hasPermi('system:translate:export')") + @PostMapping("/export") + public void export(HttpServletResponse response, SysTranslate sysTranslate, String type, @RequestParam(name = "isSource", required = false, defaultValue = "0") Boolean isSource) + { + if (StringUtils.isEmpty(type)) { + return; + } + List list; + if (isSource) { + list = sysTranslateService.selectSourceList(type, sysTranslate.getProductId()); + } else { + list = sysTranslateService.selectSysTranslateList(sysTranslate, type); + } + ExcelUtil util = new ExcelUtil<>(SysTranslate.class); + util.exportExcel(response, list, "翻译列表"); + } + +} diff --git a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysUserController.java b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysUserController.java index 75e1468d..d2dad33e 100644 --- a/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysUserController.java +++ b/springboot/fastbee-admin/src/main/java/com/fastbee/web/controller/system/SysUserController.java @@ -10,6 +10,7 @@ import com.fastbee.common.core.domain.model.LoginUser; import com.fastbee.common.core.page.TableDataInfo; import com.fastbee.common.enums.BusinessType; import com.fastbee.common.exception.ServiceException; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.SecurityUtils; import com.fastbee.common.utils.StringUtils; import com.fastbee.common.utils.poi.ExcelUtil; @@ -160,15 +161,15 @@ public class SysUserController extends BaseController roleService.checkRoleDataScope(user.getRoleIds()); if (!userService.checkUserNameUnique(user)) { - return error("新增用户'" + user.getUserName() + "'失败,登录账号已存在"); + return error(StringUtils.format(MessageUtils.message("user.add.failed.name.exists"), user.getUserName())); } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) { - return error("新增用户'" + user.getUserName() + "'失败,手机号码已存在"); + return error(StringUtils.format(MessageUtils.message("user.add.failed.phone.exists"), user.getUserName())); } else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user)) { - return error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在"); + return error(StringUtils.format(MessageUtils.message("user.add.failed.email.exists"), user.getUserName())); } user.setCreateBy(getUsername()); user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); @@ -189,15 +190,15 @@ public class SysUserController extends BaseController roleService.checkRoleDataScope(user.getRoleIds()); if (!userService.checkUserNameUnique(user)) { - return error("修改用户'" + user.getUserName() + "'失败,登录账号已存在"); + return error(StringUtils.format(MessageUtils.message("user.update.failed.name.exists"), user.getUserName())); } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) { - return error("修改用户'" + user.getUserName() + "'失败,手机号码已存在"); + return error(StringUtils.format(MessageUtils.message("user.update.failed.phone.exists"), user.getUserName())); } else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user)) { - return error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在"); + return error(StringUtils.format(MessageUtils.message("user.update.failed.email.exists"), user.getUserName())); } user.setUpdateBy(getUsername()); return toAjax(userService.updateUser(user)); @@ -213,7 +214,7 @@ public class SysUserController extends BaseController { if (ArrayUtils.contains(userIds, getUserId())) { - return error("当前用户不能删除"); + return error(MessageUtils.message("user.delete.failed")); } return toAjax(userService.deleteUserByIds(userIds)); } diff --git a/springboot/fastbee-admin/src/main/resources/i18n/messages.properties b/springboot/fastbee-admin/src/main/resources/i18n/messages.properties index 81e3735b..635cc195 100644 --- a/springboot/fastbee-admin/src/main/resources/i18n/messages.properties +++ b/springboot/fastbee-admin/src/main/resources/i18n/messages.properties @@ -1,38 +1,429 @@ -#错误消息 -not.null=* 必须填写 -user.jcaptcha.error=验证码错误 -user.jcaptcha.expire=验证码已失效 -user.not.exists=用户不存在/密码错误 -user.password.not.match=用户不存在/密码错误 -user.password.retry.limit.count=密码输入错误{0}次 -user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定{1}分钟 -user.password.delete=对不起,您的账号已被删除 -user.blocked=用户已封禁,请联系管理员 -role.blocked=角色已封禁,请联系管理员 -login.blocked=很遗憾,访问IP已被列入系统黑名单 -user.logout.success=退出成功 +#\u9519\u8BEF\u6D88\u606F +not.null=\u5FC5\u987B\u586B\u5199 +user.jcaptcha.error=\u9A8C\u8BC1\u7801\u9519\u8BEF +user.jcaptcha.expire=\u9A8C\u8BC1\u7801\u5DF2\u5931\u6548 +user.not.exists=\u7528\u6237\u4E0D\u5B58\u5728/\u5BC6\u7801\u9519\u8BEF +user.password.not.match=\u7528\u6237\u4E0D\u5B58\u5728/\u5BC6\u7801\u9519\u8BEF +user.password.retry.limit.count=\u5BC6\u7801\u8F93\u5165\u9519\u8BEF{0}\u6B21 +user.password.retry.limit.exceed=\u5BC6\u7801\u8F93\u5165\u9519\u8BEF{0}\u6B21\uFF0C\u5E10\u6237\u9501\u5B9A{1}\u5206\u949F +user.password.delete=\u5BF9\u4E0D\u8D77\uFF0C\u60A8\u7684\u8D26\u53F7\u5DF2\u88AB\u5220\u9664 +user.blocked=\u7528\u6237\u5DF2\u5C01\u7981\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458 +role.blocked=\u89D2\u8272\u5DF2\u5C01\u7981\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458 +user.logout.success=\u9000\u51FA\u6210\u529F -length.not.valid=长度必须在{min}到{max}个字符之间 +length.not.valid=\u957F\u5EA6\u5FC5\u987B\u5728{min}\u5230{max}\u4E2A\u5B57\u7B26\u4E4B\u95F4 -user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头 -user.password.not.valid=* 5-50个字符 +user.username.not.valid=2\u523020\u4E2A\u6C49\u5B57\u3001\u5B57\u6BCD\u3001\u6570\u5B57\u6216\u4E0B\u5212\u7EBF\u7EC4\u6210\uFF0C\u4E14\u5FC5\u987B\u4EE5\u975E\u6570\u5B57\u5F00\u5934 +user.password.not.valid=5-50\u4E2A\u5B57\u7B26 -user.email.not.valid=邮箱格式错误 -user.mobile.phone.number.not.valid=手机号格式错误 -user.login.success=登录成功 -user.register.success=注册成功 -user.notfound=请重新登录 -user.forcelogout=管理员强制退出,请重新登录 -user.unknown.error=未知错误,请重新登录 +user.email.not.valid=\u90AE\u7BB1\u683C\u5F0F\u9519\u8BEF +user.mobile.phone.number.not.valid=\u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF +user.login.success=\u767B\u5F55\u6210\u529F +user.register.success=\u6CE8\u518C\u6210\u529F +user.notfound=\u8BF7\u91CD\u65B0\u767B\u5F55 +user.forcelogout=\u7BA1\u7406\u5458\u5F3A\u5236\u9000\u51FA\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55 +user.unknown.error=\u672A\u77E5\u9519\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55 -##文件上传消息 -upload.exceed.maxSize=上传的文件大小超出限制的文件大小!
允许的文件最大大小是:{0}MB! -upload.filename.exceed.length=上传的文件名最长{0}个字符 +##\u6743\u9650 +no.permission=\u60A8\u6CA1\u6709\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}] +no.create.permission=\u60A8\u6CA1\u6709\u521B\u5EFA\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}] +no.update.permission=\u60A8\u6CA1\u6709\u4FEE\u6539\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}] +no.delete.permission=\u60A8\u6CA1\u6709\u5220\u9664\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}] +no.export.permission=\u60A8\u6CA1\u6709\u5BFC\u51FA\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}] +no.view.permission=\u60A8\u6CA1\u6709\u67E5\u770B\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}] +no.operate.permission=\u6682\u65e0\u6743\u9650\u64cd\u4f5c\uff01 -##权限 -no.permission=您没有数据的权限,请联系管理员添加权限 [{0}] -no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}] -no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}] -no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}] -no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}] -no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}] +##\u6587\u4EF6\u4E0A\u4F20\u6D88\u606F +upload.exceed.maxSize=\u4E0A\u4F20\u7684\u6587\u4EF6\u5927\u5C0F\u8D85\u51FA\u9650\u5236\u7684\u6587\u4EF6\u5927\u5C0F\uFF01
\u5141\u8BB8\u7684\u6587\u4EF6\u6700\u5927\u5927\u5C0F\u662F\uFF1A{0}MB\uFF01 +upload.filename.exceed.length=\u4E0A\u4F20\u7684\u6587\u4EF6\u540D\u6700\u957F{0}\u4E2A\u5B57\u7B26 +upload.success=\u4E0A\u4F20\u6210\u529F + +##\u6587\u4EF6\u4E0B\u8F7D\u6D88\u606F +download.filename.not.valid=\u6587\u4EF6\u540D\u79F0[{}]\u975E\u6CD5\uFF0C\u4E0D\u5141\u8BB8\u4E0B\u8F7D +download.file.failed=\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25 +download.resource.not.valid=\u8D44\u6E90\u6587\u4EF6[{}]\u975E\u6CD5\uFF0C\u4E0D\u5141\u8BB8\u4E0B\u8F7D + +##Dept +dept.add.failed.name.exists=\u65B0\u589E\u673A\u6784[{}]\u5931\u8D25\uFF0C\u673A\u6784\u540D\u79F0\u5DF2\u5B58\u5728 +dept.update.failed.name.exists=\u4FEE\u6539\u673A\u6784[{}]\u5931\u8D25\uFF0C\u673A\u6784\u540D\u79F0\u5DF2\u5B58\u5728 +dept.update.failed.parent.not.valid=\u4FEE\u6539\u673A\u6784[{}]\u5931\u8D25\uFF0C\u4E0A\u7EA7\u673A\u6784\u4E0D\u80FD\u662F\u81EA\u5DF1 +dept.update.failed.child.not.valid=\u8BE5\u673A\u6784\u5305\u542B\u672A\u505C\u7528\u7684\u5B50\u673A\u6784\uFF01 +dept.delete.failed.child.exists=\u5B58\u5728\u4E0B\u7EA7\u673A\u6784\uFF0C\u4E0D\u5141\u8BB8\u5220\u9664 +dept.delete.failed.user.exists=\u673A\u6784\u5B58\u5728\u7528\u6237\uFF0C\u4E0D\u5141\u8BB8\u5220\u9664 +dept.invitationCode.is.exists=\u9080\u8bf7\u7801\u5df2\u7ecf\u5b58\u5728\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165 + +##Dict +dict.add.failed.type.exists=\u65B0\u589E\u5B57\u5178[{}]\u5931\u8D25\uFF0C\u5B57\u5178\u7C7B\u578B\u5DF2\u5B58\u5728 +dict.update.failed.type.exists=\u65B0\u589E\u5B57\u5178[{}]\u5931\u8D25\uFF0C\u5B57\u5178\u7C7B\u578B\u5DF2\u5B58\u5728 + +##Index +index.welcome.message=\u6B22\u8FCE\u4F7F\u7528{}\u540E\u53F0\u7BA1\u7406\u6846\u67B6\uFF0C\u5F53\u524D\u7248\u672C\uFF1Av{}\uFF0C\u8BF7\u901A\u8FC7\u524D\u7AEF\u5730\u5740\u8BBF\u95EE\u3002 + +##Menu +menu.add.failed.name.exists=\u65B0\u589E\u83DC\u5355[{}]\u5931\u8D25\uFF0C\u83DC\u5355\u540D\u79F0\u5DF2\u5B58\u5728 +menu.add.failed.path.not.valid=\u65B0\u589E\u83DC\u5355[{}]\u5931\u8D25\uFF0C\u5730\u5740\u5FC5\u987B\u4EE5http(s)://\u5F00\u5934 +menu.update.failed.name.exists=\u4FEE\u6539\u83DC\u5355[{}]\u5931\u8D25\uFF0C\u83DC\u5355\u540D\u79F0\u5DF2\u5B58\u5728 +menu.update.failed.path.not.valid=\u4FEE\u6539\u83DC\u5355[{}]\u5931\u8D25\uFF0C\u5730\u5740\u5FC5\u987B\u4EE5http(s)://\u5F00\u5934 +menu.update.failed.parent.not.valid=\u4FEE\u6539\u83DC\u5355[{}]\u5931\u8D25\uFF0C\u4E0A\u7EA7\u83DC\u5355\u4E0D\u80FD\u9009\u62E9\u81EA\u5DF1 +menu.delete.failed.child.exists=\u5B58\u5728\u5B50\u83DC\u5355,\u4E0D\u5141\u8BB8\u5220\u9664 +menu.delete.failed.role.exists=\u83DC\u5355\u5DF2\u5206\u914D,\u4E0D\u5141\u8BB8\u5220\u9664 + +##Post +post.add.failed.name.exists=\u65B0\u589E\u5C97\u4F4D[{}]\u5931\u8D25\uFF0C\u5C97\u4F4D\u540D\u79F0\u5DF2\u5B58\u5728 +post.add.failed.code.exists=\u65B0\u589E\u5C97\u4F4D[{}]\u5931\u8D25\uFF0C\u5C97\u4F4D\u7F16\u7801\u5DF2\u5B58\u5728 +post.update.failed.name.exists=\u4FEE\u6539\u5C97\u4F4D[{}]\u5931\u8D25\uFF0C\u5C97\u4F4D\u540D\u79F0\u5DF2\u5B58\u5728 +post.update.failed.code.exists=\u4FEE\u6539\u5C97\u4F4D[{}]\u5931\u8D25\uFF0C\u5C97\u4F4D\u7F16\u7801\u5DF2\u5B58\u5728 + +##User +user.username.exists=\u7CFB\u7EDF\u8D26\u53F7\u540D\u79F0\u5DF2\u5B58\u5728\uFF0C\u8BF7\u4FEE\u6539\u540E\u91CD\u8BD5 +user.password.differ=\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165 +user.add.failed.name.exists=\u65B0\u589E\u7528\u6237[{}]\u5931\u8D25\uFF0C\u767B\u5F55\u8D26\u53F7\u5DF2\u5B58\u5728 +user.add.failed.phone.exists=\u65B0\u589E\u7528\u6237[{}]\u5931\u8D25\uFF0C\u624B\u673A\u53F7\u7801\u5DF2\u5B58\u5728 +user.add.failed.email.exists=\u65B0\u589E\u7528\u6237[{}]\u5931\u8D25\uFF0C\u90AE\u7BB1\u8D26\u53F7\u5DF2\u5B58\u5728 +user.update.failed.password.wrong=\u4FEE\u6539\u5BC6\u7801\u5931\u8D25\uFF0C\u65E7\u5BC6\u7801\u9519\u8BEF +user.update.failed.password.repeat=\u65B0\u5BC6\u7801\u4E0D\u80FD\u4E0E\u65E7\u5BC6\u7801\u76F8\u540C +user.update.password.failed=\u4FEE\u6539\u5BC6\u7801\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458 +user.update.failed.name.exists=\u65B0\u589E\u7528\u6237[{}]\u5931\u8D25\uFF0C\u767B\u5F55\u8D26\u53F7\u5DF2\u5B58\u5728 +user.update.failed.phone.exists=\u4FEE\u6539\u7528\u6237[{}]\u5931\u8D25\uFF0C\u624B\u673A\u53F7\u7801\u5DF2\u5B58\u5728 +user.update.failed.email.exists=\u4FEE\u6539\u7528\u6237[{}]\u5931\u8D25\uFF0C\u90AE\u7BB1\u8D26\u53F7\u5DF2\u5B58\u5728 +user.update.failed=\u4FEE\u6539\u4E2A\u4EBA\u4FE1\u606F\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458 +user.delete.failed=\u5F53\u524D\u7528\u6237\u4E0D\u80FD\u5220\u9664 +user.upload.avatar.failed=\u4E0A\u4F20\u56FE\u7247\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458 +user.not.login=\u8BF7\u767B\u5F55\u540E\u91CD\u8BD5 +user.access.denied=\u7528\u6237\u62D2\u7EDD\u8BBF\u95EE + +##Role +role.add.manager.failed=\u4E0D\u5141\u8BB8\u8BBE\u7F6E\u7BA1\u7406\u5458\u89D2\u8272\u6807\u8BC6 +role.add.failed.name.exists=\u65B0\u589E\u89D2\u8272[{}]\u5931\u8D25\uFF0C\u89D2\u8272\u540D\u79F0\u5DF2\u5B58\u5728 +role.add.failed.key.exists=\u65B0\u589E\u89D2\u8272[{}]\u5931\u8D25\uFF0C\u89D2\u8272\u6743\u9650\u5DF2\u5B58\u5728 +role.update.failed.name.exists=\u4FEE\u6539\u89D2\u8272[{}]\u5931\u8D25\uFF0C\u89D2\u8272\u540D\u79F0\u5DF2\u5B58\u5728 +role.update.failed.key.exists=\u4FEE\u6539\u89D2\u8272[{}]\u5931\u8D25\uFF0C\u89D2\u8272\u6743\u9650\u5DF2\u5B58\u5728 +role.update.failed=\u4FEE\u6539\u89D2\u8272[{}]\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458 + +##Import +import.failed.file.null=\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u5148\u4E0A\u4F20\u6587\u4EF6\uFF01 +import.failed.data.null=\u5BFC\u5165\u5931\u8D25\uFF0C\u5BFC\u5165\u6570\u636E\u4E3A\u7A7A\uFF01 +import.failed.device.name.null=\u5BFC\u5165\u5931\u8D25\uFF0C\u6A21\u677F\u91CC\u8BBE\u5907\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A\uFF01 +import.success=\u5BFC\u5165\u6210\u529F +import.fail=\u5bfc\u5165\u5931\u8d25 + +##General +success=\u6210\u529F +fail=\u5931\u8D25 +query.success=\u67E5\u8BE2\u6210\u529F +operate.success=\u64CD\u4F5C\u6210\u529F +operate.fail=\u64cd\u4f5c\u5931\u8d25 +create.success=\u521B\u5EFA\u6210\u529F +create.failed=\u521B\u5EFA\u5931\u8D25 +save.success=\u4FDD\u5B58\u6210\u529F +save.failed=\u4FDD\u5B58\u5931\u8D25 +authorization.success=\u6388\u6743\u6210\u529F +delete.success=\u5220\u9664\u6210\u529f +delete.fail=\u5220\u9664\u5931\u8d25 +bind.success=\u7ed1\u5b9a\u6210\u529f +bind.fail=\u7ed1\u5b9a\u5931\u8d25 +unbind.success=\u89e3\u7ed1\u6210\u529f +unbind.fail=\u89e3\u7ed1\u5931\u8d25 +captcha.fail=\u9a8c\u8bc1\u7801\u9519\u8bef +import.fail.[{}]=\u5bfc\u5165\u5931\u8d25\uff1a[{}] +only.allow.tenant.config=\u53ea\u5141\u8bb8\u79df\u6237\u914d\u7f6e +password.fail=\u5bc6\u7801\u9519\u8bef +login.success=\u767b\u5f55\u6210\u529f + +##Email +email.format.error=\u90AE\u7BB1\u683C\u5F0F\u9519\u8BEF +email.verification.code.send=\u90AE\u7BB1\u9A8C\u8BC1\u7801\u5DF2\u53D1\u9001 + +##Firmware +firmware.task.upgrade.failed.time.not.valid=\u9884\u5B9A\u5347\u7EA7\u65F6\u95F4\u5E94\u5927\u4E8E\u5F53\u524D\u65F6\u95F4 +##Media +media.record.query.failed=\u8FDE\u63A5\u8D85\u65F6\u6216\u53D1\u751F\u9519\u8BEF\uFF0C\u672A\u83B7\u53D6\u5230\u6570\u636E +##Modbus +modbus.type.null=\u7C7B\u578B\u4E3A\u7A7A +modbus.crc.check.abnormal=crc\u6821\u9a8c\u5f02\u5e38 +##Netty +netty.client.not.exists=\u5BA2\u6237\u7AEF\u4E0D\u5B58\u5728 +##Runtime +runtime.message.id.null=\u6D88\u606Fid\u4E3A\u7A7A +##Wechat +wechat.verify.type.null=\u8BF7\u4F20\u5165\u9A8C\u8BC1\u65B9\u5F0F +wechat.bind.message.id.null=\u8BF7\u4F20\u5165\u7ED1\u5B9A\u4FE1\u606FID +wechat.please.config.open.platform=\u8bf7\u5148\u914d\u7f6e\u5fae\u4fe1\u5f00\u653e\u5e73\u53f0\u79fb\u52a8\u5e94\u7528\u4fe1\u606f +wechat.user.certificate.gain.fail=\u7528\u6237\u51ed\u8bc1\u83b7\u53d6\u5931\u8d25\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55\uff01 +wechat.please.config.open.platform.mini=\u8bf7\u5148\u914d\u7f6e\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u5c0f\u7a0b\u5e8f\u4fe1\u606f\uff01 +wechat.user.phone.certificate.gain.fail=\u7528\u6237\u624b\u673a\u53f7\u51ed\u8bc1\u83b7\u53d6\u5931\u8d25\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55\uff01 +wechat.gain.user.call.certificate.fail=\u83b7\u53d6\u7528\u6237\u8c03\u7528\u51ed\u636e\u5931\u8d25\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55\uff01 +wechat.gain.user.phone.fail=\u83b7\u53d6\u7528\u6237\u624b\u673a\u53f7\u5931\u8d25\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55\uff01 +wechat.please.login=\u8bf7\u5148\u767b\u5f55\u540e\u91cd\u8bd5 +wechat.please.enter.user.password=\u8bf7\u4f20\u5165\u7528\u6237\u5bc6\u7801 +wechat.cancelBind.password.fail=\u5bc6\u7801\u9519\u8bef\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165 +wechat.please.enter.wechat.user.info=\u8bf7\u4f20\u5165\u5fae\u4fe1\u7528\u6237\u4fe1\u606f +wechat.please.enter.user.certificate=\u8bf7\u4f20\u5165\u7528\u6237\u51ed\u8bc1 +wechat.gain.wechat.info.fail=\u83b7\u53d6\u5fae\u4fe1\u4fe1\u606f\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5\uff01 +wechat.your.wechat.already.bind.other.account=\u60a8\u7684\u5fae\u4fe1\u5df2\u7ed1\u5b9a\u5176\u4ed6\u8d26\u53f7\uff0c\u8bf7\u5148\u4f7f\u7528\u5fae\u4fe1\u767b\u5f55\u89e3\u7ed1\u540e\u91cd\u8bd5 +wechat.this.wechat.already.bind.other.account=\u8be5\u5fae\u4fe1\u5df2\u7ed1\u5b9a\u5176\u4ed6\u8d26\u53f7\uff0c\u8bf7\u5148\u4f7f\u7528\u5fae\u4fe1\u767b\u5f55\u89e3\u7ed1\u540e\u91cd\u8bd5\uff01 +wechat.please.config.open.platform.web.application.personal.bind.info=\u8bf7\u5148\u914d\u7f6e\u5fae\u4fe1\u5f00\u653e\u5e73\u53f0\u7f51\u7ad9\u5e94\u7528\u4e2a\u4eba\u4e2d\u5fc3\u7ed1\u5b9a\u4fe1\u606f +wechat.you.cancel.or.not.gain.authorization.info=\u60a8\u5df2\u53d6\u6d88\u6388\u6743\u6216\u672a\u83b7\u53d6\u5230\u6388\u6743\u4fe1\u606f +wechat.the.qr.code.has.expired=\u4e8c\u7ef4\u7801\u5df2\u5931\u6548\uff0c\u8bf7\u91cd\u65b0\u70b9\u51fb\u7ed1\u5b9a +wechat.your.account.already.bind.wechat=\u60a8\u7684\u8d26\u53f7\u5df2\u7ed1\u5b9a\u5fae\u4fe1\uff0c\u8bf7\u5148\u89e3\u7ed1 +##AuthResource +auth.resource.product.query.success=\u67E5\u8BE2\u4EA7\u54C1\u5217\u8868\u6210\u529F +##Device +device.user.id.null=\u7528\u6237ID\u4E0D\u80FD\u4E3A\u7A7A +device.product.id.null=\u8BBE\u5907\u7F16\u53F7\u548C\u4EA7\u54C1ID\u4E0D\u80FD\u4E3A\u7A7A +device.dept.id.null=\u8BF7\u9009\u62E9\u5206\u914D\u673A\u6784 +device.id.null=\u8BF7\u9009\u62E9\u8BBE\u5907 +device.not.select=\u8bf7\u9009\u62e9\u8bbe\u5907 +device.serialNumber.not.empty=\u8bbe\u5907\u7f16\u53f7\u4e0d\u80fd\u4e3a\u7a7a +device.delete.fail.please.delete.device.scene=\u8bbe\u5907\u7f16\u53f7\u4e3a[{}]\u7684\u5220\u9664\u5931\u8d25\uff0c\u8bf7\u5148\u5220\u9664\u5bf9\u5e94\u8bbe\u5907\u4e0b\u7684\u573a\u666f\u8054\u52a8 +delete.fail.please.delete.scene.model=\u8bbe\u5907\u7f16\u53f7\u4e3a[{}]\u7684\u5220\u9664\u5931\u8d25\uff0c\u8bf7\u5148\u5220\u9664\u5bf9\u5e94\u8bbe\u5907\u4e0b\u7684\u573a\u666f\u7ba1\u7406 +device.tenant.can.not.bind.exist.device=\u79df\u6237\u4e0d\u5141\u8bb8\u7ed1\u5b9a\u5df2\u5b58\u5728\u7684\u8bbe\u5907\uff0c\u8bbe\u5907\u7f16\u53f7\uff1a[{}] +now.user.belong.device.can.not.repeat.share=\u5f53\u524d\u7528\u6237\u5df2\u62e5\u6709\u8be5\u8bbe\u5907\uff0c\u65e0\u6cd5\u91cd\u590d\u5206\u914d\uff0c\u8bbe\u5907\u7f16\u53f7\uff1a[{}] +device.share.other.user.can.not.share=\u8be5\u8bbe\u5907\u5df2\u88ab\u5206\u914d\u5230\u5176\u4ed6\u7528\u6237\uff0c\u65e0\u6cd5\u91cd\u590d\u5206\u914d\uff0c\u8bbe\u5907\u7f16\u53f7\uff1a[{}] +device.not.exist.add.fail.please.check.product.id.is.correct=\u8bbe\u5907\u4e0d\u5b58\u5728\uff0c\u81ea\u52a8\u6dfb\u52a0\u8bbe\u5907\u65f6\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u4ea7\u54c1\u7f16\u53f7\u662f\u5426\u6b63\u786e +device.add.success=\u6dfb\u52a0\u8bbe\u5907\u6210\u529f +device.assignment.fail.dept.not.exist=\u673a\u6784\u4e0d\u5b58\u5728\u6216\u672a\u7ed1\u5b9a\u7ba1\u7406\u5458\uff0c\u8bf7\u8c03\u6574\u540e\u91cd\u8bd5\uff01 +device.assignment.fail.dept.admin.not.exist=\u673a\u6784\u7ba1\u7406\u5458\u4e0d\u5b58\u5728 +device.assignment.success=\u5206\u914d\u8bbe\u5907\u6210\u529f +device.assignment.fail=\u5206\u914d\u8bbe\u5907\u5931\u8d25 +device.recovery.fail.dept.not.exist=\u673a\u6784\u4e0d\u5b58\u5728\u6216\u672a\u7ed1\u5b9a\u7ba1\u7406\u5458\uff0c\u8bf7\u8c03\u6574\u540e\u91cd\u8bd5\uff01 +device.recovery.fail.dept.admin.not.exist=\u673a\u6784\u7ba1\u7406\u5458\u4e0d\u5b58\u5728 +device.recovery.success=\u56de\u6536\u8bbe\u5907\u6210\u529f +device.recovery.fail=\u56de\u6536\u8bbe\u5907\u5931\u8d25 +device.not.exist=\u8bbe\u5907\u4e0d\u5b58\u5728 +device.serialNumber.allow.generate.max.number=\u6700\u591a\u53ea\u80fd\u751f\u6210200\u4e2a\uff01 +device.insert.fail.device.number.already.exist=\u8bbe\u5907\u7f16\u53f7\uff1a[{}] \u5df2\u7ecf\u5b58\u5728\uff0c\u65b0\u589e\u5931\u8d25 +device.insert.fail.device.ip.already.exist=\u8be5\u4e3b\u673aip\u548c\u7aef\u53e3\u5df2\u7ecf\u5b58\u5728\uff0c\u8bbe\u5907\u7f16\u53f7\u4e3a\uff1a[{}] +device.get.mqtt.connection.param.fail=\u83b7\u53d6\u8bbe\u5907mqtt\u8fde\u63a5\u53c2\u6570\u5931\u8d25 +device.get.authorization.fail.please.config=\u4ea7\u54c1\u5df2\u542f\u7528\u6388\u6743\uff0c\u83b7\u53d6\u8bbe\u5907\u6388\u6743\u7801\u5931\u8d25\uff0c\u8bf7\u5148\u914d\u7f6e\u6388\u6743\u7801 +device.unsupported.authentication.method=\u4f20\u8f93\u534f\u8bae\u4e3aHTTP\uff0c\u8ba4\u8bc1\u65b9\u5f0f\u4ec5\u652f\u6301 Basic \u548c Digest\uff0c\u8bf7\u524d\u5f80\u4ea7\u54c1\u4fee\u6539\u534f\u8bae +device.not.found.by.serial.number=\u6570\u636e\u5e93\u4e2d\u4e0d\u5b58\u5728\u8be5\u8bbe\u5907 +device.duplicate.by.serial.number=\u5df2\u5b58\u5728\u76f8\u540c\u8bbe\u5907\u7f16\u53f7\u7684\u6570\u636e +device.restore.success=\u8bbe\u5907\u8fd8\u539f\u6210\u529f +device.restore.fail=\u8bbe\u5907\u8fd8\u539f\u5931\u8d25 +product.not.found.by.product.id=\u8bbe\u5907\u6240\u5c5e\u4ea7\u54c1\u5df2\u5220\u9664\uff0c\u8bf7\u5148\u5c06\u4ea7\u54c1\u6062\u590d +device.import.assignment.fail.product.information.is.empty=\u5bfc\u5165\u5931\u8d25\uff0c\u4ea7\u54c1\u4fe1\u606f\u4e3a\u7a7a +device.import.assignment.fail.serialNumber.already.exists=\u4ee5\u4e0b\u8bbe\u5907\u7f16\u53f7[{}]\u5df2\u5b58\u5728\uff0c\u8bf7\u4fee\u6539\u540e\u91cd\u8bd5 +device.import.assignment.fail.dept.not.exists=\u673a\u6784\u4e0d\u5b58\u5728\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u673a\u6784\uff01 +device.import.assignment.fail.dept.admin.not.exists=\u673a\u6784\u7ba1\u7406\u5458\u4fe1\u606f\u4e0d\u5b58\u5728\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u673a\u6784\uff01 +device.import.serialNumber.not.comply.national.standard.protocol=\u8bbe\u5907\u7f16\u53f7[{}]\u4e0d\u7b26\u5408\u56fd\u6807\u534f\u8bae\u683c\u5f0f\u8981\u6c42 +##DeviceJob +job.add.failed.cron.not.valid=\u65B0\u589E\u4EFB\u52A1[{}]\u5931\u8D25\uFF0CCron\u8868\u8FBE\u5F0F\u4E0D\u6B63\u786E +job.add.failed.rmi.not.valid=\u65B0\u589E\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5141\u8BB8'rmi'\u8C03\u7528 +job.add.failed.ldap.not.valid=\u65B0\u589E\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5141\u8BB8'ldap(s)'\u8C03\u7528 +job.add.failed.http.not.valid=\u65B0\u589E\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5141\u8BB8'http(s)'\u8C03\u7528 +job.add.failed.string.error=\u65B0\u589E\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u5B58\u5728\u8FDD\u89C4 +job.add.failed.string.not.valid=\u65B0\u589E\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5728\u767D\u540D\u5355\u5185 +job.add.failed.product.not.modbus.config=\u65b0\u589e\u4efb\u52a1[{}]\u5931\u8d25\uff0c\u8bf7\u5148\u53bb\u4ea7\u54c1\u8fdb\u884cmodbus\u914d\u7f6e +job.update.failed.cron.not.valid=\u4FEE\u6539\u4EFB\u52A1[{}]\u5931\u8D25\uFF0CCron\u8868\u8FBE\u5F0F\u4E0D\u6B63\u786E +job.update.failed.rmi.not.valid=\u4FEE\u6539\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5141\u8BB8'rmi'\u8C03\u7528 +job.update.failed.ldap.not.valid=\u4FEE\u6539\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5141\u8BB8'ldap(s)'\u8C03\u7528 +job.update.failed.http.not.valid=\u4FEE\u6539\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5141\u8BB8'http(s)'\u8C03\u7528 +job.update.failed.string.error=\u4FEE\u6539\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u5B58\u5728\u8FDD\u89C4 +job.update.failed.string.not.valid=\u4FEE\u6539\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5728\u767D\u540D\u5355\u5185 +job.update.failed.product.not.modbus.config=\u66f4\u65b0\u4efb\u52a1[{}]\u5931\u8d25\uff0c\u8bf7\u5148\u53bb\u4ea7\u54c1\u8fdb\u884cmodbus\u914d\u7f6e +job.not.exists=\u4EFB\u52A1\u4E0D\u5B58\u5728\u6216\u5DF2\u8FC7\u671F +##DeviceUser +device.user.delete.failed.user.not.valid=\u8BBE\u5907\u6240\u6709\u8005\u4E0D\u80FD\u5220\u9664 +##GoviewProject +goview.project.data.save.failed.id.null=\u6CA1\u6709\u8BE5\u9879\u76EEID +goview.project.data.execute.sql.failed=\u8BF7\u7F16\u5199sql\u8BED\u53E5 +##ThingsModel +things.model.identifier.repeat=\u4EA7\u54C1\u4E0B\u7684\u6807\u8BC6\u7B26\u4E0D\u80FD\u91CD\u590D +things.model.import.failed.identifier.repeat=[{}]\u6761\u6570\u636E\u672A\u5BFC\u5165\uFF0C\u6807\u8BC6\u7B26\u91CD\u590D +things.model.update.fail.quote.the.scene.variable.formula.please.delete=\u5f53\u524d\u7269\u6a21\u578b\u88ab\u5f15\u7528\u5230\u573a\u666f\u8fd0\u7b97\u578b\u53d8\u91cf\u7684\u8ba1\u7b97\u516c\u5f0f\u4e2d\uff0c\u65e0\u6cd5\u4fee\u6539\uff0c\u8bf7\u5148\u5220\u9664\u5f15\u7528\u5173\u7cfb\u540e\u518d\u6267\u884c\u4fee\u6539\u64cd\u4f5c\uff01 +things.model.delete.fail.quote.the.scene.variable.formula.please.delete=\u5f53\u524d\u7269\u6a21\u578b\u88ab\u5f15\u7528\u5230\u573a\u666f\u8fd0\u7b97\u578b\u53d8\u91cf\u7684\u8ba1\u7b97\u516c\u5f0f\u4e2d\uff0c\u65e0\u6cd5\u5220\u9664\uff0c\u8bf7\u5148\u5220\u9664\u5f15\u7528\u5173\u7cfb\u540e\u518d\u6267\u884c\u5220\u9664\u64cd\u4f5c\uff01 +things.model.import.data.exception=\u5bfc\u5165\u6570\u636e\u5f02\u5e38 +things.model.register.address.repeat=\u540c\u4e00\u4e2a\u91c7\u96c6\u70b9\u6a21\u677f\u4e0b,\u5bc4\u5b58\u5668\u5730\u5740\u91cd\u590d,\u8bf7\u68c0\u67e5\u5bfc\u5165\u53d8\u91cf\u5bc4\u5b58\u5668\u5730\u5740 +##MQTT +mqtt.unauthorized=mqtt\u8D26\u53F7\u548C\u5BC6\u7801\u4E0E\u8BA4\u8BC1\u670D\u52A1\u5668\u914D\u7F6E\u4E0D\u5339\u914D +##Oauth +oauth.response.type.not.valid=response_type\u53C2\u6570\u503C\u53EA\u5141\u8BB8code\u548Ctoken +oauth.grant.type.null=\u672A\u77E5\u6388\u6743\u7C7B\u578B +oauth.grant.type.implicit.not.support=Token\u63A5\u53E3\u4E0D\u652F\u6301implicit\u6388\u6743\u6A21\u5F0F +oauth.access.token.null=\u8BBF\u95EE\u4EE4\u724C\u4E0D\u80FD\u4E3A\u7A7A +obtain.basic.authorization.failed=client_id\u6216client_secret\u672A\u6B63\u786E\u4F20\u9012 +##Record +record.app.null=app\u4E0D\u80FD\u4E3A\u7A7A +record.stream.null=stream\u4E0D\u80FD\u4E3A\u7A7A +record.time.not.valid=\u9519\u8BEF\u7684\u5F00\u59CB\u65F6\u95F4\u6216\u7ED3\u675F\u65F6\u95F4 +record.file.null=\u672A\u627E\u5230\u89C6\u9891\u6587\u4EF6 + +##ErrorCodeConstants +app.not.found=App \u4E0D\u5B58\u5728 +app.is.disable=App \u5DF2\u7ECF\u88AB\u7981\u7528 +app.exist.order.cant.delete=\u652F\u4ED8\u5E94\u7528\u5B58\u5728\u652F\u4ED8\u8BA2\u5355\uFF0C\u65E0\u6CD5\u5220\u9664 +app.exist.refund.cant.delete=\u652F\u4ED8\u5E94\u7528\u5B58\u5728\u9000\u6B3E\u8BA2\u5355\uFF0C\u65E0\u6CD5\u5220\u9664 +channel.not.found=\u652F\u4ED8\u6E20\u9053\u7684\u914D\u7F6E\u4E0D\u5B58\u5728 +channel.is.disable=\u652F\u4ED8\u6E20\u9053\u5DF2\u7ECF\u7981\u7528 +channel.exists.same.channel.error=\u5DF2\u5B58\u5728\u76F8\u540C\u7684\u6E20\u9053 +order.not.found=\u652F\u4ED8\u8BA2\u5355\u4E0D\u5B58\u5728 +order.status.is.not.waiting=\u652F\u4ED8\u8BA2\u5355\u4E0D\u5904\u4E8E\u5F85\u652F\u4ED8 +order.status.is.success=\u8BA2\u5355\u5DF2\u652F\u4ED8\uFF0C\u8BF7\u5237\u65B0\u9875\u9762 +order.is.expired=\u652F\u4ED8\u8BA2\u5355\u5DF2\u7ECF\u8FC7\u671F +order.submit.channel.error=\u53D1\u8D77\u652F\u4ED8\u62A5\u9519\uFF0C\u9519\u8BEF\u7801\uFF1A{}\uFF0C\u9519\u8BEF\u63D0\u793A\uFF1A{} +order.refund.fail.status.error=\u652F\u4ED8\u8BA2\u5355\u9000\u6B3E\u5931\u8D25\uFF0C\u539F\u56E0\uFF1A\u72B6\u6001\u4E0D\u662F\u5DF2\u652F\u4ED8\u6216\u5DF2\u9000\u6B3E +order.extension.not.found=\u652F\u4ED8\u4EA4\u6613\u62D3\u5C55\u5355\u4E0D\u5B58\u5728 +order.extension.status.is.not.waiting=\u652F\u4ED8\u4EA4\u6613\u62D3\u5C55\u5355\u4E0D\u5904\u4E8E\u5F85\u652F\u4ED8 +order.extension.is.paid=\u8BA2\u5355\u5DF2\u652F\u4ED8\uFF0C\u8BF7\u7B49\u5F85\u652F\u4ED8\u7ED3\u679C +refund.price.exceed=\u9000\u6B3E\u91D1\u989D\u8D85\u8FC7\u8BA2\u5355\u53EF\u9000\u6B3E\u91D1\u989D +refund.has.refunding=\u5DF2\u7ECF\u6709\u9000\u6B3E\u5728\u5904\u7406\u4E2D +refund.exists=\u5DF2\u7ECF\u5B58\u5728\u9000\u6B3E\u5355 +refund.not.found=\u652F\u4ED8\u9000\u6B3E\u5355\u4E0D\u5B58\u5728 +refund.statue.is.not.waiting=\u652F\u4ED8\u9000\u6B3E\u5355\u4E0D\u5904\u4E8E\u5F85\u9000\u6B3E +demo.order.not.found=\u793A\u4F8B\u8BA2\u5355\u4E0D\u5B58\u5728 +demo.order.update.paid.status.not.unpaid=\u793A\u4F8B\u8BA2\u5355\u66F4\u65B0\u652F\u4ED8\u72B6\u6001\u5931\u8D25\uFF0C\u8BA2\u5355\u4E0D\u662F\u3010\u672A\u652F\u4ED8\u3011\u72B6\u6001 +demo.order.update.paid.fail.pay.order.id.error=\u793A\u4F8B\u8BA2\u5355\u66F4\u65B0\u652F\u4ED8\u72B6\u6001\u5931\u8D25\uFF0C\u652F\u4ED8\u5355\u7F16\u53F7\u4E0D\u5339\u914D +demo.order.update.paid.fail.pay.order.status.not.success=\u793A\u4F8B\u8BA2\u5355\u66F4\u65B0\u652F\u4ED8\u72B6\u6001\u5931\u8D25\uFF0C\u652F\u4ED8\u5355\u72B6\u6001\u4E0D\u662F\u3010\u652F\u4ED8\u6210\u529F\u3011\u72B6\u6001 +demo.order.update.paid.fail.pay.price.not.match=\u793A\u4F8B\u8BA2\u5355\u66F4\u65B0\u652F\u4ED8\u72B6\u6001\u5931\u8D25\uFF0C\u652F\u4ED8\u5355\u91D1\u989D\u4E0D\u5339\u914D +demo.order.refund.fail.not.paid=\u53D1\u8D77\u9000\u6B3E\u5931\u8D25\uFF0C\u793A\u4F8B\u8BA2\u5355\u672A\u652F\u4ED8 +demo.order.refund.fail.refunded=\u53D1\u8D77\u9000\u6B3E\u5931\u8D25\uFF0C\u793A\u4F8B\u8BA2\u5355\u5DF2\u9000\u6B3E +demo.order.refund.fail.refund.not.found=\u53D1\u8D77\u9000\u6B3E\u5931\u8D25\uFF0C\u9000\u6B3E\u8BA2\u5355\u4E0D\u5B58\u5728 +demo.order.refund.fail.refund.not.success=\u53D1\u8D77\u9000\u6B3E\u5931\u8D25\uFF0C\u9000\u6B3E\u8BA2\u5355\u672A\u9000\u6B3E\u6210\u529F +demo.order.refund.fail.refund.order.id.error=\u53D1\u8D77\u9000\u6B3E\u5931\u8D25\uFF0C\u9000\u6B3E\u5355\u7F16\u53F7\u4E0D\u5339\u914D +demo.order.refund.fail.refund.price.not.match=\u53D1\u8D77\u9000\u6B3E\u5931\u8D25\uFF0C\u9000\u6B3E\u5355\u91D1\u989D\u4E0D\u5339\u914D +device.order.control.no.permission=\u6682\u65e0\u6743\u9650\u64cd\u4f5c\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u5206\u914d\u6307\u4ee4\u6743\u9650\uff01 + +##sysConfig +sysConfig.add.param.fail.name.exist=\u65b0\u589e\u53c2\u6570[{}]\u5931\u8d25\uff0c\u53c2\u6570\u952e\u540d\u5df2\u5b58\u5728 +sysConfig.update.param.fail.name.exist=\u4fee\u6539\u53c2\u6570[{}]\u5931\u8d25\uff0c\u53c2\u6570\u952e\u540d\u5df2\u5b58\u5728 +##sysRegister +sysRegister.fail.not.enable.register=\u5f53\u524d\u7cfb\u7edf\u6ca1\u6709\u5f00\u542f\u6ce8\u518c\u529f\u80fd\uff01 +##ossDetail +ossDetail.fail.file.not.empty=\u4e0a\u4f20\u6587\u4ef6\u4e0d\u80fd\u4e3a\u7a7a +##notify +sms.send.fail.contact.admin=\u77ed\u4fe1\u53d1\u9001\u5931\u8d25\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\uff01 +captcha.has.sent.please.try.again.later=\u9a8c\u8bc1\u7801\u5df2\u53d1\u9001\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5\uff01 +not.find.enable.notify.template=\u67e5\u8be2\u4e0d\u5230\u542f\u7528\u7684\u901a\u77e5\u6a21\u677f +not.find.notify.channel=\u67e5\u8be2\u4e0d\u5230\u901a\u77e5\u6e20\u9053 +only.can.config.alert.and.not.wechat.mini.notify=\u975e\u7ba1\u7406\u5458\u53ea\u5141\u8bb8\u6dfb\u52a0\u8bbe\u5907\u544a\u8b66\u4e1a\u52a1\u5e76\u4e14\u975e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u6a21\u677f\uff01 +notify.can.not.not.alert.and.wechat.mini.status=\u975e\u7ba1\u7406\u5458\u53ea\u80fd\u66f4\u6539\u8bbe\u5907\u544a\u8b66\u4e1a\u52a1\u5e76\u4e14\u975e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u6a21\u677f\u72b6\u6001\uff01 + +##dataCenter +please.select.device=\u8bf7\u9009\u62e9\u8bbe\u5907 +please.incoming.serialNumber=\u8bf7\u4f20\u5165\u8bbe\u5907\u7f16\u53f7 +##license +certificate.install.success=\u8bc1\u4e66\u5b89\u88c5\u6210\u529f +certificate.install.fail=\u8bc1\u4e66\u5b89\u88c5\u5931\u8d25:[{}] +certificate.incoming.success=\u8bc1\u4e66\u4e0a\u4f20\u6210\u529f +certificate.incoming.fail=\u8bc1\u4e66\u4e0a\u4f20\u5931\u8d25 +certificate.upload.success=\u8bc1\u4e66\u4e0a\u4f20\u6210\u529f +certificate.upload.fail=\u8bc1\u4e66\u4e0a\u4f20\u5931\u8d25:[{}] +##sceneModel +please.incoming.scene.id=\u8bf7\u4f20\u5165\u573a\u666fid +please.incoming.device.config.number=\u8bf7\u4f20\u5165\u5173\u8054\u8bbe\u5907\u914d\u7f6e\u7684\u5e8f\u53f7 +sceneModel.please.introduced.id=\u8bf7\u4f20\u5165\u573a\u666f\u7ba1\u7406id +sceneModel.current.variable.quote.operate.variable.formula.please.delete=\u5f53\u524d\u53d8\u91cf\u88ab\u5f15\u7528\u5230\u573a\u666f\u8fd0\u7b97\u578b\u53d8\u91cf\u7684\u8ba1\u7b97\u516c\u5f0f\u4e2d\uff0c\u65e0\u6cd5\u5220\u9664\uff0c\u8bf7\u5148\u5220\u9664\u5f15\u7528\u5173\u7cfb\u540e\u518d\u6267\u884c\u5220\u9664\u64cd\u4f5c\uff01 +sceneModel.scene.already.bind.device=\u573a\u666f\u5df2\u7ed1\u5b9a\u8be5\u8bbe\u5907\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01 +sceneModel.update.fail.device.variable.has.quote.scene.variable.please.delete=\u5f53\u524d\u8bbe\u5907\u4e0b\u5b58\u5728\u53d8\u91cf\u88ab\u5f15\u7528\u5230\u8fd0\u7b97\u578b\u53d8\u91cf\u8ba1\u7b97\u516c\u5f0f\u4e2d\uff0c\u65e0\u6cd5\u4fee\u6539\uff0c\u8bf7\u5220\u9664\u5f15\u7528\u5173\u7cfb\u540e\u518d\u6267\u884c\u4fee\u6539\u64cd\u4f5c\uff01 +sceneModel.delete.fail.device.variable.has.quote.scene.variable.please.delete=\u5f53\u524d\u8bbe\u5907\u4e0b\u5b58\u5728\u53d8\u91cf\u88ab\u5f15\u7528\u5230\u8fd0\u7b97\u578b\u53d8\u91cf\u8ba1\u7b97\u516c\u5f0f\u4e2d\uff0c\u65e0\u6cd5\u5220\u9664\uff0c\u8bf7\u5220\u9664\u5f15\u7528\u5173\u7cfb\u540e\u518d\u6267\u884c\u5220\u9664\u64cd\u4f5c\uff01 +sceneModel.formula.cannot.empty=\u8ba1\u7b97\u516c\u5f0f\u4e0d\u80fd\u4e3a\u7a7a\uff01 +sceneModel.variable.cannot.empty=\u53d8\u91cf\u4e0d\u80fd\u4e3a\u7a7a\uff01 +sceneModel.formula.and.variable.number.inconsistent=\u8ba1\u7b97\u516c\u5f0f\u548c\u53d8\u91cf\u4e2a\u6570\u4e0d\u4e00\u81f4\uff0c\u8bf7\u68c0\u67e5\u540e\u91cd\u8bd5 +sceneModel.update.fail.variable.name.exist=\u53d8\u91cf\u540d\u79f0\u5df2\u5b58\u5728\uff0c\u8bf7\u4fee\u6539\u540e\u91cd\u8bd5\uff01 +sceneModel.device.not.belong.current.tenant=\u8bf7\u5148\u628a\u8bbe\u5907\u914d\u7f6e\u7684\u6240\u6709\u8bbe\u5907\u5206\u914d\u7ed9\u5f53\u524d\u573a\u666f\u914d\u7f6e\u7684\u6240\u5c5e\u673a\u6784\uff0c\u624d\u53ef\u8fdb\u884c\u64cd\u4f5c\uff01 +##oauthClientDetail +add.fail.same.client.can.config.one=\u540c\u4e00\u4e2a\u6388\u6743\u5e73\u53f0\u53ea\u80fd\u914d\u7f6e\u4e00\u6761\u4fe1\u606f\uff0c\u8bf7\u52ff\u91cd\u590d\u914d\u7f6e +client.id.is.exist=\u5ba2\u6237\u7aefid\uff1a[{}]\u5df2\u5b58\u5728\u6216\u5df2\u88ab\u5176\u4ed6\u79df\u6237\u4f7f\u7528 +oauthClientDetail.client.not.exist=oauth2 \u5ba2\u6237\u7aef\u4e0d\u5b58\u5728 +oauthClientDetail.client.disabled=oauth2 \u5ba2\u6237\u7aef\u5df2\u7981\u7528 +oauthClientDetail.invalid.client.set=\u65e0\u6548 client_secret +oauthClientDetail.invalid.redirects=\u65e0\u6548 redirect_uri\uff1a[{}] +##category +delete.fail.please.delete.category.product=\u5220\u9664\u5931\u8d25\uff0c\u8bf7\u5148\u5220\u9664\u5bf9\u5e94\u5206\u7c7b\u4e0b\u7684\u4ea7\u54c1 +##goviewProjectData +only.allow.select.operate=\u53ea\u5141\u8bb8select\u64cd\u4f5c\uff0c\u7981\u6b62update\u3001delete\u3001insert\u64cd\u4f5c +##newsCategory +newsCategory.delete.fail.please.delete.category.info=\u5220\u9664\u5931\u8d25\uff0c\u8bf7\u5148\u5220\u9664\u5bf9\u5e94\u5206\u7c7b\u4e0b\u7684\u65b0\u95fb\u8d44\u8baf +##product +delete.fail.please.delete.firmware=\u5220\u9664\u5931\u8d25\uff0c\u8bf7\u5148\u5220\u9664\u5bf9\u5e94\u4ea7\u54c1\u4e0b\u7684\u56fa\u4ef6 +delete.fail.please.delete.product.device=\u5220\u9664\u5931\u8d25\uff0c\u8bf7\u5148\u5220\u9664\u5bf9\u5e94\u4ea7\u54c1\u4e0b\u7684\u8bbe\u5907 +delete.fail.please.delete.product.scene=\u5220\u9664\u5931\u8d25\uff0c\u8bf7\u5148\u4fee\u6539\u6216\u5220\u9664\u5bf9\u5e94\u4ea7\u54c1\u4e0b\u7684\u573a\u666f\u8054\u52a8\uff1a[{}] +product.status.update.fail.value.fail=\u72b6\u6001\u66f4\u65b0\u5931\u8d25,\u72b6\u6001\u503c\u6709\u8bef +product.status.update.fail=\u72b6\u6001\u66f4\u65b0\u5931\u8d25 +restore.product.fail=\u5f53\u524d\u4ea7\u54c1\u672a\u67e5\u8be2\u5230 +product.name.is.not.empty=\u8bf7\u8f93\u5165\u4ea7\u54c1\u540d\u79f0 +product.import.categoryId.is.fail=\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u4ea7\u54c1\u5206\u7c7b\u7f16\u53f7categoryid +##socialLogin +bind.account.not.exist=\u7ed1\u5b9a\u8d26\u6237\u4e0d\u5b58\u5728 +socialLogin.verify.has.expired=\u9a8c\u8bc1\u7801\u5df2\u5931\u6548\uff0c\u8bf7\u91cd\u65b0\u83b7\u53d6 +socialLogin.platform.type.fail=\u9519\u8bef\u5e73\u53f0\u7c7b\u578b +user.account.and.bind.account.not.match=\u7528\u6237\u8d26\u6237\u548c\u7ed1\u5b9a\u8d26\u6237\u4e0d\u5339\u914d +socialLogin.user.not.exist=\u7528\u6237\u4e0d\u5b58\u5728 +socialLogin.bind.end.user.cannot.login.web=\u8bf7\u52ff\u7ed1\u5b9a\u7ec8\u7aef\u7528\u6237\uff0c\u7ed1\u5b9a\u7ec8\u7aef\u7528\u6237\u540e\u4e0d\u53ef\u767b\u5f55web\u7aef +socialLogin.account.already.bind.other.wechat.please.unbind=\u8be5\u8d26\u53f7\u5df2\u7ecf\u7ed1\u5b9a\u5176\u4ed6\u5fae\u4fe1\uff0c\u8bf7\u5148\u89e3\u7ed1\u540e\u91cd\u8bd5\uff01 +socialLogin.register.fail.please.check.role.exist=\u6ce8\u518c\u5931\u8d25,\u8bf7\u8054\u7cfb\u7ba1\u7406\u4eba\u5458\u68c0\u67e5\u673a\u6784\u89d2\u8272\u662f\u5426\u5b58\u5728 +socialLogin.web.not.allow.end.user.login=web\u7aef\u4e0d\u5141\u8bb8\u7ec8\u7aef\u7528\u6237\u767b\u5f55 +socialLogin.register.fail.please.check.invitationCode.exist=\u9080\u8bf7\u7801\u9519\u8bef\uff0c\u8bf7\u8054\u7cfb\u673a\u6784\u7ba1\u7406\u5458\u6838\u5bf9 +The.organization.to.which.your.account.belongs.has.been.suspended.Please.contact.the.administrator=\u4f60\u7684\u8d26\u53f7\u6240\u5c5e\u673a\u6784\u5df2\u88ab\u505c\u7528\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\uff01 +default.institution.has.been.deactivated.contact.administrator=\u9ed8\u8ba4\u673a\u6784\u5df2\u88ab\u505c\u7528\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\uff01 +##alert +alert.push.fail.device.not.exist=\u544a\u8b66\u63a8\u9001\uff0c\u8bbe\u5907\u4e0d\u5b58\u5728\uff1a[{}] +##modbus +not.modbus.protocol.please.config.collect.protocol=\u975emodbus\u534f\u8bae\u8bf7\u5148\u914d\u7f6e\u4e3b\u52a8\u91c7\u96c6\u534f\u8bae +modbus.point.not.config=\u672a\u914d\u7f6emodbus\u70b9\u4f4d +##ota +firmwareTask.add.fail.FirmwareTask.exist=\u4efb\u52a1\uff1a[{}]\u5df2\u5b58\u5728 +firmware.version.not.exist=\u56fa\u4ef6\u7248\u672c\u4e0d\u5b58\u5728%21 +##mqttMessage +mqtt.service.send.device.not.exist=\u670d\u52a1\u4e0b\u53d1\u7684\u8bbe\u5907\uff1a[{}]\u4e0d\u5b58\u5728 +mqtt.disconnect.occur.fail=\u65ad\u5f00mqtt\u8fde\u63a5\u53d1\u751f\u9519\u8bef\uff1a[{}] + +##genTable +genTable.template.rendering.fail=\u5bfc\u5165\u5931\u8d25\uff1a[{}] +genTable.data.sync.fail.original.table.not.exist=\u540c\u6b65\u6570\u636e\u5931\u8d25\uff0c\u539f\u8868\u7ed3\u6784\u4e0d\u5b58\u5728 +genTable.tree.code.field.cannot.empty=\u6811\u7f16\u7801\u5b57\u6bb5\u4e0d\u80fd\u4e3a\u7a7a +genTable.tree.parent.code.field.cannot.empty=\u6811\u7236\u7f16\u7801\u5b57\u6bb5\u4e0d\u80fd\u4e3a\u7a7a +genTable.tree.name.field.cannot.empty=\u6811\u540d\u79f0\u5b57\u6bb5\u4e0d\u80fd\u4e3a\u7a7a +genTable.relate.child.table.name.cannot.empty=\u5173\u8054\u5b50\u8868\u7684\u8868\u540d\u4e0d\u80fd\u4e3a\u7a7a +genTable.child.table.relate.foreign.key.name.cannot.empty=\u5b50\u8868\u5173\u8054\u7684\u5916\u952e\u540d\u4e0d\u80fd\u4e3a\u7a7a + +##oauthCode +oauthCode.code.not.exist=code \u4e0d\u5b58\u5728 + +##protocol +protocol.input.content.is.empty=\u8f93\u5165\u5185\u5bb9\u4e3a\u7a7a +protocol.data.parse.error=\u6570\u636e\u89e3\u6790\u51fa\u9519[{}] +protocol.data.parse.exception=\u6570\u636e\u89e3\u6790\u5f02\u5e38[{}] +protocol.instruction.number.exception=\u6307\u4ee4\u7f16\u53f7\u5f02\u5e38\uff1a[{}] + +##modbusJob +modbusJob.add.fail.please.bind.gateway=\u8bf7\u5148\u7ed1\u5b9a\u7f51\u5173 + +thingsModel.array.or.object.no.need.update=\u6682\u65e0\u9700\u8981\u66f4\u65b0\u7684\u6570\u7ec4\u3001\u5bf9\u8c61\u7c7b\u7269\u6a21\u578b + +sync.fail.please.try.again=\u540c\u6b65\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5\uff01 +sync.success=\u540c\u6b65\u6210\u529f + +## scada +scada.product.id.is.null=\u4ea7\u54c1id\u4e3a\u7a7a +scada.scene.id.is.null=\u573a\u666fid\u4e3a\u7a7a +scada.guid.cannot.empty=guid\u4e0d\u80fd\u4e3a\u7a7a +scada.base64.change.image.exception=\u7ec4\u6001base64\u8f6c\u56fe\u7247\u5f02\u5e38:[{}] +scada.please.select.device=\u8bf7\u9009\u62e9\u8bbe\u5907 +scada.please.enter.password=\u8bf7\u8f93\u5165\u5bc6\u7801\uff01 +scada.please.login=\u672a\u767b\u5f55\uff0c\u8bf7\u767b\u5f55\u540e\u91cd\u8bd5 +scada.password.fail.please.reload.enter=\u5bc6\u7801\u9519\u8bef\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\uff01 +scada.product.has.relate.please.select.again=\u8be5\u4ea7\u54c1\u5df2\u7ecf\u5173\u8054\u7ec4\u6001\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01 +scada.scene.has.relate.please.select.again=\u8be5\u573a\u666f\u5df2\u7ecf\u5173\u8054\u7ec4\u6001\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01 +scada.not.allow.view.other.tenant.config=\u4e0d\u5141\u8bb8\u67e5\u770b\u5176\u4ed6\u79df\u6237\u7684\u7ec4\u6001\uff01 +scada.upload.gallery.file.fail=\u4e0a\u4f20\u56fe\u5e93\u6587\u4ef6\u5f02\u5e38\uff0c[{}] +scada.upload.fail=\u4e0a\u4f20\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5\uff01 +scada.invalid.profile=\u65e0\u6548\u7684\u914d\u7f6e\u6587\u4ef6 +scada.import.success.need.replace.variable=\u5bfc\u5165\u6210\u529f\uff0c\u5f53\u524d\u9875\u9762\u9700\u8981\u91cd\u65b0\u66ff\u6362\u7ed1\u5b9a\u7ec4\u4ef6\u7684\u53d8\u91cf\uff01 + +## speaker +speaker.product.has.relate=\u8be5\u4ea7\u54c1\u5df2\u5173\u8054\uff0c\u8bf7\u52ff\u91cd\u590d\u5173\u8054 +speaker.product.relate.add.fail=\u65b0\u589e\u5931\u8d25 +speaker.not.found.product.relate=\u672a\u67e5\u8be2\u5230\u4ea7\u54c1\u5173\u8054\u4fe1\u606f + +##file +file.content.is.empty=\u6587\u4ef6\u5185\u5bb9\u4e3a\u7a7a +file.is.invalid=\u65e0\u6548\u7684\u6587\u4ef6 + +## workOrder +workOrder.please.select.user=\u8bf7\u6307\u5b9a\u8054\u7cfb\u4eba +workOrder.please.fill.result.info=\u8bf7\u586b\u5199\u7ed3\u5355\u4fe1\u606f + +## subGateway +subGateway.subDeviceAddress.is.repeat=\u5b58\u5728\u76f8\u540c\u7684\u5b50\u8bbe\u5907\u5730\u5740\uff0c\u8bf7\u4fee\u6539\u540e\u91cd\u8bd5\uff01 diff --git a/springboot/fastbee-admin/src/main/resources/i18n/messages_en_US.properties b/springboot/fastbee-admin/src/main/resources/i18n/messages_en_US.properties new file mode 100644 index 00000000..dc461837 --- /dev/null +++ b/springboot/fastbee-admin/src/main/resources/i18n/messages_en_US.properties @@ -0,0 +1,429 @@ +#\u9519\u8BEF\u6D88\u606F +not.null=Required +user.jcaptcha.error=The verification code is incorrect +user.jcaptcha.expire=The verification code has expired +user.not.exists=User does not exist/password is incorrect +user.password.not.match=User does not exist/password is incorrect +user.password.retry.limit.count=The password was entered incorrectly {0} times +user.password.retry.limit.exceed=The password was entered incorrectly {0} times and the account was locked for {1} minutes +user.password.delete=Sorry, your account has been deleted +user.blocked=The user has been blocked, please contact the administrator +role.blocked=The role has been banned, contact the administrator +user.logout.success=The exit was successful + +length.not.valid=The length must be between {min} and {max} characters + +user.username.not.valid=Consists of 2 to 20 characters, letters, numbers, or underscores and must start with a non-number +user.password.not.valid=5-50 characters + +user.email.not.valid=The mailbox is malformed +user.mobile.phone.number.not.valid=The phone number is in the wrong format +user.login.success=Login successful +user.register.success=Registration is successful +user.notfound=Please log in again +user.forcelogout=The administrator forcibly logs out, please log back in +user.unknown.error=Unknown error, please log back in + +##\u6743\u9650 +no.permission=You don't have permissions for data, contact your administrator to add permissions [{0}] +no.create.permission=You do not have permission to create data, please contact your administrator to add permission [{0}] +no.update.permission=You do not have permission to modify the data, please contact the administrator to add permission [{0}] +no.delete.permission=You do not have permission to delete data, please contact your administrator to add permission [{0}] +no.export.permission=You do not have permission to export data, please contact your administrator to add permission [{0}] +no.view.permission=You do not have permission to view the data, please contact your administrator to add permission [{0}] +no.operate.permission=You do not have the permission to perform this operation! + +##\u6587\u4EF6\u4E0A\u4F20\u6D88\u606F +upload.exceed.maxSize=The uploaded file size exceeds the limit file size!
The maximum file size allowed is: {0}MB! +upload.filename.exceed.length=The uploaded file name can be up to {0} characters +upload.success=The upload is successful + +##\u6587\u4EF6\u4E0B\u8F7D\u6D88\u606F +download.filename.not.valid=The file name [{}] is illegal and is not allowed to be downloaded +download.file.failed=Failed to download the file +download.resource.not.valid=The resource file [{}] is illegal and is not allowed to be downloaded + +##Dept +dept.add.failed.name.exists=Failed to add organization [{}], and the organization name already exists +dept.update.failed.name.exists=Failed to modify organization [{}], and the organization name already exists +dept.update.failed.parent.not.valid=If the modification of the organization [{}] fails, the parent organization cannot be itself +dept.update.failed.child.not.valid=The agency contains sub-institutions that are not deactivated! +dept.delete.failed.child.exists=There are subordinate organizations and deletion is not allowed +dept.delete.failed.user.exists=If there are users in the organization, you cannot delete them +dept.invitationCode.is.exists=The invitation code already exists, please re-enter it + +##Dict +dict.add.failed.type.exists=Failed to add dictionary [{}], the dictionary type already exists +dict.update.failed.type.exists=Failed to modify dictionary [{}], the dictionary type already exists + +##Index +index.welcome.message=Welcome to the {} backend management framework, the current version: v{}, please access it through the front-end address. + +##Menu +menu.add.failed.name.exists=Failed to add a new menu [{}], the menu name already exists +menu.add.failed.path.not.valid=Failed to add a new menu [{}] with an address starting with http(s):// +menu.update.failed.name.exists=Failed to modify menu [{}], menu name already exists +menu.update.failed.path.not.valid=Failed to modify menu [{}] with address starting with http(s):// +menu.update.failed.parent.not.valid=Failed to modify the menu [{}], the parent menu cannot select itself +menu.delete.failed.child.exists=A submenu exists and cannot be deleted +menu.delete.failed.role.exists=Menu is assigned and is not allowed to be deleted + +##Post +post.add.failed.name.exists=Failed to add a new post [{}], and the job name already exists +post.add.failed.code.exists=Failed to add a new post [{}], and the post code already exists +post.update.failed.name.exists=Failed to modify the post [{}], the post name already exists +post.update.failed.code.exists=Failed to modify post [{}], the post code already exists + +##User +user.username.exists=The system account name already exists, please modify it and try again +user.password.differ=The password is inconsistent twice, please re-enter it +user.add.failed.name.exists=The new user [{}] failed, and the login account already exists +user.add.failed.phone.exists=Failed to add user [{}], and the mobile phone number already exists +user.add.failed.email.exists=Failed to add user [{}], the email account already exists +user.update.failed.password.wrong=Failed to change the password, the old password is incorrect +user.update.failed.password.repeat=The new password cannot be the same as the old password +user.update.password.failed=If the password is abnormal, contact the administrator +user.update.failed.name.exists=The new user [{}] failed, and the login account already exists +user.update.failed.phone.exists=Failed to modify user [{}], mobile phone number already exists +user.update.failed.email.exists=Failed to modify user [{}], and the email account already exists +user.update.failed=If the personal information is abnormal, contact the administrator +user.delete.failed=The current user cannot be deleted +user.upload.avatar.failed=If the uploaded image is abnormal, contact the administrator +user.not.login=Please log in and try again +user.access.denied=Access denied by the user + +##Role +role.add.manager.failed=Administrator role identity is not allowed +role.add.failed.name.exists=Failed to add a role [{}], the name of the role already exists +role.add.failed.key.exists=Failed to add a role [{}], and the role permissions already exist +role.update.failed.name.exists=Failed to modify the role [{}], the role name already exists +role.update.failed.key.exists=Failed to modify the role [{}], and the role permissions already exist +role.update.failed=Failed to modify the role [{}], contact the administrator + +##Import +import.failed.file.null=Failed to import, please upload the file first! +import.failed.data.null=Failed to import, imported data is empty! +import.failed.device.name.null=Failed to import, the device name in the template cannot be empty! +import.success=The import is successful +import.fail=The import failed + +##General +success=success +fail=failed +query.success=The query succeeds +operate.success=The operation succeeded +operate.fail=The operation failed +create.success=The creation is successful +create.failed=Failed to create +save.success=Save successfully +save.failed=Failed to save +authorization.success=Authorization succeeded +delete.success=Delete successfully +delete.fail=Delete failed +bind.success=Binding successful +bind.fail=Binding failed +unbind.success=Unbind successfully +unbind.fail=Unbinding failed +captcha.fail=Verification code error +import.fail.[{}]=Import failed: [{}] +only.allow.tenant.config=Only allow tenant configuration +password.fail=Password error +login.success=Login succeeded + +##Email +email.format.error=The email address is malformed +email.verification.code.send=Email verification code sent + +##Firmware +firmware.task.upgrade.failed.time.not.valid=The scheduled upgrade time should be greater than the current time +##Media +media.record.query.failed=The connection timed out or an error occurred and no data was obtained +##Modbus +modbus.type.null=type is empty +modbus.crc.check.abnormal=CRC check abnormal +##Netty +netty.client.not.exists=The client does not exist +##Runtime +runtime.message.id.null=The message id is empty +##Wechat +wechat.verify.type.null=Please specify the verification method +wechat.bind.message.id.null=Please pass in the binding information ID +wechat.please.config.open.platform=Please configure WeChat Open Platform mobile application information first +wechat.user.certificate.gain.fail=Failed to obtain user credentials, please log in again! +wechat.please.config.open.platform.mini=Please configure WeChat public platform mini program information first! +wechat.user.phone.certificate.gain.fail=Failed to obtain user's mobile phone number credentials, please log in again! +wechat.gain.user.call.certificate.fail=Failed to obtain user call credentials, please log in again! +wechat.gain.user.phone.fail=Failed to obtain user phone number, please log in again! +wechat.please.login=Please log in first and try again +wechat.please.enter.user.password=Please enter the user password +wechat.cancelBind.password.fail=Password error, please re-enter +wechat.please.enter.wechat.user.info=Please provide WeChat user information +wechat.please.enter.user.certificate=Please provide user credentials +wechat.gain.wechat.info.fail=Failed to obtain WeChat information, please try again! +wechat.your.wechat.already.bind.other.account=Your WeChat account has already been linked to another account. Please log in and unbind it using WeChat first, and then try again +wechat.this.wechat.already.bind.other.account=This WeChat account has already been linked to another account. Please log in and unbind it using WeChat first, and then try again! +wechat.please.config.open.platform.web.application.personal.bind.info=Please first configure the WeChat Open Platform website application personal center binding information +wechat.you.cancel.or.not.gain.authorization.info=You have cancelled authorization or have not obtained authorization information +wechat.the.qr.code.has.expired=The QR code has expired, please click bind again +wechat.your.account.already.bind.wechat=Your account has been linked to WeChat, please unbind it first +##AuthResource +auth.resource.product.query.success=The product list was queried +##Device +device.user.id.null=User ID cannot be empty +device.product.id.null=Device number and product ID cannot be empty +device.dept.id.null=Select Allocation Authority +device.id.null=Select a device +device.not.select=Please select a device +device.serialNumber.not.empty=The device number cannot be empty +device.delete.fail.please.delete.device.scene=If the device ID [{}] fails, delete the scene linkage under the corresponding device +delete.fail.please.delete.scene.model=If the device ID [{}] fails, delete the sceneModel linkage under the corresponding device +device.tenant.can.not.bind.exist.device=Tenants are not allowed to bind existing devices, device number: [{}] +now.user.belong.device.can.not.repeat.share=The current user already owns the device and cannot be reassigned. Device ID: [{}] +device.share.other.user.can.not.share=This device has already been assigned to another user and cannot be duplicated. Device ID: [{}] +device.not.exist.add.fail.please.check.product.id.is.correct=The device does not exist, automatic device addition failed, please check if the product number is correct +device.add.success=Device added successfully +device.assignment.fail.dept.not.exist=The institution does not exist or is not bound to an administrator. Please adjust and try again! +device.assignment.fail.dept.admin.not.exist=Institution administrator does not exist +device.assignment.success=Equipment allocation successful +device.assignment.fail=Equipment allocation failed +device.recovery.fail.dept.not.exist=The institution does not exist or is not bound to an administrator. Please adjust and try again! +device.recovery.fail.dept.admin.not.exist=Institution administrator does not exist +device.recovery.success=Successful recycling of equipment +device.recovery.fail=Recycling device failed +device.not.exist=The device does not exist +device.serialNumber.allow.generate.max.number=Only up to 200 can be generated! +device.insert.fail.device.number.already.exist=Device number: [{}] already exists, adding failed +device.insert.fail.device.ip.already.exist=The host IP and port already exist, and the device number is: [{}] +device.get.mqtt.connection.param.fail=Failed to retrieve device MQTT connection parameters +device.get.authorization.fail.please.config=The product has enabled authorization, but obtaining the device authorization code has failed. Please configure the authorization code first +device.unsupported.authentication.method=Device authentication method not supported +device.not.found.by.serial.number=Device not found +device.duplicate.by.serial.number=Device already exists +device.restore.success=Device restored successfully +device.restore.fail=Device restoration failed +product.not.found.by.product.id=Product not found +device.import.assignment.fail.product.information.is.empty=Import failed, product information is empty +device.import.assignment.fail.serialNumber.already.exists=The following device number [{}] already exists. Please modify it and try again +device.import.assignment.fail.dept.not.exists=The institution does not exist. Please select another institution! +device.import.assignment.fail.dept.admin.not.exists=The institution administrator information does not exist. Please select an institution again! +device.import.serialNumber.not.comply.national.standard.protocol=The device number [{}] does not comply with the format requirements of the national standard protocol +##DeviceJob +job.add.failed.cron.not.valid=Failed to add task [{}] with incorrect Cron expression +job.add.failed.rmi.not.valid=The new task [{}] failed, and 'rmi' is not allowed to be called on the target string +job.add.failed.ldap.not.valid=The new task [{}] failed, and 'ldap(s)' cannot be called as the target string +job.add.failed.http.not.valid=The new task [{}] failed, and the target string does not allow 'http(s)' to be called +job.add.failed.string.error=The new task [{}] has failed, and the target string has been violated +job.add.failed.string.not.valid=The new task [{}] failed, and the destination string is not in the whitelist +job.add.failed.product.not.modbus.config=Failed to add task [{}], please go to the product to configure modbus first +job.update.failed.cron.not.valid=Task [{}] failed to be modified, and the Cron expression is incorrect +job.update.failed.rmi.not.valid=Task [{}] failed, and 'rmi' is not allowed to be called by the target string +job.update.failed.ldap.not.valid=Modify task [{}] failed, and 'ldap(s)' is not allowed to be called as the target string +job.update.failed.http.not.valid=Modify task [{}] failed, and 'http(s)' is not allowed to be called to the target string +job.update.failed.string.error=Task [{}] has failed to be modified, and the target string has been violated +job.update.failed.string.not.valid=Task [{}] has failed to be modified, and the destination string is not in the whitelist +job.update.failed.product.not.modbus.config=Update task [{}] failed, please go to the product to configure modbus +job.not.exists=The task does not exist or has expired +##DeviceUser +device.user.delete.failed.user.not.valid=Device owner cannot be deleted +##GoviewProject +goview.project.data.save.failed.id.null=There is no project ID +goview.project.data.execute.sql.failed=Write an SQL statement +##ThingsModel +things.model.identifier.repeat=The identifier under the product cannot be repeated +things.model.import.failed.identifier.repeat=[{}] data is not imported, and the identifier is duplicated +things.model.update.fail.quote.the.scene.variable.formula.please.delete=The current object model is referenced to the calculation formula of the scene operation variable and cannot be modified. Please delete the reference relationship before performing the modification operation! +things.model.delete.fail.quote.the.scene.variable.formula.please.delete=The current object model is referenced to the calculation formula of the scene operation variable and cannot be deleted. Please delete the reference relationship before performing the deletion operation! +things.model.import.data.exception=Import data exception +things.model.register.address.repeat=Under the same collection point template, there are duplicate register addresses. Please check the imported variable register addresses +##MQTT +mqtt.unauthorized=mqtt account and password do not match the configuration of the authentication server +##Oauth +oauth.response.type.not.valid=response_type parameter values allow only code and token +oauth.grant.type.null=Unknown grant type +The oauth.grant.type.implicit.not.support=Token operation does not support implicit authorization mode +oauth.access.token.null=Access token cannot be empty +obtain.basic.authorization.failed=client_id or client_secret is not delivered correctly +##Record +record.app.null=app cannot be empty +record.stream.null=stream cannot be empty +record.time.not.valid=Wrong start time or end time +record.file.null=No video file found + +##ErrorCodeConstants +app.not.found=App does not exist +app.is.disable=App has been disabled +app.exist.order.cant.delete=A payment order exists in the payment application and cannot be deleted +app.exist.refund.cant.delete=A refund order exists in the payment app and cannot be deleted +channel.not.found=The configuration of the payment channel does not exist +channel.is.disable=Payment channel is disabled +channel.exists.same.channel.error=The same channel already exists +order.not.found=The payment order does not exist +order.status.is.not.waiting=The paid order is not pending payment +order.status.is.success=Order has been paid, please refresh the page +order.is.expired=The payment order has expired +order.submit.channel.error=Error message is reported for initiating payment, error code: {}, error message: {} +order.refund.fail.status.error=Failed to refund the paid order due to the fact that the status is not Paid or Refunded +order.extension.not.found=The payment transaction extension does not exist +order.extension.status.is.not.waiting=The payment transaction extension order is not pending payment +order.extension.is.paid=The order has been paid, please wait for the payment result +refund.price.exceed=The amount refunded exceeds the amount of the order that can be refunded +refund.has.refunding=A refund is already being processed +refund.exists=A refund ticket already exists +refund.not.found=Payment Refund Form Does Not Exist +refund.statue.is.not.waiting=Payment of a refund receipt is not pending refund +demo.order.not.found=The sample order does not exist +demo.order.update.paid.status.not.unpaid=Example: Failed to update payment status of order, order is not in unpaid status +demo.order.update.paid.fail.pay.order.id.error=Failed to update the payment status of the sample order, and the payment slip number does not match +demo.order.update.paid.fail.pay.order.status.not.success=Example: Failed to update the payment status of the order, and the status of the payment slip is not [Payment Successful]. +demo.order.update.paid.fail.pay.price.not.match=Failed to update the payment status of the sample order, and the payment order amount does not match +demo.order.refund.fail.not.paid=Failed to initiate a refund, but the sample order has not been paid +demo.order.refund.fail.refunded=Failed to initiate a refund, the sample order has been refunded +demo.order.refund.fail.refund.not.found=Failed to initiate a refund, but the refund order does not exist +demo.order.refund.fail.refund.not.success=Failed to initiate a refund, but the order was not refunded +demo.order.refund.fail.refund.order.id.error=Failed to initiate a refund, and the refund order number does not match +demo.order.refund.fail.refund.price.not.match=Failed to initiate a refund, and the amount of the refund order does not match +device.order.control.no.permission=There is no permission to operate, please contact the administrator to assign command permissions! + +##sysConfig +sysConfig.add.param.fail.name.exist=Failed to add parameter [{}], the parameter key name already exists +sysConfig.update.param.fail.name.exist=Parameter [{}] failed, and the parameter key name already exists +##sysRegister +sysRegister.fail.not.enable.register=The current system does not have the registration function enabled! +##ossDetail +ossDetail.fail.file.not.empty=The uploaded file cannot be empty +##notify +sms.send.fail.contact.admin=SMS sending failed, please contact the administrator! +captcha.has.sent.please.try.again.later=The verification code has been sent, please try again later! +not.find.enable.notify.template=Unable to find enabled notification templates +not.find.notify.channel=Unable to find notification channel +only.can.config.alert.and.not.wechat.mini.notify=Non-administrators are only allowed to add device alarm services and templates that are not WeChat Mini Programs! +notify.can.not.not.alert.and.wechat.mini.status=Non-administrators can only change the template status of the device alarm service and non-WeChat Mini Program! + +##dataCenter +please.select.device=Please select a device +please.incoming.serialNumber=Please pass in the device number +##license +certificate.install.success=The certificate is successfully installed +certificate.install.fail=Certificate installation failed:[{}] +certificate.incoming.success=The certificate is successfully uploaded +certificate.incoming.fail=The certificate upload failed +certificate.upload.success=The certificate is successfully uploaded +certificate.upload.fail=Certificate upload failed:[{}] +##sceneModel +please.incoming.scene.id=Please pass in the scene ID +please.incoming.device.config.number=Enter the serial number of the associated device configuration +sceneModel.please.introduced.id=Please enter the scene management ID +sceneModel.current.variable.quote.operate.variable.formula.please.delete=The current variable is referenced to the calculation formula of the scene operation variable and cannot be deleted. Please delete the reference relationship before performing the deletion operation! +sceneModel.scene.already.bind.device=The scene has already been bound to this device, please select again! +sceneModel.update.fail.device.variable.has.quote.scene.variable.please.delete=There are variables in the current device that are referenced to the calculation formula of operational variables and cannot be modified. Please delete the reference relationship before performing the modification operation! +sceneModel.delete.fail.device.variable.has.quote.scene.variable.please.delete=There are variables under the current device that are referenced to the calculation formula of operational variables and cannot be deleted. Please delete the reference relationship before performing the deletion operation! +sceneModel.formula.cannot.empty=The calculation formula cannot be empty! +sceneModel.variable.cannot.empty=The variable cannot be empty! +sceneModel.formula.and.variable.number.inconsistent=The calculation formula and the number of variables are inconsistent. Please check and try again +sceneModel.update.fail.variable.name.exist=The variable name already exists, please modify it and try again! +sceneModel.device.not.belong.current.tenant=Please allocate all devices configured in the device configuration to the organization specified in the current scene configuration before proceeding with the operation! +##oauthClientDetail +add.fail.same.client.can.config.one=Only one piece of information can be configured on the same authorization platform, please do not configure it again +client.id.is.exist=Client ID: [{}] Already exists or is already in use by another tenant +oauthClientDetail.client.not.exist=OAuth2 client does not exist +oauthClientDetail.client.disabled=OAuth2 client disabled +oauthClientDetail.invalid.client.set=Invalid client set +oauthClientDetail.invalid.redirects=Invalid redirects: [{}] +##category +delete.fail.please.delete.category.product=Delete failed, please delete the products under the corresponding category first +##goviewProjectData +only.allow.select.operate=Only allow select operation, prohibit update, delete, insert operation +##newsCategory +newsCategory.delete.fail.please.delete.category.info=Delete failed, please delete the news information under the corresponding category first +##product +delete.fail.please.delete.firmware=Delete failed, please delete the firmware under the corresponding product first +delete.fail.please.delete.product.device=Delete failed, please delete the device under the corresponding product first +delete.fail.please.delete.product.scene=Delete failed, please modify or delete the scene linkage under the corresponding product first: [{}] +product.status.update.fail.value.fail=Status update failed, incorrect status value +product.status.update.fail=Status update failed +restore.product.fail=Product restore failed not exist +product.name.is.not.empty=Please enter a product name +product.import.categoryId.is.fail=Please enter the correct product classification number categoryId +##socialLogin +bind.account.not.exist=The bound account does not exist +socialLogin.verify.has.expired=The verification code has expired, please obtain it again +socialLogin.platform.type.fail=Wrong platform type +user.account.and.bind.account.not.match=User account and bound account do not match +socialLogin.user.not.exist=user does not exist +socialLogin.bind.end.user.cannot.login.web=Do not bind end users, after binding end users, you cannot log in to the web end +socialLogin.account.already.bind.other.wechat.please.unbind=This account has already been linked to another WeChat account. Please unbind it first and try again! +socialLogin.register.fail.please.check.role.exist=Registration failed, please contact the management personnel to check if the institutional role exists +socialLogin.web.not.allow.end.user.login=The web end does not allow end users to log in +socialLogin.register.fail.please.check.invitationCode.exist=If the invitation code is incorrect, contact your organization administrator to check it +The.organization.to.which.your.account.belongs.has.been.suspended.Please.contact.the.administrator=The organization to which your account belongs has been suspended. Please contact the administrator! +default.institution.has.been.deactivated.contact.administrator=The default institution has been deactivated. Please contact the administrator! +##alert +alert.push.fail.device.not.exist=Alarm push, device does not exist: [{}] +##modbus +not.modbus.protocol.please.config.collect.protocol=Please configure the active collection protocol first for non Modbus protocols +modbus.point.not.config=Modbus point not configured +##ota +firmwareTask.add.fail.FirmwareTask.exist=Task: [{}] already exists +firmware.version.not.exist=The firmware version does not exist! +##mqttMessage +mqtt.service.send.device.not.exist=The device issued by the service: [{}] does not exist +mqtt.disconnect.occur.fail=Error occurred while disconnecting MQTT connection: [{}] + +##genTable +genTable.template.rendering.fail=Template rendering failed, table name: [{}] +genTable.data.sync.fail.original.table.not.exist=Data synchronization failed, original table structure does not exist +genTable.tree.code.field.cannot.empty=The tree code field cannot be empty +genTable.tree.parent.code.field.cannot.empty=The tree parent code field cannot be empty +genTable.tree.name.field.cannot.empty=The tree name field cannot be empty +genTable.relate.child.table.name.cannot.empty=The table name of the associated sub table cannot be empty +genTable.child.table.relate.foreign.key.name.cannot.empty=The foreign key name associated with a sub table cannot be empty + +##oauthCode +oauthCode.code.not.exist=Code does not exist + +##protocol +protocol.input.content.is.empty=The input content is empty +protocol.data.parse.error=Data parsing error [{}] +protocol.data.parse.exception=Data parsing exception [{}] +protocol.instruction.number.exception=Instruction number exception: [{}] + +##modbusJob +modbusJob.add.fail.please.bind.gateway=Please bind the gateway first + +thingsModel.array.or.object.no.need.update=There are no arrays or objects that need to be updated + +sync.fail.please.try.again=Sync failed, please try again! +sync.success=Synchronization succeeded + +## scada +scada.product.id.is.null=The product ID is empty +scada.scene.id.is.null=The scene ID is empty +scada.guid.cannot.empty=The guid cannot be empty +scada.base64.change.image.exception=Configuration base64 to image abnormal:[{}] +scada.please.select.device=Please select a device +scada.please.enter.password=Please enter your password! +scada.please.login=If you are not logged in, please log in and try again +scada.password.fail.please.reload.enter=The password is incorrect, please re-enter it! +scada.product.has.relate.please.select.again=The product has been associated with the configuration, please select it again! +scada.scene.has.relate.please.select.again=This scene has been associated with the configuration, please select it again! +scada.not.allow.view.other.tenant.config=It is not allowed to view the configuration of other tenants! +scada.upload.gallery.file.fail=The upload of the gallery file is abnormal,[{}] +scada.upload.fail=Upload failed, please try again! +scada.invalid.profile=Invalid profile +scada.import.success.need.replace.variable=The import is successful, and the current page needs to replace the variables of the bound component again! + +## speaker +speaker.product.has.relate=The product is already linked, please do not associate it repeatedly +speaker.product.relate.add.fail=Failed to add a new feature +speaker.not.found.product.relate=No product related information was found + +##file +file.content.is.empty=The file content is empty +file.is.invalid=Invalid file + +## workOrder +workOrder.please.select.user=Please specify the contact person +workOrder.please.fill.result.info=Please fill in the statement information + +## subGateway +subGateway.subDeviceAddress.is.repeat=There is a duplicate sub-device address. Please modify it and try again! diff --git a/springboot/fastbee-admin/src/main/resources/i18n/messages_zh_CN.properties b/springboot/fastbee-admin/src/main/resources/i18n/messages_zh_CN.properties new file mode 100644 index 00000000..23218dae --- /dev/null +++ b/springboot/fastbee-admin/src/main/resources/i18n/messages_zh_CN.properties @@ -0,0 +1,429 @@ +#\u9519\u8BEF\u6D88\u606F +not.null=\u5FC5\u987B\u586B\u5199 +user.jcaptcha.error=\u9A8C\u8BC1\u7801\u9519\u8BEF +user.jcaptcha.expire=\u9A8C\u8BC1\u7801\u5DF2\u5931\u6548 +user.not.exists=\u7528\u6237\u4E0D\u5B58\u5728/\u5BC6\u7801\u9519\u8BEF +user.password.not.match=\u7528\u6237\u4E0D\u5B58\u5728/\u5BC6\u7801\u9519\u8BEF +user.password.retry.limit.count=\u5BC6\u7801\u8F93\u5165\u9519\u8BEF{0}\u6B21 +user.password.retry.limit.exceed=\u5BC6\u7801\u8F93\u5165\u9519\u8BEF{0}\u6B21\uFF0C\u5E10\u6237\u9501\u5B9A{1}\u5206\u949F +user.password.delete=\u5BF9\u4E0D\u8D77\uFF0C\u60A8\u7684\u8D26\u53F7\u5DF2\u88AB\u5220\u9664 +user.blocked=\u7528\u6237\u5DF2\u5C01\u7981\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458 +role.blocked=\u89D2\u8272\u5DF2\u5C01\u7981\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458 +user.logout.success=\u9000\u51FA\u6210\u529F + +length.not.valid=\u957F\u5EA6\u5FC5\u987B\u5728{min}\u5230{max}\u4E2A\u5B57\u7B26\u4E4B\u95F4 + +user.username.not.valid=2\u523020\u4E2A\u6C49\u5B57\u3001\u5B57\u6BCD\u3001\u6570\u5B57\u6216\u4E0B\u5212\u7EBF\u7EC4\u6210\uFF0C\u4E14\u5FC5\u987B\u4EE5\u975E\u6570\u5B57\u5F00\u5934 +user.password.not.valid=5-50\u4E2A\u5B57\u7B26 + +user.email.not.valid=\u90AE\u7BB1\u683C\u5F0F\u9519\u8BEF +user.mobile.phone.number.not.valid=\u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF +user.login.success=\u767B\u5F55\u6210\u529F +user.register.success=\u6CE8\u518C\u6210\u529F +user.notfound=\u8BF7\u91CD\u65B0\u767B\u5F55 +user.forcelogout=\u7BA1\u7406\u5458\u5F3A\u5236\u9000\u51FA\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55 +user.unknown.error=\u672A\u77E5\u9519\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55 + +##\u6743\u9650 +no.permission=\u60A8\u6CA1\u6709\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}] +no.create.permission=\u60A8\u6CA1\u6709\u521B\u5EFA\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}] +no.update.permission=\u60A8\u6CA1\u6709\u4FEE\u6539\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}] +no.delete.permission=\u60A8\u6CA1\u6709\u5220\u9664\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}] +no.export.permission=\u60A8\u6CA1\u6709\u5BFC\u51FA\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}] +no.view.permission=\u60A8\u6CA1\u6709\u67E5\u770B\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}] +no.operate.permission=\u6682\u65e0\u6743\u9650\u64cd\u4f5c\uff01 + +##\u6587\u4EF6\u4E0A\u4F20\u6D88\u606F +upload.exceed.maxSize=\u4E0A\u4F20\u7684\u6587\u4EF6\u5927\u5C0F\u8D85\u51FA\u9650\u5236\u7684\u6587\u4EF6\u5927\u5C0F\uFF01
\u5141\u8BB8\u7684\u6587\u4EF6\u6700\u5927\u5927\u5C0F\u662F\uFF1A{0}MB\uFF01 +upload.filename.exceed.length=\u4E0A\u4F20\u7684\u6587\u4EF6\u540D\u6700\u957F{0}\u4E2A\u5B57\u7B26 +upload.success=\u4E0A\u4F20\u6210\u529F + +##\u6587\u4EF6\u4E0B\u8F7D\u6D88\u606F +download.filename.not.valid=\u6587\u4EF6\u540D\u79F0[{}]\u975E\u6CD5\uFF0C\u4E0D\u5141\u8BB8\u4E0B\u8F7D +download.file.failed=\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25 +download.resource.not.valid=\u8D44\u6E90\u6587\u4EF6[{}]\u975E\u6CD5\uFF0C\u4E0D\u5141\u8BB8\u4E0B\u8F7D + +##Dept +dept.add.failed.name.exists=\u65B0\u589E\u673A\u6784[{}]\u5931\u8D25\uFF0C\u673A\u6784\u540D\u79F0\u5DF2\u5B58\u5728 +dept.update.failed.name.exists=\u4FEE\u6539\u673A\u6784[{}]\u5931\u8D25\uFF0C\u673A\u6784\u540D\u79F0\u5DF2\u5B58\u5728 +dept.update.failed.parent.not.valid=\u4FEE\u6539\u673A\u6784[{}]\u5931\u8D25\uFF0C\u4E0A\u7EA7\u673A\u6784\u4E0D\u80FD\u662F\u81EA\u5DF1 +dept.update.failed.child.not.valid=\u8BE5\u673A\u6784\u5305\u542B\u672A\u505C\u7528\u7684\u5B50\u673A\u6784\uFF01 +dept.delete.failed.child.exists=\u5B58\u5728\u4E0B\u7EA7\u673A\u6784\uFF0C\u4E0D\u5141\u8BB8\u5220\u9664 +dept.delete.failed.user.exists=\u673A\u6784\u5B58\u5728\u7528\u6237\uFF0C\u4E0D\u5141\u8BB8\u5220\u9664 +dept.invitationCode.is.exists=\u9080\u8bf7\u7801\u5df2\u7ecf\u5b58\u5728\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165 + +##Dict +dict.add.failed.type.exists=\u65B0\u589E\u5B57\u5178[{}]\u5931\u8D25\uFF0C\u5B57\u5178\u7C7B\u578B\u5DF2\u5B58\u5728 +dict.update.failed.type.exists=\u4fee\u6539\u5b57\u5178[{}]\u5931\u8d25\uff0c\u5b57\u5178\u7c7b\u578b\u5df2\u5b58\u5728 + +##Index +index.welcome.message=\u6B22\u8FCE\u4F7F\u7528{}\u540E\u53F0\u7BA1\u7406\u6846\u67B6\uFF0C\u5F53\u524D\u7248\u672C\uFF1Av{}\uFF0C\u8BF7\u901A\u8FC7\u524D\u7AEF\u5730\u5740\u8BBF\u95EE\u3002 + +##Menu +menu.add.failed.name.exists=\u65B0\u589E\u83DC\u5355[{}]\u5931\u8D25\uFF0C\u83DC\u5355\u540D\u79F0\u5DF2\u5B58\u5728 +menu.add.failed.path.not.valid=\u65B0\u589E\u83DC\u5355[{}]\u5931\u8D25\uFF0C\u5730\u5740\u5FC5\u987B\u4EE5http(s)://\u5F00\u5934 +menu.update.failed.name.exists=\u4FEE\u6539\u83DC\u5355[{}]\u5931\u8D25\uFF0C\u83DC\u5355\u540D\u79F0\u5DF2\u5B58\u5728 +menu.update.failed.path.not.valid=\u4FEE\u6539\u83DC\u5355[{}]\u5931\u8D25\uFF0C\u5730\u5740\u5FC5\u987B\u4EE5http(s)://\u5F00\u5934 +menu.update.failed.parent.not.valid=\u4FEE\u6539\u83DC\u5355[{}]\u5931\u8D25\uFF0C\u4E0A\u7EA7\u83DC\u5355\u4E0D\u80FD\u9009\u62E9\u81EA\u5DF1 +menu.delete.failed.child.exists=\u5B58\u5728\u5B50\u83DC\u5355,\u4E0D\u5141\u8BB8\u5220\u9664 +menu.delete.failed.role.exists=\u83DC\u5355\u5DF2\u5206\u914D,\u4E0D\u5141\u8BB8\u5220\u9664 + +##Post +post.add.failed.name.exists=\u65B0\u589E\u5C97\u4F4D[{}]\u5931\u8D25\uFF0C\u5C97\u4F4D\u540D\u79F0\u5DF2\u5B58\u5728 +post.add.failed.code.exists=\u65B0\u589E\u5C97\u4F4D[{}]\u5931\u8D25\uFF0C\u5C97\u4F4D\u7F16\u7801\u5DF2\u5B58\u5728 +post.update.failed.name.exists=\u4FEE\u6539\u5C97\u4F4D[{}]\u5931\u8D25\uFF0C\u5C97\u4F4D\u540D\u79F0\u5DF2\u5B58\u5728 +post.update.failed.code.exists=\u4FEE\u6539\u5C97\u4F4D[{}]\u5931\u8D25\uFF0C\u5C97\u4F4D\u7F16\u7801\u5DF2\u5B58\u5728 + +##User +user.username.exists=\u7CFB\u7EDF\u8D26\u53F7\u540D\u79F0\u5DF2\u5B58\u5728\uFF0C\u8BF7\u4FEE\u6539\u540E\u91CD\u8BD5 +user.password.differ=\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165 +user.add.failed.name.exists=\u65B0\u589E\u7528\u6237[{}]\u5931\u8D25\uFF0C\u767B\u5F55\u8D26\u53F7\u5DF2\u5B58\u5728 +user.add.failed.phone.exists=\u65B0\u589E\u7528\u6237[{}]\u5931\u8D25\uFF0C\u624B\u673A\u53F7\u7801\u5DF2\u5B58\u5728 +user.add.failed.email.exists=\u65B0\u589E\u7528\u6237[{}]\u5931\u8D25\uFF0C\u90AE\u7BB1\u8D26\u53F7\u5DF2\u5B58\u5728 +user.update.failed.password.wrong=\u4FEE\u6539\u5BC6\u7801\u5931\u8D25\uFF0C\u65E7\u5BC6\u7801\u9519\u8BEF +user.update.failed.password.repeat=\u65B0\u5BC6\u7801\u4E0D\u80FD\u4E0E\u65E7\u5BC6\u7801\u76F8\u540C +user.update.password.failed=\u4FEE\u6539\u5BC6\u7801\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458 +user.update.failed.name.exists=\u65B0\u589E\u7528\u6237[{}]\u5931\u8D25\uFF0C\u767B\u5F55\u8D26\u53F7\u5DF2\u5B58\u5728 +user.update.failed.phone.exists=\u4FEE\u6539\u7528\u6237[{}]\u5931\u8D25\uFF0C\u624B\u673A\u53F7\u7801\u5DF2\u5B58\u5728 +user.update.failed.email.exists=\u4FEE\u6539\u7528\u6237[{}]\u5931\u8D25\uFF0C\u90AE\u7BB1\u8D26\u53F7\u5DF2\u5B58\u5728 +user.update.failed=\u4FEE\u6539\u4E2A\u4EBA\u4FE1\u606F\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458 +user.delete.failed=\u5F53\u524D\u7528\u6237\u4E0D\u80FD\u5220\u9664 +user.upload.avatar.failed=\u4E0A\u4F20\u56FE\u7247\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458 +user.not.login=\u8BF7\u767B\u5F55\u540E\u91CD\u8BD5 +user.access.denied=\u7528\u6237\u62D2\u7EDD\u8BBF\u95EE + +##Role +role.add.manager.failed=\u4E0D\u5141\u8BB8\u8BBE\u7F6E\u7BA1\u7406\u5458\u89D2\u8272\u6807\u8BC6 +role.add.failed.name.exists=\u65B0\u589E\u89D2\u8272[{}]\u5931\u8D25\uFF0C\u89D2\u8272\u540D\u79F0\u5DF2\u5B58\u5728 +role.add.failed.key.exists=\u65B0\u589E\u89D2\u8272[{}]\u5931\u8D25\uFF0C\u89D2\u8272\u6743\u9650\u5DF2\u5B58\u5728 +role.update.failed.name.exists=\u4FEE\u6539\u89D2\u8272[{}]\u5931\u8D25\uFF0C\u89D2\u8272\u540D\u79F0\u5DF2\u5B58\u5728 +role.update.failed.key.exists=\u4FEE\u6539\u89D2\u8272[{}]\u5931\u8D25\uFF0C\u89D2\u8272\u6743\u9650\u5DF2\u5B58\u5728 +role.update.failed=\u4FEE\u6539\u89D2\u8272[{}]\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458 + +##Import +import.failed.file.null=\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u5148\u4E0A\u4F20\u6587\u4EF6\uFF01 +import.failed.data.null=\u5BFC\u5165\u5931\u8D25\uFF0C\u5BFC\u5165\u6570\u636E\u4E3A\u7A7A\uFF01 +import.failed.device.name.null=\u5BFC\u5165\u5931\u8D25\uFF0C\u6A21\u677F\u91CC\u8BBE\u5907\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A\uFF01 +import.success=\u5BFC\u5165\u6210\u529F +import.fail=\u5bfc\u5165\u5931\u8d25 + +##General +success=\u6210\u529F +fail=\u5931\u8D25 +query.success=\u67E5\u8BE2\u6210\u529F +operate.success=\u64CD\u4F5C\u6210\u529F +operate.fail=\u64cd\u4f5c\u5931\u8d25 +create.success=\u521B\u5EFA\u6210\u529F +create.failed=\u521B\u5EFA\u5931\u8D25 +save.success=\u4FDD\u5B58\u6210\u529F +save.failed=\u4FDD\u5B58\u5931\u8D25 +authorization.success=\u6388\u6743\u6210\u529F +delete.success=\u5220\u9664\u6210\u529f +delete.fail=\u5220\u9664\u5931\u8d25 +bind.success=\u7ed1\u5b9a\u6210\u529f +bind.fail=\u7ed1\u5b9a\u5931\u8d25 +unbind.success=\u89e3\u7ed1\u6210\u529f +unbind.fail=\u89e3\u7ed1\u5931\u8d25 +captcha.fail=\u9a8c\u8bc1\u7801\u9519\u8bef +import.fail.[{}]=\u5bfc\u5165\u5931\u8d25\uff1a[{}] +only.allow.tenant.config=\u53ea\u5141\u8bb8\u79df\u6237\u914d\u7f6e +password.fail=\u5bc6\u7801\u9519\u8bef +login.success=\u767b\u5f55\u6210\u529f + +##Email +email.format.error=\u90AE\u7BB1\u683C\u5F0F\u9519\u8BEF +email.verification.code.send=\u90AE\u7BB1\u9A8C\u8BC1\u7801\u5DF2\u53D1\u9001 + +##Firmware +firmware.task.upgrade.failed.time.not.valid=\u9884\u5B9A\u5347\u7EA7\u65F6\u95F4\u5E94\u5927\u4E8E\u5F53\u524D\u65F6\u95F4 +##Media +media.record.query.failed=\u8FDE\u63A5\u8D85\u65F6\u6216\u53D1\u751F\u9519\u8BEF\uFF0C\u672A\u83B7\u53D6\u5230\u6570\u636E +##Modbus +modbus.type.null=\u7C7B\u578B\u4E3A\u7A7A +modbus.crc.check.abnormal=crc\u6821\u9a8c\u5f02\u5e38 +##Netty +netty.client.not.exists=\u5BA2\u6237\u7AEF\u4E0D\u5B58\u5728 +##Runtime +runtime.message.id.null=\u6D88\u606Fid\u4E3A\u7A7A +##Wechat +wechat.verify.type.null=\u8BF7\u4F20\u5165\u9A8C\u8BC1\u65B9\u5F0F +wechat.bind.message.id.null=\u8BF7\u4F20\u5165\u7ED1\u5B9A\u4FE1\u606FID +wechat.please.config.open.platform=\u8bf7\u5148\u914d\u7f6e\u5fae\u4fe1\u5f00\u653e\u5e73\u53f0\u79fb\u52a8\u5e94\u7528\u4fe1\u606f +wechat.user.certificate.gain.fail=\u7528\u6237\u51ed\u8bc1\u83b7\u53d6\u5931\u8d25\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55\uff01 +wechat.please.config.open.platform.mini=\u8bf7\u5148\u914d\u7f6e\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u5c0f\u7a0b\u5e8f\u4fe1\u606f\uff01 +wechat.user.phone.certificate.gain.fail=\u7528\u6237\u624b\u673a\u53f7\u51ed\u8bc1\u83b7\u53d6\u5931\u8d25\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55\uff01 +wechat.gain.user.call.certificate.fail=\u83b7\u53d6\u7528\u6237\u8c03\u7528\u51ed\u636e\u5931\u8d25\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55\uff01 +wechat.gain.user.phone.fail=\u83b7\u53d6\u7528\u6237\u624b\u673a\u53f7\u5931\u8d25\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55\uff01 +wechat.please.login=\u8bf7\u5148\u767b\u5f55\u540e\u91cd\u8bd5 +wechat.please.enter.user.password=\u8bf7\u4f20\u5165\u7528\u6237\u5bc6\u7801 +wechat.cancelBind.password.fail=\u5bc6\u7801\u9519\u8bef\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165 +wechat.please.enter.wechat.user.info=\u8bf7\u4f20\u5165\u5fae\u4fe1\u7528\u6237\u4fe1\u606f +wechat.please.enter.user.certificate=\u8bf7\u4f20\u5165\u7528\u6237\u51ed\u8bc1 +wechat.gain.wechat.info.fail=\u83b7\u53d6\u5fae\u4fe1\u4fe1\u606f\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5\uff01 +wechat.your.wechat.already.bind.other.account=\u60a8\u7684\u5fae\u4fe1\u5df2\u7ed1\u5b9a\u5176\u4ed6\u8d26\u53f7\uff0c\u8bf7\u5148\u4f7f\u7528\u5fae\u4fe1\u767b\u5f55\u89e3\u7ed1\u540e\u91cd\u8bd5 +wechat.this.wechat.already.bind.other.account=\u8be5\u5fae\u4fe1\u5df2\u7ed1\u5b9a\u5176\u4ed6\u8d26\u53f7\uff0c\u8bf7\u5148\u4f7f\u7528\u5fae\u4fe1\u767b\u5f55\u89e3\u7ed1\u540e\u91cd\u8bd5\uff01 +wechat.please.config.open.platform.web.application.personal.bind.info=\u8bf7\u5148\u914d\u7f6e\u5fae\u4fe1\u5f00\u653e\u5e73\u53f0\u7f51\u7ad9\u5e94\u7528\u4e2a\u4eba\u4e2d\u5fc3\u7ed1\u5b9a\u4fe1\u606f +wechat.you.cancel.or.not.gain.authorization.info=\u60a8\u5df2\u53d6\u6d88\u6388\u6743\u6216\u672a\u83b7\u53d6\u5230\u6388\u6743\u4fe1\u606f +wechat.the.qr.code.has.expired=\u4e8c\u7ef4\u7801\u5df2\u5931\u6548\uff0c\u8bf7\u91cd\u65b0\u70b9\u51fb\u7ed1\u5b9a +wechat.your.account.already.bind.wechat=\u60a8\u7684\u8d26\u53f7\u5df2\u7ed1\u5b9a\u5fae\u4fe1\uff0c\u8bf7\u5148\u89e3\u7ed1 +##AuthResource +auth.resource.product.query.success=\u67E5\u8BE2\u4EA7\u54C1\u5217\u8868\u6210\u529F +##Device +device.user.id.null=\u7528\u6237ID\u4E0D\u80FD\u4E3A\u7A7A +device.product.id.null=\u8BBE\u5907\u7F16\u53F7\u548C\u4EA7\u54C1ID\u4E0D\u80FD\u4E3A\u7A7A +device.dept.id.null=\u8BF7\u9009\u62E9\u5206\u914D\u673A\u6784 +device.id.null=\u8BF7\u9009\u62E9\u8BBE\u5907 +device.not.select=\u8bf7\u9009\u62e9\u8bbe\u5907 +device.serialNumber.not.empty=\u8bbe\u5907\u7f16\u53f7\u4e0d\u80fd\u4e3a\u7a7a +device.delete.fail.please.delete.device.scene=\u8bbe\u5907\u7f16\u53f7\u4e3a[{}]\u7684\u5220\u9664\u5931\u8d25\uff0c\u8bf7\u5148\u5220\u9664\u5bf9\u5e94\u8bbe\u5907\u4e0b\u7684\u573a\u666f\u8054\u52a8 +delete.fail.please.delete.scene.model=\u8bbe\u5907\u7f16\u53f7\u4e3a[{}]\u7684\u5220\u9664\u5931\u8d25\uff0c\u8bf7\u5148\u5220\u9664\u5bf9\u5e94\u8bbe\u5907\u4e0b\u7684\u573a\u666f\u7ba1\u7406 +device.tenant.can.not.bind.exist.device=\u79df\u6237\u4e0d\u5141\u8bb8\u7ed1\u5b9a\u5df2\u5b58\u5728\u7684\u8bbe\u5907\uff0c\u8bbe\u5907\u7f16\u53f7\uff1a[{}] +now.user.belong.device.can.not.repeat.share=\u5f53\u524d\u7528\u6237\u5df2\u62e5\u6709\u8be5\u8bbe\u5907\uff0c\u65e0\u6cd5\u91cd\u590d\u5206\u914d\uff0c\u8bbe\u5907\u7f16\u53f7\uff1a[{}] +device.share.other.user.can.not.share=\u8be5\u8bbe\u5907\u5df2\u88ab\u5206\u914d\u5230\u5176\u4ed6\u7528\u6237\uff0c\u65e0\u6cd5\u91cd\u590d\u5206\u914d\uff0c\u8bbe\u5907\u7f16\u53f7\uff1a[{}] +device.not.exist.add.fail.please.check.product.id.is.correct=\u8bbe\u5907\u4e0d\u5b58\u5728\uff0c\u81ea\u52a8\u6dfb\u52a0\u8bbe\u5907\u65f6\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u4ea7\u54c1\u7f16\u53f7\u662f\u5426\u6b63\u786e +device.add.success=\u6dfb\u52a0\u8bbe\u5907\u6210\u529f +device.assignment.fail.dept.not.exist=\u673a\u6784\u4e0d\u5b58\u5728\u6216\u672a\u7ed1\u5b9a\u7ba1\u7406\u5458\uff0c\u8bf7\u8c03\u6574\u540e\u91cd\u8bd5\uff01 +device.assignment.fail.dept.admin.not.exist=\u673a\u6784\u7ba1\u7406\u5458\u4e0d\u5b58\u5728 +device.assignment.success=\u5206\u914d\u8bbe\u5907\u6210\u529f +device.assignment.fail=\u5206\u914d\u8bbe\u5907\u5931\u8d25 +device.recovery.fail.dept.not.exist=\u673a\u6784\u4e0d\u5b58\u5728\u6216\u672a\u7ed1\u5b9a\u7ba1\u7406\u5458\uff0c\u8bf7\u8c03\u6574\u540e\u91cd\u8bd5\uff01 +device.recovery.fail.dept.admin.not.exist=\u673a\u6784\u7ba1\u7406\u5458\u4e0d\u5b58\u5728 +device.recovery.success=\u56de\u6536\u8bbe\u5907\u6210\u529f +device.recovery.fail=\u56de\u6536\u8bbe\u5907\u5931\u8d25 +device.not.exist=\u8bbe\u5907\u4e0d\u5b58\u5728 +device.serialNumber.allow.generate.max.number=\u6700\u591a\u53ea\u80fd\u751f\u6210200\u4e2a\uff01 +device.insert.fail.device.number.already.exist=\u8bbe\u5907\u7f16\u53f7\uff1a[{}] \u5df2\u7ecf\u5b58\u5728\uff0c\u65b0\u589e\u5931\u8d25 +device.insert.fail.device.ip.already.exist=\u8be5\u4e3b\u673aip\u548c\u7aef\u53e3\u5df2\u7ecf\u5b58\u5728\uff0c\u8bbe\u5907\u7f16\u53f7\u4e3a\uff1a[{}] +device.get.mqtt.connection.param.fail=\u83b7\u53d6\u8bbe\u5907mqtt\u8fde\u63a5\u53c2\u6570\u5931\u8d25 +device.get.authorization.fail.please.config=\u4ea7\u54c1\u5df2\u542f\u7528\u6388\u6743\uff0c\u83b7\u53d6\u8bbe\u5907\u6388\u6743\u7801\u5931\u8d25\uff0c\u8bf7\u5148\u914d\u7f6e\u6388\u6743\u7801 +device.unsupported.authentication.method=\u4f20\u8f93\u534f\u8bae\u4e3aHTTP\uff0c\u8ba4\u8bc1\u65b9\u5f0f\u4ec5\u652f\u6301 Basic \u548c Digest\uff0c\u8bf7\u524d\u5f80\u4ea7\u54c1\u4fee\u6539\u534f\u8bae +device.not.found.by.serial.number=\u6570\u636e\u5e93\u4e2d\u4e0d\u5b58\u5728\u8be5\u8bbe\u5907 +device.duplicate.by.serial.number=\u5df2\u5b58\u5728\u76f8\u540c\u8bbe\u5907\u7f16\u53f7\u7684\u6570\u636e +device.restore.success=\u8bbe\u5907\u8fd8\u539f\u6210\u529f +device.restore.fail=\u8bbe\u5907\u8fd8\u539f\u5931\u8d25 +product.not.found.by.product.id=\u8bbe\u5907\u6240\u5c5e\u4ea7\u54c1\u5df2\u5220\u9664\uff0c\u8bf7\u5148\u5c06\u4ea7\u54c1\u6062\u590d +device.import.assignment.fail.product.information.is.empty=\u5bfc\u5165\u5931\u8d25\uff0c\u4ea7\u54c1\u4fe1\u606f\u4e3a\u7a7a +device.import.assignment.fail.serialNumber.already.exists=\u4ee5\u4e0b\u8bbe\u5907\u7f16\u53f7[{}]\u5df2\u5b58\u5728\uff0c\u8bf7\u4fee\u6539\u540e\u91cd\u8bd5 +device.import.assignment.fail.dept.not.exists=\u673a\u6784\u4e0d\u5b58\u5728\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u673a\u6784\uff01 +device.import.assignment.fail.dept.admin.not.exists=\u673a\u6784\u7ba1\u7406\u5458\u4fe1\u606f\u4e0d\u5b58\u5728\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u673a\u6784\uff01 +device.import.serialNumber.not.comply.national.standard.protocol=\u8bbe\u5907\u7f16\u53f7[{}]\u4e0d\u7b26\u5408\u56fd\u6807\u534f\u8bae\u683c\u5f0f\u8981\u6c42 +##DeviceJob +job.add.failed.cron.not.valid=\u65B0\u589E\u4EFB\u52A1[{}]\u5931\u8D25\uFF0CCron\u8868\u8FBE\u5F0F\u4E0D\u6B63\u786E +job.add.failed.rmi.not.valid=\u65B0\u589E\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5141\u8BB8'rmi'\u8C03\u7528 +job.add.failed.ldap.not.valid=\u65B0\u589E\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5141\u8BB8'ldap(s)'\u8C03\u7528 +job.add.failed.http.not.valid=\u65B0\u589E\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5141\u8BB8'http(s)'\u8C03\u7528 +job.add.failed.string.error=\u65B0\u589E\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u5B58\u5728\u8FDD\u89C4 +job.add.failed.string.not.valid=\u65B0\u589E\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5728\u767D\u540D\u5355\u5185 +job.add.failed.product.not.modbus.config=\u65b0\u589e\u4efb\u52a1[{}]\u5931\u8d25\uff0c\u8bf7\u5148\u53bb\u4ea7\u54c1\u8fdb\u884cmodbus\u914d\u7f6e +job.update.failed.cron.not.valid=\u4FEE\u6539\u4EFB\u52A1[{}]\u5931\u8D25\uFF0CCron\u8868\u8FBE\u5F0F\u4E0D\u6B63\u786E +job.update.failed.rmi.not.valid=\u4FEE\u6539\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5141\u8BB8'rmi'\u8C03\u7528 +job.update.failed.ldap.not.valid=\u4FEE\u6539\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5141\u8BB8'ldap(s)'\u8C03\u7528 +job.update.failed.http.not.valid=\u4FEE\u6539\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5141\u8BB8'http(s)'\u8C03\u7528 +job.update.failed.string.error=\u4FEE\u6539\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u5B58\u5728\u8FDD\u89C4 +job.update.failed.string.not.valid=\u4FEE\u6539\u4EFB\u52A1[{}]\u5931\u8D25\uFF0C\u76EE\u6807\u5B57\u7B26\u4E32\u4E0D\u5728\u767D\u540D\u5355\u5185 +job.update.failed.product.not.modbus.config=\u66f4\u65b0\u4efb\u52a1[{}]\u5931\u8d25\uff0c\u8bf7\u5148\u53bb\u4ea7\u54c1\u8fdb\u884cmodbus\u914d\u7f6e +job.not.exists=\u4EFB\u52A1\u4E0D\u5B58\u5728\u6216\u5DF2\u8FC7\u671F +##DeviceUser +device.user.delete.failed.user.not.valid=\u8BBE\u5907\u6240\u6709\u8005\u4E0D\u80FD\u5220\u9664 +##GoviewProject +goview.project.data.save.failed.id.null=\u6CA1\u6709\u8BE5\u9879\u76EEID +goview.project.data.execute.sql.failed=\u8BF7\u7F16\u5199sql\u8BED\u53E5 +##ThingsModel +things.model.identifier.repeat=\u4EA7\u54C1\u4E0B\u7684\u6807\u8BC6\u7B26\u4E0D\u80FD\u91CD\u590D +things.model.import.failed.identifier.repeat=[{}]\u6761\u6570\u636E\u672A\u5BFC\u5165\uFF0C\u6807\u8BC6\u7B26\u91CD\u590D +things.model.update.fail.quote.the.scene.variable.formula.please.delete=\u5f53\u524d\u7269\u6a21\u578b\u88ab\u5f15\u7528\u5230\u573a\u666f\u8fd0\u7b97\u578b\u53d8\u91cf\u7684\u8ba1\u7b97\u516c\u5f0f\u4e2d\uff0c\u65e0\u6cd5\u4fee\u6539\uff0c\u8bf7\u5148\u5220\u9664\u5f15\u7528\u5173\u7cfb\u540e\u518d\u6267\u884c\u4fee\u6539\u64cd\u4f5c\uff01 +things.model.delete.fail.quote.the.scene.variable.formula.please.delete=\u5f53\u524d\u7269\u6a21\u578b\u88ab\u5f15\u7528\u5230\u573a\u666f\u8fd0\u7b97\u578b\u53d8\u91cf\u7684\u8ba1\u7b97\u516c\u5f0f\u4e2d\uff0c\u65e0\u6cd5\u5220\u9664\uff0c\u8bf7\u5148\u5220\u9664\u5f15\u7528\u5173\u7cfb\u540e\u518d\u6267\u884c\u5220\u9664\u64cd\u4f5c\uff01 +things.model.import.data.exception=\u5bfc\u5165\u6570\u636e\u5f02\u5e38 +things.model.register.address.repeat=\u540c\u4e00\u4e2a\u91c7\u96c6\u70b9\u6a21\u677f\u4e0b,\u5bc4\u5b58\u5668\u5730\u5740\u91cd\u590d,\u8bf7\u68c0\u67e5\u5bfc\u5165\u53d8\u91cf\u5bc4\u5b58\u5668\u5730\u5740 +##MQTT +mqtt.unauthorized=mqtt\u8D26\u53F7\u548C\u5BC6\u7801\u4E0E\u8BA4\u8BC1\u670D\u52A1\u5668\u914D\u7F6E\u4E0D\u5339\u914D +##Oauth +oauth.response.type.not.valid=response_type\u53C2\u6570\u503C\u53EA\u5141\u8BB8code\u548Ctoken +oauth.grant.type.null=\u672A\u77E5\u6388\u6743\u7C7B\u578B +oauth.grant.type.implicit.not.support=Token\u63A5\u53E3\u4E0D\u652F\u6301implicit\u6388\u6743\u6A21\u5F0F +oauth.access.token.null=\u8BBF\u95EE\u4EE4\u724C\u4E0D\u80FD\u4E3A\u7A7A +obtain.basic.authorization.failed=client_id\u6216client_secret\u672A\u6B63\u786E\u4F20\u9012 +##Record +record.app.null=app\u4E0D\u80FD\u4E3A\u7A7A +record.stream.null=stream\u4E0D\u80FD\u4E3A\u7A7A +record.time.not.valid=\u9519\u8BEF\u7684\u5F00\u59CB\u65F6\u95F4\u6216\u7ED3\u675F\u65F6\u95F4 +record.file.null=\u672A\u627E\u5230\u89C6\u9891\u6587\u4EF6 + +##ErrorCodeConstants +app.not.found=App \u4E0D\u5B58\u5728 +app.is.disable=App \u5DF2\u7ECF\u88AB\u7981\u7528 +app.exist.order.cant.delete=\u652F\u4ED8\u5E94\u7528\u5B58\u5728\u652F\u4ED8\u8BA2\u5355\uFF0C\u65E0\u6CD5\u5220\u9664 +app.exist.refund.cant.delete=\u652F\u4ED8\u5E94\u7528\u5B58\u5728\u9000\u6B3E\u8BA2\u5355\uFF0C\u65E0\u6CD5\u5220\u9664 +channel.not.found=\u652F\u4ED8\u6E20\u9053\u7684\u914D\u7F6E\u4E0D\u5B58\u5728 +channel.is.disable=\u652F\u4ED8\u6E20\u9053\u5DF2\u7ECF\u7981\u7528 +channel.exists.same.channel.error=\u5DF2\u5B58\u5728\u76F8\u540C\u7684\u6E20\u9053 +order.not.found=\u652F\u4ED8\u8BA2\u5355\u4E0D\u5B58\u5728 +order.status.is.not.waiting=\u652F\u4ED8\u8BA2\u5355\u4E0D\u5904\u4E8E\u5F85\u652F\u4ED8 +order.status.is.success=\u8BA2\u5355\u5DF2\u652F\u4ED8\uFF0C\u8BF7\u5237\u65B0\u9875\u9762 +order.is.expired=\u652F\u4ED8\u8BA2\u5355\u5DF2\u7ECF\u8FC7\u671F +order.submit.channel.error=\u53D1\u8D77\u652F\u4ED8\u62A5\u9519\uFF0C\u9519\u8BEF\u7801\uFF1A{}\uFF0C\u9519\u8BEF\u63D0\u793A\uFF1A{} +order.refund.fail.status.error=\u652F\u4ED8\u8BA2\u5355\u9000\u6B3E\u5931\u8D25\uFF0C\u539F\u56E0\uFF1A\u72B6\u6001\u4E0D\u662F\u5DF2\u652F\u4ED8\u6216\u5DF2\u9000\u6B3E +order.extension.not.found=\u652F\u4ED8\u4EA4\u6613\u62D3\u5C55\u5355\u4E0D\u5B58\u5728 +order.extension.status.is.not.waiting=\u652F\u4ED8\u4EA4\u6613\u62D3\u5C55\u5355\u4E0D\u5904\u4E8E\u5F85\u652F\u4ED8 +order.extension.is.paid=\u8BA2\u5355\u5DF2\u652F\u4ED8\uFF0C\u8BF7\u7B49\u5F85\u652F\u4ED8\u7ED3\u679C +refund.price.exceed=\u9000\u6B3E\u91D1\u989D\u8D85\u8FC7\u8BA2\u5355\u53EF\u9000\u6B3E\u91D1\u989D +refund.has.refunding=\u5DF2\u7ECF\u6709\u9000\u6B3E\u5728\u5904\u7406\u4E2D +refund.exists=\u5DF2\u7ECF\u5B58\u5728\u9000\u6B3E\u5355 +refund.not.found=\u652F\u4ED8\u9000\u6B3E\u5355\u4E0D\u5B58\u5728 +refund.statue.is.not.waiting=\u652F\u4ED8\u9000\u6B3E\u5355\u4E0D\u5904\u4E8E\u5F85\u9000\u6B3E +demo.order.not.found=\u793A\u4F8B\u8BA2\u5355\u4E0D\u5B58\u5728 +demo.order.update.paid.status.not.unpaid=\u793A\u4F8B\u8BA2\u5355\u66F4\u65B0\u652F\u4ED8\u72B6\u6001\u5931\u8D25\uFF0C\u8BA2\u5355\u4E0D\u662F\u3010\u672A\u652F\u4ED8\u3011\u72B6\u6001 +demo.order.update.paid.fail.pay.order.id.error=\u793A\u4F8B\u8BA2\u5355\u66F4\u65B0\u652F\u4ED8\u72B6\u6001\u5931\u8D25\uFF0C\u652F\u4ED8\u5355\u7F16\u53F7\u4E0D\u5339\u914D +demo.order.update.paid.fail.pay.order.status.not.success=\u793A\u4F8B\u8BA2\u5355\u66F4\u65B0\u652F\u4ED8\u72B6\u6001\u5931\u8D25\uFF0C\u652F\u4ED8\u5355\u72B6\u6001\u4E0D\u662F\u3010\u652F\u4ED8\u6210\u529F\u3011\u72B6\u6001 +demo.order.update.paid.fail.pay.price.not.match=\u793A\u4F8B\u8BA2\u5355\u66F4\u65B0\u652F\u4ED8\u72B6\u6001\u5931\u8D25\uFF0C\u652F\u4ED8\u5355\u91D1\u989D\u4E0D\u5339\u914D +demo.order.refund.fail.not.paid=\u53D1\u8D77\u9000\u6B3E\u5931\u8D25\uFF0C\u793A\u4F8B\u8BA2\u5355\u672A\u652F\u4ED8 +demo.order.refund.fail.refunded=\u53D1\u8D77\u9000\u6B3E\u5931\u8D25\uFF0C\u793A\u4F8B\u8BA2\u5355\u5DF2\u9000\u6B3E +demo.order.refund.fail.refund.not.found=\u53D1\u8D77\u9000\u6B3E\u5931\u8D25\uFF0C\u9000\u6B3E\u8BA2\u5355\u4E0D\u5B58\u5728 +demo.order.refund.fail.refund.not.success=\u53D1\u8D77\u9000\u6B3E\u5931\u8D25\uFF0C\u9000\u6B3E\u8BA2\u5355\u672A\u9000\u6B3E\u6210\u529F +demo.order.refund.fail.refund.order.id.error=\u53D1\u8D77\u9000\u6B3E\u5931\u8D25\uFF0C\u9000\u6B3E\u5355\u7F16\u53F7\u4E0D\u5339\u914D +demo.order.refund.fail.refund.price.not.match=\u53D1\u8D77\u9000\u6B3E\u5931\u8D25\uFF0C\u9000\u6B3E\u5355\u91D1\u989D\u4E0D\u5339\u914D +device.order.control.no.permission=\u6682\u65e0\u6743\u9650\u64cd\u4f5c\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u5206\u914d\u6307\u4ee4\u6743\u9650\uff01 + +##sysConfig +sysConfig.add.param.fail.name.exist=\u65b0\u589e\u53c2\u6570[{}]\u5931\u8d25\uff0c\u53c2\u6570\u952e\u540d\u5df2\u5b58\u5728 +sysConfig.update.param.fail.name.exist=\u4fee\u6539\u53c2\u6570[{}]\u5931\u8d25\uff0c\u53c2\u6570\u952e\u540d\u5df2\u5b58\u5728 +##sysRegister +sysRegister.fail.not.enable.register=\u5f53\u524d\u7cfb\u7edf\u6ca1\u6709\u5f00\u542f\u6ce8\u518c\u529f\u80fd\uff01 +##ossDetail +ossDetail.fail.file.not.empty=\u4e0a\u4f20\u6587\u4ef6\u4e0d\u80fd\u4e3a\u7a7a +##notify +sms.send.fail.contact.admin=\u77ed\u4fe1\u53d1\u9001\u5931\u8d25\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\uff01 +captcha.has.sent.please.try.again.later=\u9a8c\u8bc1\u7801\u5df2\u53d1\u9001\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5\uff01 +not.find.enable.notify.template=\u67e5\u8be2\u4e0d\u5230\u542f\u7528\u7684\u901a\u77e5\u6a21\u677f +not.find.notify.channel=\u67e5\u8be2\u4e0d\u5230\u901a\u77e5\u6e20\u9053 +only.can.config.alert.and.not.wechat.mini.notify=\u975e\u7ba1\u7406\u5458\u53ea\u5141\u8bb8\u6dfb\u52a0\u8bbe\u5907\u544a\u8b66\u4e1a\u52a1\u5e76\u4e14\u975e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u6a21\u677f\uff01 +notify.can.not.not.alert.and.wechat.mini.status=\u975e\u7ba1\u7406\u5458\u53ea\u80fd\u66f4\u6539\u8bbe\u5907\u544a\u8b66\u4e1a\u52a1\u5e76\u4e14\u975e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u6a21\u677f\u72b6\u6001\uff01 + +##dataCenter +please.select.device=\u8bf7\u9009\u62e9\u8bbe\u5907 +please.incoming.serialNumber=\u8bf7\u4f20\u5165\u8bbe\u5907\u7f16\u53f7 +##license +certificate.install.success=\u8bc1\u4e66\u5b89\u88c5\u6210\u529f +certificate.install.fail=\u8bc1\u4e66\u5b89\u88c5\u5931\u8d25:[{}] +certificate.incoming.success=\u8bc1\u4e66\u4e0a\u4f20\u6210\u529f +certificate.incoming.fail=\u8bc1\u4e66\u4e0a\u4f20\u5931\u8d25 +certificate.upload.success=\u8bc1\u4e66\u4e0a\u4f20\u6210\u529f +certificate.upload.fail=\u8bc1\u4e66\u4e0a\u4f20\u5931\u8d25:[{}] +##sceneModel +please.incoming.scene.id=\u8bf7\u4f20\u5165\u573a\u666fid +please.incoming.device.config.number=\u8bf7\u4f20\u5165\u5173\u8054\u8bbe\u5907\u914d\u7f6e\u7684\u5e8f\u53f7 +sceneModel.please.introduced.id=\u8bf7\u4f20\u5165\u573a\u666f\u7ba1\u7406id +sceneModel.current.variable.quote.operate.variable.formula.please.delete=\u5f53\u524d\u53d8\u91cf\u88ab\u5f15\u7528\u5230\u573a\u666f\u8fd0\u7b97\u578b\u53d8\u91cf\u7684\u8ba1\u7b97\u516c\u5f0f\u4e2d\uff0c\u65e0\u6cd5\u5220\u9664\uff0c\u8bf7\u5148\u5220\u9664\u5f15\u7528\u5173\u7cfb\u540e\u518d\u6267\u884c\u5220\u9664\u64cd\u4f5c\uff01 +sceneModel.scene.already.bind.device=\u573a\u666f\u5df2\u7ed1\u5b9a\u8be5\u8bbe\u5907\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01 +sceneModel.update.fail.device.variable.has.quote.scene.variable.please.delete=\u5f53\u524d\u8bbe\u5907\u4e0b\u5b58\u5728\u53d8\u91cf\u88ab\u5f15\u7528\u5230\u8fd0\u7b97\u578b\u53d8\u91cf\u8ba1\u7b97\u516c\u5f0f\u4e2d\uff0c\u65e0\u6cd5\u4fee\u6539\uff0c\u8bf7\u5220\u9664\u5f15\u7528\u5173\u7cfb\u540e\u518d\u6267\u884c\u4fee\u6539\u64cd\u4f5c\uff01 +sceneModel.delete.fail.device.variable.has.quote.scene.variable.please.delete=\u5f53\u524d\u8bbe\u5907\u4e0b\u5b58\u5728\u53d8\u91cf\u88ab\u5f15\u7528\u5230\u8fd0\u7b97\u578b\u53d8\u91cf\u8ba1\u7b97\u516c\u5f0f\u4e2d\uff0c\u65e0\u6cd5\u5220\u9664\uff0c\u8bf7\u5220\u9664\u5f15\u7528\u5173\u7cfb\u540e\u518d\u6267\u884c\u5220\u9664\u64cd\u4f5c\uff01 +sceneModel.formula.cannot.empty=\u8ba1\u7b97\u516c\u5f0f\u4e0d\u80fd\u4e3a\u7a7a\uff01 +sceneModel.variable.cannot.empty=\u53d8\u91cf\u4e0d\u80fd\u4e3a\u7a7a\uff01 +sceneModel.formula.and.variable.number.inconsistent=\u8ba1\u7b97\u516c\u5f0f\u548c\u53d8\u91cf\u4e2a\u6570\u4e0d\u4e00\u81f4\uff0c\u8bf7\u68c0\u67e5\u540e\u91cd\u8bd5 +sceneModel.update.fail.variable.name.exist=\u53d8\u91cf\u540d\u79f0\u5df2\u5b58\u5728\uff0c\u8bf7\u4fee\u6539\u540e\u91cd\u8bd5\uff01 +sceneModel.device.not.belong.current.tenant=\u8bf7\u5148\u628a\u8bbe\u5907\u914d\u7f6e\u7684\u6240\u6709\u8bbe\u5907\u5206\u914d\u7ed9\u5f53\u524d\u573a\u666f\u914d\u7f6e\u7684\u6240\u5c5e\u673a\u6784\uff0c\u624d\u53ef\u8fdb\u884c\u64cd\u4f5c\uff01 +##oauthClientDetail +add.fail.same.client.can.config.one=\u540c\u4e00\u4e2a\u6388\u6743\u5e73\u53f0\u53ea\u80fd\u914d\u7f6e\u4e00\u6761\u4fe1\u606f\uff0c\u8bf7\u52ff\u91cd\u590d\u914d\u7f6e +client.id.is.exist=\u5ba2\u6237\u7aefid\uff1a[{}]\u5df2\u5b58\u5728\u6216\u5df2\u88ab\u5176\u4ed6\u79df\u6237\u4f7f\u7528 +oauthClientDetail.client.not.exist=oauth2 \u5ba2\u6237\u7aef\u4e0d\u5b58\u5728 +oauthClientDetail.client.disabled=oauth2 \u5ba2\u6237\u7aef\u5df2\u7981\u7528 +oauthClientDetail.invalid.client.set=\u65e0\u6548 client_secret +oauthClientDetail.invalid.redirects=\u65e0\u6548 redirect_uri\uff1a[{}] +##category +delete.fail.please.delete.category.product=\u5220\u9664\u5931\u8d25\uff0c\u8bf7\u5148\u5220\u9664\u5bf9\u5e94\u5206\u7c7b\u4e0b\u7684\u4ea7\u54c1 +##goviewProjectData +only.allow.select.operate=\u53ea\u5141\u8bb8select\u64cd\u4f5c\uff0c\u7981\u6b62update\u3001delete\u3001insert\u64cd\u4f5c +##newsCategory +newsCategory.delete.fail.please.delete.category.info=\u5220\u9664\u5931\u8d25\uff0c\u8bf7\u5148\u5220\u9664\u5bf9\u5e94\u5206\u7c7b\u4e0b\u7684\u65b0\u95fb\u8d44\u8baf +##product +delete.fail.please.delete.firmware=\u5220\u9664\u5931\u8d25\uff0c\u8bf7\u5148\u5220\u9664\u5bf9\u5e94\u4ea7\u54c1\u4e0b\u7684\u56fa\u4ef6 +delete.fail.please.delete.product.device=\u5220\u9664\u5931\u8d25\uff0c\u8bf7\u5148\u5220\u9664\u5bf9\u5e94\u4ea7\u54c1\u4e0b\u7684\u8bbe\u5907 +delete.fail.please.delete.product.scene=\u5220\u9664\u5931\u8d25\uff0c\u8bf7\u5148\u4fee\u6539\u6216\u5220\u9664\u5bf9\u5e94\u4ea7\u54c1\u4e0b\u7684\u573a\u666f\u8054\u52a8\uff1a[{}] +product.status.update.fail.value.fail=\u72b6\u6001\u66f4\u65b0\u5931\u8d25,\u72b6\u6001\u503c\u6709\u8bef +product.status.update.fail=\u72b6\u6001\u66f4\u65b0\u5931\u8d25 +restore.product.fail=\u5f53\u524d\u4ea7\u54c1\u672a\u67e5\u8be2\u5230 +product.name.is.not.empty=\u8bf7\u8f93\u5165\u4ea7\u54c1\u540d\u79f0 +product.import.categoryId.is.fail=\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u4ea7\u54c1\u5206\u7c7b\u7f16\u53f7categoryid +##socialLogin +bind.account.not.exist=\u7ed1\u5b9a\u8d26\u6237\u4e0d\u5b58\u5728 +socialLogin.verify.has.expired=\u9a8c\u8bc1\u7801\u5df2\u5931\u6548\uff0c\u8bf7\u91cd\u65b0\u83b7\u53d6 +socialLogin.platform.type.fail=\u9519\u8bef\u5e73\u53f0\u7c7b\u578b +user.account.and.bind.account.not.match=\u7528\u6237\u8d26\u6237\u548c\u7ed1\u5b9a\u8d26\u6237\u4e0d\u5339\u914d +socialLogin.user.not.exist=\u7528\u6237\u4e0d\u5b58\u5728 +socialLogin.bind.end.user.cannot.login.web=\u8bf7\u52ff\u7ed1\u5b9a\u7ec8\u7aef\u7528\u6237\uff0c\u7ed1\u5b9a\u7ec8\u7aef\u7528\u6237\u540e\u4e0d\u53ef\u767b\u5f55web\u7aef +socialLogin.account.already.bind.other.wechat.please.unbind=\u8be5\u8d26\u53f7\u5df2\u7ecf\u7ed1\u5b9a\u5176\u4ed6\u5fae\u4fe1\uff0c\u8bf7\u5148\u89e3\u7ed1\u540e\u91cd\u8bd5\uff01 +socialLogin.register.fail.please.check.role.exist=\u6ce8\u518c\u5931\u8d25,\u8bf7\u8054\u7cfb\u7ba1\u7406\u4eba\u5458\u68c0\u67e5\u673a\u6784\u89d2\u8272\u662f\u5426\u5b58\u5728 +socialLogin.web.not.allow.end.user.login=web\u7aef\u4e0d\u5141\u8bb8\u7ec8\u7aef\u7528\u6237\u767b\u5f55 +socialLogin.register.fail.please.check.invitationCode.exist=\u9080\u8bf7\u7801\u9519\u8bef\uff0c\u8bf7\u8054\u7cfb\u673a\u6784\u7ba1\u7406\u5458\u6838\u5bf9 +The.organization.to.which.your.account.belongs.has.been.suspended.Please.contact.the.administrator=\u4f60\u7684\u8d26\u53f7\u6240\u5c5e\u673a\u6784\u5df2\u88ab\u505c\u7528\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\uff01 +default.institution.has.been.deactivated.contact.administrator=\u9ed8\u8ba4\u673a\u6784\u5df2\u88ab\u505c\u7528\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\uff01 +##alert +alert.push.fail.device.not.exist=\u544a\u8b66\u63a8\u9001\uff0c\u8bbe\u5907\u4e0d\u5b58\u5728\uff1a[{}] +##modbus +not.modbus.protocol.please.config.collect.protocol=\u975emodbus\u534f\u8bae\u8bf7\u5148\u914d\u7f6e\u4e3b\u52a8\u91c7\u96c6\u534f\u8bae +modbus.point.not.config=\u672a\u914d\u7f6emodbus\u70b9\u4f4d +##ota +firmwareTask.add.fail.FirmwareTask.exist=\u4efb\u52a1\uff1a[{}]\u5df2\u5b58\u5728 +firmware.version.not.exist=\u56fa\u4ef6\u7248\u672c\u4e0d\u5b58\u5728%21 +##mqttMessage +mqtt.service.send.device.not.exist=\u670d\u52a1\u4e0b\u53d1\u7684\u8bbe\u5907\uff1a[{}]\u4e0d\u5b58\u5728 +mqtt.disconnect.occur.fail=\u65ad\u5f00mqtt\u8fde\u63a5\u53d1\u751f\u9519\u8bef\uff1a[{}] + +##genTable +genTable.template.rendering.fail=\u5bfc\u5165\u5931\u8d25\uff1a[{}] +genTable.data.sync.fail.original.table.not.exist=\u540c\u6b65\u6570\u636e\u5931\u8d25\uff0c\u539f\u8868\u7ed3\u6784\u4e0d\u5b58\u5728 +genTable.tree.code.field.cannot.empty=\u6811\u7f16\u7801\u5b57\u6bb5\u4e0d\u80fd\u4e3a\u7a7a +genTable.tree.parent.code.field.cannot.empty=\u6811\u7236\u7f16\u7801\u5b57\u6bb5\u4e0d\u80fd\u4e3a\u7a7a +genTable.tree.name.field.cannot.empty=\u6811\u540d\u79f0\u5b57\u6bb5\u4e0d\u80fd\u4e3a\u7a7a +genTable.relate.child.table.name.cannot.empty=\u5173\u8054\u5b50\u8868\u7684\u8868\u540d\u4e0d\u80fd\u4e3a\u7a7a +genTable.child.table.relate.foreign.key.name.cannot.empty=\u5b50\u8868\u5173\u8054\u7684\u5916\u952e\u540d\u4e0d\u80fd\u4e3a\u7a7a + +##oauthCode +oauthCode.code.not.exist=code \u4e0d\u5b58\u5728 + +##protocol +protocol.input.content.is.empty=\u8f93\u5165\u5185\u5bb9\u4e3a\u7a7a +protocol.data.parse.error=\u6570\u636e\u89e3\u6790\u51fa\u9519[{}] +protocol.data.parse.exception=\u6570\u636e\u89e3\u6790\u5f02\u5e38[{}] +protocol.instruction.number.exception=\u6307\u4ee4\u7f16\u53f7\u5f02\u5e38\uff1a[{}] + +##modbusJob +modbusJob.add.fail.please.bind.gateway=\u8bf7\u5148\u7ed1\u5b9a\u7f51\u5173 + +thingsModel.array.or.object.no.need.update=\u6682\u65e0\u9700\u8981\u66f4\u65b0\u7684\u6570\u7ec4\u3001\u5bf9\u8c61\u7c7b\u7269\u6a21\u578b + +sync.fail.please.try.again=\u540c\u6b65\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5\uff01 +sync.success=\u540c\u6b65\u6210\u529f + +## scada +scada.product.id.is.null=\u4ea7\u54c1id\u4e3a\u7a7a +scada.scene.id.is.null=\u573a\u666fid\u4e3a\u7a7a +scada.guid.cannot.empty=guid\u4e0d\u80fd\u4e3a\u7a7a +scada.base64.change.image.exception=\u7ec4\u6001base64\u8f6c\u56fe\u7247\u5f02\u5e38:[{}] +scada.please.select.device=\u8bf7\u9009\u62e9\u8bbe\u5907 +scada.please.enter.password=\u8bf7\u8f93\u5165\u5bc6\u7801\uff01 +scada.please.login=\u672a\u767b\u5f55\uff0c\u8bf7\u767b\u5f55\u540e\u91cd\u8bd5 +scada.password.fail.please.reload.enter=\u5bc6\u7801\u9519\u8bef\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\uff01 +scada.product.has.relate.please.select.again=\u8be5\u4ea7\u54c1\u5df2\u7ecf\u5173\u8054\u7ec4\u6001\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01 +scada.scene.has.relate.please.select.again=\u8be5\u573a\u666f\u5df2\u7ecf\u5173\u8054\u7ec4\u6001\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\uff01 +scada.not.allow.view.other.tenant.config=\u4e0d\u5141\u8bb8\u67e5\u770b\u5176\u4ed6\u79df\u6237\u7684\u7ec4\u6001\uff01 +scada.upload.gallery.file.fail=\u4e0a\u4f20\u56fe\u5e93\u6587\u4ef6\u5f02\u5e38\uff0c[{}] +scada.upload.fail=\u4e0a\u4f20\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5\uff01 +scada.invalid.profile=\u65e0\u6548\u7684\u914d\u7f6e\u6587\u4ef6 +scada.import.success.need.replace.variable=\u5bfc\u5165\u6210\u529f\uff0c\u5f53\u524d\u9875\u9762\u9700\u8981\u91cd\u65b0\u66ff\u6362\u7ed1\u5b9a\u7ec4\u4ef6\u7684\u53d8\u91cf\uff01 + +## speaker +speaker.product.has.relate=\u8be5\u4ea7\u54c1\u5df2\u5173\u8054\uff0c\u8bf7\u52ff\u91cd\u590d\u5173\u8054 +speaker.product.relate.add.fail=\u65b0\u589e\u5931\u8d25 +speaker.not.found.product.relate=\u672a\u67e5\u8be2\u5230\u4ea7\u54c1\u5173\u8054\u4fe1\u606f + +##file +file.content.is.empty=\u6587\u4ef6\u5185\u5bb9\u4e3a\u7a7a +file.is.invalid=\u65e0\u6548\u7684\u6587\u4ef6 + +## workOrder +workOrder.please.select.user=\u8bf7\u6307\u5b9a\u8054\u7cfb\u4eba +workOrder.please.fill.result.info=\u8bf7\u586b\u5199\u7ed3\u5355\u4fe1\u606f + +## subGateway +subGateway.subDeviceAddress.is.repeat=\u5b58\u5728\u76f8\u540c\u7684\u5b50\u8bbe\u5907\u5730\u5740\uff0c\u8bf7\u4fee\u6539\u540e\u91cd\u8bd5\uff01 \ No newline at end of file diff --git a/springboot/fastbee-common/pom.xml b/springboot/fastbee-common/pom.xml index b769c977..827eaf96 100644 --- a/springboot/fastbee-common/pom.xml +++ b/springboot/fastbee-common/pom.xml @@ -183,6 +183,19 @@ easyexcel-core + + org.mapstruct + mapstruct + + + org.mapstruct + mapstruct-jdk8 + + + org.mapstruct + mapstruct-processor + + diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/constant/Constants.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/constant/Constants.java index 6c226573..e4f43e5f 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/constant/Constants.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/constant/Constants.java @@ -171,4 +171,20 @@ public class Constants */ public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", "org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config", "com.ruoyi.generator" }; + + /** + * 语言类型 + */ + public static final String LANGUAGE = "language"; + public static final String ZH_CN = "zh-CN"; + public static final String EN_US = "en-US"; + + /** + * 翻译数据类型 + */ + public static final String MENU = "menu"; + public static final String DICT_DATA = "dict_data"; + public static final String DICT_TYPE = "dict_type"; + public static final String THINGS_MODEL = "things_model"; + public static final String THINGS_MODEL_TEMPLATE = "things_model_template"; } diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/controller/BaseController.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/controller/BaseController.java index b331ba3b..400572dd 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/controller/BaseController.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/controller/BaseController.java @@ -8,10 +8,7 @@ import com.fastbee.common.core.page.PageDomain; import com.fastbee.common.core.page.TableDataInfo; import com.fastbee.common.core.page.TableSupport; import com.fastbee.common.core.redis.RedisCache; -import com.fastbee.common.utils.DateUtils; -import com.fastbee.common.utils.PageUtils; -import com.fastbee.common.utils.SecurityUtils; -import com.fastbee.common.utils.StringUtils; +import com.fastbee.common.utils.*; import com.fastbee.common.utils.sql.SqlUtil; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -91,12 +88,22 @@ public class BaseController { TableDataInfo rspData = new TableDataInfo(); rspData.setCode(HttpStatus.SUCCESS); - rspData.setMsg("查询成功"); + rspData.setMsg(MessageUtils.message("query.success")); rspData.setRows(list); rspData.setTotal(new PageInfo(list).getTotal()); return rspData; } + protected TableDataInfo getDataTable(List list, Long total) + { + TableDataInfo rspData = new TableDataInfo(); + rspData.setCode(HttpStatus.SUCCESS); + rspData.setMsg(MessageUtils.message("query.success")); + rspData.setRows(list); + rspData.setTotal(total); + return rspData; + } + /** * 返回成功 */ diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictData.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictData.java index 8f3d1f54..bc2aadf1 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictData.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictData.java @@ -3,8 +3,11 @@ package com.fastbee.common.core.domain.entity; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; +import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.fastbee.common.annotation.Excel; @@ -17,6 +20,8 @@ import com.fastbee.common.core.domain.BaseEntity; * * @author ruoyi */ +@EqualsAndHashCode(callSuper = true) +@Data @ApiModel(value = "SysDictData", description = "字典数据表 sys_dict_data") public class SysDictData extends BaseEntity { @@ -65,125 +70,18 @@ public class SysDictData extends BaseEntity @Excel(name = "状态", readConverterExp = "0=正常,1=停用") private String status; - public Long getDictCode() - { - return dictCode; - } + /** 字典标签 */ + @TableField(exist = false) + @ApiModelProperty("中文字典标签") + private String dictLabel_zh_CN; - public void setDictCode(Long dictCode) - { - this.dictCode = dictCode; - } + /** 字典标签 */ + @TableField(exist = false) + @ApiModelProperty("英文字典标签") + private String dictLabel_en_US; - public Long getDictSort() - { - return dictSort; - } + @TableField(exist = false) + @Deprecated + private String language; - public void setDictSort(Long dictSort) - { - this.dictSort = dictSort; - } - - @NotBlank(message = "字典标签不能为空") - @Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符") - public String getDictLabel() - { - return dictLabel; - } - - public void setDictLabel(String dictLabel) - { - this.dictLabel = dictLabel; - } - - @NotBlank(message = "字典键值不能为空") - @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符") - public String getDictValue() - { - return dictValue; - } - - public void setDictValue(String dictValue) - { - this.dictValue = dictValue; - } - - @NotBlank(message = "字典类型不能为空") - @Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符") - public String getDictType() - { - return dictType; - } - - public void setDictType(String dictType) - { - this.dictType = dictType; - } - - @Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符") - public String getCssClass() - { - return cssClass; - } - - public void setCssClass(String cssClass) - { - this.cssClass = cssClass; - } - - public String getListClass() - { - return listClass; - } - - public void setListClass(String listClass) - { - this.listClass = listClass; - } - - public boolean getDefault() - { - return UserConstants.YES.equals(this.isDefault); - } - - public String getIsDefault() - { - return isDefault; - } - - public void setIsDefault(String isDefault) - { - this.isDefault = isDefault; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("dictCode", getDictCode()) - .append("dictSort", getDictSort()) - .append("dictLabel", getDictLabel()) - .append("dictValue", getDictValue()) - .append("dictType", getDictType()) - .append("cssClass", getCssClass()) - .append("listClass", getListClass()) - .append("isDefault", getIsDefault()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } } diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictType.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictType.java index eee07a37..e9eebd93 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictType.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysDictType.java @@ -4,8 +4,11 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; +import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.fastbee.common.annotation.Excel; @@ -17,6 +20,8 @@ import com.fastbee.common.core.domain.BaseEntity; * * @author ruoyi */ +@EqualsAndHashCode(callSuper = true) +@Data @ApiModel(value = "SysDictType", description = "字典类型表 sys_dict_type") public class SysDictType extends BaseEntity { @@ -42,63 +47,18 @@ public class SysDictType extends BaseEntity @Excel(name = "状态", readConverterExp = "0=正常,1=停用") private String status; - public Long getDictId() - { - return dictId; - } + /** 字典类型标签 */ + @ApiModelProperty("中文字典标签") + @TableField(exist = false) + private String dictName_zh_CN; - public void setDictId(Long dictId) - { - this.dictId = dictId; - } + /** 字典类型标签 */ + @ApiModelProperty("英文字典标签") + @TableField(exist = false) + private String dictName_en_US; - @NotBlank(message = "字典名称不能为空") - @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符") - public String getDictName() - { - return dictName; - } + @TableField(exist = false) + @Deprecated + private String language; - public void setDictName(String dictName) - { - this.dictName = dictName; - } - - @NotBlank(message = "字典类型不能为空") - @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符") - @Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "字典类型必须以字母开头,且只能为(小写字母,数字,下滑线)") - public String getDictType() - { - return dictType; - } - - public void setDictType(String dictType) - { - this.dictType = dictType; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("dictId", getDictId()) - .append("dictName", getDictName()) - .append("dictType", getDictType()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } } diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysMenu.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysMenu.java index 92a73065..2b30f226 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysMenu.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysMenu.java @@ -6,8 +6,11 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; +import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.fastbee.common.core.domain.BaseEntity; @@ -17,6 +20,8 @@ import com.fastbee.common.core.domain.BaseEntity; * * @author ruoyi */ +@EqualsAndHashCode(callSuper = true) +@Data @ApiModel(value = "SysMenu", description = "菜单权限表 sys_menu") public class SysMenu extends BaseEntity { @@ -89,206 +94,18 @@ public class SysMenu extends BaseEntity @ApiModelProperty("子菜单") private List children = new ArrayList(); - public Long getMenuId() - { - return menuId; - } + @Deprecated + @TableField(exist = false) + private String language; - public void setMenuId(Long menuId) - { - this.menuId = menuId; - } + /** 菜单名称 */ + @TableField(exist = false) + @ApiModelProperty("中文菜单名称") + private String menuName_zh_CN; - @NotBlank(message = "菜单名称不能为空") - @Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符") - public String getMenuName() - { - return menuName; - } + /** 菜单名称 */ + @TableField(exist = false) + @ApiModelProperty("英文菜单名称") + private String menuName_en_US; - public void setMenuName(String menuName) - { - this.menuName = menuName; - } - - public String getParentName() - { - return parentName; - } - - public void setParentName(String parentName) - { - this.parentName = parentName; - } - - public Long getParentId() - { - return parentId; - } - - public void setParentId(Long parentId) - { - this.parentId = parentId; - } - - @NotNull(message = "显示顺序不能为空") - public Integer getOrderNum() - { - return orderNum; - } - - public void setOrderNum(Integer orderNum) - { - this.orderNum = orderNum; - } - - @Size(min = 0, max = 200, message = "路由地址不能超过200个字符") - public String getPath() - { - return path; - } - - public void setPath(String path) - { - this.path = path; - } - - @Size(min = 0, max = 200, message = "组件路径不能超过255个字符") - public String getComponent() - { - return component; - } - - public void setComponent(String component) - { - this.component = component; - } - - public String getQuery() - { - return query; - } - - public void setQuery(String query) - { - this.query = query; - } - - public String getRouteName() - { - return routeName; - } - - public void setRouteName(String routeName) - { - this.routeName = routeName; - } - - public String getIsFrame() - { - return isFrame; - } - - public void setIsFrame(String isFrame) - { - this.isFrame = isFrame; - } - - public String getIsCache() - { - return isCache; - } - - public void setIsCache(String isCache) - { - this.isCache = isCache; - } - - @NotBlank(message = "菜单类型不能为空") - public String getMenuType() - { - return menuType; - } - - public void setMenuType(String menuType) - { - this.menuType = menuType; - } - - public String getVisible() - { - return visible; - } - - public void setVisible(String visible) - { - this.visible = visible; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } - - @Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符") - public String getPerms() - { - return perms; - } - - public void setPerms(String perms) - { - this.perms = perms; - } - - public String getIcon() - { - return icon; - } - - public void setIcon(String icon) - { - this.icon = icon; - } - - public List getChildren() - { - return children; - } - - public void setChildren(List children) - { - this.children = children; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("menuId", getMenuId()) - .append("menuName", getMenuName()) - .append("parentId", getParentId()) - .append("orderNum", getOrderNum()) - .append("path", getPath()) - .append("component", getComponent()) - .append("query", getQuery()) - .append("routeName", getRouteName()) - .append("isFrame", getIsFrame()) - .append("IsCache", getIsCache()) - .append("menuType", getMenuType()) - .append("visible", getVisible()) - .append("status ", getStatus()) - .append("perms", getPerms()) - .append("icon", getIcon()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } } diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysUser.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysUser.java index bff8749a..10470b61 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysUser.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/core/domain/entity/SysUser.java @@ -4,8 +4,11 @@ import java.util.Date; import java.util.List; import javax.validation.constraints.*; +import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.fastbee.common.annotation.Excel; @@ -20,6 +23,8 @@ import com.fastbee.common.xss.Xss; * * @author ruoyi */ +@EqualsAndHashCode(callSuper = true) +@Data @ApiModel(value = "SysUser", description = "用户对象 sys_user") public class SysUser extends BaseEntity { @@ -111,236 +116,26 @@ public class SysUser extends BaseEntity @ApiModelProperty("角色ID") private Long roleId; - public SysUser() - { + @TableField(exist = false) + private String language; + + @TableField(exist = false) + private String timeZone; + + public SysUser() { } - public SysUser(Long userId) - { + public SysUser(Long userId) { this.userId = userId; } - public Long getUserId() - { - return userId; - } - - public void setUserId(Long userId) - { - this.userId = userId; - } - - public boolean isAdmin() - { + public boolean isAdmin() { return isAdmin(this.userId); } - public static boolean isAdmin(Long userId) - { + public static boolean isAdmin(Long userId) { return userId != null && 1L == userId; } - public Long getDeptId() - { - return deptId; - } - - public void setDeptId(Long deptId) - { - this.deptId = deptId; - } - - @Xss(message = "用户昵称不能包含脚本字符") - @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符") - public String getNickName() - { - return nickName; - } - - public void setNickName(String nickName) - { - this.nickName = nickName; - } - - @Xss(message = "用户账号不能包含脚本字符") - @NotBlank(message = "用户账号不能为空") - @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符") - public String getUserName() - { - return userName; - } - - public void setUserName(String userName) - { - this.userName = userName; - } - - @Email(message = "邮箱格式不正确") - @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") - public String getEmail() - { - return email; - } - - public void setEmail(String email) - { - this.email = email; - } - - @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符") - public String getPhonenumber() - { - return phonenumber; - } - - public void setPhonenumber(String phonenumber) - { - this.phonenumber = phonenumber; - } - - public String getSex() - { - return sex; - } - - public void setSex(String sex) - { - this.sex = sex; - } - - public String getAvatar() - { - return avatar; - } - - public void setAvatar(String avatar) - { - this.avatar = avatar; - } - - public String getPassword() - { - return password; - } - - public void setPassword(String password) - { - this.password = password; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } - - public String getDelFlag() - { - return delFlag; - } - - public void setDelFlag(String delFlag) - { - this.delFlag = delFlag; - } - - public String getLoginIp() - { - return loginIp; - } - - public void setLoginIp(String loginIp) - { - this.loginIp = loginIp; - } - - public Date getLoginDate() - { - return loginDate; - } - - public void setLoginDate(Date loginDate) - { - this.loginDate = loginDate; - } - - public SysDept getDept() - { - return dept; - } - - public void setDept(SysDept dept) - { - this.dept = dept; - } - - public List getRoles() - { - return roles; - } - - public void setRoles(List roles) - { - this.roles = roles; - } - - public Long[] getRoleIds() - { - return roleIds; - } - - public void setRoleIds(Long[] roleIds) - { - this.roleIds = roleIds; - } - - public Long[] getPostIds() - { - return postIds; - } - - public void setPostIds(Long[] postIds) - { - this.postIds = postIds; - } - - public Long getRoleId() - { - return roleId; - } - - public void setRoleId(Long roleId) - { - this.roleId = roleId; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("userId", getUserId()) - .append("deptId", getDeptId()) - .append("userName", getUserName()) - .append("nickName", getNickName()) - .append("email", getEmail()) - .append("phonenumber", getPhonenumber()) - .append("sex", getSex()) - .append("avatar", getAvatar()) - .append("password", getPassword()) - .append("status", getStatus()) - .append("delFlag", getDelFlag()) - .append("loginIp", getLoginIp()) - .append("loginDate", getLoginDate()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .append("dept", getDept()) - .toString(); - } } diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/enums/Language.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/enums/Language.java new file mode 100644 index 00000000..a2a9edd3 --- /dev/null +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/enums/Language.java @@ -0,0 +1,25 @@ +package com.fastbee.common.enums; + +public enum Language { + ZH_CN("zh-CN"), + EN("en-US"), + DEFAULT("default"); + + private String value; + + Language(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + public static String matches(String language) { + if(language.equals("zh")){ + return Language.ZH_CN.value; + }else { + return Language.EN.value; + } + } +} diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/enums/TranslateType.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/enums/TranslateType.java new file mode 100644 index 00000000..2f3b339d --- /dev/null +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/enums/TranslateType.java @@ -0,0 +1,24 @@ +package com.fastbee.common.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +import static com.fastbee.common.constant.Constants.*; + +@Getter +@AllArgsConstructor +public enum TranslateType { + + MENU_TYPE(MENU, "sys_menu_translate", "sys_menu", "menu_id", "menu_name"), + DICT_DATA_TYPE(DICT_DATA, "sys_dict_data_translate", "sys_dict_data", "dict_code", "dict_label"), + DICT_TYPE_TYPE(DICT_TYPE, "sys_dict_type_translate", "sys_dict_type", "dict_id", "dict_name"), + THINGS_MODEL_TYPE(THINGS_MODEL, "iot_things_model_translate", "iot_things_model", "model_id", "model_name"), + THINGS_MODEL_TEMPLATE_TYPE(THINGS_MODEL_TEMPLATE, "iot_things_model_template_translate", "iot_things_model_template", "template_id", "template_name"); + + String value; + String translateTable; + String sourceTable; + String idColumn; + String nameColumn; + +} diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/DictUtils.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/DictUtils.java index c81adad0..019f3033 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/DictUtils.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/DictUtils.java @@ -9,6 +9,9 @@ import com.fastbee.common.utils.spring.SpringUtils; import java.util.Collection; import java.util.List; +import static com.fastbee.common.constant.Constants.EN_US; +import static com.fastbee.common.constant.Constants.ZH_CN; + /** * 字典工具类 * @@ -53,15 +56,16 @@ public class DictUtils * * @param dictType 字典类型 * @param dictValue 字典值 + * @param language 语言 * @return 字典标签 */ - public static String getDictLabel(String dictType, String dictValue) + public static String getDictLabel(String dictType, String dictValue, String language) { if (StringUtils.isEmpty(dictValue)) { return StringUtils.EMPTY; } - return getDictLabel(dictType, dictValue, SEPARATOR); + return getDictLabel(dictType, dictValue, SEPARATOR, language); } /** @@ -86,9 +90,10 @@ public class DictUtils * @param dictType 字典类型 * @param dictValue 字典值 * @param separator 分隔符 + * @param language 语言 * @return 字典标签 */ - public static String getDictLabel(String dictType, String dictValue, String separator) + public static String getDictLabel(String dictType, String dictValue, String separator, String language) { StringBuilder propertyString = new StringBuilder(); List datas = getDictCache(dictType); @@ -116,7 +121,13 @@ public class DictUtils { if (dictValue.equals(dict.getDictValue())) { - return dict.getDictLabel(); + if (ZH_CN.equals(language)) { + return dict.getDictLabel_zh_CN(); + } else if (EN_US.equals(language)) { + return dict.getDictLabel_en_US(); + } else { + return dict.getDictLabel(); + } } } } diff --git a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/SecurityUtils.java b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/SecurityUtils.java index 6a9a25cc..afa51a8d 100644 --- a/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/SecurityUtils.java +++ b/springboot/fastbee-common/src/main/java/com/fastbee/common/utils/SecurityUtils.java @@ -176,4 +176,23 @@ public class SecurityUtils .anyMatch(x -> Constants.SUPER_ADMIN.equals(x) || PatternMatchUtils.simpleMatch(x, role)); } + /** + * 获取语言 + * @return + */ + public static String getLanguage(){ + try + { + String language = getLoginUser().getLanguage(); + if (StringUtils.isEmpty(language)){ + return "en-US"; + } + return language; + } + catch (Exception e) + { + return "en-US"; + } + } + } diff --git a/springboot/fastbee-framework/pom.xml b/springboot/fastbee-framework/pom.xml index 6a9ecba0..b7a51802 100644 --- a/springboot/fastbee-framework/pom.xml +++ b/springboot/fastbee-framework/pom.xml @@ -70,6 +70,22 @@ ${dynamic-datasource.version} + + org.mapstruct + mapstruct + ${mapstruct.version} + + + org.mapstruct + mapstruct-jdk8 + ${mapstruct.version} + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + + diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/ResourcesConfig.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/ResourcesConfig.java index 1a1dfa6b..f15daee2 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/ResourcesConfig.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/ResourcesConfig.java @@ -1,6 +1,8 @@ package com.fastbee.framework.config; import java.util.concurrent.TimeUnit; + +import com.fastbee.framework.interceptor.LanguageInterceptor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -15,6 +17,8 @@ import com.fastbee.common.config.RuoYiConfig; import com.fastbee.common.constant.Constants; import com.fastbee.framework.interceptor.RepeatSubmitInterceptor; +import javax.annotation.Resource; + /** * 通用配置 * @@ -25,6 +29,8 @@ public class ResourcesConfig implements WebMvcConfigurer { @Autowired private RepeatSubmitInterceptor repeatSubmitInterceptor; + @Resource + private LanguageInterceptor languageInterceptor; @Override public void addResourceHandlers(ResourceHandlerRegistry registry) @@ -46,6 +52,9 @@ public class ResourcesConfig implements WebMvcConfigurer public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(repeatSubmitInterceptor).addPathPatterns("/**"); + //这里配置国际化拦截器的白名单 + registry.addInterceptor(languageInterceptor).addPathPatterns("/**").excludePathPatterns("/v2/api-docs", + "/tool/gen/**"); } /** diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/SecurityConfig.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/SecurityConfig.java index ed924f6b..1b0aa1ab 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/SecurityConfig.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/config/SecurityConfig.java @@ -119,6 +119,7 @@ public class SecurityConfig "/wechat/mobileLogin", "/wechat/miniLogin", "/wechat/wxBind/callback").permitAll() .antMatchers("/zlmhook/**").permitAll() .antMatchers("/goview/sys/login","/goview/project/getData").permitAll() + .antMatchers("/app/language/list").permitAll() // 静态资源,可匿名访问 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/druid/**").permitAll() diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/interceptor/LanguageInterceptor.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/interceptor/LanguageInterceptor.java new file mode 100644 index 00000000..9f05cd3a --- /dev/null +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/interceptor/LanguageInterceptor.java @@ -0,0 +1,58 @@ +package com.fastbee.framework.interceptor; + +import com.fastbee.common.enums.Language; +import com.fastbee.common.utils.SecurityUtils; +import com.fastbee.common.utils.StringUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.context.i18n.LocaleContextHolder; +import org.springframework.stereotype.Component; +import org.springframework.web.servlet.HandlerInterceptor; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Locale; + +import static com.fastbee.common.constant.Constants.LANGUAGE; + + +/** + * 国际化语言拦截器 + */ +@Component +@Slf4j +public class LanguageInterceptor implements HandlerInterceptor { + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + String language = request.getHeader(LANGUAGE); + if (StringUtils.isEmpty(language) || language.equals("undefined") + || language.equals("")|| language.equals("null")){ + //针对有些接口没有增加语言字段,先去token获取 + language = SecurityUtils.getLanguage(); + }else if (!language.contains("-")){ + language = Language.matches(language); + } + // 前端传递的language必须是zh-CN格式的,中间的-必须要完整,不能只传递zh或en + Locale locale = new Locale(language.split("-")[0],language.split("-")[1]); + // 这样赋值以后,MessageUtils.message方法就不用修改了 + LocaleContextHolder.setLocale(locale); + return true; + } + + /** + * 请求处理之后进行调用,但是在视图被渲染之前(Controller方法调用之后) + */ + @Override + public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) { + } + + /** + * 在整个请求结束之后被调用,也就是在DispatcherServlet 渲染了对应的视图之后执行(主要是用于进行资源清理工作) + */ + @Override + public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) { + } + + +} diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/SysLoginService.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/SysLoginService.java index 4a9a3405..2daa763a 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/SysLoginService.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/SysLoginService.java @@ -66,7 +66,7 @@ public class SysLoginService * @param uuid 唯一标识 * @return 结果 */ - public String login(String username, String password, String code, String uuid) + public String login(String username, String password, String code, String uuid, String language) { // 验证码校验 validateCaptcha(username, code, uuid); @@ -100,6 +100,7 @@ public class SysLoginService } AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"))); LoginUser loginUser = (LoginUser) authentication.getPrincipal(); + loginUser.setLanguage(language); recordLoginInfo(loginUser.getUserId()); // 生成token return tokenService.createToken(loginUser); @@ -111,7 +112,7 @@ public class SysLoginService * @param password 密码 * @return token */ - public String socialLogin(String username, String password){ + public String socialLogin(String username, String password, String language){ // 用户验证 Authentication authentication = null; try @@ -136,6 +137,7 @@ public class SysLoginService AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"))); LoginUser loginUser = (LoginUser) authentication.getPrincipal(); recordLoginInfo(loginUser.getUserId()); + loginUser.setLanguage(language); // 生成token return tokenService.createToken(loginUser); } @@ -146,7 +148,7 @@ public class SysLoginService * @param encodePwd 系统用户密码 * @return */ - public String redirectLogin(String username,String encodePwd){ + public String redirectLogin(String username,String encodePwd,String language){ // UserDetails userDetails=userDetailsServiceImpl.loadUserByUsername(username); SysUser user = userService.selectUserByUserName(username); if (StringUtils.isNull(user)) @@ -167,6 +169,8 @@ public class SysLoginService UserDetails userDetails = userDetailsServiceImpl.createLoginUser(user); LoginUser loginUser = (LoginUser) userDetails; recordLoginInfo(loginUser.getUserId()); + loginUser.setLanguage(language); + // 生成token return tokenService.createToken(loginUser); diff --git a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/UserDetailsServiceImpl.java b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/UserDetailsServiceImpl.java index 7a5fe886..f702cbab 100644 --- a/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/UserDetailsServiceImpl.java +++ b/springboot/fastbee-framework/src/main/java/com/fastbee/framework/web/service/UserDetailsServiceImpl.java @@ -61,6 +61,6 @@ public class UserDetailsServiceImpl implements UserDetailsService public UserDetails createLoginUser(SysUser user) { - return new LoginUser(user.getUserId(), user.getDeptId(), user, permissionService.getMenuPermission(user)); + return new LoginUser(user.getUserId(), user.getDeptId(), user.getLanguage(), user, permissionService.getMenuPermission(user)); } } diff --git a/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/ruleEngine/SceneContext.java b/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/ruleEngine/SceneContext.java index 6f69a7ad..7a3061c5 100644 --- a/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/ruleEngine/SceneContext.java +++ b/springboot/fastbee-gateway/fastbee-mq/src/main/java/com/fastbee/mq/ruleEngine/SceneContext.java @@ -355,7 +355,7 @@ public class SceneContext { for (SceneThingsModelItem sceneThingsModelItem : sceneThingsModelItems) { // 查询设备信息 Device device = deviceService.selectDeviceBySerialNumber(sceneThingsModelItem.getDeviceNumber()); - Optional.ofNullable(device).orElseThrow(() -> new ServiceException("告警推送,设备不存在" + "[{" + sceneThingsModelItem.getDeviceNumber() + "}]")); + Optional.ofNullable(device).orElseThrow(() -> new ServiceException(MessageUtils.message("alert.push.fail.device.not.exist", sceneThingsModelItem.getDeviceNumber()))); // 获取场景相关的告警参数,告警必须要是启动状态 List sceneSendVOList = alertService.listByAlertIds(sceneId); if (CollectionUtils.isEmpty(sceneSendVOList)) { diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/AuthResourceController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/AuthResourceController.java index 58ead906..213bb739 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/AuthResourceController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/AuthResourceController.java @@ -1,6 +1,7 @@ package com.fastbee.data.controller; import com.fastbee.common.core.controller.BaseController; +import com.fastbee.common.utils.MessageUtils; import org.springframework.web.bind.annotation.*; /** @@ -18,7 +19,7 @@ public class AuthResourceController extends BaseController */ @GetMapping("/product") public String findAll() { - return "查询产品列表成功!"; + return MessageUtils.message("auth.resource.product.query.success"); } diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceController.java index 8c30c6a9..5fa8404d 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceController.java @@ -6,6 +6,7 @@ import com.fastbee.common.core.controller.BaseController; import com.fastbee.common.core.domain.AjaxResult; import com.fastbee.common.core.page.TableDataInfo; import com.fastbee.common.enums.BusinessType; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.StringUtils; import com.fastbee.common.utils.poi.ExcelUtil; import com.fastbee.iot.domain.Device; @@ -199,10 +200,10 @@ public class DeviceController extends BaseController public AjaxResult relateUser(@RequestBody DeviceRelateUserInput deviceRelateUserInput) { if(deviceRelateUserInput.getUserId()==0 || deviceRelateUserInput.getUserId()==null){ - return AjaxResult.error("用户ID不能为空"); + return AjaxResult.error(MessageUtils.message("device.user.id.null")); } if(deviceRelateUserInput.getDeviceNumberAndProductIds()==null || deviceRelateUserInput.getDeviceNumberAndProductIds().size()==0){ - return AjaxResult.error("设备编号和产品ID不能为空"); + return AjaxResult.error(MessageUtils.message("device.product.id.null")); } return deviceService.deviceRelateUser(deviceRelateUserInput); } diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceJobController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceJobController.java index b1360538..17f181f8 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceJobController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceJobController.java @@ -6,6 +6,8 @@ import com.fastbee.common.core.domain.AjaxResult; import com.fastbee.common.core.page.TableDataInfo; import com.fastbee.common.enums.BusinessType; import com.fastbee.common.exception.job.TaskException; +import com.fastbee.common.utils.MessageUtils; +import com.fastbee.common.utils.StringUtils; import com.fastbee.common.utils.poi.ExcelUtil; import com.fastbee.iot.domain.DeviceJob; import com.fastbee.iot.service.IDeviceJobService; @@ -82,7 +84,7 @@ public class DeviceJobController extends BaseController { if (!CronUtils.isValid(job.getCronExpression())) { - return error("新增任务'" + job.getJobName() + "'失败,Cron表达式不正确"); + return error(StringUtils.format(MessageUtils.message("job.add.failed.cron.not.valid"), job.getJobName())); } job.setCreateBy(getUsername()); return toAjax(jobService.insertJob(job)); @@ -99,7 +101,7 @@ public class DeviceJobController extends BaseController { if (!CronUtils.isValid(job.getCronExpression())) { - return error("修改任务'" + job.getJobName() + "'失败,Cron表达式不正确"); + return error(StringUtils.format(MessageUtils.message("job.add.failed.product.not.modbus.config"), job.getJobName())); } job.setUpdateBy(getUsername()); return toAjax(jobService.updateJob(job)); diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceUserController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceUserController.java index c183b25f..96108ac1 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceUserController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/DeviceUserController.java @@ -2,6 +2,7 @@ package com.fastbee.data.controller; import java.util.List; +import com.fastbee.common.utils.MessageUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; @@ -128,7 +129,7 @@ public class DeviceUserController extends BaseController { int count=deviceUserService.deleteDeviceUser(deviceUser); if(count==0){ - return AjaxResult.error("设备所有者不能删除"); + return AjaxResult.error(MessageUtils.message("device.user.delete.failed.user.not.valid")); }else{ return AjaxResult.success(); } diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SocialLoginController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SocialLoginController.java index f54f2f95..85b6ab7c 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SocialLoginController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/SocialLoginController.java @@ -15,6 +15,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import static com.fastbee.common.constant.Constants.LANGUAGE; + /** * 第三方登录接口Controller * @@ -69,9 +71,9 @@ public class SocialLoginController { @GetMapping("/login/{loginId}") @ApiOperation("跳转登录api") @ApiImplicitParam(name = "loginId", value = "登录Id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class) - public AjaxResult socialLogin(@PathVariable String loginId) { + public AjaxResult socialLogin(HttpServletRequest request, @PathVariable String loginId) { // 生成授权页面 - return iSocialLoginService.socialLogin(loginId); + return iSocialLoginService.socialLogin(loginId, request.getHeader(LANGUAGE)); } /** @@ -82,8 +84,8 @@ public class SocialLoginController { */ @ApiOperation("绑定登录方法") @PostMapping("/bind/login") - public AjaxResult bindLogin(@RequestBody BindLoginBody bindLoginBody) { - return iSocialLoginService.bindLogin(bindLoginBody); + public AjaxResult bindLogin(HttpServletRequest request, @RequestBody BindLoginBody bindLoginBody) { + return iSocialLoginService.bindLogin(bindLoginBody, request.getHeader(LANGUAGE)); } /** @@ -94,8 +96,8 @@ public class SocialLoginController { */ @ApiOperation("注册绑定") @PostMapping("/bind/register") - public AjaxResult bindRegister(@RequestBody BindRegisterBody bindRegisterBody) { - return iSocialLoginService.bindRegister(bindRegisterBody); + public AjaxResult bindRegister(HttpServletRequest request, @RequestBody BindRegisterBody bindRegisterBody) { + return iSocialLoginService.bindRegister(bindRegisterBody, request.getHeader(LANGUAGE)); } } diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ThingsModelController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ThingsModelController.java index 7f2b6eaa..bab5049f 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ThingsModelController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ThingsModelController.java @@ -5,6 +5,7 @@ import com.fastbee.common.core.controller.BaseController; import com.fastbee.common.core.domain.AjaxResult; import com.fastbee.common.core.page.TableDataInfo; import com.fastbee.common.enums.BusinessType; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.StringUtils; import com.fastbee.common.utils.poi.ExcelUtil; import com.fastbee.iot.domain.ThingsModel; @@ -86,7 +87,7 @@ public class ThingsModelController extends BaseController if(result==1){ return AjaxResult.success(); }else if(result==2){ - return AjaxResult.error("产品下的标识符不能重复"); + return AjaxResult.error(MessageUtils.message("things.model.identifier.repeat")); }else{ return AjaxResult.error(); } @@ -98,9 +99,9 @@ public class ThingsModelController extends BaseController public AjaxResult ImportByTemplateIds(@RequestBody ImportThingsModelInput input){ int repeatCount=thingsModelService.importByTemplateIds(input); if(repeatCount==0){ - return AjaxResult.success("数据导入成功"); + return AjaxResult.success(MessageUtils.message("import.success")); }else{ - return AjaxResult.success(repeatCount+"条数据未导入,标识符重复"); + return AjaxResult.success(StringUtils.format(MessageUtils.message("things.model.import.failed.identifier.repeat"), repeatCount)); } } @@ -117,7 +118,7 @@ public class ThingsModelController extends BaseController if(result==1){ return AjaxResult.success(); }else if(result==2){ - return AjaxResult.error("产品下的标识符不能重复"); + return AjaxResult.error(MessageUtils.message("things.model.identifier.repeat")); }else{ return AjaxResult.error(); } @@ -143,7 +144,7 @@ public class ThingsModelController extends BaseController @ApiOperation("获取缓存的JSON物模型") public AjaxResult getCacheThingsModelByProductId(@PathVariable("productId") Long productId) { - return AjaxResult.success("操作成功",thingsModelService.getCacheThingsModelByProductId(productId)); + return AjaxResult.success(MessageUtils.message("operate.success"),thingsModelService.getCacheThingsModelByProductId(productId)); } @ApiOperation(value = "物模型导入模板") diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ToolController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ToolController.java index 52a79329..2639a495 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ToolController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/ToolController.java @@ -12,6 +12,7 @@ import com.fastbee.common.core.iot.response.DeCodeBo; import com.fastbee.common.core.page.TableDataInfo; import com.fastbee.common.enums.BusinessType; import com.fastbee.common.exception.file.FileNameLengthLimitExceededException; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.StringUtils; import com.fastbee.common.utils.file.FileUploadUtils; import com.fastbee.common.utils.file.FileUtils; @@ -71,13 +72,13 @@ import static com.fastbee.common.utils.file.FileUploadUtils.getExtension; public class ToolController extends BaseController { private static final Logger log = LoggerFactory.getLogger(ToolController.class); - @Autowired + @Resource private IDeviceService deviceService; - @Autowired + @Resource private IMqttMessagePublish messagePublish; - @Autowired + @Resource private MqttClientConfig mqttConfig; - @Autowired + @Resource private IToolService toolService; // 令牌秘钥 @Value("${token.secret}") @@ -119,7 +120,7 @@ public class ToolController extends BaseController { log.info("-----------服务端mqtt认证成功,clientId:" + clientid + "---------------"); return ResponseEntity.ok().body("ok"); } else { - return toolService.returnUnauthorized(new MqttAuthenticationModel(clientid, username, password), "mqtt账号和密码与认证服务器配置不匹配"); + return toolService.returnUnauthorized(new MqttAuthenticationModel(clientid, username, password), MessageUtils.message("mqtt.unauthorized")); } } else if (clientid.startsWith("web") || clientid.startsWith("phone")) { // web端和移动端认证:token认证 diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/translate/AppLanguageController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/translate/AppLanguageController.java new file mode 100644 index 00000000..f50a7fe2 --- /dev/null +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/translate/AppLanguageController.java @@ -0,0 +1,97 @@ +package com.fastbee.data.controller.translate; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fastbee.common.core.domain.CommonResult; +import com.fastbee.common.core.page.TableDataInfo; +import com.fastbee.common.core.controller.BaseController; +import com.fastbee.common.utils.poi.ExcelUtil; +import com.fastbee.system.domain.AppLanguage; +import com.fastbee.system.domain.vo.AppLanguageVO; +import com.fastbee.system.service.IAppLanguageService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; + + +/** + * app语言Controller + */ +@RestController +@RequestMapping("/app/language") +@Api(tags = "APP语言") +public class AppLanguageController extends BaseController +{ + @Resource + private IAppLanguageService appLanguageService; + + /** + * 查询app语言列表 + */ + //@PreAuthorize("@ss.hasPermi('app:language:list')") + @GetMapping("/list") + @ApiOperation("查询app语言列表") + public TableDataInfo list(AppLanguage appLanguage) + { + Page voPage = appLanguageService.pageAppLanguageVO(appLanguage); + return getDataTable(voPage.getRecords(), voPage.getTotal()); + } + + /** + * 导出app语言列表 + */ + @PreAuthorize("@ss.hasPermi('app:language:export')") + @PostMapping("/export") + public void export(HttpServletResponse response, AppLanguage appLanguage) + { + Page voPage = appLanguageService.pageAppLanguageVO(appLanguage); + ExcelUtil util = new ExcelUtil(AppLanguageVO.class); + util.exportExcel(response, voPage.getRecords(), "app语言数据"); + } + + /** + * 获取app语言详细信息 + */ + //@PreAuthorize("@ss.hasPermi('app:language:query')") + @GetMapping(value = "/{id}") + @ApiOperation("获取app语言详细信息") + public CommonResult getInfo(@PathVariable("id") Long id) + { + return CommonResult.success(appLanguageService.selectAppLanguageById(id)); + } + + /** + * 新增app语言 + */ + @PreAuthorize("@ss.hasPermi('app:language:add')") + @PostMapping + public CommonResult add(@RequestBody AppLanguage appLanguage) + { + appLanguage.setCreateBy(getUsername()); + return CommonResult.success(appLanguageService.insertAppLanguage(appLanguage)); + } + + /** + * 修改app语言 + */ + @PreAuthorize("@ss.hasPermi('app:language:edit')") + @PutMapping + public CommonResult edit(@RequestBody AppLanguage appLanguage) + { + return CommonResult.success(appLanguageService.updateAppLanguage(appLanguage)); + } + + /** + * 删除app语言 + */ + @PreAuthorize("@ss.hasPermi('app:language:remove')") + @DeleteMapping("/{ids}") + public CommonResult remove(@PathVariable Long[] ids) + { + return CommonResult.success(appLanguageService.deleteAppLanguageByIds(ids)); + } +} diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/translate/AppPreferencesController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/translate/AppPreferencesController.java new file mode 100644 index 00000000..4b169b53 --- /dev/null +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/translate/AppPreferencesController.java @@ -0,0 +1,107 @@ +package com.fastbee.data.controller.translate; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fastbee.common.core.domain.CommonResult; +import com.fastbee.common.core.domain.model.LoginUser; +import com.fastbee.common.core.page.TableDataInfo; +import com.fastbee.common.core.controller.BaseController; +import com.fastbee.common.utils.SecurityUtils; +import com.fastbee.common.utils.poi.ExcelUtil; +import com.fastbee.framework.web.service.TokenService; +import com.fastbee.system.domain.AppPreferences; +import com.fastbee.system.domain.vo.AppPreferencesVO; +import com.fastbee.system.service.IAppPreferencesService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; + + +/** + * APP用户偏好设置Controller + + */ +@RestController +@RequestMapping("/app/preferences") +@Api(tags = "APP用户偏好设置") +public class AppPreferencesController extends BaseController +{ + @Resource + private IAppPreferencesService appPreferencesService; + + @Resource + private TokenService tokenService; + + /** + * 查询APP用户偏好设置列表 + */ + @PreAuthorize("@ss.hasPermi('iot:preferences:list')") + @GetMapping("/list") + public TableDataInfo list(AppPreferences appPreferences) + { + Page voPage = appPreferencesService.pageAppPreferencesVO(appPreferences); + return getDataTable(voPage.getRecords(), voPage.getTotal()); + } + + /** + * 导出APP用户偏好设置列表 + */ + @PreAuthorize("@ss.hasPermi('iot:preferences:export')") + @PostMapping("/export") + public void export(HttpServletResponse response, AppPreferences appPreferences) + { + Page voPage = appPreferencesService.pageAppPreferencesVO(appPreferences); + ExcelUtil util = new ExcelUtil(AppPreferencesVO.class); + util.exportExcel(response, voPage.getRecords(), "APP用户偏好设置数据"); + } + + /** + * 获取APP用户偏好设置详细信息 + */ + @PreAuthorize("@ss.hasPermi('iot:preferences:query')") + @GetMapping(value = "/{userId}") + public CommonResult getInfo(@PathVariable("userId") Long userId) + { + if (userId == null) { + userId = SecurityUtils.getUserId(); + } + return CommonResult.success(appPreferencesService.selectAppPreferencesByUserId(userId)); + } + + /** + * 新增APP用户偏好设置 + */ + //@PreAuthorize("@ss.hasPermi('iot:preferences:add')") + @PostMapping("/addOrUpdate") + @ApiOperation("新增或者更新APP用户偏好设置") + public CommonResult add(@RequestBody AppPreferences appPreferences) + { + LoginUser loginUser = getLoginUser(); + loginUser.setLanguage(appPreferences.getLanguage()); + tokenService.setLoginUser(loginUser); + return CommonResult.success(appPreferencesService.addOrUpdate(appPreferences)); + } + + /** + * 修改APP用户偏好设置 + */ + @PreAuthorize("@ss.hasPermi('iot:preferences:edit')") + @PutMapping + public CommonResult edit(@RequestBody AppPreferences appPreferences) + { + return CommonResult.success(appPreferencesService.updateAppPreferences(appPreferences)); + } + + /** + * 删除APP用户偏好设置 + */ + @PreAuthorize("@ss.hasPermi('iot:preferences:remove')") + @DeleteMapping("/{userIds}") + public CommonResult remove(@PathVariable Long[] userIds) + { + return CommonResult.success(appPreferencesService.deleteAppPreferencesByUserIds(userIds)); + } +} diff --git a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/wechat/WeChatController.java b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/wechat/WeChatController.java index 01d68fa0..4ac8518f 100644 --- a/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/wechat/WeChatController.java +++ b/springboot/fastbee-open-api/src/main/java/com/fastbee/data/controller/wechat/WeChatController.java @@ -2,6 +2,7 @@ package com.fastbee.data.controller.wechat; import com.fastbee.common.core.domain.AjaxResult; import com.fastbee.common.exception.ServiceException; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.StringUtils; import com.fastbee.common.wechat.WeChatLoginBody; import com.fastbee.common.wechat.WeChatLoginResult; @@ -21,6 +22,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import static com.fastbee.common.constant.Constants.LANGUAGE; + /** * 微信相关控制器 * @author fastb @@ -41,8 +44,8 @@ public class WeChatController { */ @ApiOperation("移动应用微信登录") @PostMapping("/mobileLogin") - public AjaxResult mobileLogin(@RequestBody WeChatLoginBody weChatLoginBody) { - return AjaxResult.success(weChatService.mobileLogin(weChatLoginBody)); + public AjaxResult mobileLogin(HttpServletRequest request, @RequestBody WeChatLoginBody weChatLoginBody) { + return AjaxResult.success(weChatService.mobileLogin(weChatLoginBody, request.getHeader(LANGUAGE))); } /** @@ -52,8 +55,8 @@ public class WeChatController { */ @ApiOperation("小程序微信登录") @PostMapping("/miniLogin") - public AjaxResult miniLogin(@RequestBody WeChatLoginBody weChatLoginBody) { - WeChatLoginResult weChatLoginResult = weChatService.miniLogin(weChatLoginBody); + public AjaxResult miniLogin(HttpServletRequest request, @RequestBody WeChatLoginBody weChatLoginBody) { + WeChatLoginResult weChatLoginResult = weChatService.miniLogin(weChatLoginBody, request.getHeader(LANGUAGE)); return AjaxResult.success(weChatLoginResult); } @@ -66,7 +69,7 @@ public class WeChatController { @PostMapping("/bind") public AjaxResult bind(@RequestBody WxBindReqVO wxBindReqVO) { if (StringUtils.isEmpty(wxBindReqVO.getSourceClient())) { - throw new ServiceException("请传入验证方式"); + throw new ServiceException(MessageUtils.message("wechat.verify.type.null")); } return weChatService.bind(wxBindReqVO); } @@ -80,7 +83,7 @@ public class WeChatController { @PostMapping("/cancelBind") public AjaxResult cancelBind(@RequestBody WxCancelBindReqVO wxCancelBindReqVO) { if (wxCancelBindReqVO.getVerifyType() == null) { - throw new ServiceException("请传入验证方式"); + throw new ServiceException(MessageUtils.message("wechat.verify.type.null")); } return weChatService.cancelBind(wxCancelBindReqVO); } @@ -119,7 +122,7 @@ public class WeChatController { @GetMapping("/getWxBindMsg") public AjaxResult getWxBindMsg(String wxBindMsgId) { if (StringUtils.isEmpty(wxBindMsgId)) { - return AjaxResult.error("请传入wxBindMsgId"); + return AjaxResult.error(MessageUtils.message("wechat.bind.message.id.null")); } // 返回二维码信息 return weChatService.getWxBindMsg(wxBindMsgId); diff --git a/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/service/GenTableServiceImpl.java b/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/service/GenTableServiceImpl.java index 56d70c03..55b3ab27 100644 --- a/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/service/GenTableServiceImpl.java +++ b/springboot/fastbee-plugs/fastbee-generator/src/main/java/com/fastbee/generator/service/GenTableServiceImpl.java @@ -392,7 +392,7 @@ public class GenTableServiceImpl implements IGenTableService } catch (IOException e) { - throw new ServiceException("渲染模板失败,表名:" + table.getTableName()); + throw new ServiceException(MessageUtils.message("genTable.template.rendering.fail", table.getTableName())); } } } @@ -414,7 +414,7 @@ public class GenTableServiceImpl implements IGenTableService List dbTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName); if (StringUtils.isEmpty(dbTableColumns)) { - throw new ServiceException("同步数据失败,原表结构不存在"); + throw new ServiceException(MessageUtils.message("genTable.data.sync.fail.original.table.not.exist")); } List dbTableColumnNames = dbTableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList()); @@ -526,25 +526,25 @@ public class GenTableServiceImpl implements IGenTableService JSONObject paramsObj = JSON.parseObject(options); if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_CODE))) { - throw new ServiceException("树编码字段不能为空"); + throw new ServiceException(MessageUtils.message("genTable.tree.code.field.cannot.empty")); } else if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_PARENT_CODE))) { - throw new ServiceException("树父编码字段不能为空"); + throw new ServiceException(MessageUtils.message("genTable.tree.parent.code.field.cannot.empty")); } else if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_NAME))) { - throw new ServiceException("树名称字段不能为空"); + throw new ServiceException(MessageUtils.message("genTable.tree.name.field.cannot.empty")); } else if (GenConstants.TPL_SUB.equals(genTable.getTplCategory())) { if (StringUtils.isEmpty(genTable.getSubTableName())) { - throw new ServiceException("关联子表的表名不能为空"); + throw new ServiceException(MessageUtils.message("genTable.relate.child.table.name.cannot.empty")); } else if (StringUtils.isEmpty(genTable.getSubTableFkName())) { - throw new ServiceException("子表关联的外键名不能为空"); + throw new ServiceException(MessageUtils.message("genTable.child.table.relate.foreign.key.name.cannot.empty")); } } } diff --git a/springboot/fastbee-plugs/fastbee-mqtt-client/src/main/java/com/fastbee/mqttclient/PubMqttClient.java b/springboot/fastbee-plugs/fastbee-mqtt-client/src/main/java/com/fastbee/mqttclient/PubMqttClient.java index 54b99816..2baf2cb5 100644 --- a/springboot/fastbee-plugs/fastbee-mqtt-client/src/main/java/com/fastbee/mqttclient/PubMqttClient.java +++ b/springboot/fastbee-plugs/fastbee-mqtt-client/src/main/java/com/fastbee/mqttclient/PubMqttClient.java @@ -3,6 +3,7 @@ package com.fastbee.mqttclient; import com.fastbee.common.constant.FastBeeConstant; import com.fastbee.common.core.redis.RedisCache; import com.fastbee.common.exception.ServiceException; +import com.fastbee.common.utils.MessageUtils; import lombok.Setter; import lombok.extern.slf4j.Slf4j; import org.eclipse.paho.client.mqttv3.*; @@ -120,7 +121,7 @@ public class PubMqttClient { token.waitForCompletion(); } catch (MqttException e) { log.error("=>断开mqtt连接发生错误 message={}", e.getMessage()); - throw new ServiceException("断开mqtt连接发生错误" + e.getMessage()); + throw new ServiceException(MessageUtils.message("mqtt.disconnect.occur.fail", e.getMessage())); } } client = null; diff --git a/springboot/fastbee-protocol/fastbee-protocol-collect/src/main/java/com/fastbee/common/ProtocolDeCodeService.java b/springboot/fastbee-protocol/fastbee-protocol-collect/src/main/java/com/fastbee/common/ProtocolDeCodeService.java index 962b615a..ffa6155e 100644 --- a/springboot/fastbee-protocol/fastbee-protocol-collect/src/main/java/com/fastbee/common/ProtocolDeCodeService.java +++ b/springboot/fastbee-protocol/fastbee-protocol-collect/src/main/java/com/fastbee/common/ProtocolDeCodeService.java @@ -2,6 +2,7 @@ package com.fastbee.common; import com.fastbee.common.core.iot.response.DeCodeBo; import com.fastbee.common.exception.ServiceException; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.gateway.CRC16Utils; import io.netty.buffer.ByteBufUtil; import lombok.extern.slf4j.Slf4j; @@ -21,7 +22,7 @@ public class ProtocolDeCodeService { public String protocolDeCode(DeCodeBo bo) { if (null == bo) { - throw new ServiceException("输入内容为空"); + throw new ServiceException(MessageUtils.message("protocol.input.content.is.empty")); } String payload = bo.getPayload(); /*1-解析 2-读指令 3-写指令 4-CRC生成 5-CRC校验*/ diff --git a/springboot/fastbee-protocol/fastbee-protocol-collect/src/main/java/com/fastbee/json/JsonProtocolService.java b/springboot/fastbee-protocol/fastbee-protocol-collect/src/main/java/com/fastbee/json/JsonProtocolService.java index 758c2f25..76cd5501 100644 --- a/springboot/fastbee-protocol/fastbee-protocol-collect/src/main/java/com/fastbee/json/JsonProtocolService.java +++ b/springboot/fastbee-protocol/fastbee-protocol-collect/src/main/java/com/fastbee/json/JsonProtocolService.java @@ -10,6 +10,7 @@ import com.fastbee.common.core.thingsModel.ThingsModelSimpleItem; import com.fastbee.common.core.thingsModel.ThingsModelValuesInput; import com.fastbee.common.exception.ServiceException; import com.fastbee.common.utils.DateUtils; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.iot.model.ThingsModels.ValueItem; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -45,7 +46,7 @@ public class JsonProtocolService { reportMessage.setSerialNumber(clientId); return reportMessage; }catch (Exception e){ - throw new ServiceException("数据解析异常"+e.getMessage()); + throw new ServiceException(MessageUtils.message("protocol.data.parse.exception", e)); } } diff --git a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/DeviceReportMessageServiceImpl.java b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/DeviceReportMessageServiceImpl.java index 1d7fe0bc..be132219 100644 --- a/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/DeviceReportMessageServiceImpl.java +++ b/springboot/fastbee-server/mqtt-broker/src/main/java/com/fastbee/mqtt/service/impl/DeviceReportMessageServiceImpl.java @@ -7,6 +7,7 @@ import com.fastbee.common.enums.ServerType; import com.fastbee.common.enums.ThingsModelType; import com.fastbee.common.enums.TopicType; import com.fastbee.common.exception.ServiceException; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.gateway.mq.TopicsUtils; import com.fastbee.iot.domain.Device; import com.fastbee.iot.service.IDeviceService; @@ -81,7 +82,7 @@ public class DeviceReportMessageServiceImpl implements IDeviceReportMessageServi public Device buildReport(DeviceReportBo bo) { String serialNumber = topicsUtils.parseSerialNumber(bo.getTopicName()); Device device = deviceService.selectDeviceBySerialNumber(serialNumber); - Optional.ofNullable(device).orElseThrow(() -> new ServiceException("设备不存在")); + Optional.ofNullable(device).orElseThrow(() -> new ServiceException(MessageUtils.message("device.not.exist"))); //设置物模型 String thingsModel = topicsUtils.getThingsModel(bo.getTopicName()); ThingsModelType thingsModelType = ThingsModelType.getType(thingsModel); diff --git a/springboot/fastbee-server/sip-server/src/main/java/com/fastbee/sip/service/impl/MediaServerServiceImpl.java b/springboot/fastbee-server/sip-server/src/main/java/com/fastbee/sip/service/impl/MediaServerServiceImpl.java index b3af23e6..eb34edbc 100644 --- a/springboot/fastbee-server/sip-server/src/main/java/com/fastbee/sip/service/impl/MediaServerServiceImpl.java +++ b/springboot/fastbee-server/sip-server/src/main/java/com/fastbee/sip/service/impl/MediaServerServiceImpl.java @@ -5,6 +5,7 @@ import com.fastbee.common.core.domain.entity.SysRole; import com.fastbee.common.core.domain.entity.SysUser; import com.fastbee.common.exception.ServiceException; import com.fastbee.common.utils.DateUtils; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.iot.domain.Device; import com.fastbee.iot.mapper.DeviceMapper; import com.fastbee.sip.domain.MediaServer; @@ -143,7 +144,7 @@ public class MediaServerServiceImpl implements IMediaServerService { // } // } if (null == user.getDeptId()) { - throw new ServiceException("只允许租户配置"); + throw new ServiceException(MessageUtils.message("only.allow.tenant.config")); } if (!isAdmin(user.getUserId())) { mediaServer.setIsSys(0); diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/ISocialLoginService.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/ISocialLoginService.java index 737b0321..e7675817 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/ISocialLoginService.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/ISocialLoginService.java @@ -59,7 +59,7 @@ public interface ISocialLoginService { * @param loginId 登录id * @return */ - AjaxResult socialLogin(String loginId); + AjaxResult socialLogin(String loginId, String language); /** * 绑定登录api @@ -67,7 +67,7 @@ public interface ISocialLoginService { * @param bindLoginBody 绑定账户参数 * @return */ - AjaxResult bindLogin(BindLoginBody bindLoginBody); + AjaxResult bindLogin(BindLoginBody bindLoginBody, String language); /** * 注册绑定api @@ -75,7 +75,7 @@ public interface ISocialLoginService { * @param bindRegisterBody * @return */ - AjaxResult bindRegister(BindRegisterBody bindRegisterBody); + AjaxResult bindRegister(BindRegisterBody bindRegisterBody, String language); String genBindId(AuthUser authUser); diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/CategoryServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/CategoryServiceImpl.java index cb5c8f09..180a94cd 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/CategoryServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/CategoryServiceImpl.java @@ -4,6 +4,7 @@ import com.fastbee.common.core.domain.AjaxResult; import com.fastbee.common.core.domain.entity.SysRole; import com.fastbee.common.core.domain.entity.SysUser; import com.fastbee.common.utils.DateUtils; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.iot.domain.Category; import com.fastbee.iot.mapper.CategoryMapper; import com.fastbee.iot.model.IdAndName; @@ -124,12 +125,12 @@ public class CategoryServiceImpl implements ICategoryService { int productCount=categoryMapper.productCountInCategorys(categoryIds); if(productCount>0){ - return AjaxResult.error("删除失败,请先删除对应分类下的产品"); + return AjaxResult.error(MessageUtils.message("delete.fail.please.delete.category.product")); } if(categoryMapper.deleteCategoryByCategoryIds(categoryIds)>0){ - return AjaxResult.success("删除成功"); + return AjaxResult.success(MessageUtils.message("delete.success")); } - return AjaxResult.error("删除失败"); + return AjaxResult.error(MessageUtils.message("delete.fail")); } /** diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceServiceImpl.java index 466918c3..d4eeb3c5 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/DeviceServiceImpl.java @@ -18,6 +18,7 @@ import com.fastbee.common.enums.DeviceStatus; import com.fastbee.common.enums.ThingsModelType; import com.fastbee.common.exception.ServiceException; import com.fastbee.common.utils.DateUtils; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.StringUtils; import com.fastbee.common.utils.http.HttpUtils; import com.fastbee.common.utils.ip.IpUtils; @@ -678,8 +679,7 @@ public class DeviceServiceImpl implements IDeviceService { // 设备编号唯一检查 Device existDevice = deviceMapper.selectDeviceBySerialNumber(device.getSerialNumber()); if (existDevice != null) { - log.error("设备编号:" + device.getSerialNumber() + "已经存在了,新增设备失败"); - throw new ServiceException("设备编号:" + device.getSerialNumber() + " 已经存在,新增失败"); + throw new ServiceException(MessageUtils.message("device.insert.fail.device.number.already.exist", device.getSerialNumber())); } SysUser sysUser = getLoginUser().getUser(); //添加设备 @@ -747,7 +747,7 @@ public class DeviceServiceImpl implements IDeviceService { Device existDevice = deviceMapper.selectDeviceBySerialNumber(deviceRelateUserInput.getDeviceNumberAndProductIds().get(i).getDeviceNumber()); if (existDevice != null) { if (existDevice.getUserId().longValue() == deviceRelateUserInput.getUserId().longValue()) { - return AjaxResult.error("用户已经拥有设备:" + existDevice.getDeviceName() + ", 设备编号:" + existDevice.getSerialNumber()); + return AjaxResult.error(MessageUtils.message("now.user.belong.device.can.not.repeat.share", existDevice.getSerialNumber())); } // 先删除设备的所有用户 deviceUserMapper.deleteDeviceUserByDeviceId(new UserIdDeviceIdModel(null, existDevice.getDeviceId())); @@ -774,11 +774,11 @@ public class DeviceServiceImpl implements IDeviceService { deviceRelateUserInput.getUserId(), deviceRelateUserInput.getDeviceNumberAndProductIds().get(i).getProductId()); if (result == 0) { - return AjaxResult.error("设备不存在,自动添加设备时失败,请检查产品编号是否正确"); + return AjaxResult.error(MessageUtils.message("device.not.exist.add.fail.please.check.product.id.is.correct")); } } } - return AjaxResult.success("添加设备成功"); + return AjaxResult.success(MessageUtils.message("device.add.success")); } /** @@ -1240,7 +1240,7 @@ public class DeviceServiceImpl implements IDeviceService { DeviceMqttConnectVO connectVO = new DeviceMqttConnectVO(); DeviceMqttVO deviceMqttVO = deviceMapper.selectMqttConnectData(deviceId); if (deviceMqttVO == null) { - throw new ServiceException("获取设备MQTT连接参数失败"); + throw new ServiceException(MessageUtils.message("device.get.mqtt.connection.param.fail")); } // 不管认证方式,目前就只返回简单认证方式 String password; @@ -1248,7 +1248,7 @@ public class DeviceServiceImpl implements IDeviceService { // 查询产品授权码 List productAuthorizeList = productAuthorizeService.listByProductId(deviceMqttVO.getProductId()); if (CollectionUtils.isEmpty(productAuthorizeList)) { - throw new ServiceException("产品已启用授权,获取设备授权码失败,请先配置授权码"); + throw new ServiceException(MessageUtils.message("device.get.authorization.fail.please.config")); } List collect = productAuthorizeList.stream().filter(p -> p.getProductId().equals(deviceMqttVO.getDeviceId())).collect(Collectors.toList()); ProductAuthorize productAuthorize = CollectionUtils.isEmpty(collect) ? productAuthorizeList.get(0) : collect.get(0); diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/NewsCategoryServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/NewsCategoryServiceImpl.java index a0fcc925..db317e79 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/NewsCategoryServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/NewsCategoryServiceImpl.java @@ -4,6 +4,7 @@ import java.util.List; import com.fastbee.common.core.domain.AjaxResult; import com.fastbee.common.utils.DateUtils; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.iot.model.IdAndName; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -95,12 +96,12 @@ public class NewsCategoryServiceImpl implements INewsCategoryService { int productCount=newsCategoryMapper.newsCountInCategorys(categoryIds); if(productCount>0){ - return AjaxResult.error("删除失败,请先删除对应分类下的新闻资讯"); + return AjaxResult.error(MessageUtils.message("newsCategory.delete.fail.please.delete.category.info")); } if(newsCategoryMapper.deleteNewsCategoryByCategoryIds(categoryIds)>0){ - return AjaxResult.success("删除成功"); + return AjaxResult.success(MessageUtils.message("delete.success")); } - return AjaxResult.error("删除失败"); + return AjaxResult.error(MessageUtils.message("delete.fail")); } /** diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ProductServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ProductServiceImpl.java index 7747edea..102f67bd 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ProductServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ProductServiceImpl.java @@ -6,6 +6,7 @@ import com.fastbee.common.core.domain.entity.SysUser; import com.fastbee.common.core.redis.RedisCache; import com.fastbee.common.core.redis.RedisKeyBuilder; import com.fastbee.common.utils.DateUtils; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.iot.domain.Product; import com.fastbee.iot.domain.ThingsModelTemplate; import com.fastbee.iot.mapper.DeviceMapper; @@ -196,7 +197,7 @@ public class ProductServiceImpl implements IProductService public AjaxResult changeProductStatus(ChangeProductStatusModel model) { if(model.getStatus()!=1 && model.getStatus()!=2){ - return AjaxResult.error("状态更新失败,状态值有误"); + return AjaxResult.error(MessageUtils.message("product.status.update.fail.value.fail")); } if(model.getStatus()==2){ // 产品下必须包含物模型 @@ -214,9 +215,9 @@ public class ProductServiceImpl implements IProductService //} } if(productMapper.changeProductStatus(model)>0){ - return AjaxResult.success("操作成功"); + return AjaxResult.success(MessageUtils.message("operate.success")); } - return AjaxResult.error("状态更新失败"); + return AjaxResult.error(MessageUtils.message("product.status.update.fail")); } /*** @@ -250,7 +251,7 @@ public class ProductServiceImpl implements IProductService // 产品下不能有设备 int deviceCount=productMapper.deviceCountInProducts(productIds); if(deviceCount>0){ - return AjaxResult.error("删除失败,请先删除对应产品下的设备"); + return AjaxResult.error(MessageUtils.message("delete.fail.please.delete.product.device")); } // 删除产品物模型 productMapper.deleteProductThingsModelByProductIds(productIds); @@ -258,9 +259,9 @@ public class ProductServiceImpl implements IProductService productAuthorizeMapper.deleteProductAuthorizeByProductIds(productIds); // 删除产品 if(productMapper.deleteProductByProductIds(productIds)>0){ - return AjaxResult.success("删除成功"); + return AjaxResult.success(MessageUtils.message("delete.success")); } - return AjaxResult.error("删除失败"); + return AjaxResult.error(MessageUtils.message("delete.fail")); } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/SocialLoginServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/SocialLoginServiceImpl.java index 3d65743f..4ace6545 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/SocialLoginServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/SocialLoginServiceImpl.java @@ -10,6 +10,7 @@ import com.fastbee.common.core.domain.model.LoginUser; import com.fastbee.common.core.redis.RedisCache; import com.fastbee.common.exception.ServiceException; import com.fastbee.common.utils.DateUtils; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.SecurityUtils; import com.fastbee.common.utils.StringUtils; import com.fastbee.common.utils.sign.Md5Utils; @@ -220,13 +221,13 @@ public class SocialLoginServiceImpl implements ISocialLoginService { } @Override - public AjaxResult socialLogin(String loginId) { + public AjaxResult socialLogin(String loginId, String language) { AjaxResult ajax = AjaxResult.success(); String loginKey = LOGIN_SOCIAL_REDIS_KEY + loginId; LoginIdValue loginIdValue = redisCache.getCacheObject(loginKey); if (loginIdValue != null) { //login - String token = sysLoginService.redirectLogin(loginIdValue.getUsername(), loginIdValue.getPassword()); + String token = sysLoginService.redirectLogin(loginIdValue.getUsername(), loginIdValue.getPassword(), language); ajax.put(Constants.TOKEN, token); } else { log.info("loginId:{} ", loginId); @@ -236,7 +237,7 @@ public class SocialLoginServiceImpl implements ISocialLoginService { } @Override - public AjaxResult bindLogin(BindLoginBody bindLoginBody) { + public AjaxResult bindLogin(BindLoginBody bindLoginBody, String language) { BindIdValue bindValue = redisCache.getCacheObject(BIND_REDIS_KEY + bindLoginBody.getBindId()); SocialUser socialUser = findSocialUser(bindValue.getUuid(), bindValue.getSource()); AjaxResult checkAjax = checkSocialUser(socialUser, bindLoginBody.getBindId()); @@ -248,19 +249,19 @@ public class SocialLoginServiceImpl implements ISocialLoginService { SysUser sysUser = iSysUserService.selectUserByUserName(bindLoginBody.getUsername()); if (sysUser == null) { // 单独返回code用户不存在,给前端处理 - return AjaxResult.error(HttpStatus.USER_NO_EXIST, "用户不存在"); + return AjaxResult.error(HttpStatus.USER_NO_EXIST, MessageUtils.message("socialLogin.user.not.exist")); } // 自定义一下密码错误的提示 if(!SecurityUtils.matchesPassword(bindLoginBody.getPassword(), sysUser.getPassword())){ - throw new ServiceException("密码错误"); + throw new ServiceException(MessageUtils.message("password.fail")); } List socialUserList = iSocialUserService.selectBySysUserId(sysUser.getUserId()); if (CollectionUtils.isNotEmpty(socialUserList)) { - throw new ServiceException("该账号已经绑定其他微信,请先解绑后重试!"); + throw new ServiceException(MessageUtils.message("socialLogin.account.already.bind.other.wechat.please.unbind")); } // 生成令牌 String token = sysLoginService.login(bindLoginBody.getUsername(), bindLoginBody.getPassword(), bindLoginBody.getCode(), - bindLoginBody.getUuid()); + bindLoginBody.getUuid(), language); LoginUser loginUser = tokenService.getLoginUserByToken(token); //绑定和更新 SocialUser updateSocialUser = new SocialUser(); @@ -274,7 +275,7 @@ public class SocialLoginServiceImpl implements ISocialLoginService { } @Override - public AjaxResult bindRegister(BindRegisterBody bindRegisterBody) { + public AjaxResult bindRegister(BindRegisterBody bindRegisterBody, String language) { if (!("true".equals(iSysConfigService.selectConfigByKey("sys.account.registerUser")))) { return error("当前系统没有开启注册功能!"); } @@ -301,7 +302,7 @@ public class SocialLoginServiceImpl implements ISocialLoginService { iSocialUserService.updateSocialUser(updateSocialUser); redisCache.deleteObject(BIND_REDIS_KEY + bindRegisterBody.getBindId()); // 生成令牌 - String token = sysLoginService.redirectLogin(sysUser.getUserName(), sysUser.getPassword()); + String token = sysLoginService.redirectLogin(sysUser.getUserName(), sysUser.getPassword(), language); ajax.put(Constants.TOKEN, token); return ajax; } @@ -410,7 +411,7 @@ public class SocialLoginServiceImpl implements ISocialLoginService { public AjaxResult checkSocialUser(SocialUser socialUser, String bindId) { if (socialUser == null) { log.info("bindId不存在, bindId: {}", bindId); - return error("绑定账户不存在"); + return error(MessageUtils.message("bind.account.not.exist")); } else { return null; } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ThingsModelServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ThingsModelServiceImpl.java index 00d14821..b4e48b75 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ThingsModelServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ThingsModelServiceImpl.java @@ -10,6 +10,7 @@ import com.fastbee.common.core.redis.RedisKeyBuilder; import com.fastbee.common.enums.ThingsModelType; import com.fastbee.common.exception.ServiceException; import com.fastbee.common.utils.DateUtils; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.StringUtils; import com.fastbee.iot.domain.Product; import com.fastbee.iot.domain.ThingsModel; @@ -427,7 +428,7 @@ public class ThingsModelServiceImpl implements IThingsModelService { */ public String importData(List lists, Integer tempSlaveId) { if (null == tempSlaveId || CollectionUtils.isEmpty(lists)) { - throw new ServiceException("导入数据异常"); + throw new ServiceException(MessageUtils.message("things.model.import.data.exception")); } int success = 0; int failure = 0; diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ThingsModelTemplateServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ThingsModelTemplateServiceImpl.java index d82342f7..9c8a9a8d 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ThingsModelTemplateServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/ThingsModelTemplateServiceImpl.java @@ -10,6 +10,7 @@ import com.fastbee.common.core.domain.entity.SysUser; import com.fastbee.common.core.domain.model.LoginUser; import com.fastbee.common.exception.ServiceException; import com.fastbee.common.utils.DateUtils; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.StringUtils; import com.fastbee.iot.domain.ThingsModel; import com.fastbee.iot.model.varTemp.EnumClass; @@ -107,7 +108,7 @@ public class ThingsModelTemplateServiceImpl implements IThingsModelTemplateServi return thingsModelTemplateMapper.insertThingsModelTemplate(template); }catch (Exception e){ if (e.getMessage().contains("iot_things_modes_slaveId_reg")){ - throw new ServiceException("同一个采集点模板下,寄存器地址重复,请检查导入变量寄存器地址"); + throw new ServiceException(MessageUtils.message("things.model.register.address.repeat")); }else { throw new ServiceException(e.getMessage()); } @@ -196,7 +197,7 @@ public class ThingsModelTemplateServiceImpl implements IThingsModelTemplateServi */ public String importData(List lists, String tempSlaveId) { if (null == tempSlaveId || CollectionUtils.isEmpty(lists)) { - throw new ServiceException("导入数据异常"); + throw new ServiceException(MessageUtils.message("things.model.import.data.exception")); } int success = 0; int failure = 0; diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/UserSocialProfileServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/UserSocialProfileServiceImpl.java index f23a5902..b5225721 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/UserSocialProfileServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/service/impl/UserSocialProfileServiceImpl.java @@ -4,6 +4,7 @@ import com.fastbee.common.constant.HttpStatus; import com.fastbee.common.core.domain.AjaxResult; import com.fastbee.common.core.redis.RedisCache; import com.fastbee.common.enums.SocialPlatformType; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.iot.domain.SocialUser; import com.fastbee.iot.domain.UserSocialProfile; import com.fastbee.iot.model.login.BindIdValue; @@ -65,7 +66,7 @@ public class UserSocialProfileServiceImpl implements IUserSocialProfileService { updateSocialUser.setSysUserId(sysUserId); iSocialUserService.updateSocialUser(updateSocialUser); redisCache.deleteObject(BIND_REDIS_KEY + bindId); - return AjaxResult.success("绑定成功!"); + return AjaxResult.success(MessageUtils.message("bind.success")); } @Override @@ -73,7 +74,7 @@ public class UserSocialProfileServiceImpl implements IUserSocialProfileService { try { SocialPlatformType.valueOf(platform); } catch (Exception e) { - return AjaxResult.error("错误平台类型"); + return AjaxResult.error(MessageUtils.message("socialLogin.platform.type.fail")); } return AjaxResult.success(); } @@ -82,15 +83,15 @@ public class UserSocialProfileServiceImpl implements IUserSocialProfileService { public AjaxResult unbindSocialAccount(Long socialUserId, Long sysUserId) { SocialUser socialUser = iSocialUserService.selectSocialUserBySocialUserId(socialUserId); if (socialUser == null) { - return AjaxResult.error("绑定账户不存在!"); + return AjaxResult.error(MessageUtils.message("bind.account.not.exist")); } else if (!socialUser.getSysUserId().equals(socialUserId)) { - return AjaxResult.error("用户账户和绑定账户不匹配!"); + return AjaxResult.error(MessageUtils.message("user.account.and.bind.account.not.match")); } else { SocialUser updateSocialUser = new SocialUser(); updateSocialUser.setSocialUserId(socialUserId); updateSocialUser.setSysUserId(-1L); iSocialUserService.updateSocialUser(updateSocialUser); - return AjaxResult.success("解除绑定成功!"); + return AjaxResult.success(MessageUtils.message("unbind.success")); } } diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/WeChatService.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/WeChatService.java index ec3716f2..545c19b3 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/WeChatService.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/WeChatService.java @@ -21,14 +21,14 @@ public interface WeChatService { * @param weChatLoginBody 微信登录参数 * @return String */ - WeChatLoginResult mobileLogin(WeChatLoginBody weChatLoginBody); + WeChatLoginResult mobileLogin(WeChatLoginBody weChatLoginBody, String language); /** * 小程序微信登录 * @param weChatLoginBody 微信登录参数 * @return 登录结果 */ - WeChatLoginResult miniLogin(WeChatLoginBody weChatLoginBody); + WeChatLoginResult miniLogin(WeChatLoginBody weChatLoginBody, String language); /** * 取消所有相关微信绑定 diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/impl/WeChatServiceImpl.java b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/impl/WeChatServiceImpl.java index 3c33e17e..5dcd7b47 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/impl/WeChatServiceImpl.java +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/java/com/fastbee/iot/wechat/impl/WeChatServiceImpl.java @@ -10,6 +10,7 @@ import com.fastbee.common.enums.SocialPlatformType; import com.fastbee.common.enums.VerifyTypeEnum; import com.fastbee.common.exception.ServiceException; import com.fastbee.common.utils.DateUtils; +import com.fastbee.common.utils.MessageUtils; import com.fastbee.common.utils.StringUtils; import com.fastbee.common.utils.bean.BeanUtils; import com.fastbee.common.utils.http.HttpUtils; @@ -107,19 +108,19 @@ public class WeChatServiceImpl implements WeChatService { * @param weChatLoginBody 微信登录参数 * @return String */ - public WeChatLoginResult mobileLogin(WeChatLoginBody weChatLoginBody) { + public WeChatLoginResult mobileLogin(WeChatLoginBody weChatLoginBody, String language) { WeChatLoginResult weChatLoginResult = new WeChatLoginResult(); SocialPlatformType socialPlatformType = SocialPlatformType.WECHAT_OPEN_MOBILE; // 查询微信平台信息 SocialPlatform socialPlatform = socialPlatformService.selectSocialPlatformByPlatform(socialPlatformType.getSourceClient()); if (socialPlatform == null) { - throw new ServiceException("请先配置微信开放平台移动应用信息"); + throw new ServiceException(MessageUtils.message("wechat.please.config.open.platform")); } // 用户凭证code只能消费一次,前端调的uni.login有时会消费,然后直接就把获取到的信息传过来,不会消费的话就这里通过code拿 if (StringUtils.isEmpty(weChatLoginBody.getAccessToken()) || StringUtils.isEmpty(weChatLoginBody.getOpenId()) || StringUtils.isEmpty(weChatLoginBody.getUnionId())) { WeChatAppResult weChatResult = this.getAccessTokenOpenId(weChatLoginBody.getCode(), socialPlatform); if (weChatResult == null || weChatResult.getErrCode() != null) { - throw new ServiceException("用户凭证获取失败,请重新登录!"); + throw new ServiceException(MessageUtils.message("wechat.user.certificate.gain.fail")); } weChatLoginBody.setAccessToken(weChatResult.getAccessToken()).setRefreshToken(weChatResult.getRefreshToken()).setExpiresIn(weChatResult.getExpiresIn()).setOpenId(weChatResult.getOpenId()).setUnionId(weChatResult.getUnionId()).setScope(weChatResult.getScope()); } @@ -165,9 +166,9 @@ public class WeChatServiceImpl implements WeChatService { } else { SysUser sysUser = sysUserService.selectUserById(bindSysUserId); if (sysUser == null) { - throw new ServiceException("用户不存在"); + throw new ServiceException(MessageUtils.message("user.not.exist")); } - String token = sysLoginService.redirectLogin(sysUser.getUserName(), sysUser.getPassword()); + String token = sysLoginService.redirectLogin(sysUser.getUserName(), sysUser.getPassword(), language); weChatLoginResult.setToken(token); } return weChatLoginResult; @@ -179,26 +180,26 @@ public class WeChatServiceImpl implements WeChatService { * @return 登录结果 */ @Override - public WeChatLoginResult miniLogin(WeChatLoginBody weChatLoginBody) { + public WeChatLoginResult miniLogin(WeChatLoginBody weChatLoginBody, String language) { // 使用微信手机号去登录不绑定微信,没有用户则用手机号自动注册一个登录,密码是手机号 SocialPlatformType socialPlatformType = SocialPlatformType.WECHAT_OPEN_MINI_PROGRAM; // 查询微信平台信息 SocialPlatform socialPlatform = socialPlatformService.selectSocialPlatformByPlatform(socialPlatformType.getSourceClient()); if (socialPlatform == null) { - throw new ServiceException("请先配置微信公众平台小程序信息!"); + throw new ServiceException(MessageUtils.message("wechat.please.config.open.platform.mini")); } if (StringUtils.isEmpty(weChatLoginBody.getPhoneCode())) { - throw new ServiceException("用户手机号凭证获取失败,请重新登录!"); + throw new ServiceException(MessageUtils.message("wechat.user.phone.certificate.gain.fail")); } // 先获取token WeChatAppResult result = getAccessToken(socialPlatform); if (result == null || StringUtils.isEmpty(result.getAccessToken())) { - throw new ServiceException("获取用户调用凭据失败,请重新登录!"); + throw new ServiceException(MessageUtils.message("wechat.user.certificate.gain.fail")); } // 根据phoneCode获取用户手机号 WeChatPhoneInfo userPhoneInfo = getWechatUserPhoneInfo(weChatLoginBody.getPhoneCode(), result.getAccessToken()); if (userPhoneInfo == null || !userPhoneInfo.getErrCode().equals("0")) { - throw new ServiceException("获取用户手机号失败,请重新登录!"); + throw new ServiceException(MessageUtils.message("wechat.user.phone.certificate.gain.fail")); } String phoneNumber = userPhoneInfo.getPhoneInfo().getPhoneNumber(); SysUser sysUser = sysUserService.selectUserByPhoneNumber(phoneNumber); @@ -214,9 +215,9 @@ public class WeChatServiceImpl implements WeChatService { if (StringUtils.isNotEmpty(registerUserOutput.getMsg())) { throw new ServiceException(registerUserOutput.getMsg()); } - token = sysLoginService.redirectLogin(phoneNumber, phoneNumber); + token = sysLoginService.redirectLogin(phoneNumber, phoneNumber, language); } else { - token = sysLoginService.redirectLogin(sysUser.getUserName(), sysUser.getPassword()); + token = sysLoginService.redirectLogin(sysUser.getUserName(), sysUser.getPassword(), language); } weChatLoginResult.setToken(token); return weChatLoginResult; @@ -252,21 +253,21 @@ public class WeChatServiceImpl implements WeChatService { public AjaxResult cancelBind(WxCancelBindReqVO wxCancelBindReqVO) { LoginUser loginUser = getLoginUser(); if (loginUser == null || loginUser.getUserId() == null) { - throw new ServiceException("请先登录后重试"); + throw new ServiceException(MessageUtils.message("wechat.please.login")); } // 密码验证 if (VerifyTypeEnum.PASSWORD.getVerifyType().equals(wxCancelBindReqVO.getVerifyType())) { if (StringUtils.isEmpty(wxCancelBindReqVO.getPassword())) { - throw new ServiceException("请传入用户密码"); + throw new ServiceException(MessageUtils.message("wechat.please.enter.user.password")); } Boolean validateResult = sysUserService.validatePassword(loginUser.getUser().getPassword(), wxCancelBindReqVO.getPassword()); if (Boolean.FALSE.equals(validateResult)) { - throw new ServiceException("密码错误,请重新输入"); + throw new ServiceException(MessageUtils.message("wechat.cancelBind.password.fail")); } } // 解绑所有微信应用 int cancelBind = socialUserService.cancelBind(loginUser.getUserId(), SocialPlatformType.listWechatPlatform); - return cancelBind >= 1 ? success("解绑成功") : AjaxResult.error("解绑失败"); + return cancelBind >= 1 ? success(MessageUtils.message("unbind.success")) : AjaxResult.error(MessageUtils.message("unbind.fail")); } /** @@ -278,30 +279,30 @@ public class WeChatServiceImpl implements WeChatService { public AjaxResult bind(WxBindReqVO wxBindReqVO) { Long sysUserId = getUserId(); if (sysUserId == null) { - throw new ServiceException("请登录后重试"); + throw new ServiceException(MessageUtils.message("wechat.please.login")); } String openId = ""; String unionId = ""; // 区分小程序绑定还是移动应用绑定 if (SocialPlatformType.WECHAT_OPEN_MOBILE.sourceClient.equals(wxBindReqVO.getSourceClient())) { if (StringUtils.isEmpty(wxBindReqVO.getOpenId()) || StringUtils.isEmpty(wxBindReqVO.getUnionId())) { - throw new ServiceException("请传入微信用户信息"); + throw new ServiceException(MessageUtils.message("wechat.please.enter.wechat.user.info")); } openId = wxBindReqVO.getOpenId(); unionId = wxBindReqVO.getUnionId(); } else if (SocialPlatformType.WECHAT_OPEN_MINI_PROGRAM.sourceClient.equals(wxBindReqVO.getSourceClient())) { if (StringUtils.isEmpty(wxBindReqVO.getCode())) { - throw new ServiceException("请传入用户凭证"); + throw new ServiceException(MessageUtils.message("wechat.please.enter.user.certificate")); } // 查询微信平台信息 SocialPlatform socialPlatform = socialPlatformService.selectSocialPlatformByPlatform(SocialPlatformType.WECHAT_OPEN_MINI_PROGRAM.sourceClient); if (socialPlatform == null) { - throw new ServiceException("请先配置微信开放平台小程序信息!"); + throw new ServiceException(MessageUtils.message("wechat.please.config.open.platform.mini")); } WeChatMiniProgramResult weChatMiniProgramResult = this.codeToSession(wxBindReqVO.getCode(), socialPlatform); if (weChatMiniProgramResult == null || (StringUtils.isEmpty(weChatMiniProgramResult.getOpenId()) && StringUtils.isEmpty(weChatMiniProgramResult.getUnionId()))) { - throw new ServiceException("获取微信信息失败,请重试!"); + throw new ServiceException(MessageUtils.message("wechat.gain.wechat.info.fail")); } openId = weChatMiniProgramResult.getOpenId(); unionId = weChatMiniProgramResult.getUnionId(); @@ -311,11 +312,11 @@ public class WeChatServiceImpl implements WeChatService { int bindResult; List socialUserList = socialUserService.selectBySysUserId(sysUserId); if (CollectionUtils.isNotEmpty(socialUserList)) { - return success("绑定成功!"); + return success(MessageUtils.message("bind.success")); } if (socialUser != null) { if (socialUser.getSysUserId() != null && !sysUserId.equals(socialUser.getSysUserId())) { - throw new ServiceException("该微信已绑定其他账号,请先使用微信登录解绑后重试!"); + throw new ServiceException(MessageUtils.message("wechat.this.wechat.already.bind.other.account")); } SocialUser updateSocialUser = new SocialUser(); updateSocialUser.setSocialUserId(socialUser.getSocialUserId()); @@ -334,19 +335,19 @@ public class WeChatServiceImpl implements WeChatService { bindResult = socialUserService.insertSocialUser(insertSocialUser); } // 绑定 - return bindResult >= 1 ? success("绑定成功!") : AjaxResult.error("绑定失败"); + return bindResult >= 1 ? success(MessageUtils.message("bind.success")) : AjaxResult.error(MessageUtils.message("bind.fail")); } @Override public AjaxResult getWxBindQr(HttpServletRequest httpServletRequest) { Long sysUserId = getUserId(); if (sysUserId == null) { - throw new ServiceException("请先登录后重试!"); + throw new ServiceException(MessageUtils.message("wechat.please.login")); } WeChatLoginQrRes weChatLoginQrRes = new WeChatLoginQrRes(); SocialPlatform socialPlatform = socialPlatformService.selectSocialPlatformByPlatform(SocialPlatformType.WECHAT_OPEN_WEB_BIND.sourceClient); if (socialPlatform == null) { - throw new ServiceException("请先配置微信开放平台网站应用个人中心绑定信息"); + throw new ServiceException(MessageUtils.message("wechat.please.config.open.platform.web.application.personal.bind.info")); } weChatLoginQrRes.setAppid(socialPlatform.getClientId()); weChatLoginQrRes.setScope("snsapi_login"); @@ -362,36 +363,36 @@ public class WeChatServiceImpl implements WeChatService { SocialPlatform socialPlatform = socialPlatformService.selectSocialPlatformByPlatform(SocialPlatformType.WECHAT_OPEN_WEB_BIND.sourceClient); if (socialPlatform == null) { String serverName = httpServletRequest.getServerName(); - String msgId = socialLoginService.genErrorId("请先配置微信开放平台网站应用个人中心绑定信息"); + String msgId = socialLoginService.genErrorId(MessageUtils.message("wechat.please.config.open.platform.web.application.personal.bind.info")); return "https://" + serverName + "/user/profile?wxBindMsgId=" + msgId; } String url = socialPlatform.getRedirectLoginUri(); //获取临时票据 code log.info("code:{}", code); if (StringUtils.isEmpty(code)) { - String msgId = socialLoginService.genErrorId("您已取消授权或未获取到授权信息"); + String msgId = socialLoginService.genErrorId(MessageUtils.message("wechat.you.cancel.or.not.gain.authorization.info")); return url + msgId; } Long sysUserId = redisCache.getCacheObject(WX_BIND_REDIS_KEY + wxBindId); if (sysUserId == null) { - String msgId = socialLoginService.genErrorId("二维码已失效,请重新点击绑定"); + String msgId = socialLoginService.genErrorId(MessageUtils.message("wechat.the.qr.code.has.expired")); return url + msgId; } List socialUserList = socialUserService.selectBySysUserId(sysUserId); if (CollectionUtils.isNotEmpty(socialUserList)) { - String msgId = socialLoginService.genErrorId("您的账号已绑定微信,请先解绑"); + String msgId = socialLoginService.genErrorId(MessageUtils.message("wechat.your.account.already.bind.wechat")); return url + msgId; } // 组装获取accessToken的url WeChatAppResult weChatAppResult = this.getAccessTokenOpenId(code, socialPlatform); if (weChatAppResult == null || StringUtils.isEmpty(weChatAppResult.getAccessToken()) || StringUtils.isEmpty(weChatAppResult.getOpenId()) || StringUtils.isEmpty(weChatAppResult.getUnionId())) { - String msgId = socialLoginService.genErrorId("获取微信信息失败,请重试"); + String msgId = socialLoginService.genErrorId(MessageUtils.message("wechat.gain.wechat.info.fail")); return url + msgId; } Long bindUserId = socialUserService.selectSysUserIdByUnionId(weChatAppResult.getUnionId()); if (bindUserId != null && !bindUserId.equals(sysUserId)) { - String msgId = socialLoginService.genErrorId("您的微信已绑定其他账号,请先使用微信登录解绑后重试!"); + String msgId = socialLoginService.genErrorId(MessageUtils.message("wechat.your.wechat.already.bind.other.account")); return url + msgId; } SocialUser socialUser = socialUserService.selectOneByOpenIdAndUnionId(weChatAppResult.getOpenId(), weChatAppResult.getUnionId()); diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/convert/AppLanguageConvert.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/convert/AppLanguageConvert.java new file mode 100644 index 00000000..61f1ca66 --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/convert/AppLanguageConvert.java @@ -0,0 +1,70 @@ +package com.fastbee.system.convert; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fastbee.system.domain.AppLanguage; +import com.fastbee.system.domain.vo.AppLanguageVO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +/** + * app语言Convert转换类 + * + * @author zhuangpeng.li + * @date 2024-11-25 + */ +@Mapper +public interface AppLanguageConvert +{ + + AppLanguageConvert INSTANCE = Mappers.getMapper(AppLanguageConvert.class); + + /** + * 实体类转换为VO类 + * + * @param appLanguage + * @return app语言集合 + */ + AppLanguageVO convertAppLanguageVO(AppLanguage appLanguage); + + /** + * VO类转换为实体类集合 + * + * @param appLanguageVO + * @return app语言集合 + */ + AppLanguage convertAppLanguage(AppLanguageVO appLanguageVO); + + /** + * 实体类转换为VO类集合 + * + * @param appLanguageList + * @return app语言集合 + */ + List convertAppLanguageVOList(List appLanguageList); + + /** + * VO类转换为实体类 + * + * @param appLanguageVOList + * @return app语言集合 + */ + List convertAppLanguageList(List appLanguageVOList); + + /** + * 实体类转换为VO类分页 + * + * @param appLanguagePage + * @return app语言分页 + */ + Page convertAppLanguageVOPage(Page appLanguagePage); + + /** + * VO类转换为实体类 + * + * @param appLanguageVOPage + * @return app语言分页 + */ + Page convertAppLanguagePage(Page appLanguageVOPage); +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/convert/AppPreferencesConvert.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/convert/AppPreferencesConvert.java new file mode 100644 index 00000000..16dc6591 --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/convert/AppPreferencesConvert.java @@ -0,0 +1,70 @@ +package com.fastbee.system.convert; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fastbee.system.domain.AppPreferences; +import com.fastbee.system.domain.vo.AppPreferencesVO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +/** + * APP用户偏好设置Convert转换类 + * + * @author fastbee + * @date 2024-12-03 + */ +@Mapper +public interface AppPreferencesConvert +{ + + AppPreferencesConvert INSTANCE = Mappers.getMapper(AppPreferencesConvert.class); + + /** + * 实体类转换为VO类 + * + * @param appPreferences + * @return APP用户偏好设置集合 + */ + AppPreferencesVO convertAppPreferencesVO(AppPreferences appPreferences); + + /** + * VO类转换为实体类集合 + * + * @param appPreferencesVO + * @return APP用户偏好设置集合 + */ + AppPreferences convertAppPreferences(AppPreferencesVO appPreferencesVO); + + /** + * 实体类转换为VO类集合 + * + * @param appPreferencesList + * @return APP用户偏好设置集合 + */ + List convertAppPreferencesVOList(List appPreferencesList); + + /** + * VO类转换为实体类 + * + * @param appPreferencesVOList + * @return APP用户偏好设置集合 + */ + List convertAppPreferencesList(List appPreferencesVOList); + + /** + * 实体类转换为VO类分页 + * + * @param appPreferencesPage + * @return APP用户偏好设置分页 + */ + Page convertAppPreferencesVOPage(Page appPreferencesPage); + + /** + * VO类转换为实体类 + * + * @param appPreferencesVOPage + * @return APP用户偏好设置分页 + */ + Page convertAppPreferencesPage(Page appPreferencesVOPage); +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/AppLanguage.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/AppLanguage.java new file mode 100644 index 00000000..617dda45 --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/AppLanguage.java @@ -0,0 +1,56 @@ +package com.fastbee.system.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fastbee.common.core.domain.PageEntity; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.util.Date; + +/** + * app语言对象 app_language + */ +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "AppLanguage", description = "app语言 app_language") +@Data +@TableName("app_language" ) +public class AppLanguage extends PageEntity implements Serializable { + private static final long serialVersionUID=1L; + + /** 主键ID */ + @TableId(value = "id", type = IdType.AUTO) + @ApiModelProperty("主键ID") + private Long id; + + /** 语言 */ + @ApiModelProperty("语言") + private String language; + + /** 国家 */ + @ApiModelProperty("国家") + private String country; + + /** 时区 */ + @ApiModelProperty("时区") + private String timeZone; + + /** 创建者 */ + @ApiModelProperty("创建者") + private String createBy; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty("创建时间") + private Date createTime; + + /** 语言名称 */ + @ApiModelProperty("语言名称") + private String langName; + +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/AppPreferences.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/AppPreferences.java new file mode 100644 index 00000000..d949d6a9 --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/AppPreferences.java @@ -0,0 +1,44 @@ +package com.fastbee.system.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fastbee.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; + + +/** + * APP用户偏好设置对象 app_preferences + * + * @author fastbee + * @date 2024-12-03 + */ +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "AppPreferences", description = "APP用户偏好设置 app_preferences") +@Data +@TableName("app_preferences" ) +public class AppPreferences extends BaseEntity implements Serializable{ + private static final long serialVersionUID=1L; + + /** 主键id */ + @TableId(value = "id", type = IdType.AUTO) + @ApiModelProperty("主键id") + private Long id; + + /** 用户 */ + @ApiModelProperty("用户") + private Long userId; + + /** 语言 */ + @ApiModelProperty("语言") + private String language; + + /** 时区 */ + @ApiModelProperty("时区") + private String timeZone; +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysTranslate.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysTranslate.java new file mode 100644 index 00000000..623884e9 --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/SysTranslate.java @@ -0,0 +1,34 @@ +package com.fastbee.system.domain; + +import com.fastbee.common.annotation.Excel; +import com.fastbee.common.core.domain.BaseEntity; +import lombok.Data; + +/** + * 翻译对象 sys_translate + * + * @author ruoyi + */ +@Data +public class SysTranslate extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** ID */ + @Excel(name = "ID") + private Long id; + + /** zh_CN */ + @Excel(name = "zh-CN") + private String zh_CN; + + /** en_US */ + @Excel(name = "en-US") + private String en_US; + + /** 物模型翻译表使用 */ + private Long productId; + + private String tableName; + +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/vo/AppLanguageVO.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/vo/AppLanguageVO.java new file mode 100644 index 00000000..4aa4f6ba --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/vo/AppLanguageVO.java @@ -0,0 +1,60 @@ +package com.fastbee.system.domain.vo; + +import com.fastbee.common.annotation.Excel; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + + +/** + * app语言对象 app_language + * + * @author zhuangpeng.li + * @date 2024-11-25 + */ + +@ApiModel(value = "AppLanguageVO", description = "app语言 app_language") +@Data +public class AppLanguageVO { + + /** 主键ID */ + @Excel(name = "主键ID") + @ApiModelProperty("主键ID") + private Long id; + + /** 语言 */ + @Excel(name = "语言") + @ApiModelProperty("语言") + private String language; + + /** 国家 */ + @Excel(name = "国家") + @ApiModelProperty("国家") + private String country; + + /** 时区 */ + @Excel(name = "时区") + @ApiModelProperty("时区") + private String timeZone; + + /** 创建者 */ + @Excel(name = "创建者") + @ApiModelProperty("创建者") + private String createBy; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("创建时间") + @Excel(name = "创建时间") + private Date createTime; + + /** 语言名称 */ + @Excel(name = "语言名称") + @ApiModelProperty("语言名称") + private String langName; + + +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/vo/AppPreferencesVO.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/vo/AppPreferencesVO.java new file mode 100644 index 00000000..045a104d --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/domain/vo/AppPreferencesVO.java @@ -0,0 +1,71 @@ +package com.fastbee.system.domain.vo; + +import com.fastbee.common.annotation.Excel; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + + +/** + * APP用户偏好设置对象 app_preferences + * + * @author fastbee + * @date 2024-12-03 + */ + +@ApiModel(value = "AppPreferencesVO", description = "APP用户偏好设置 app_preferences") +@Data +public class AppPreferencesVO { + + /** 主键id */ + @Excel(name = "主键id") + @ApiModelProperty("主键id") + private Long id; + + /** 用户 */ + @Excel(name = "用户") + @ApiModelProperty("用户") + private Long userId; + + /** 语言 */ + @Excel(name = "语言") + @ApiModelProperty("语言") + private String language; + + /** 时区 */ + @Excel(name = "时区") + @ApiModelProperty("时区") + private String timeZone; + + /** 创建者 */ + @Excel(name = "创建者") + @ApiModelProperty("创建者") + private String createBy; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("创建时间") + @Excel(name = "创建时间") + private Date createTime; + + /** 更新者 */ + @Excel(name = "更新者") + @ApiModelProperty("更新者") + private String updateBy; + + /** 更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("更新时间") + @Excel(name = "更新时间") + private Date updateTime; + + /** 备注 */ + @Excel(name = "备注") + @ApiModelProperty("备注") + private String remark; + + +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/AppLanguageMapper.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/AppLanguageMapper.java new file mode 100644 index 00000000..9f8349f8 --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/AppLanguageMapper.java @@ -0,0 +1,13 @@ +package com.fastbee.system.mapper; + + +import com.fastbee.common.mybatis.mapper.BaseMapperX; +import com.fastbee.system.domain.AppLanguage; + +/** + * app语言Mapper接口 + */ +public interface AppLanguageMapper extends BaseMapperX +{ + +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/AppPreferencesMapper.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/AppPreferencesMapper.java new file mode 100644 index 00000000..bc927d2d --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/AppPreferencesMapper.java @@ -0,0 +1,14 @@ +package com.fastbee.system.mapper; + + +import com.fastbee.common.mybatis.mapper.BaseMapperX; +import com.fastbee.system.domain.AppPreferences; + +/** + * APP用户偏好设置Mapper接口 + */ +public interface AppPreferencesMapper extends BaseMapperX +{ + + +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysDictDataMapper.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysDictDataMapper.java index bc59c41b..5e766cf6 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysDictDataMapper.java +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysDictDataMapper.java @@ -42,7 +42,15 @@ public interface SysDictDataMapper * @param dictCode 字典数据ID * @return 字典数据 */ - public SysDictData selectDictDataById(Long dictCode); + public SysDictData selectDictDataById(@Param("dictCode") Long dictCode, @Param("language") String language); + + /** + * 根据条件分页查询字典数据--返回所有语言 + * + * @param dictData 字典数据信息 + * @return 字典数据集合信息 + */ + public List selectDictDataListAll(SysDictData dictData); /** * 查询字典数据 diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysDictTypeMapper.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysDictTypeMapper.java index 3551325f..7a7c0c79 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysDictTypeMapper.java +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysDictTypeMapper.java @@ -1,7 +1,10 @@ package com.fastbee.system.mapper; import java.util.List; + +import com.fastbee.common.core.domain.entity.SysDictData; import com.fastbee.common.core.domain.entity.SysDictType; +import org.apache.ibatis.annotations.Param; /** * 字典表 数据层 @@ -23,7 +26,7 @@ public interface SysDictTypeMapper * * @return 字典类型集合信息 */ - public List selectDictTypeAll(); + public List selectDictTypeAll(@Param("language") String language); /** * 根据字典类型ID查询信息 @@ -31,7 +34,7 @@ public interface SysDictTypeMapper * @param dictId 字典类型ID * @return 字典类型 */ - public SysDictType selectDictTypeById(Long dictId); + public SysDictType selectDictTypeById(@Param("dictId") Long dictId, @Param("language") String language); /** * 根据字典类型查询信息 @@ -39,7 +42,7 @@ public interface SysDictTypeMapper * @param dictType 字典类型 * @return 字典类型 */ - public SysDictType selectDictTypeByType(String dictType); + public SysDictType selectDictTypeByType(@Param("dictType") String dictType, @Param("language") String language); /** * 通过字典ID删除字典信息 @@ -79,5 +82,5 @@ public interface SysDictTypeMapper * @param dictType 字典类型 * @return 结果 */ - public SysDictType checkDictTypeUnique(String dictType); + public List checkDictTypeUnique(@Param("dictType") String dictType, @Param("language") String language); } diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysMenuMapper.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysMenuMapper.java index 93b5d567..ea306d7b 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysMenuMapper.java +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysMenuMapper.java @@ -55,7 +55,7 @@ public interface SysMenuMapper * * @return 菜单列表 */ - public List selectMenuTreeAll(); + public List selectMenuTreeAll(@Param("language") String language); /** * 根据用户ID查询菜单 @@ -63,7 +63,7 @@ public interface SysMenuMapper * @param userId 用户ID * @return 菜单列表 */ - public List selectMenuTreeByUserId(Long userId); + public List selectMenuTreeByUserId(@Param("userId") Long userId, @Param("language") String language); /** * 根据角色ID查询菜单树信息 @@ -80,7 +80,7 @@ public interface SysMenuMapper * @param menuId 菜单ID * @return 菜单信息 */ - public SysMenu selectMenuById(Long menuId); + public SysMenu selectMenuById(@Param("menuId") Long menuId, @Param("language") String language); /** * 是否存在菜单子节点 diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysTranslateMapper.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysTranslateMapper.java new file mode 100644 index 00000000..65f38f11 --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/mapper/SysTranslateMapper.java @@ -0,0 +1,46 @@ +package com.fastbee.system.mapper; + +import com.fastbee.common.mybatis.mapper.BaseMapperX; +import com.fastbee.system.domain.SysTranslate; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 翻译Mapper接口 + * + * @author kerwincui + * @date 2024-05-29 + */ +@Mapper +public interface SysTranslateMapper extends BaseMapperX +{ + + /** + * 新增或修改翻译 + * + * @param sysTranslate 翻译 + * @return 结果 + */ + public int insertSysTranslate(SysTranslate sysTranslate); + + /** + * 查询翻译列表 + * + * @param sysTranslate 翻译 + * @return 翻译集合 + */ + public List selectSysTranslateList(SysTranslate sysTranslate); + + /** + * 查询原表数据列表 + * + * @param tableName 表名 + * @param idColumn id列名 + * @param nameColumn 名称列名 + * @return 翻译集合 + */ + public List selectSourceList(@Param("tableName") String tableName, @Param("idColumn") String idColumn, @Param("nameColumn") String nameColumn, @Param("productId") Long productId); + +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/IAppLanguageService.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/IAppLanguageService.java new file mode 100644 index 00000000..69265e5c --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/IAppLanguageService.java @@ -0,0 +1,54 @@ +package com.fastbee.system.service; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.fastbee.system.domain.AppLanguage; +import com.fastbee.system.domain.vo.AppLanguageVO; + +/** + * app语言Service接口 + */ +public interface IAppLanguageService extends IService +{ + /** + * 查询app语言 + * + * @param id app语言主键 + * @return app语言 + */ + public AppLanguage selectAppLanguageById(Long id); + + /** + * 查询app语言列表 + * + * @param appLanguage app语言 + * @return app语言分页集合 + */ + Page pageAppLanguageVO(AppLanguage appLanguage); + + /** + * 新增app语言 + * + * @param appLanguage app语言 + * @return 结果 + */ + public int insertAppLanguage(AppLanguage appLanguage); + + /** + * 修改app语言 + * + * @param appLanguage app语言 + * @return 结果 + */ + public int updateAppLanguage(AppLanguage appLanguage); + + /** + * 批量删除app语言 + * + * @param ids 需要删除的app语言主键集合 + * @return 结果 + */ + public int deleteAppLanguageByIds(Long[] ids); + +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/IAppPreferencesService.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/IAppPreferencesService.java new file mode 100644 index 00000000..810e2e51 --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/IAppPreferencesService.java @@ -0,0 +1,86 @@ +package com.fastbee.system.service; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.fastbee.system.domain.AppPreferences; +import com.fastbee.system.domain.vo.AppPreferencesVO; + +import java.util.List; + +/** + * APP用户偏好设置Service接口 + */ +public interface IAppPreferencesService extends IService +{ + + /** + * 查询APP用户偏好设置列表 + * + * @param appPreferences APP用户偏好设置 + * @return APP用户偏好设置分页集合 + */ + Page pageAppPreferencesVO(AppPreferences appPreferences); + + /** + * 查询APP用户偏好设置 + * + * @param userId APP用户偏好设置主键 + * @return APP用户偏好设置 + */ + public AppPreferences selectAppPreferencesByUserId(Long userId); + + /** + * 查询APP用户偏好设置列表 + * + * @param appPreferences APP用户偏好设置 + * @return APP用户偏好设置集合 + */ + List listAppPreferencesVO(AppPreferences appPreferences); + + /** + * 新增APP用户偏好设置 + * + * @param appPreferences APP用户偏好设置 + * @return 结果 + */ + public int insertAppPreferences(AppPreferences appPreferences); + + /** + * 修改APP用户偏好设置 + * + * @param appPreferences APP用户偏好设置 + * @return 结果 + */ + public int updateAppPreferences(AppPreferences appPreferences); + + /** + * 批量删除APP用户偏好设置 + * + * @param userIds 需要删除的APP用户偏好设置主键集合 + * @return 结果 + */ + public int deleteAppPreferencesByUserIds(Long[] userIds); + + /** + * 删除APP用户偏好设置信息 + * + * @param userId APP用户偏好设置主键 + * @return 结果 + */ + public int deleteAppPreferencesByUserId(Long userId); + + /** + * 新增或者更新用户偏好设置 + * @param appPreferences + * @return + */ + public int addOrUpdate(AppPreferences appPreferences); + + /** + * 获取用户偏好语言 + * @param userId + * @return + */ + public String getLanguage(Long userId); +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/ISysMenuService.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/ISysMenuService.java index 1c19b334..467c6c17 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/ISysMenuService.java +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/ISysMenuService.java @@ -50,9 +50,10 @@ public interface ISysMenuService * 根据用户ID查询菜单树信息 * * @param userId 用户ID + * @param language 语言 * @return 菜单列表 */ - public List selectMenuTreeByUserId(Long userId); + public List selectMenuTreeByUserId(Long userId, String language); /** * 根据角色ID查询菜单树信息 diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/ISysTranslateService.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/ISysTranslateService.java new file mode 100644 index 00000000..2e3ad828 --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/ISysTranslateService.java @@ -0,0 +1,37 @@ +package com.fastbee.system.service; + + +import com.fastbee.system.domain.SysTranslate; + +import java.util.List; + +/** + * 翻译Service接口 + * + * @author kerwincui + * @date 2024-05-29 + */ +public interface ISysTranslateService +{ + /** + * 导入翻译列表 + * @param list + * @return + */ + public void importSysTranslate(List list, String type, Long productId); + + /** + * 查询翻译列表 + * @param sysTranslate 翻译类 + * @return 翻译列表 + */ + public List selectSysTranslateList(SysTranslate sysTranslate, String type); + + /** + * 查询原表数据列表 + * @param type + * @return + */ + public List selectSourceList(String type, Long productId); + +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/AppLanguageServiceImpl.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/AppLanguageServiceImpl.java new file mode 100644 index 00000000..83c4ddd5 --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/AppLanguageServiceImpl.java @@ -0,0 +1,106 @@ +package com.fastbee.system.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fastbee.common.utils.StringUtils; +import com.fastbee.system.convert.AppLanguageConvert; +import com.fastbee.system.domain.AppLanguage; +import com.fastbee.system.domain.vo.AppLanguageVO; +import com.fastbee.system.mapper.AppLanguageMapper; +import com.fastbee.system.service.IAppLanguageService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.Map; +import java.util.Objects; + +/** + * app语言Service业务层处理 + */ +@Service +public class AppLanguageServiceImpl extends ServiceImpl implements IAppLanguageService +{ + @Resource + private AppLanguageMapper appLanguageMapper; + + /** + * 查询app语言 + * + * @param id app语言主键 + * @return app语言 + */ + @Override + public AppLanguage selectAppLanguageById(Long id) + { + return appLanguageMapper.selectById(id); + } + + /** + * 查询app语言分页列表 + * + * @param appLanguage app语言 + * @return app语言 + */ + @Override + public Page pageAppLanguageVO(AppLanguage appLanguage) { + LambdaQueryWrapper lqw = buildQueryWrapper(appLanguage); + Page appLanguagePage = baseMapper.selectPage(new Page<>(appLanguage.getPageNum(), appLanguage.getPageSize()), lqw); + return AppLanguageConvert.INSTANCE.convertAppLanguageVOPage(appLanguagePage); + } + + private LambdaQueryWrapper buildQueryWrapper(AppLanguage query) { + Map params = query.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.eq(StringUtils.isNotBlank(query.getLanguage()), AppLanguage::getLanguage, query.getLanguage()); + lqw.eq(StringUtils.isNotBlank(query.getCountry()), AppLanguage::getCountry, query.getCountry()); + lqw.eq(StringUtils.isNotBlank(query.getTimeZone()), AppLanguage::getTimeZone, query.getTimeZone()); + lqw.like(StringUtils.isNotBlank(query.getLangName()), AppLanguage::getLangName, query.getLangName()); + + if (!Objects.isNull(params.get("beginTime")) && + !Objects.isNull(params.get("endTime"))) { + lqw.between(AppLanguage::getCreateTime, params.get("beginTime"), params.get("endTime")); + } + return lqw; + } + + + /** + * 新增app语言 + * + * @param appLanguage app语言 + * @return 结果 + */ + @Override + public int insertAppLanguage(AppLanguage appLanguage) + { + return appLanguageMapper.insert(appLanguage); + } + + /** + * 修改app语言 + * + * @param appLanguage app语言 + * @return 结果 + */ + @Override + public int updateAppLanguage(AppLanguage appLanguage) + { + return appLanguageMapper.updateById(appLanguage); + } + + /** + * 批量删除app语言 + * + * @param ids 需要删除的app语言主键 + * @return 结果 + */ + @Override + public int deleteAppLanguageByIds(Long[] ids) + { + return appLanguageMapper.deleteBatchIds(Arrays.asList(ids)); + } + +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/AppPreferencesServiceImpl.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/AppPreferencesServiceImpl.java new file mode 100644 index 00000000..4bd3e299 --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/AppPreferencesServiceImpl.java @@ -0,0 +1,180 @@ +package com.fastbee.system.service.impl; + + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fastbee.common.enums.Language; +import com.fastbee.common.utils.SecurityUtils; +import com.fastbee.common.utils.DateUtils; +import com.fastbee.common.utils.StringUtils; +import com.fastbee.system.convert.AppPreferencesConvert; +import com.fastbee.system.domain.AppPreferences; +import com.fastbee.system.domain.vo.AppPreferencesVO; +import com.fastbee.system.mapper.AppPreferencesMapper; +import com.fastbee.system.service.IAppPreferencesService; +import org.springframework.stereotype.Service; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Objects; + + +/** + * APP用户偏好设置Service业务层处理 + */ +@Service +public class AppPreferencesServiceImpl extends ServiceImpl implements IAppPreferencesService +{ + + /** + * 查询APP用户偏好设置分页列表 + * + * @param appPreferences APP用户偏好设置 + * @return APP用户偏好设置 + */ + @Override + public Page pageAppPreferencesVO(AppPreferences appPreferences) { + LambdaQueryWrapper lqw = buildQueryWrapper(appPreferences); + Page appPreferencesPage = baseMapper.selectPage(new Page<>(appPreferences.getPageNum(), appPreferences.getPageSize()), lqw); + return AppPreferencesConvert.INSTANCE.convertAppPreferencesVOPage(appPreferencesPage); + } + + /** + * 查询APP用户偏好设置 + * + * @param userId APP用户偏好设置主键 + * @return APP用户偏好设置 + */ + @Override + public AppPreferences selectAppPreferencesByUserId(Long userId) + { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(AppPreferences::getUserId, userId); + AppPreferences appPreferences = baseMapper.selectOne(queryWrapper); + if (appPreferences == null){ + appPreferences = new AppPreferences(); + } + // 设置默认语言 + if (StringUtils.isEmpty(appPreferences.getLanguage())) { + appPreferences.setLanguage(Language.DEFAULT.getValue()); + } + return appPreferences; + } + + /** + * 查询APP用户偏好设置列表 + * + * @param appPreferences APP用户偏好设置 + * @return APP用户偏好设置 + */ + @Override + public List listAppPreferencesVO(AppPreferences appPreferences) { + LambdaQueryWrapper lqw = buildQueryWrapper(appPreferences); + List appPreferencesList = baseMapper.selectList(lqw); + return AppPreferencesConvert.INSTANCE.convertAppPreferencesVOList(appPreferencesList); + } + + + /** + * 新增APP用户偏好设置 + * + * @param appPreferences APP用户偏好设置 + * @return 结果 + */ + @Override + public int insertAppPreferences(AppPreferences appPreferences) + { + appPreferences.setCreateTime(DateUtils.getNowDate()); + return baseMapper.insert(appPreferences); + } + + /** + * 修改APP用户偏好设置 + * + * @param appPreferences APP用户偏好设置 + * @return 结果 + */ + @Override + public int updateAppPreferences(AppPreferences appPreferences) + { + appPreferences.setUpdateTime(DateUtils.getNowDate()); + return baseMapper.updateById(appPreferences); + } + + /** + * 批量删除APP用户偏好设置 + * + * @param userIds 需要删除的APP用户偏好设置主键 + * @return 结果 + */ + @Override + public int deleteAppPreferencesByUserIds(Long[] userIds) + { + LambdaUpdateWrapper query = new LambdaUpdateWrapper<>(); + query.in(AppPreferences::getUserId, Arrays.asList(userIds)); + return baseMapper.delete(query); + } + + /** + * 删除APP用户偏好设置信息 + * + * @param userId APP用户偏好设置主键 + * @return 结果 + */ + @Override + public int deleteAppPreferencesByUserId(Long userId) + { + LambdaUpdateWrapper query = new LambdaUpdateWrapper<>(); + query.eq(AppPreferences::getUserId, userId); + return baseMapper.delete(query); + } + + /** + * 新增或者更新用户偏好设置 + * @param appPreferences + * @return + */ + @Override + public int addOrUpdate(AppPreferences appPreferences) + { + if (Objects.isNull(appPreferences.getId())){ + appPreferences.setUserId(SecurityUtils.getUserId()); + } + AppPreferences preferences = this.selectAppPreferencesByUserId(SecurityUtils.getUserId()); + if (!Objects.isNull(preferences)){ + return baseMapper.updateById(appPreferences); + } else { + return baseMapper.insert(appPreferences); + } + } + + /** + * 获取用户偏好语言 + * @param userId + * @return + */ + @Override + public String getLanguage(Long userId) { + AppPreferences appPreferences = selectAppPreferencesByUserId(userId); + return appPreferences.getLanguage(); + } + + private LambdaQueryWrapper buildQueryWrapper(AppPreferences query) { + Map params = query.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.eq(query.getUserId() != null, AppPreferences::getUserId, query.getUserId()); + lqw.eq(StringUtils.isNotBlank(query.getLanguage()), AppPreferences::getLanguage, query.getLanguage()); + lqw.eq(StringUtils.isNotBlank(query.getTimeZone()), AppPreferences::getTimeZone, query.getTimeZone()); + + if (!Objects.isNull(params.get("beginTime")) && + !Objects.isNull(params.get("endTime"))) { + lqw.between(AppPreferences::getCreateTime, params.get("beginTime"), params.get("endTime")); + } + return lqw; + } + +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysDictDataServiceImpl.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysDictDataServiceImpl.java index 303822a3..8c3aa9d3 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysDictDataServiceImpl.java +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysDictDataServiceImpl.java @@ -1,6 +1,8 @@ package com.fastbee.system.service.impl; import java.util.List; + +import com.fastbee.common.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.fastbee.common.core.domain.entity.SysDictData; @@ -28,6 +30,7 @@ public class SysDictDataServiceImpl implements ISysDictDataService @Override public List selectDictDataList(SysDictData dictData) { + dictData.setLanguage(SecurityUtils.getLanguage()); return dictDataMapper.selectDictDataList(dictData); } @@ -53,7 +56,7 @@ public class SysDictDataServiceImpl implements ISysDictDataService @Override public SysDictData selectDictDataById(Long dictCode) { - return dictDataMapper.selectDictDataById(dictCode); + return dictDataMapper.selectDictDataById(dictCode, SecurityUtils.getLanguage()); } /** diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysDictTypeServiceImpl.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysDictTypeServiceImpl.java index 20340852..89a8e535 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysDictTypeServiceImpl.java +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysDictTypeServiceImpl.java @@ -12,13 +12,16 @@ import com.fastbee.system.service.ISysDictTypeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; - +import com.fastbee.common.utils.SecurityUtils; import javax.annotation.PostConstruct; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import static com.fastbee.common.constant.Constants.EN_US; +import static com.fastbee.common.constant.Constants.ZH_CN; + /** * 字典 业务层处理 * @@ -51,6 +54,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService @Override public List selectDictTypeList(SysDictType dictType) { + dictType.setLanguage(SecurityUtils.getLanguage()); return dictTypeMapper.selectDictTypeList(dictType); } @@ -62,7 +66,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService @Override public List selectDictTypeAll() { - return dictTypeMapper.selectDictTypeAll(); + return dictTypeMapper.selectDictTypeAll(SecurityUtils.getLanguage()); } /** @@ -77,12 +81,14 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService List dictDatas = DictUtils.getDictCache(dictType); if (StringUtils.isNotEmpty(dictDatas)) { + convertDictLabel(dictDatas, SecurityUtils.getLanguage()); return dictDatas; } dictDatas = dictDataMapper.selectDictDataByType(dictType); if (StringUtils.isNotEmpty(dictDatas)) { DictUtils.setDictCache(dictType, dictDatas); + convertDictLabel(dictDatas, SecurityUtils.getLanguage()); return dictDatas; } return null; @@ -97,7 +103,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService @Override public SysDictType selectDictTypeById(Long dictId) { - return dictTypeMapper.selectDictTypeById(dictId); + return dictTypeMapper.selectDictTypeById(dictId, SecurityUtils.getLanguage()); } /** @@ -109,7 +115,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService @Override public SysDictType selectDictTypeByType(String dictType) { - return dictTypeMapper.selectDictTypeByType(dictType); + return dictTypeMapper.selectDictTypeByType(dictType, SecurityUtils.getLanguage()); } /** @@ -140,7 +146,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService { SysDictData dictData = new SysDictData(); dictData.setStatus("0"); - Map> dictDataMap = dictDataMapper.selectDictDataList(dictData).stream().collect(Collectors.groupingBy(SysDictData::getDictType)); + Map> dictDataMap = dictDataMapper.selectDictDataListAll(dictData).stream().collect(Collectors.groupingBy(SysDictData::getDictType)); for (Map.Entry> entry : dictDataMap.entrySet()) { DictUtils.setDictCache(entry.getKey(), entry.getValue().stream().sorted(Comparator.comparing(SysDictData::getDictSort)).collect(Collectors.toList())); @@ -193,7 +199,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService @Transactional public int updateDictType(SysDictType dict) { - SysDictType oldDict = dictTypeMapper.selectDictTypeById(dict.getDictId()); + SysDictType oldDict = dictTypeMapper.selectDictTypeById(dict.getDictId(), SecurityUtils.getLanguage()); dictDataMapper.updateDictDataType(oldDict.getDictType(), dict.getDictType()); int row = dictTypeMapper.updateDictType(dict); if (row > 0) @@ -214,11 +220,32 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService public boolean checkDictTypeUnique(SysDictType dict) { Long dictId = StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId(); - SysDictType dictType = dictTypeMapper.checkDictTypeUnique(dict.getDictType()); - if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue()) + List dictType = dictTypeMapper.checkDictTypeUnique(dict.getDictType(), SecurityUtils.getLanguage()); + if (!dictType.isEmpty() && dictType.get(0).getDictId().longValue() != dictId.longValue()) { return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; } + + /** + * 多语言转换 + * @param list + * @param language + * @return + */ + public static void convertDictLabel(List list, String language) { + switch (language) { + case EN_US: + for (SysDictData data : list) { + data.setDictLabel(data.getDictLabel_en_US()); + } + break; + case ZH_CN: + for (SysDictData data : list) { + data.setDictLabel(data.getDictLabel_zh_CN()); + } + break; + } + } } diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysMenuServiceImpl.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysMenuServiceImpl.java index a32c5198..f88cf537 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysMenuServiceImpl.java +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysMenuServiceImpl.java @@ -65,6 +65,7 @@ public class SysMenuServiceImpl implements ISysMenuService @Override public List selectMenuList(SysMenu menu, Long userId) { + menu.setLanguage(SecurityUtils.getLanguage()); List menuList = null; // 管理员显示所有菜单信息 if (SysUser.isAdmin(userId)) @@ -128,16 +129,16 @@ public class SysMenuServiceImpl implements ISysMenuService * @return 菜单列表 */ @Override - public List selectMenuTreeByUserId(Long userId) + public List selectMenuTreeByUserId(Long userId, String language) { List menus = null; if (SecurityUtils.isAdmin(userId)) { - menus = menuMapper.selectMenuTreeAll(); + menus = menuMapper.selectMenuTreeAll(language); } else { - menus = menuMapper.selectMenuTreeByUserId(userId); + menus = menuMapper.selectMenuTreeByUserId(userId, language); } return getChildPerms(menus, 0); } @@ -263,7 +264,7 @@ public class SysMenuServiceImpl implements ISysMenuService @Override public SysMenu selectMenuById(Long menuId) { - return menuMapper.selectMenuById(menuId); + return menuMapper.selectMenuById(menuId, SecurityUtils.getLanguage()); } /** diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysTranslateServiceImpl.java b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysTranslateServiceImpl.java new file mode 100644 index 00000000..ae2becb4 --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/java/com/fastbee/system/service/impl/SysTranslateServiceImpl.java @@ -0,0 +1,95 @@ +package com.fastbee.system.service.impl; + +import com.fastbee.common.enums.TranslateType; +import com.fastbee.system.domain.SysTranslate; +import com.fastbee.system.mapper.SysTranslateMapper; +import com.fastbee.system.service.ISysTranslateService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +import static com.fastbee.common.constant.Constants.*; + +/** + * 翻译Service业务层处理 + * + * @author kerwincui + * @date 2024-05-29 + */ +@Service +public class SysTranslateServiceImpl implements ISysTranslateService +{ + @Resource + private SysTranslateMapper sysTranslateMapper; + + /** + * 导入翻译列表 + * @param list + * @return + */ + public void importSysTranslate(List list, String type, Long productId) { + TranslateType translateType = matchTranslateType(type); + if (translateType == null) { + return; + } + for (SysTranslate sysTranslate : list) { + sysTranslate.setTableName(translateType.getTranslateTable()); + sysTranslate.setProductId(productId); + sysTranslateMapper.insertSysTranslate(sysTranslate); + } + } + + /** + * 查询翻译列表 + * @param sysTranslate 翻译类 + * @return 翻译列表 + */ + @Override + public List selectSysTranslateList(SysTranslate sysTranslate, String type) + { + TranslateType translateType = matchTranslateType(type); + if (translateType == null) { + return null; + } + sysTranslate.setTableName(translateType.getTranslateTable()); + return sysTranslateMapper.selectSysTranslateList(sysTranslate); + } + + /** + * 查询原表数据列表 + * @param type + * @return + */ + @Override + public List selectSourceList(String type, Long productId) { + TranslateType translateType = matchTranslateType(type); + if (translateType == null) { + return null; + } + return sysTranslateMapper.selectSourceList(translateType.getSourceTable(), translateType.getIdColumn(), translateType.getNameColumn(), productId); + } + + /** + * 根据type匹配对应的翻译类型 + * @param type + * @return + */ + public TranslateType matchTranslateType(String type) { + switch (type) { + case MENU: + return TranslateType.MENU_TYPE; + case DICT_DATA: + return TranslateType.DICT_DATA_TYPE; + case DICT_TYPE: + return TranslateType.DICT_TYPE_TYPE; + case THINGS_MODEL: + return TranslateType.THINGS_MODEL_TYPE; + case THINGS_MODEL_TEMPLATE: + return TranslateType.THINGS_MODEL_TEMPLATE_TYPE; + default: + return null; + } + } + +} diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/AppLanguageMapper.xml b/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/AppLanguageMapper.xml new file mode 100644 index 00000000..c83adc8c --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/AppLanguageMapper.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + select id, language, country, time_zone, create_by, create_time, lang_name from app_language + + + diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/AppPreferencesMapper.xml b/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/AppPreferencesMapper.xml new file mode 100644 index 00000000..9e510717 --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/AppPreferencesMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + select id, user_id, language, time_zone, create_by, create_time, update_by, update_time, remark from app_preferences + + + diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysDictDataMapper.xml b/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysDictDataMapper.xml index 71fc8ca9..e9468718 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysDictDataMapper.xml +++ b/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysDictDataMapper.xml @@ -52,8 +52,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + - + select d.dict_id, + case + when #{language} = 'zh-CN' then d.dict_name + when #{language} = 'en-US' then t.en_us + else d.dict_name + end as dict_name, + d.dict_type, d.status, d.create_by, d.create_time, d.remark + from sys_dict_type d + left join sys_dict_type_translate t on d.dict_id = t.id AND dict_name like concat('%', #{dictName}, '%') @@ -42,22 +50,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysMenuMapper.xml b/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysMenuMapper.xml index 9b6cde18..886e1634 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysMenuMapper.xml +++ b/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysMenuMapper.xml @@ -33,7 +33,15 @@ @@ -119,8 +151,17 @@ diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysTranslateMapper.xml b/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysTranslateMapper.xml new file mode 100644 index 00000000..09eebbd8 --- /dev/null +++ b/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysTranslateMapper.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + insert into ${tableName} + + id, + product_id, + zh_cn, + en_us + + + #{id}, + #{productId}, + #{zh_CN}, + #{en_US} + + on duplicate key update + product_id = #{productId}, + zh_cn = #{zh_CN}, + en_us = #{en_US} + + + + + + + diff --git a/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysUserMapper.xml b/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysUserMapper.xml index 044b1d45..ad8e939c 100644 --- a/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysUserMapper.xml +++ b/springboot/fastbee-service/fastbee-system-service/src/main/resources/mapper/system/SysUserMapper.xml @@ -23,6 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -47,14 +49,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, - d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status, - r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status - from sys_user u - left join sys_dept d on u.dept_id = d.dept_id - left join sys_user_role ur on u.user_id = ur.user_id - left join sys_role r on r.role_id = ur.role_id - + select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, + d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status, + r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status, + ap.language,ap.time_zone + from sys_user u + left join sys_dept d on u.dept_id = d.dept_id + left join sys_user_role ur on u.user_id = ur.user_id + left join sys_role r on r.role_id = ur.role_id + left join app_preferences ap on u.user_id = ap.user_id +