Commit 0dbad0de75de717b7b379e623d6bd9fdaeb46702

Authored by shiyang
1 parent f52b828f1d
Exists in master

知识库-专家组推荐-推荐记录

Showing 6 changed files with 146 additions and 4 deletions

talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java View file @ 0dbad0d
... ... @@ -2,14 +2,12 @@
2 2  
3 3 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
4 4 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5   -import com.lyms.talkonlineweb.domain.ArticleInfo;
6   -import com.lyms.talkonlineweb.domain.LymsArticle;
7   -import com.lyms.talkonlineweb.domain.LymsDoctor;
8   -import com.lyms.talkonlineweb.domain.LymsPushedart;
  5 +import com.lyms.talkonlineweb.domain.*;
9 6 import com.lyms.talkonlineweb.result.BaseResponse;
10 7 import com.lyms.talkonlineweb.service.ArticleInfoService;
11 8 import com.lyms.talkonlineweb.service.LymsArticleService;
12 9 import com.lyms.talkonlineweb.service.LymsPushedartService;
  10 +import com.lyms.talkonlineweb.service.impl.PushedartlogsInfoServiceImpl;
13 11 import lombok.extern.log4j.Log4j2;
14 12 import org.springframework.beans.factory.annotation.Autowired;
15 13 import org.springframework.beans.factory.annotation.Value;
... ... @@ -43,6 +41,8 @@
43 41 @Autowired
44 42 private LymsPushedartService lymsPushedartService;//推送记录
45 43  
  44 + @Autowired
  45 + private PushedartlogsInfoServiceImpl pushedartlogsInfoService;
46 46 /**
47 47 * 上传文件
48 48 *
... ... @@ -167,6 +167,25 @@
167 167 Map<String, Object> pMap = lymsArticleService.getArtPushStat();
168 168 baseResponse.setObject(pMap);
169 169  
  170 + return baseResponse;
  171 + }
  172 + /**
  173 + * 专家组推荐-推荐记录
  174 + *
  175 + * @return
  176 + */
  177 + @GetMapping("getPushedartlogsInfo")
  178 + public BaseResponse getPushedartlogsInfo(PushedartlogsInfo pushedartlogsInfo, Integer current, Integer size){
  179 + BaseResponse baseResponse=new BaseResponse();
  180 + try {
  181 + Page<PushedartlogsInfo> page=new Page<>(current,size);
  182 + Page<PushedartlogsInfo> pushedartlogsInfoPage=pushedartlogsInfoService.page(page,Wrappers.query(pushedartlogsInfo).orderByDesc("createdtime"));
  183 + baseResponse.setObject(pushedartlogsInfoPage);
  184 + baseResponse.setErrormsg("成功");
  185 + } catch (Exception e) {
  186 + baseResponse.setErrormsg("失败");
  187 + e.printStackTrace();
  188 + }
170 189 return baseResponse;
171 190 }
172 191  
talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/PushedartlogsInfo.java View file @ 0dbad0d
  1 +package com.lyms.talkonlineweb.domain;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableField;
  5 +import com.baomidou.mybatisplus.annotation.TableId;
  6 +import com.baomidou.mybatisplus.annotation.TableName;
  7 +import java.io.Serializable;
  8 +import java.util.Date;
  9 +import lombok.Data;
  10 +
  11 +/**
  12 + *
  13 + * @TableName pushedartLogs_info
  14 + */
  15 +@TableName(value ="pushedartLogs_info")
  16 +@Data
  17 +public class PushedartlogsInfo implements Serializable {
  18 + /**
  19 + * 文章标题
  20 + */
  21 + @TableField(value = "title")
  22 + private String title;
  23 +
  24 + /**
  25 + * 文章内容
  26 + */
  27 + @TableField(value = "content")
  28 + private String content;
  29 +
  30 + /**
  31 + * 推送时间
  32 + */
  33 + @TableField(value = "createdtime")
  34 + private Date createdtime;
  35 +
  36 + /**
  37 + * 科室名称
  38 + */
  39 + @TableField(value = "dname")
  40 + private String dname;
  41 +
  42 + /**
  43 + * 疾病种类
  44 + */
  45 + @TableField(value = "illness")
  46 + private String illness;
  47 +
  48 + /**
  49 + * 患者名称
  50 + */
  51 + @TableField(value = "pname")
  52 + private String pname;
  53 +
  54 + @TableField(exist = false)
  55 + private static final long serialVersionUID = 1L;
  56 +
  57 +}
talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/PushedartlogsInfoMapper.java View file @ 0dbad0d
  1 +package com.lyms.talkonlineweb.mapper;
  2 +
  3 +import com.lyms.talkonlineweb.domain.PushedartlogsInfo;
  4 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  5 +
  6 +/**
  7 + * @Entity com.lyms.talkonlineweb.domain.PushedartlogsInfo
  8 + */
  9 +public interface PushedartlogsInfoMapper extends BaseMapper<PushedartlogsInfo> {
  10 +
  11 +}
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/PushedartlogsInfoService.java View file @ 0dbad0d
  1 +package com.lyms.talkonlineweb.service;
  2 +
  3 +import com.lyms.talkonlineweb.domain.PushedartlogsInfo;
  4 +import com.baomidou.mybatisplus.extension.service.IService;
  5 +
  6 +/**
  7 + *
  8 + */
  9 +public interface PushedartlogsInfoService extends IService<PushedartlogsInfo> {
  10 +
  11 +}
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/PushedartlogsInfoServiceImpl.java View file @ 0dbad0d
  1 +package com.lyms.talkonlineweb.service.impl;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  4 +import com.lyms.talkonlineweb.domain.PushedartlogsInfo;
  5 +import com.lyms.talkonlineweb.service.PushedartlogsInfoService;
  6 +import com.lyms.talkonlineweb.mapper.PushedartlogsInfoMapper;
  7 +import org.springframework.stereotype.Service;
  8 +
  9 +/**
  10 + *
  11 + */
  12 +@Service
  13 +public class PushedartlogsInfoServiceImpl extends ServiceImpl<PushedartlogsInfoMapper, PushedartlogsInfo>
  14 + implements PushedartlogsInfoService{
  15 +
  16 +}
talkonlineweb/src/main/resources/mapper/PushedartlogsInfoMapper.xml View file @ 0dbad0d
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper
  3 + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4 + "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5 +<mapper namespace="com.lyms.talkonlineweb.mapper.PushedartlogsInfoMapper">
  6 +
  7 + <resultMap id="BaseResultMap" type="com.lyms.talkonlineweb.domain.PushedartlogsInfo">
  8 + <result property="title" column="title" jdbcType="VARCHAR"/>
  9 + <result property="content" column="content" jdbcType="VARCHAR"/>
  10 + <result property="createdtime" column="createdtime" jdbcType="TIMESTAMP"/>
  11 + <result property="dname" column="dname" jdbcType="VARCHAR"/>
  12 + <result property="illness" column="illness" jdbcType="VARCHAR"/>
  13 + <result property="pname" column="pname" jdbcType="VARCHAR"/>
  14 + </resultMap>
  15 +
  16 + <sql id="Base_Column_List">
  17 + title,content,createdtime,
  18 + dname,illness,pname
  19 + </sql>
  20 +</mapper>