Commit 86f4cc6b authored by W_Y's avatar W_Y

查询待办任务列表

parent ddc1bec8
...@@ -19,6 +19,13 @@ import java.util.List; ...@@ -19,6 +19,13 @@ import java.util.List;
public interface ReviewSceneChangeTaskMapper extends BaseMapper<ReviewSceneChangeTask> { public interface ReviewSceneChangeTaskMapper extends BaseMapper<ReviewSceneChangeTask> {
List<ReviewSceneChangeTask> findLastChangeByTaskId(@Param("taskId") Long taskId); List<ReviewSceneChangeTask> findLastChangeByTaskId(@Param("taskId") Long taskId);
/**
* 根据任务状态和用户ID查询列表
* @param taskStatus
* @return
*/
List<ReviewSceneChangeTask> findListByUserIdAndStatus(@Param("userId") Long userId, @Param("taskStatus") String taskStatus);
} }
......
...@@ -45,4 +45,12 @@ public interface ReviewSceneChangeTaskService extends IService<ReviewSceneChange ...@@ -45,4 +45,12 @@ public interface ReviewSceneChangeTaskService extends IService<ReviewSceneChange
*/ */
List<ReviewSceneChangeTask> findLastChangeByTaskId(Long taskId); List<ReviewSceneChangeTask> findLastChangeByTaskId(Long taskId);
/**
* 根据用户ID和任务状态查询列表
* @param userId
* @param taskStatus
* @return
*/
List<ReviewSceneChangeTask> findListByUserIdAndStatus(Long userId, String taskStatus);
} }
...@@ -184,6 +184,18 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha ...@@ -184,6 +184,18 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
return true; return true;
} }
/**
* 根据用户ID和任务状态查询列表
* @param userId
* @param taskStatus
* @return
*/
@Override
public List<ReviewSceneChangeTask> findListByUserIdAndStatus(Long userId, String taskStatus) {
List<ReviewSceneChangeTask> reviewSceneChangeTask = reviewSceneChangeTaskMapper.findListByUserIdAndStatus(userId,taskStatus);
return reviewSceneChangeTask;
}
} }
......
...@@ -3,6 +3,7 @@ package com.ruoyi.web; ...@@ -3,6 +3,7 @@ package com.ruoyi.web;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.bean.BeanUtils; import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.domain.ReviewSceneChangeTask; import com.ruoyi.domain.ReviewSceneChangeTask;
...@@ -38,4 +39,12 @@ public class ReviewSceneChangeTaskController extends BaseController { ...@@ -38,4 +39,12 @@ public class ReviewSceneChangeTaskController extends BaseController {
return success(); return success();
} }
@Trace
@Log(title = "待办任务列表")
@RequestMapping(method = RequestMethod.POST, value = "/findPending")
public TableDataInfo findPending() {
startPage();
return getDataTable(reviewSceneChangeTaskService.findListByUserIdAndStatus(getUserId(),ReviewSceneChangeTask.STATUS_PENDING));
}
} }
...@@ -29,4 +29,10 @@ ...@@ -29,4 +29,10 @@
) )
</select> </select>
<select id="findListByUserIdAndStatus" resultType="com.ruoyi.domain.ReviewSceneChangeTask">
SELECT sct.* FROM t_review_scene_change_task sct
LEFT JOIN t_review_scene_change_task_user_relation sctu ON sct.id = sctu.task_id
WHERE sctu.user_id = #{userId} and sct.task_status = #{taskStatus}
</select>
</mapper> </mapper>
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