diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java index a069373..a4156fc 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java @@ -2,14 +2,12 @@ package com.lyms.talkonlineweb.controller; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.lyms.talkonlineweb.domain.ArticleInfo; -import com.lyms.talkonlineweb.domain.LymsArticle; -import com.lyms.talkonlineweb.domain.LymsDoctor; -import com.lyms.talkonlineweb.domain.LymsPushedart; +import com.lyms.talkonlineweb.domain.*; import com.lyms.talkonlineweb.result.BaseResponse; import com.lyms.talkonlineweb.service.ArticleInfoService; import com.lyms.talkonlineweb.service.LymsArticleService; import com.lyms.talkonlineweb.service.LymsPushedartService; +import com.lyms.talkonlineweb.service.impl.PushedartlogsInfoServiceImpl; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -43,6 +41,8 @@ public class ArticleController { @Autowired private LymsPushedartService lymsPushedartService;//推送记录 + @Autowired + private PushedartlogsInfoServiceImpl pushedartlogsInfoService; /** * 上传文件 * @@ -169,5 +169,24 @@ public class ArticleController { return baseResponse; } + /** + * 专家组推荐-推荐记录 + * + * @return + */ + @GetMapping("getPushedartlogsInfo") + public BaseResponse getPushedartlogsInfo(PushedartlogsInfo pushedartlogsInfo, Integer current, Integer size){ + BaseResponse baseResponse=new BaseResponse(); + try { + Page page=new Page<>(current,size); + Page pushedartlogsInfoPage=pushedartlogsInfoService.page(page,Wrappers.query(pushedartlogsInfo).orderByDesc("createdtime")); + baseResponse.setObject(pushedartlogsInfoPage); + baseResponse.setErrormsg("成功"); + } catch (Exception e) { + baseResponse.setErrormsg("失败"); + e.printStackTrace(); + } + return baseResponse; + } } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/PushedartlogsInfo.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/PushedartlogsInfo.java new file mode 100644 index 0000000..7c819ed --- /dev/null +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/PushedartlogsInfo.java @@ -0,0 +1,57 @@ +package com.lyms.talkonlineweb.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * + * @TableName pushedartLogs_info + */ +@TableName(value ="pushedartLogs_info") +@Data +public class PushedartlogsInfo implements Serializable { + /** + * 文章标题 + */ + @TableField(value = "title") + private String title; + + /** + * 文章内容 + */ + @TableField(value = "content") + private String content; + + /** + * 推送时间 + */ + @TableField(value = "createdtime") + private Date createdtime; + + /** + * 科室名称 + */ + @TableField(value = "dname") + private String dname; + + /** + * 疾病种类 + */ + @TableField(value = "illness") + private String illness; + + /** + * 患者名称 + */ + @TableField(value = "pname") + private String pname; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; + +} \ No newline at end of file diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/PushedartlogsInfoMapper.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/PushedartlogsInfoMapper.java new file mode 100644 index 0000000..4b572df --- /dev/null +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/PushedartlogsInfoMapper.java @@ -0,0 +1,15 @@ +package com.lyms.talkonlineweb.mapper; + +import com.lyms.talkonlineweb.domain.PushedartlogsInfo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Entity com.lyms.talkonlineweb.domain.PushedartlogsInfo + */ +public interface PushedartlogsInfoMapper extends BaseMapper { + +} + + + + diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/PushedartlogsInfoService.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/PushedartlogsInfoService.java new file mode 100644 index 0000000..8fda816 --- /dev/null +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/PushedartlogsInfoService.java @@ -0,0 +1,11 @@ +package com.lyms.talkonlineweb.service; + +import com.lyms.talkonlineweb.domain.PushedartlogsInfo; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * + */ +public interface PushedartlogsInfoService extends IService { + +} diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/PushedartlogsInfoServiceImpl.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/PushedartlogsInfoServiceImpl.java new file mode 100644 index 0000000..e04a18c --- /dev/null +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/PushedartlogsInfoServiceImpl.java @@ -0,0 +1,20 @@ +package com.lyms.talkonlineweb.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.lyms.talkonlineweb.domain.PushedartlogsInfo; +import com.lyms.talkonlineweb.service.PushedartlogsInfoService; +import com.lyms.talkonlineweb.mapper.PushedartlogsInfoMapper; +import org.springframework.stereotype.Service; + +/** + * + */ +@Service +public class PushedartlogsInfoServiceImpl extends ServiceImpl + implements PushedartlogsInfoService{ + +} + + + + diff --git a/talkonlineweb/src/main/resources/mapper/PushedartlogsInfoMapper.xml b/talkonlineweb/src/main/resources/mapper/PushedartlogsInfoMapper.xml new file mode 100644 index 0000000..413c4a3 --- /dev/null +++ b/talkonlineweb/src/main/resources/mapper/PushedartlogsInfoMapper.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + title,content,createdtime, + dname,illness,pname + +