Commit dfeec976 authored by shiyu's avatar shiyu

签到任务判断是否过期

parent b968c205
......@@ -125,4 +125,9 @@ public class SignInTaskVo implements Entity {
* 在规定的时间段内
*/
private Boolean isSignInAble = true;
/**
* 是否过期
*/
private Boolean isExpire = false;
}
......@@ -93,6 +93,9 @@ public class QdSignInTaskServiceImpl implements QdSignInTaskService {
}
long joinPeopleNum = qdUserSignInTaskDao.countByTaskId(task.getId());
signInTaskVo.setJoinPeopleNum(joinPeopleNum);
if (task.getEndValidTime().before(new Date())) {
signInTaskVo.setIsExpire(true);
}
signInTaskVoList.add(signInTaskVo);
}
return Result.success(PageSearchResult.of(pageInfo, signInTaskVoList));
......
......@@ -17,7 +17,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
......
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