fix
This commit is contained in:
parent
6fad729be5
commit
41eb361911
@ -31,13 +31,13 @@ public interface TaskProcessRecordMapper extends BaseMapper<TaskProcessRecord> {
|
||||
|
||||
int deleteTaskProcessRecordById(@Param("id") Long id);
|
||||
|
||||
List<TaskProcessRecordDto> selectTaskProcessRecordsByTaskId(@Param("page") IPage page, @Param("taskId") Long taskId,@Param("useType") int useType);
|
||||
List<TaskProcessRecordDto> selectTaskProcessRecordsByTaskId(@Param("page") IPage page, @Param("taskId") Long taskId,@Param("useType") Integer useType);
|
||||
|
||||
int deleteTaskProcessRecordsByTaskId(@Param("taskId") Long taskId);
|
||||
|
||||
TaskProcessRecordDto selectTaskProcessRecordLastByTaskId(@Param("taskId") Long taskId);
|
||||
|
||||
List<TaskProcessRecordDto> selectTaskProcessRecordsByTaskIds(@Param("page") IPage page, @Param("taskIds") List<Long> taskIds,@Param("useType") int useType);
|
||||
List<TaskProcessRecordDto> selectTaskProcessRecordsByTaskIdsAndType(@Param("page") IPage page, @Param("taskIds") List<Long> taskIds,@Param("useType") Integer useType);
|
||||
|
||||
List<TaskProcessRecord> selectByCondition(@Param("page") IPage page, @Param("taskModel") TaskModel taskModel);
|
||||
}
|
||||
@ -38,6 +38,6 @@ public class TaskProcessRecordDto {
|
||||
@ApiModelProperty(value = "任务名称", name = "name")
|
||||
private String name;
|
||||
//1,修改名称,2修改进度 ,3名称和进度都修改
|
||||
@ApiModelProperty(value = "0表示记录,1 表示评论", name = "useType")
|
||||
@ApiModelProperty(value = "0表示记录,不传全部", name = "useType")
|
||||
private Integer useType;
|
||||
}
|
||||
|
||||
@ -21,6 +21,6 @@ public class ChangeTaskListReq extends BasePage {
|
||||
@ApiModelProperty(value="详情id(二选一)",name = "detailId")
|
||||
private Long detailId;
|
||||
|
||||
@ApiModelProperty(value="0:不包含评论,1包含评论",name = "type")
|
||||
private int useType;
|
||||
@ApiModelProperty(value="0:不包含评论,1评论",name = "type")
|
||||
private Integer useType;
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.lz.modules.performance.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.modules.app.entity.StaffEntity;
|
||||
import com.lz.modules.app.model.TaskModel;
|
||||
@ -21,6 +22,7 @@ import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
@ -97,7 +99,7 @@ public class TaskProcessRecordServiceImpl extends ServiceImpl<TaskProcessRecordM
|
||||
if(CollectionUtils.isNotEmpty(resultTaskDtos)){
|
||||
List<Long> collect = resultTaskDtos.stream().map(resultTaskDto -> resultTaskDto.getId()).collect(Collectors.toList());
|
||||
pageUtils = PageUtils.startPage(req.getCurrPage(),req.getPageSize()).doSelect(
|
||||
page -> taskProcessRecordMapper.selectTaskProcessRecordsByTaskIds(page, collect,req.getUseType())
|
||||
page -> taskProcessRecordMapper.selectTaskProcessRecordsByTaskIdsAndType(page, collect,req.getUseType())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -129,7 +129,11 @@
|
||||
</update>
|
||||
|
||||
<select id="selectTaskProcessRecordsByTaskId" resultType="com.lz.modules.performance.dto.TaskProcessRecordDto">
|
||||
select gmt_create,remark,label,type,name,use_type from lz_task_process_record where task_id=#{taskId} and use_type = #{useType} and is_delete = 0 order by gmt_create desc
|
||||
select gmt_create,remark,label,type,name,use_type from lz_task_process_record where task_id=#{taskId}
|
||||
<if test="useType !=null">
|
||||
and use_type = #{useType}
|
||||
</if>
|
||||
and is_delete = 0 order by gmt_create desc
|
||||
</select>
|
||||
|
||||
<update id="deleteTaskProcessRecordsByTaskId" parameterType="java.lang.Long">
|
||||
@ -137,12 +141,16 @@
|
||||
</update>
|
||||
|
||||
<select id="selectTaskProcessRecordLastByTaskId" resultType="com.lz.modules.performance.dto.TaskProcessRecordDto">
|
||||
select gmt_create,remark,label,type from lz_task_process_record where task_id=#{taskId} and is_delete = 0 order by id desc limit 1
|
||||
select gmt_create,remark,label,type from lz_task_process_record where task_id=#{taskId} and is_delete = 0
|
||||
order by id desc limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectTaskProcessRecordsByTaskIds" resultType="com.lz.modules.performance.dto.TaskProcessRecordDto">
|
||||
select gmt_create,remark,label,type from lz_task_process_record where is_delete = 0 and use_type = #{useType}
|
||||
<select id="selectTaskProcessRecordsByTaskIdsAndType" resultType="com.lz.modules.performance.dto.TaskProcessRecordDto">
|
||||
select gmt_create,remark,label,type from lz_task_process_record where is_delete = 0
|
||||
<if test="useType !=null">
|
||||
and use_type = #{useType}
|
||||
</if>
|
||||
and task_id in
|
||||
<foreach collection="taskIds" item="taskId" separator="," open="(" close=")">
|
||||
#{taskId}
|
||||
@ -155,6 +163,5 @@
|
||||
select * from lz_task_process_record where is_delete = 0 and (detail_id = #{taskModel.detailId} or task_id=#{taskModel.taskId} ) and use_type=#{taskModel.useType} order by id desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user