|
|
@@ -105,18 +105,24 @@ public class QuestionServiceImpl extends BaseServiceImpl<QuestionMapper, Questio |
|
|
|
} |
|
|
|
try { |
|
|
|
LambdaQueryWrapper<Question> questionLambdaQueryWrapper = new LambdaQueryWrapper<Question>() |
|
|
|
//只需要取最上面的那一条 |
|
|
|
.eq(Question::getMissionId, thMissions.get(0).getId()) |
|
|
|
.like(ObjectUtil.isNotEmpty(query.getName()), Question::getMissionName, query.getName()) |
|
|
|
.eq(ObjectUtil.isNotEmpty(query.getType()), Question::getType, query.getType()) |
|
|
|
.eq(Question::getStatus, QuestionStatusEnum.CONFIRM.getCode()) |
|
|
|
//.eq(Question::getTenantId, ShiroUtils.getTenantId()) |
|
|
|
.eq(Question::getMark, MarkTypeEnum.VALID.getCode()).orderByDesc(Question::getCreateTime); |
|
|
|
|
|
|
|
if(ObjectUtil.isNotEmpty(query.getStartTime()) && ObjectUtil.isNotEmpty(query.getEndTime())){ |
|
|
|
query.setStartTime(query.getStartTime()+" 00:00:00"); |
|
|
|
query.setEndTime(query.getEndTime()+" 23:59:59"); |
|
|
|
questionLambdaQueryWrapper.between(Question::getCreateTime, dateformat.parse(query.getStartTime()), dateformat.parse(query.getEndTime())); |
|
|
|
} |
|
|
|
|
|
|
|
if((ObjectUtil.isNotEmpty(query.getStartTime()) && ObjectUtil.isNotEmpty(query.getEndTime())) |
|
|
|
|| StringUtils.isNotEmpty(query.getMissionName())){ |
|
|
|
questionLambdaQueryWrapper.like(Question::getMissionName, query.getMissionName()); |
|
|
|
}else { |
|
|
|
//只需要取最上面的那一条 |
|
|
|
questionLambdaQueryWrapper.eq(Question::getMissionId, thMissions.get(0).getId()); |
|
|
|
} |
|
|
|
return questionMapper.selectList(questionLambdaQueryWrapper); |
|
|
|
}catch (Exception e){ |
|
|
|
e.printStackTrace(); |