|
@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
@@ -92,7 +93,7 @@ public class TreePosterContentServiceImpl extends ServiceImpl<ITreePosterContent
|
|
|
|
|
|
IPage<TreePosterContent> pageInfo = this.lambdaQuery()
|
|
|
.eq(TreePosterContent::getAppUserId, queryDTO.getAppUserId())
|
|
|
- .eq(TreePosterContent::getAppUserId, queryDTO.getAppUserId())
|
|
|
+ .eq(TreePosterContent::getTreeId, queryDTO.getTreeId())
|
|
|
.page(page);
|
|
|
List<AppTreePosterContentRespDTO> list = new ArrayList<>();
|
|
|
AppTreePosterContentRespDTO respDTO;
|
|
@@ -105,4 +106,26 @@ public class TreePosterContentServiceImpl extends ServiceImpl<ITreePosterContent
|
|
|
pageResult.setTotal(pageInfo.getTotal());
|
|
|
return pageResult;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<AppTreePosterContentRespDTO> getList(AppTreePosterContentQueryDTO queryDTO) {
|
|
|
+ List<AppTreePosterContentRespDTO> list = new ArrayList<>();
|
|
|
+ AppTreePosterContentRespDTO respDTO;
|
|
|
+
|
|
|
+ // 当天最小时间
|
|
|
+ LocalDateTime min = LocalDateTime.of(LocalDate.from(LocalDateTime.now()), LocalDateTime.MIN.toLocalTime());
|
|
|
+ // 当天最大时间
|
|
|
+ LocalDateTime max = LocalDateTime.of(LocalDate.from(LocalDateTime.now()), LocalDateTime.MAX.toLocalTime());
|
|
|
+
|
|
|
+ List<TreePosterContent> treePosterContentList = this.lambdaQuery()
|
|
|
+ .eq(TreePosterContent::getTreeId, queryDTO.getTreeId())
|
|
|
+ .between(TreePosterContent::getCreatedTime, min, max)
|
|
|
+ .list();
|
|
|
+ for (TreePosterContent treePosterContent : treePosterContentList) {
|
|
|
+ respDTO = new AppTreePosterContentRespDTO();
|
|
|
+ BeanUtil.copyProperties(treePosterContent, respDTO);
|
|
|
+ list.add(respDTO);
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
}
|