Commit 0e5e1cc8e8e91553f4fa559b165690283400f911

Authored by shiyang
1 parent 764c84f446
Exists in master

新推送记录列表

Showing 3 changed files with 45 additions and 8 deletions

talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java View file @ 0e5e1cc
... ... @@ -6,10 +6,7 @@
6 6 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7 7 import com.lyms.talkonlineweb.domain.*;
8 8 import com.lyms.talkonlineweb.result.BaseResponse;
9   -import com.lyms.talkonlineweb.service.ArticleInfoService;
10   -import com.lyms.talkonlineweb.service.GetpushartInfoService;
11   -import com.lyms.talkonlineweb.service.LymsArticleService;
12   -import com.lyms.talkonlineweb.service.LymsPushedartService;
  9 +import com.lyms.talkonlineweb.service.*;
13 10 import com.lyms.talkonlineweb.service.impl.PushedartlogsInfoServiceImpl;
14 11 import lombok.extern.log4j.Log4j2;
15 12 import org.apache.commons.io.IOUtils;
... ... @@ -53,6 +50,9 @@
53 50  
54 51 @Autowired
55 52 private GetpushartInfoService getpushartInfoService;//小程序用户端-根据患者获取推送的文章-视图
  53 +
  54 + @Autowired
  55 + private LymsPushMessagesService lymsPushMessagesService;
56 56 /**
57 57 * 上传文件
58 58 *
... ... @@ -359,6 +359,31 @@
359 359 return baseResponse;
360 360 }
361 361  
  362 + /**
  363 + * 新推送记录列表
  364 + *
  365 + * @return
  366 + */
  367 + @GetMapping("getLymsPushMessages")
  368 + public BaseResponse getLymsPushMessages(LymsPushMessages lymsPushMessages, Integer current, Integer size){
  369 + BaseResponse baseResponse=new BaseResponse();
  370 + try {
  371 + Page<LymsPushMessages> page=new Page<>(current,size);
  372 + QueryWrapper<LymsPushMessages> queryWrapper = new QueryWrapper<>();
  373 + queryWrapper.setEntity(lymsPushMessages);
  374 + if(null!=lymsPushMessages.getStartDate()&&null!=lymsPushMessages.getEndDate()){
  375 + queryWrapper.ge("plan_time", lymsPushMessages.getStartDate()).le("plan_time",lymsPushMessages.getEndDate());
  376 + }
  377 + queryWrapper.orderByDesc("plan_time");
  378 + Page<LymsPushMessages> lymsPushMessagesPage=lymsPushMessagesService.page(page,queryWrapper);
  379 + baseResponse.setObject(lymsPushMessagesPage);
  380 + baseResponse.setErrormsg("成功");
  381 + } catch (Exception e) {
  382 + baseResponse.setErrormsg("失败");
  383 + e.printStackTrace();
  384 + }
  385 + return baseResponse;
  386 + }
362 387  
363 388 }
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/TestController.java View file @ 0e5e1cc
... ... @@ -15,12 +15,12 @@
15 15 public PushArticleTask pushArticleTask;
16 16 @Autowired
17 17 public PushArticleTaskData pushArticleTaskData;
18   - @GetMapping("test0")
19   - public void test0() {
20   - pushArticleTask.pushArtcle();
21   - }
22 18 @GetMapping("test9")
23 19 public void test9() {
  20 + pushArticleTask.pushArtcle();
  21 + }
  22 + @GetMapping("test0")
  23 + public void test0() {
24 24 pushArticleTaskData.pushArtcleData();
25 25 }
26 26  
talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPushMessages.java View file @ 0e5e1cc
... ... @@ -153,6 +153,18 @@
153 153 @TableField(value = "plan_time")
154 154 private Date planTime;
155 155  
  156 + /**
  157 + * 列表筛选条件startDate
  158 + */
  159 + @TableField(exist = false)
  160 + private String startDate;
  161 +
  162 + /**
  163 + * 列表筛选条件endDate
  164 + */
  165 + @TableField(exist = false)
  166 + private String endDate;
  167 +
156 168 @TableField(exist = false)
157 169 private static final long serialVersionUID = 1L;
158 170