修复查询出未发布的任务
This commit is contained in:
@@ -435,7 +435,7 @@ public class SCLearningTaskServiceImpl implements LearningTaskService {
|
|||||||
// 找出要删除的用户关联
|
// 找出要删除的用户关联
|
||||||
List<String> userIDsToDelete = existingUserMap.values().stream()
|
List<String> userIDsToDelete = existingUserMap.values().stream()
|
||||||
.filter(taskUser -> !newUserIDs.contains(taskUser.getUserID()))
|
.filter(taskUser -> !newUserIDs.contains(taskUser.getUserID()))
|
||||||
.map(TbTaskUser::getID)
|
.map(TbTaskUser::getId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
if (!userIDsToDelete.isEmpty()) {
|
if (!userIDsToDelete.isEmpty()) {
|
||||||
|
|||||||
@@ -64,9 +64,22 @@
|
|||||||
<!-- selectTaskUsers -->
|
<!-- selectTaskUsers -->
|
||||||
<select id="selectTaskUsers" resultMap="BaseResultMap">
|
<select id="selectTaskUsers" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="Base_Column_List"/>
|
ttu.*
|
||||||
FROM tb_task_user
|
FROM tb_task_user ttu
|
||||||
<include refid="Where_Clause"/>
|
INNER JOIN tb_learning_task tlt ON ttu.task_id = tlt.task_id AND tlt.status = 1
|
||||||
|
WHERE 1=1
|
||||||
|
<if test="taskID != null and taskID != ''">
|
||||||
|
AND ttu.task_id = #{taskID}
|
||||||
|
</if>
|
||||||
|
<if test="userID != null and userID != ''">
|
||||||
|
AND ttu.user_id = #{userID}
|
||||||
|
</if>
|
||||||
|
<if test="deptID != null and deptID != ''">
|
||||||
|
AND ttu.dept_id = #{deptID}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND ttu.status = #{status}
|
||||||
|
</if>
|
||||||
ORDER BY create_time DESC
|
ORDER BY create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -249,9 +262,22 @@
|
|||||||
<!-- 分页查询任务用户关联 -->
|
<!-- 分页查询任务用户关联 -->
|
||||||
<select id="selectTaskUsersPage" resultMap="BaseResultMap">
|
<select id="selectTaskUsersPage" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="Base_Column_List" />
|
ttu.*
|
||||||
FROM tb_task_user
|
FROM tb_task_user ttu
|
||||||
<include refid="Where_Clause" />
|
INNER JOIN tb_learning_task tlt on ttu.task_id = tlt.task_id AND tlt.status=1
|
||||||
|
WHERE 1=1
|
||||||
|
<if test="taskID != null and taskID != ''">
|
||||||
|
AND ttu.task_id = #{taskID}
|
||||||
|
</if>
|
||||||
|
<if test="userID != null and userID != ''">
|
||||||
|
AND ttu.user_id = #{userID}
|
||||||
|
</if>
|
||||||
|
<if test="deptID != null and deptID != ''">
|
||||||
|
AND ttu.dept_id = #{deptID}
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
AND ttu.status = #{status}
|
||||||
|
</if>
|
||||||
ORDER BY create_time DESC
|
ORDER BY create_time DESC
|
||||||
LIMIT #{pageParam.pageSize} OFFSET #{pageParam.offset}
|
LIMIT #{pageParam.pageSize} OFFSET #{pageParam.offset}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user