feat(admin): 实现用户管理列表及新增用户功能

- 新增用户列表页面,实现分页查询和条件筛选
- 增加新增用户弹窗表单,支持姓名、手机号及密码录入和校验
- 后端新增 AdminController 提供用户列表查询和创建接口
- 完善 UserService 和 RoleService,支持分页用户数据获取及用户角色映射
- 丰富数据库 Mapper 增加用户及用户角色相关查询插入操作
- 定时任务 UserRoleTask 调整调用角色服务更新权限缓存
- 前端接口封装新建用户相关请求便于调用
- 使用密码加密存储新建用户密码保障安全
This commit is contained in:
lbw
2025-12-24 11:25:27 +08:00
parent 5404f295e4
commit 4135b72648
19 changed files with 424 additions and 90 deletions

View File

@@ -8,8 +8,6 @@
<result column="openid" jdbcType="VARCHAR" property="openid" />
<result column="phone" jdbcType="VARCHAR" property="phone" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="is_deleted" jdbcType="INTEGER" property="isDeleted" />
</resultMap>
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
@@ -17,18 +15,36 @@
values (#{password}, #{phone}, #{name})
</insert>
<insert id="createUser">
insert into user (phone, name, password)
values (#{phone}, #{name}, #{password})
</insert>
<select id="selectByPhone" resultMap="BaseResultMap">
select *
from user
where phone = #{phone}
and is_deleted = 0
</select>
<select id="selectById">
select *
from user
where id = #{id}
and is_deleted = 0
</select>
<select id="selectUserDOList" resultMap="BaseResultMap">
select *
from user
where 1 = 1
<if test="name != null">
and name = #{name}
</if>
limit #{startIndex}, #{pageSize}
</select>
<select id="selectUserTotal" resultType="java.lang.Integer">
select count(*)
from user
</select>
</mapper>