提交 1101e346 authored 作者: hzh's avatar hzh

代码优化

上级 69aa4fb7
...@@ -64,7 +64,7 @@ public class ApplyServiceImpl extends AbstractBaseService<ApplyVo, ApplyBo, Appl ...@@ -64,7 +64,7 @@ public class ApplyServiceImpl extends AbstractBaseService<ApplyVo, ApplyBo, Appl
lqw.eq(bo.getApplyTime() != null, Apply::getApplyTime, bo.getApplyTime()); lqw.eq(bo.getApplyTime() != null, Apply::getApplyTime, bo.getApplyTime());
lqw.eq(StringUtils.isNotEmpty(bo.getAddress()), Apply::getAddress, bo.getAddress()); lqw.eq(StringUtils.isNotEmpty(bo.getAddress()), Apply::getAddress, bo.getAddress());
lqw.eq(bo.getStartTime() != null, Apply::getStartTime, bo.getStartTime()); lqw.eq(bo.getStartTime() != null, Apply::getStartTime, bo.getStartTime());
lqw.ge(bo.getEndTime() != null, Apply::getEndTime, bo.getEndTime()); lqw.eq(bo.getEndTime() != null, Apply::getEndTime, bo.getEndTime());
lqw.eq(StringUtils.isNotEmpty(bo.getApplyReason()), Apply::getApplyReason, bo.getApplyReason()); lqw.eq(StringUtils.isNotEmpty(bo.getApplyReason()), Apply::getApplyReason, bo.getApplyReason());
lqw.eq(StringUtils.isNotEmpty(bo.getStatus()), Apply::getStatus, bo.getStatus()); lqw.eq(StringUtils.isNotEmpty(bo.getStatus()), Apply::getStatus, bo.getStatus());
Optional.ofNullable(params).map(map -> map.get("phone")) Optional.ofNullable(params).map(map -> map.get("phone"))
...@@ -76,6 +76,10 @@ public class ApplyServiceImpl extends AbstractBaseService<ApplyVo, ApplyBo, Appl ...@@ -76,6 +76,10 @@ public class ApplyServiceImpl extends AbstractBaseService<ApplyVo, ApplyBo, Appl
lqw.in(Apply::getId, CollectionUtils.isEmpty(apList) ? List.of(-1) : StreamUtils.toList(apList, ApplyPerson::getApplyId)); lqw.in(Apply::getId, CollectionUtils.isEmpty(apList) ? List.of(-1) : StreamUtils.toList(apList, ApplyPerson::getApplyId));
} }
}); });
Optional.ofNullable(params).map(map -> map.get("endTime"))
.ifPresent(endTime -> {
lqw.ge(Apply::getEndTime, endTime);
});
return lqw; return lqw;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论