Commit 1737386b authored by huyuchen's avatar huyuchen

提供角色类表接口

parent dc67c48f
......@@ -146,6 +146,8 @@ public interface CommonConstants {
String SIXTEEN_STRING = "16";
public static final String DEFAULT_PASSWORD = "123456";
/**
* number 0
*/
......
......@@ -65,7 +65,7 @@ public class PersonVo {
* 用户密码
*/
@Attribute(name = "userPassword")
private String password;
private Object password;
/**
* 用户角色
......
......@@ -498,6 +498,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
if (list1.stream().anyMatch(e -> e.equals(personVo.getUid()))) {
updateList.add(personVo);
} else {
//新增用户赋初始密码
personVo.setPassword(ENCODER.encode(CommonConstants.DEFAULT_PASSWORD));
insertList.add(personVo);
}
}
......
......@@ -214,12 +214,13 @@
<insert id="batchInsertUser" parameterType="java.util.List">
insert into sys_user
(user_id,username,phone,email,nickname,create_time)
(user_id,username,password,phone,email,nickname,create_time)
VALUES
<foreach collection="list" item="item" index="index" separator=",">
(
REPLACE(UUID(),"-",""),
#{item.uid},
#{item.password},
#{item.telephoneNumber},
#{item.email},
#{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