Commit 1737386b authored by huyuchen's avatar huyuchen

提供角色类表接口

parent dc67c48f
...@@ -146,6 +146,8 @@ public interface CommonConstants { ...@@ -146,6 +146,8 @@ public interface CommonConstants {
String SIXTEEN_STRING = "16"; String SIXTEEN_STRING = "16";
public static final String DEFAULT_PASSWORD = "123456";
/** /**
* number 0 * number 0
*/ */
......
...@@ -65,7 +65,7 @@ public class PersonVo { ...@@ -65,7 +65,7 @@ public class PersonVo {
* 用户密码 * 用户密码
*/ */
@Attribute(name = "userPassword") @Attribute(name = "userPassword")
private String password; private Object password;
/** /**
* 用户角色 * 用户角色
......
...@@ -498,6 +498,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -498,6 +498,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
if (list1.stream().anyMatch(e -> e.equals(personVo.getUid()))) { if (list1.stream().anyMatch(e -> e.equals(personVo.getUid()))) {
updateList.add(personVo); updateList.add(personVo);
} else { } else {
//新增用户赋初始密码
personVo.setPassword(ENCODER.encode(CommonConstants.DEFAULT_PASSWORD));
insertList.add(personVo); insertList.add(personVo);
} }
} }
......
...@@ -214,12 +214,13 @@ ...@@ -214,12 +214,13 @@
<insert id="batchInsertUser" parameterType="java.util.List"> <insert id="batchInsertUser" parameterType="java.util.List">
insert into sys_user insert into sys_user
(user_id,username,phone,email,nickname,create_time) (user_id,username,password,phone,email,nickname,create_time)
VALUES VALUES
<foreach collection="list" item="item" index="index" separator=","> <foreach collection="list" item="item" index="index" separator=",">
( (
REPLACE(UUID(),"-",""), REPLACE(UUID(),"-",""),
#{item.uid}, #{item.uid},
#{item.password},
#{item.telephoneNumber}, #{item.telephoneNumber},
#{item.email}, #{item.email},
#{item.personName}, #{item.personName},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment