Commit 6cfa43779043441d0dd69845ecab9e46087c5b08

Authored by changpengfei
1 parent cb39ed1c38
Exists in master

文章关联科室值

Showing 7 changed files with 49 additions and 72 deletions

talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java View file @ 6cfa437
... ... @@ -2,10 +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;
5 6 import com.lyms.talkonlineweb.domain.LymsArticle;
6 7 import com.lyms.talkonlineweb.domain.LymsDoctor;
7 8 import com.lyms.talkonlineweb.domain.LymsPushedart;
8 9 import com.lyms.talkonlineweb.result.BaseResponse;
  10 +import com.lyms.talkonlineweb.service.ArticleInfoService;
9 11 import com.lyms.talkonlineweb.service.LymsArticleService;
10 12 import com.lyms.talkonlineweb.service.LymsPushedartService;
11 13 import lombok.extern.log4j.Log4j2;
... ... @@ -39,6 +41,9 @@
39 41 private LymsArticleService lymsArticleService;
40 42  
41 43 @Autowired
  44 + private ArticleInfoService articleInfoService;
  45 +
  46 + @Autowired
42 47 private LymsPushedartService lymsPushedartService;//推送记录
43 48  
44 49 /**
45 50  
... ... @@ -88,10 +93,10 @@
88 93 * @return
89 94 */
90 95 @GetMapping("sltArticleLst")
91   - public BaseResponse sltArticleLst(LymsArticle article, int current, int size){
  96 + public BaseResponse sltArticleLst(ArticleInfo article, int current, int size){
92 97 BaseResponse baseResponse=new BaseResponse();
93   - Page<LymsArticle> page=new Page<>(current,size);
94   - Page<LymsArticle> articlePagePage=lymsArticleService.page(page, Wrappers.query(article).orderByDesc("updated_time","createdtime"));
  98 + Page<ArticleInfo> page=new Page<>(current,size);
  99 + Page<ArticleInfo> articlePagePage=articleInfoService.page(page, Wrappers.query(article).orderByDesc("updated_time","createdtime"));
95 100  
96 101 baseResponse.setObject(articlePagePage);
97 102  
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java View file @ 6cfa437
  1 +package com.lyms.talkonlineweb.controller;
  2 +
  3 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  4 +import com.lyms.talkonlineweb.domain.LymsChatgroup;
  5 +import com.lyms.talkonlineweb.result.BaseResponse;
  6 +import com.lyms.talkonlineweb.service.LymsChatgroupService;
  7 +import com.lyms.talkonlineweb.util.HXService;
  8 +import org.springframework.beans.BeanUtils;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.web.bind.annotation.GetMapping;
  11 +import org.springframework.web.bind.annotation.RequestMapping;
  12 +import org.springframework.web.bind.annotation.RestController;
  13 +
  14 +import java.util.List;
  15 +
  16 +@RestController
  17 +@RequestMapping("chat")
  18 +public class ChatGroupController {
  19 + @Autowired
  20 + private LymsChatgroupService lymsChatgroupService;
  21 +
  22 + @Autowired
  23 + private HXService hxService;
  24 + /**
  25 + * 添加或删除聊天组
  26 + * @param group
  27 + * @return
  28 + */
  29 + @GetMapping("saveChatGroup")
  30 + public BaseResponse saveChatGroup(LymsChatgroup group){
  31 + BaseResponse baseResponse=new BaseResponse();
  32 + List<LymsChatgroup> gLst=lymsChatgroupService.list(Wrappers.query(group));
  33 + if(gLst.size()>0){
  34 + LymsChatgroup group2=gLst.get(0);
  35 + group.setId(group2.getId());
  36 + }
  37 + lymsChatgroupService.saveOrUpdate(group);
  38 + baseResponse.setObject(group);
  39 + return baseResponse;
  40 + }
  41 +}
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java View file @ 6cfa437
... ... @@ -42,9 +42,6 @@
42 42 private LymsTcardService lymsTcardService;//问诊卡信息
43 43  
44 44 @Autowired
45   - private LymsChatroomService lymsChatroomService;//聊天室
46   -
47   - @Autowired
48 45 private LymsLogsService lymsLogsService;//日志记录
49 46  
50 47  
talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsChatroomMapper.java View file @ 6cfa437
1   -package com.lyms.talkonlineweb.mapper;
2   -
3   -import com.lyms.talkonlineweb.domain.LymsChatroom;
4   -import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5   -
6   -/**
7   - * @Entity com.lyms.talkonlineweb.domain.LymsChatroom
8   - */
9   -public interface LymsChatroomMapper extends BaseMapper<LymsChatroom> {
10   -
11   -}
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsChatroomService.java View file @ 6cfa437
1   -package com.lyms.talkonlineweb.service;
2   -
3   -import com.lyms.talkonlineweb.domain.LymsChatroom;
4   -import com.baomidou.mybatisplus.extension.service.IService;
5   -
6   -/**
7   - *
8   - */
9   -public interface LymsChatroomService extends IService<LymsChatroom> {
10   -
11   -}
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsChatroomServiceImpl.java View file @ 6cfa437
1   -package com.lyms.talkonlineweb.service.impl;
2   -
3   -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4   -import com.lyms.talkonlineweb.domain.LymsChatroom;
5   -import com.lyms.talkonlineweb.service.LymsChatroomService;
6   -import com.lyms.talkonlineweb.mapper.LymsChatroomMapper;
7   -import org.springframework.stereotype.Service;
8   -
9   -/**
10   - *
11   - */
12   -@Service
13   -public class LymsChatroomServiceImpl extends ServiceImpl<LymsChatroomMapper, LymsChatroom>
14   - implements LymsChatroomService{
15   -
16   -}
talkonlineweb/src/main/resources/mapper/LymsChatroomMapper.xml View file @ 6cfa437
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.LymsChatroomMapper">
6   -
7   - <resultMap id="BaseResultMap" type="com.lyms.talkonlineweb.domain.LymsChatroom">
8   - <id property="id" column="id" jdbcType="INTEGER"/>
9   - <result property="name" column="name" jdbcType="VARCHAR"/>
10   - <result property="description" column="description" jdbcType="VARCHAR"/>
11   - <result property="owner" column="owner" jdbcType="INTEGER"/>
12   - <result property="from" column="from" jdbcType="INTEGER"/>
13   - <result property="target" column="target" jdbcType="INTEGER"/>
14   - </resultMap>
15   -
16   - <sql id="Base_Column_List">
17   - id,name,description,
18   - owner,from,target
19   - </sql>
20   -</mapper>