From 20d9f5ef9c770884ecc48a8c03b7e38f3001b950 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Fri, 21 May 2021 17:33:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=BB=98=E8=AE=A4=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E4=B8=BA=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/dataease/service/sys/SysUserService.java | 3 +++ backend/src/main/resources/db/migration/V3__init_data.sql | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/sys/SysUserService.java b/backend/src/main/java/io/dataease/service/sys/SysUserService.java index 455cf479ca..208d3290a0 100644 --- a/backend/src/main/java/io/dataease/service/sys/SysUserService.java +++ b/backend/src/main/java/io/dataease/service/sys/SysUserService.java @@ -71,6 +71,9 @@ public class SysUserService { }else{ user.setPassword(CodingUtil.md5(user.getPassword())); } + if(StringUtils.isEmpty(user.getLanguage())){ + user.setLanguage("zh_CN"); + } int insert = sysUserMapper.insert(user); SysUser dbUser = findOne(user); saveUserRoles(dbUser.getUserId(), request.getRoleIds());//插入用户角色关联 diff --git a/backend/src/main/resources/db/migration/V3__init_data.sql b/backend/src/main/resources/db/migration/V3__init_data.sql index 397af9e899..d42d13a454 100644 --- a/backend/src/main/resources/db/migration/V3__init_data.sql +++ b/backend/src/main/resources/db/migration/V3__init_data.sql @@ -51,8 +51,8 @@ INSERT INTO `sys_menu` VALUES (52, 0, 0, 1, '关于', 'about', 'system/about/ind COMMIT; BEGIN; -INSERT INTO `sys_user` VALUES (4, 0, 'admin', '管理员', '男', NULL, 'admin@fit2cloud.com', '40b8893ea9ebc2d631c4bb42bb1e8996', b'1', 1, NULL, NULL, NULL, NULL, 1615184951534,NULL); -INSERT INTO `sys_user` VALUES (19, 25, 'demo', 'demo', '男', NULL, 'demo@fit2cloud.com', '40b8893ea9ebc2d631c4bb42bb1e8996', b'0', 0, NULL, NULL, NULL, 1619086036234, 1619086036234,NULL); +INSERT INTO `sys_user` VALUES (4, 0, 'admin', '管理员', '男', NULL, 'admin@fit2cloud.com', '40b8893ea9ebc2d631c4bb42bb1e8996', b'1', 1, NULL, NULL, NULL, NULL, 1615184951534,'zh_CN'); +INSERT INTO `sys_user` VALUES (19, 25, 'demo', 'demo', '男', NULL, 'demo@fit2cloud.com', '40b8893ea9ebc2d631c4bb42bb1e8996', b'0', 0, NULL, NULL, NULL, 1619086036234, 1619086036234,'zh_CN'); COMMIT;