记得上下班打卡 | git大法好,push需谨慎

Commit 2c9082ec authored by jiangxiulong's avatar jiangxiulong

push

parent a104a5c8
...@@ -44,47 +44,21 @@ public class AdminUpushServiceImpl extends ServiceImpl<AdminUpushMapper, AdminUp ...@@ -44,47 +44,21 @@ public class AdminUpushServiceImpl extends ServiceImpl<AdminUpushMapper, AdminUp
RedisUtil redisUtil; RedisUtil redisUtil;
public PageInfo<AdminUpushVo> lists(Integer page, Integer size) { public PageInfo<AdminUpushVo> lists(Integer page, Integer size) {
/*Query query = Query.query(
Criteria.where("specifyType").is(2).and("messageType").is(2)
.and("pushTime").lt(DateUtil.getNowTime())
);
long count = mongoTemplate.count(query, AdminUpushVo.class.getSimpleName());
PageInfo<AdminUpushVo> voPageInfo = null;
if (count > 0) {
Pageable pageable = PageRequest.of(page - 1, size, Sort.by(Sort.Direction.DESC, "createdAt"));
query.with(pageable);
List<AdminUpushVo> msgList = mongoTemplate.find(
query,
AdminUpushVo.class,
AdminUpushVo.class.getSimpleName()
);
if (!CollectionUtils.isEmpty(msgList)) {
for (AdminUpushVo info : msgList) {
if (!info.getImg().isEmpty()) {
String img = imgUrl + info.getImg();
info.setImg(img);
}
}
}
voPageInfo = PageInfo.of(msgList);
voPageInfo.setTotal(count);
} else {
voPageInfo = new PageInfo<>();
}
return voPageInfo;*/
PageInfo<AdminUpushVo> voPageInfo = null; PageInfo<AdminUpushVo> voPageInfo = null;
Object adminUpushVo = redisUtil.get(KylinRedisConst.ADMIN_UPUSH_LIST); Object adminUpushVo = redisUtil.get(KylinRedisConst.ADMIN_UPUSH_LIST);
if (null == adminUpushVo) { if (null == adminUpushVo) {
voPageInfo = PageInfo.of(null); voPageInfo = PageInfo.of(null);
} else { } else {
// TODO: 2021/7/29 判断 安卓还是ios 还是全部
LinkedList<AdminUpushVo> pushList = (LinkedList<AdminUpushVo>) adminUpushVo; LinkedList<AdminUpushVo> pushList = (LinkedList<AdminUpushVo>) adminUpushVo;
for (AdminUpushVo info : pushList) {
if (!info.getImg().isEmpty()) {
String img = imgUrl + info.getImg();
info.setImg(img);
}
}
voPageInfo = PageInfo.of(pushList); voPageInfo = PageInfo.of(pushList);
voPageInfo.setTotal(pushList.size());
} }
return voPageInfo; return voPageInfo;
} }
......
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