Commit 40c90cf1 by 徐高华

朋友圈

parent 066bfdd5
......@@ -64,6 +64,16 @@ public class QwMomentPlanAttendServiceImpl implements QwMomentPlanAttendService
@Override
public ServiceResponse<Page<QwMomentPlanAttendDTO>> attendList(PlanClerkListQDTO qdto) {
// 0已失效 1待完成 2已完成
int sendStatus = qdto.getSendStatus() ;
TabQwMomentPlan plan = this.qwMomentPlanMapper.getById(qdto.getPlanId()) ;
boolean isEnd = plan.getStatusFlag()==2 || plan.getEndDate().getTime() <= System.currentTimeMillis() ;
if(isEnd && sendStatus==1) {
return ServiceResponse.success(new Page<>());
}
if(!isEnd && sendStatus==0) {
return ServiceResponse.success(new Page<>());
}
PageHelper.startPage(qdto);
if(StringUtils.isNotEmpty(qdto.getClerkParams())) {
qdto.setClerkParamsLike("%"+qdto.getClerkParams()+"%");
......@@ -79,6 +89,9 @@ public class QwMomentPlanAttendServiceImpl implements QwMomentPlanAttendService
}
List<QwMomentPlanAttendDTO> list = this.qwMomentPlanAttendMapper.list(qdto);
Page<QwMomentPlanAttendDTO> retPage = PageHelperUtils.changePageHelperToCurrentPage(list, QwMomentPlanAttendDTO.class);
if(CollectionUtils.isNotEmpty(retPage.getResult()) && sendStatus==0) {
retPage.getResult().forEach(o->o.setTaskStatus(0));
}
return ServiceResponse.success(retPage);
}
......
......@@ -74,13 +74,13 @@
and ( a.create_time >= #{startTime} and a.create_time <![CDATA[ <= ]]> #{endTime} )
</if>
<if test="sendStatus==0">
and a.task_status = 2 and b.end_time > now()
and a.task_status = 1
</if>
<if test="sendStatus==1">
and a.task_status = 1
</if>
<if test="sendStatus==2">
and a.task_status = 2 and b.end_time <![CDATA[ <= ]]> now()
and a.task_status = 2
</if>
and a.status_flag = #{statusFlag}
</select>
......
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