消息模块、爬虫
This commit is contained in:
@@ -6,12 +6,12 @@
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>school-news</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>system</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
<version>1.0.0</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
@@ -23,14 +23,14 @@
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>api-system</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Common模块依赖 -->
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-all</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring Boot Web -->
|
||||
|
||||
@@ -50,6 +50,15 @@ public interface UserMapper extends BaseMapper<TbSysUser> {
|
||||
*/
|
||||
int deleteUser(@Param("userID") String userID);
|
||||
|
||||
/**
|
||||
* @description 根据用户ID查询用户
|
||||
* @param userID 用户ID
|
||||
* @return TbSysUser 用户信息
|
||||
* @author yslg
|
||||
* @since 2025-11-13
|
||||
*/
|
||||
TbSysUser selectUserById(@Param("userID") String userID);
|
||||
|
||||
/**
|
||||
* @description 根据用户名查询用户
|
||||
* @param username 用户名
|
||||
@@ -182,6 +191,21 @@ public interface UserMapper extends BaseMapper<TbSysUser> {
|
||||
*/
|
||||
UserVO selectUserInfoTotal(@Param("userId") String userId);
|
||||
|
||||
|
||||
|
||||
int countDeptUser(@Param("deptId") String deptId);
|
||||
|
||||
/**
|
||||
* @description 查询部门及其子部门的所有用户ID
|
||||
* @param deptId 部门ID
|
||||
* @return List<String> 用户ID列表
|
||||
*/
|
||||
List<String> selectUserIdsByDeptId(@Param("deptId") String deptId);
|
||||
|
||||
/**
|
||||
* @description 查询指定部门及其子部门中指定角色的所有用户ID
|
||||
* @param deptId 部门ID
|
||||
* @param roleId 角色ID
|
||||
* @return List<String> 用户ID列表
|
||||
*/
|
||||
List<String> selectUserIdsByDeptRole(@Param("deptId") String deptId, @Param("roleId") String roleId);
|
||||
}
|
||||
|
||||
@@ -143,6 +143,15 @@
|
||||
</sql>
|
||||
|
||||
<!-- 根据用户名查询用户 -->
|
||||
<!-- 根据用户ID查询用户 -->
|
||||
<select id="selectUserById" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM tb_sys_user
|
||||
WHERE id = #{userID}
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectByUsername" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
@@ -560,7 +569,7 @@
|
||||
AND tsui.deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- countDeptUser - 递归统计部门及其子部门的用户数量 -->
|
||||
<!-- countDeptUser - 递归统计部门及其子部门的用户数量 -->
|
||||
<select id="countDeptUser" resultType="int">
|
||||
SELECT COUNT(DISTINCT tudr.user_id)
|
||||
FROM tb_sys_user_dept_role tudr
|
||||
@@ -573,6 +582,35 @@
|
||||
)
|
||||
</select>
|
||||
|
||||
<!-- selectUserIdsByDeptId - 查询部门及其子部门的所有用户ID -->
|
||||
<select id="selectUserIdsByDeptId" resultType="java.lang.String">
|
||||
SELECT DISTINCT tudr.user_id
|
||||
FROM tb_sys_user_dept_role tudr
|
||||
INNER JOIN tb_sys_dept d ON tudr.dept_id = d.dept_id AND d.deleted = 0
|
||||
INNER JOIN tb_sys_user u ON tudr.user_id = u.id AND u.deleted = 0
|
||||
WHERE tudr.deleted = 0
|
||||
AND u.status = 1
|
||||
AND d.dept_path LIKE CONCAT(
|
||||
(SELECT dept_path FROM tb_sys_dept WHERE dept_id = #{deptId} AND deleted = 0),
|
||||
'%'
|
||||
)
|
||||
</select>
|
||||
|
||||
<!-- selectUserIdsByDeptRole - 查询指定部门及其子部门中指定角色的所有用户ID -->
|
||||
<select id="selectUserIdsByDeptRole" resultType="java.lang.String">
|
||||
SELECT DISTINCT tudr.user_id
|
||||
FROM tb_sys_user_dept_role tudr
|
||||
INNER JOIN tb_sys_dept d ON tudr.dept_id = d.dept_id AND d.deleted = 0
|
||||
INNER JOIN tb_sys_user u ON tudr.user_id = u.id AND u.deleted = 0
|
||||
WHERE tudr.deleted = 0
|
||||
AND u.status = 1
|
||||
AND tudr.role_id = #{roleId}
|
||||
AND d.dept_path LIKE CONCAT(
|
||||
(SELECT dept_path FROM tb_sys_dept WHERE dept_id = #{deptId} AND deleted = 0),
|
||||
'%'
|
||||
)
|
||||
</select>
|
||||
|
||||
<!-- selectLoginUser -->
|
||||
|
||||
<select id="selectLoginUser">
|
||||
|
||||
Reference in New Issue
Block a user