Compare commits
12 Commits
7c476c6685
...
bd20153ef9
Author | SHA1 | Date |
---|---|---|
|
bd20153ef9 | |
|
bf2c98947f | |
|
c9a9ab950f | |
|
88ee5e376b | |
|
c439f7a573 | |
|
d63616c133 | |
|
95219e8eec | |
|
b16905e43d | |
|
b5c248d6e5 | |
|
13779a763d | |
|
ca889c252e | |
|
4bf159ea48 |
|
@ -1,11 +1,20 @@
|
||||||
package doctor.system.api.domain;
|
package doctor.system.api.domain;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : User
|
||||||
|
* @Description : 用户表
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 20:46
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
public class User {
|
public class User {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
private String phone;
|
private String phone;
|
||||||
|
@ -20,6 +29,7 @@ public class User {
|
||||||
private Integer weight;
|
private Integer weight;
|
||||||
private String invitationCode;
|
private String invitationCode;
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
private Date createTime;
|
private Long createTime;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,11 @@
|
||||||
|
|
||||||
<artifactId>doctor-health</artifactId>
|
<artifactId>doctor-health</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<lombok.version>1.18.12</lombok.version>
|
||||||
|
<mapstruct.version>1.4.2.Final</mapstruct.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,9 +102,27 @@
|
||||||
<artifactId>spring-boot-starter-mail</artifactId>
|
<artifactId>spring-boot-starter-mail</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct</artifactId>
|
||||||
|
<version>${mapstruct.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct-jdk8</artifactId>
|
||||||
|
<version>${mapstruct.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct-processor</artifactId>
|
||||||
|
<version>${mapstruct.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
@ -117,4 +140,5 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -0,0 +1,146 @@
|
||||||
|
package doctor.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import doctor.common.core.domain.HealthR;
|
||||||
|
import doctor.domain.entity.SickCircleEntity;
|
||||||
|
import doctor.service.CollectSickService;
|
||||||
|
|
||||||
|
import doctor.util.HttpUtils;
|
||||||
|
import doctor.util.OssUtil;
|
||||||
|
import org.apache.commons.codec.binary.Base64;
|
||||||
|
import org.apache.http.HttpResponse;
|
||||||
|
import org.apache.http.util.EntityUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName CollectSickController
|
||||||
|
* @Description 描述
|
||||||
|
* @Author 栗永斌
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/verify/v1")
|
||||||
|
public class CollectSickController {
|
||||||
|
@Autowired
|
||||||
|
CollectSickService service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消收藏病友圈
|
||||||
|
*
|
||||||
|
* @param sickCircleId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/cancelSickCollection")
|
||||||
|
public HealthR<SickCircleEntity> cancelSickCollection(@RequestParam("sickCircleId") Integer sickCircleId) {
|
||||||
|
return service.cancelSickCollection(sickCircleId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * @param sickCircleId
|
||||||
|
* 收藏病友圈
|
||||||
|
*/
|
||||||
|
@PostMapping("/addUserSickCollection")
|
||||||
|
public HealthR<SickCircleEntity> addUserSickCollection(@RequestParam("sickCircleId") Integer sickCircleId) {
|
||||||
|
return service.addUserSickCollection(sickCircleId);
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* orc身份证识别
|
||||||
|
* @param file
|
||||||
|
*/
|
||||||
|
@PostMapping("/file")
|
||||||
|
public void file(MultipartFile file) {
|
||||||
|
// TODO 存储OSS
|
||||||
|
String s = OssUtil.uploadMultipartFile(file);
|
||||||
|
String host = "https://cardnumber.market.alicloudapi.com";
|
||||||
|
String path = "/rest/160601/ocr/ocr_idcard.json";
|
||||||
|
String appcode = "94e0f9d0960f4931ad24eabfa187dcfe";
|
||||||
|
//String imgFile = "C:\\Users\\栗永斌\\Desktop\\aaaa.webp";
|
||||||
|
String imgFile = String.valueOf(s);
|
||||||
|
String method = "POST";
|
||||||
|
|
||||||
|
Map<String, String> headers = new HashMap<String, String>();
|
||||||
|
//最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
|
||||||
|
headers.put("Authorization", "APPCODE " + appcode);
|
||||||
|
//根据API的要求,定义相对应的Content-Type
|
||||||
|
headers.put("Content-Type", "application/json; charset=UTF-8");
|
||||||
|
|
||||||
|
Map<String, String> querys = new HashMap<String, String>();
|
||||||
|
// 对图像进行base64编码
|
||||||
|
String imgBase64 = img_base64(imgFile);
|
||||||
|
|
||||||
|
//configure配置
|
||||||
|
JSONObject configObj = new JSONObject();
|
||||||
|
configObj.put("side", "face");
|
||||||
|
|
||||||
|
String config_str = configObj.toString();
|
||||||
|
|
||||||
|
// 拼装请求body的json字符串
|
||||||
|
JSONObject requestObj = new JSONObject();
|
||||||
|
requestObj.put("image", imgBase64);
|
||||||
|
if (configObj.size() > 0) {
|
||||||
|
requestObj.put("configure", config_str);
|
||||||
|
}
|
||||||
|
String bodys = requestObj.toString();
|
||||||
|
|
||||||
|
try {
|
||||||
|
/**
|
||||||
|
* 重要提示如下:
|
||||||
|
* HttpUtils请从
|
||||||
|
* https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/src/main/java/com/aliyun/api/gateway/demo/util/HttpUtils.java
|
||||||
|
* 下载
|
||||||
|
* 相应的依赖请参照
|
||||||
|
* https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/pom.xml
|
||||||
|
*/
|
||||||
|
HttpResponse response = HttpUtils.doPost(host, path, method, headers, querys, bodys);
|
||||||
|
int stat = response.getStatusLine().getStatusCode();
|
||||||
|
if (stat != 200) {
|
||||||
|
System.out.println("Http code: " + stat);
|
||||||
|
System.out.println("http header error msg: " + response.getFirstHeader("X-Ca-Error-Message"));
|
||||||
|
System.out.println("Http body error msg:" + EntityUtils.toString(response.getEntity()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String res = EntityUtils.toString(response.getEntity());
|
||||||
|
JSONObject res_obj = JSON.parseObject(res);
|
||||||
|
|
||||||
|
System.out.println(res_obj.toJSONString());
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String img_base64(String path) {
|
||||||
|
/**
|
||||||
|
* 对path进行判断,如果是本地文件就二进制读取并base64编码,如果是url,则返回
|
||||||
|
*/
|
||||||
|
String imgBase64 = "";
|
||||||
|
if (path.startsWith("http")) {
|
||||||
|
imgBase64 = path;
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
File file = new File(path);
|
||||||
|
byte[] content = new byte[(int) file.length()];
|
||||||
|
FileInputStream finputstream = new FileInputStream(file);
|
||||||
|
finputstream.read(content);
|
||||||
|
finputstream.close();
|
||||||
|
imgBase64 = new String(Base64.encodeBase64(content));
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return imgBase64;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return imgBase64;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,11 +1,11 @@
|
||||||
package doctor.controller;
|
package doctor.controller;
|
||||||
|
|
||||||
|
|
||||||
import doctor.common.core.domain.HealthR;
|
import doctor.common.core.domain.HealthR;
|
||||||
|
import doctor.common.core.domain.R;
|
||||||
import doctor.domain.entity.*;
|
import doctor.domain.entity.*;
|
||||||
import doctor.service.DepartmentService;
|
|
||||||
import doctor.service.DiseaseCategoryService;
|
|
||||||
import doctor.service.DiseaseKnowledgeService;
|
import doctor.service.DiseaseKnowledgeService;
|
||||||
import doctor.service.HealthDepartmentService;
|
import doctor.service.HealthJobTitleService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -14,19 +14,26 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.github.pagehelper.page.PageMethod.startPage;
|
import static doctor.common.core.utils.PageUtils.startPage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: Medical_Treatment
|
||||||
|
* @BelongsPackage: doctor.controller
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2024/1/10 20:56
|
||||||
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/knowledgeBase/v1")
|
@RequestMapping("/share/knowledgeBase/v1")
|
||||||
public class HealthDepartmentController {
|
public class DiseaseKnowledgeController {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private HealthDepartmentService healthV1Service;
|
|
||||||
@Autowired
|
|
||||||
private DiseaseCategoryService diseaseCategoryService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private DiseaseKnowledgeService diseaseKnowledgeService;
|
private DiseaseKnowledgeService diseaseKnowledgeService;
|
||||||
|
|
||||||
|
@GetMapping("/findDepartment")
|
||||||
|
public HealthR<List<Department>> findDepartment(){
|
||||||
|
List<Department> departments= diseaseKnowledgeService.findDepartment();
|
||||||
|
return HealthR.ok(departments);
|
||||||
|
}
|
||||||
|
|
||||||
//罕见病症详情
|
//罕见病症详情
|
||||||
@GetMapping("/findDiseaseKnowledge")
|
@GetMapping("/findDiseaseKnowledge")
|
||||||
public HealthR<List<DiseaseKnowledge>> findDiseaseKnowledge(@RequestParam Integer diseaseCategoryId){
|
public HealthR<List<DiseaseKnowledge>> findDiseaseKnowledge(@RequestParam Integer diseaseCategoryId){
|
||||||
|
@ -46,17 +53,23 @@ public class HealthDepartmentController {
|
||||||
List<DrugsCategory> list=diseaseKnowledgeService.findDrugsKnowledgeList(drugsCategoryId);
|
List<DrugsCategory> list=diseaseKnowledgeService.findDrugsKnowledgeList(drugsCategoryId);
|
||||||
return HealthR.ok(list);
|
return HealthR.ok(list);
|
||||||
}
|
}
|
||||||
|
@GetMapping("/findDrugsKnowledge")
|
||||||
|
public HealthR <DrugsKnowledge> findDrugsKnowledge(@RequestParam Integer id){
|
||||||
@GetMapping("/findDiseaseCategory")
|
DrugsKnowledge list=diseaseKnowledgeService.findDrugsKnowledge(id);
|
||||||
public HealthR<List<DiseaseCategory>> findDiseaseCategory(@RequestParam Integer departmentId){
|
return HealthR.ok(list);
|
||||||
List<DiseaseCategory> list=diseaseCategoryService.findDiseaseCategory(departmentId);
|
}
|
||||||
|
@GetMapping("/popularSearch")
|
||||||
|
public HealthR<List<PopularSearchEntity>> popularSeach(){
|
||||||
|
List<PopularSearchEntity> list=diseaseKnowledgeService.popularSeach();
|
||||||
return HealthR.ok(list);
|
return HealthR.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/findDepartment")
|
|
||||||
public HealthR<List<DepartmentEntity>> findDepartment(){
|
|
||||||
List<DepartmentEntity> departmentEntities=healthV1Service.findDepartment();
|
|
||||||
return HealthR.ok(departmentEntities);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
package doctor.controller;
|
||||||
|
|
||||||
|
import doctor.common.core.domain.HealthR;
|
||||||
|
import doctor.domain.entity.DoctorEntity;
|
||||||
|
import doctor.service.DoctorService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.print.Doc;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: Medical_Treatment
|
||||||
|
* @BelongsPackage: doctor.controller
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2024/1/15 11:30
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/inquiry/v1")
|
||||||
|
public class DoctorController {
|
||||||
|
@Autowired
|
||||||
|
private DoctorService doctorService;
|
||||||
|
@GetMapping("/findDoctorList")
|
||||||
|
public HealthR<List<DoctorEntity>> findDoctorList(@RequestParam Integer deptId,
|
||||||
|
@RequestParam Integer condition,
|
||||||
|
@RequestParam Integer sortBy,
|
||||||
|
@RequestParam(value = "page",defaultValue = "1") Integer page,
|
||||||
|
@RequestParam(value = "count",defaultValue = "5") Integer count
|
||||||
|
){
|
||||||
|
List<DoctorEntity> list=doctorService.findDoctorList(deptId);
|
||||||
|
return HealthR.ok(list);
|
||||||
|
}
|
||||||
|
}
|
|
@ -21,13 +21,6 @@ public class HealthJobTitleController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private HealthJobTitleService healthJobTitleService;
|
private HealthJobTitleService healthJobTitleService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private BannersService bannersService;
|
|
||||||
@GetMapping("/bannersShow")
|
|
||||||
public HealthR<List<Banners>> bannersShow(){
|
|
||||||
List<Banners> banners = bannersService.bannersShow();
|
|
||||||
return HealthR.ok(banners);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/findJobTitleList")
|
@GetMapping("/findJobTitleList")
|
||||||
public HealthR<List<DoctorJobTitleEntity>> findJobTitleList() {
|
public HealthR<List<DoctorJobTitleEntity>> findJobTitleList() {
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package doctor.controller;
|
||||||
|
|
||||||
|
import doctor.common.core.domain.HealthR;
|
||||||
|
import doctor.domain.entity.Banners;
|
||||||
|
import doctor.service.BannersService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/share")
|
||||||
|
public class HealthShareController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BannersService bannersService;
|
||||||
|
@GetMapping("/v1/bannersShow")
|
||||||
|
public HealthR<List<Banners>> bannersShow(){
|
||||||
|
List<Banners> banners = bannersService.bannersShow();
|
||||||
|
return HealthR.ok(banners);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,42 +0,0 @@
|
||||||
package doctor.controller;
|
|
||||||
|
|
||||||
import doctor.common.core.domain.HealthR;
|
|
||||||
import doctor.domain.vo.SearchSickCircleVo;
|
|
||||||
import doctor.domain.vo.SickCircleVo;
|
|
||||||
import doctor.domain.vo.SickInfoVo;
|
|
||||||
import doctor.service.SickCircleService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/sickCircle/v1")
|
|
||||||
public class HealthSickController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SickCircleService sickCircleService;
|
|
||||||
|
|
||||||
@GetMapping("/findSickCircleInfo")
|
|
||||||
public HealthR<SickInfoVo> findSickCircleInfo(@RequestParam Integer sickCircleId) {
|
|
||||||
SickInfoVo sickInfoVo = sickCircleService.findSickCircleInfo(sickCircleId);
|
|
||||||
return HealthR.ok(sickInfoVo);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/findSickCircleList")
|
|
||||||
public HealthR<List<SickCircleVo>> sickCircleList(@RequestParam Integer page,
|
|
||||||
@RequestParam Integer count,
|
|
||||||
@RequestParam Integer departmentId) {
|
|
||||||
List<SickCircleVo> sickCircleList = sickCircleService.findSickCircleList(page, count, departmentId);
|
|
||||||
return HealthR.ok(sickCircleList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/searchSickCircle")
|
|
||||||
public HealthR<SearchSickCircleVo> searchSickCircle(@RequestParam String keyWord) {
|
|
||||||
SearchSickCircleVo searchSickCircleVo = sickCircleService.searchSickCircle(keyWord);
|
|
||||||
return HealthR.ok(searchSickCircleVo);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -5,10 +5,7 @@ import doctor.domain.entity.Information;
|
||||||
import doctor.domain.entity.InformationPlate;
|
import doctor.domain.entity.InformationPlate;
|
||||||
import doctor.service.InformationService;
|
import doctor.service.InformationService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -21,7 +18,8 @@ import static com.github.pagehelper.page.PageMethod.startPage;
|
||||||
* @CreateTime: 2024/1/11 16:19
|
* @CreateTime: 2024/1/11 16:19
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/information/v1")
|
@RequestMapping("/share/information/v1")
|
||||||
|
|
||||||
public class InformationController {
|
public class InformationController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private InformationService informationService;
|
private InformationService informationService;
|
||||||
|
@ -38,4 +36,11 @@ public class InformationController {
|
||||||
List<InformationPlate> list=informationService.findInformationPlateList();
|
List<InformationPlate> list=informationService.findInformationPlateList();
|
||||||
return HealthR.ok(list);
|
return HealthR.ok(list);
|
||||||
}
|
}
|
||||||
|
@GetMapping("/findInformation")
|
||||||
|
public HealthR<Information> findInformation(@RequestParam Long infoId,
|
||||||
|
@RequestHeader(name="userId",required = false)Long userId,
|
||||||
|
@RequestHeader(name = "sessionId",required = false)String sessionId){
|
||||||
|
Information list=informationService.findInformation(infoId);
|
||||||
|
return HealthR.ok(list,"查询成功");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
package doctor.controller;
|
package doctor.controller;
|
||||||
|
|
||||||
import doctor.common.core.domain.HealthR;
|
import doctor.common.core.domain.HealthR;
|
||||||
|
import doctor.domain.vo.DoctorVo;
|
||||||
import doctor.domain.vo.InquiryDetailsRecordVo;
|
import doctor.domain.vo.InquiryDetailsRecordVo;
|
||||||
import doctor.service.InquiryService;
|
import doctor.service.InquiryService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -20,16 +18,23 @@ import static com.github.pagehelper.page.PageMethod.startPage;
|
||||||
* @Date: 2024-01-12 19:09
|
* @Date: 2024-01-12 19:09
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/user/inquiry/verify/v1")
|
@RequestMapping("/user/inquiry")
|
||||||
public class InquiryController {
|
public class InquiryController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private InquiryService inquiryService;
|
private InquiryService inquiryService;
|
||||||
//历史问诊记录列表
|
//历史问诊记录列表
|
||||||
@GetMapping("/findHistoryInquiryRecord")
|
@GetMapping("/verify/v1/findHistoryInquiryRecord")
|
||||||
public HealthR<List<InquiryDetailsRecordVo>> findHistoryInquiryRecord(@RequestParam Integer page,@RequestParam Integer count){
|
public HealthR<List<InquiryDetailsRecordVo>> findHistoryInquiryRecord(@RequestParam Integer page,@RequestParam Integer count){
|
||||||
startPage(page,count);
|
startPage(page,count);
|
||||||
List<InquiryDetailsRecordVo> inquiryDetailsRecordVoList = inquiryService.findHistoryInquiryRecord();
|
List<InquiryDetailsRecordVo> inquiryDetailsRecordVoList = inquiryService.findHistoryInquiryRecord();
|
||||||
return HealthR.ok(inquiryDetailsRecordVoList);
|
return HealthR.ok(inquiryDetailsRecordVoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/v1/findDoctorInfo")
|
||||||
|
public HealthR<DoctorVo> findDoctorInfo(@RequestHeader Integer userId,
|
||||||
|
@RequestHeader String sessionId,
|
||||||
|
@RequestParam Integer doctorId) {
|
||||||
|
DoctorVo doctorVo = inquiryService.findDoctorInfo(doctorId);
|
||||||
|
return HealthR.ok(doctorVo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,130 @@
|
||||||
|
package doctor.controller;
|
||||||
|
|
||||||
|
import com.alibaba.nacos.api.model.v2.Result;
|
||||||
|
import com.github.pagehelper.Page;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import doctor.common.core.domain.HealthR;
|
||||||
|
import doctor.domain.entity.SickCircleEntity;
|
||||||
|
import doctor.domain.entity.SickCommentEntity;
|
||||||
|
import doctor.domain.entity.SymptomEntity;
|
||||||
|
import doctor.domain.vo.SearchSickCircleVo;
|
||||||
|
import doctor.domain.vo.SickCircleVo;
|
||||||
|
import doctor.domain.vo.SickCommentVo;
|
||||||
|
import doctor.domain.vo.SickInfoVo;
|
||||||
|
import doctor.service.PatientService;
|
||||||
|
import doctor.service.SickCircleService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName PatientController
|
||||||
|
* @Description 描述
|
||||||
|
* @Author 栗永斌
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/sickCircle/v1/")
|
||||||
|
public class PatientController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PatientService patientService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SickCircleService sickCircleService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发表评论
|
||||||
|
*/
|
||||||
|
@PostMapping("/publishComment")
|
||||||
|
public Result<SickCommentVo> publishComment(
|
||||||
|
@RequestParam("sickCircleId") Integer sickCircleId,
|
||||||
|
@RequestParam("content") String content) {
|
||||||
|
|
||||||
|
return sickCircleService.publishComment(sickCircleId, content);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点采
|
||||||
|
* @param opinion
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("expressOpinion")
|
||||||
|
public HealthR expressOpinion(@RequestParam("opinion") Integer opinion){
|
||||||
|
// return sickCircleServer.expressOpinion(commentId, opinion);
|
||||||
|
System.out.println(opinion);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增病友圈
|
||||||
|
*/
|
||||||
|
@PostMapping("/publishSickCircle")
|
||||||
|
public HealthR<SickCircleEntity> publishSickCircle(@RequestBody SickCircleEntity sickCircleEntity) {
|
||||||
|
|
||||||
|
return sickCircleService.publishSickCircle(sickCircleEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 病友圈列表
|
||||||
|
*
|
||||||
|
* @param departmentId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/findSickCircleList")
|
||||||
|
public HealthR<List<SickCircleEntity>> sickCircleList(@RequestParam(value = "departmentId",required = false) Integer departmentId,
|
||||||
|
@RequestParam(value = "page",defaultValue = "1") Integer page,
|
||||||
|
@RequestParam(value = "count",defaultValue = "10") Integer count) {
|
||||||
|
return patientService.sickCircleList(departmentId);
|
||||||
|
}
|
||||||
|
|
||||||
|
private PageInfo<SickCircleEntity> startPage(Integer page, Integer count) {
|
||||||
|
Page<SickCircleEntity> objects = PageHelper.startPage(page, count);
|
||||||
|
return new PageInfo<>(objects);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 病友圈详情
|
||||||
|
*/
|
||||||
|
@GetMapping("/findSickCircleInfo")
|
||||||
|
public HealthR<SickCircleEntity> findSickCircleInfo(@RequestParam("sickCircleId") Integer sickCircleId) {
|
||||||
|
SickCircleEntity sickCircleEntity = patientService.findSickCircleInfo(sickCircleId);
|
||||||
|
return HealthR.ok(sickCircleEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 病症列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/symptomList")
|
||||||
|
public Result<List<SymptomEntity>> symptomList() {
|
||||||
|
return patientService.symptomList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询病友圈评论列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/findSickCircleCommentList")
|
||||||
|
public HealthR<List<SickCommentEntity>> findSickCircleCommentList(@RequestParam(value = "sickCircleId",required = false) Integer sickCircleId,
|
||||||
|
@RequestParam(value = "page",defaultValue = "1") Integer page,
|
||||||
|
@RequestParam(value = "count",defaultValue = "10") Integer count) {
|
||||||
|
startPage(page, count);
|
||||||
|
return patientService.findSickCircleCommentList(sickCircleId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索病友圈
|
||||||
|
* @param keyWord
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("searchSickCircle")
|
||||||
|
public HealthR<List<SickCircleEntity>> searchSickCircle(@RequestParam(value = "keyWord",required = false) String keyWord){
|
||||||
|
return patientService.searchSickCircle(keyWord);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -106,5 +106,25 @@ public class UserVideoController {
|
||||||
}
|
}
|
||||||
|
|
||||||
//用户关注医生列表
|
//用户关注医生列表
|
||||||
|
@GetMapping("/findUserDoctorFollowList")
|
||||||
|
public HealthR<List<UserDoctorFollowVo>> findUserDoctorFollowList(@RequestParam Integer page,@RequestParam Integer count){
|
||||||
|
startPage(page,count);
|
||||||
|
List<UserDoctorFollowVo> userDoctorFollowVos = userVideoService.findUserDoctorFollowList();
|
||||||
|
return HealthR.ok(userDoctorFollowVos);
|
||||||
|
}
|
||||||
|
//用户任务列表
|
||||||
|
@GetMapping("/findUserTaskList")
|
||||||
|
public HealthR<List<UserTaskRecordVo>> findUserTaskList(){
|
||||||
|
List<UserTaskRecordVo> userTaskRecordVos = userVideoService.findUserTaskList();
|
||||||
|
return HealthR.ok(userTaskRecordVos);
|
||||||
|
}
|
||||||
|
//用户连续签到天数
|
||||||
|
@GetMapping("/findUserSign")
|
||||||
|
public HealthR<List<SignEntity>> findUserSign(@RequestHeader Integer userId){
|
||||||
|
List<SignEntity> signEntities = userVideoService.findUserSign(userId);
|
||||||
|
return HealthR.ok(signEntities);
|
||||||
|
}
|
||||||
|
// //根据用户ID查询用户信息
|
||||||
|
// @GetMapping("/getUserInfoById")
|
||||||
|
// public HealthR<>
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,4 +41,13 @@ public class VideoController {
|
||||||
return HealthR.ok(videoCommentVoList);
|
return HealthR.ok(videoCommentVoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/verify/v1/addVideoComment")
|
||||||
|
public HealthR<VideoCommentVo> addVideoComment(@RequestHeader Integer userId,
|
||||||
|
@RequestHeader String sessionId,
|
||||||
|
@RequestParam Integer videoId,
|
||||||
|
@RequestParam String content) {
|
||||||
|
videoService.addVideoComment(userId,sessionId,videoId,content);
|
||||||
|
return HealthR.ok();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
package doctor.convert;
|
||||||
|
|
||||||
|
import doctor.domain.entity.VideoEntity;
|
||||||
|
import doctor.domain.vo.VideoVo;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface VideoConvert {
|
||||||
|
VideoConvert INSTANCE = Mappers.getMapper(VideoConvert.class);
|
||||||
|
|
||||||
|
VideoVo videoEntityToVideoVo(VideoEntity videoEntity);
|
||||||
|
|
||||||
|
VideoEntity videoVoToVideoEntity(VideoVo videoVo);
|
||||||
|
|
||||||
|
List<VideoEntity> videoVoListToVideoEntityList(List<VideoVo> videoVoList);
|
||||||
|
|
||||||
|
List<VideoVo> videoEntityListToVideoVoList(List<VideoEntity> videoEntityList);
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: Medical_Treatment
|
||||||
|
* @BelongsPackage: doctor.domain.entity
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2024/1/15 11:32
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class DoctorEntity {
|
||||||
|
private Integer id;
|
||||||
|
private Integer departmentId;
|
||||||
|
private String email;
|
||||||
|
private String userName;
|
||||||
|
private Integer reviewStatus;
|
||||||
|
private String phone;
|
||||||
|
private String pwd;
|
||||||
|
private String name;
|
||||||
|
private String imagePic;
|
||||||
|
private String inauguralHospital;
|
||||||
|
private String personalProfile;
|
||||||
|
private String goodFieId;
|
||||||
|
private Date createTime;
|
||||||
|
}
|
|
@ -1,5 +1,8 @@
|
||||||
package doctor.domain.entity;
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import org.w3c.dom.Text;
|
import org.w3c.dom.Text;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -10,6 +13,9 @@ import java.util.Date;
|
||||||
* @Author: jpz
|
* @Author: jpz
|
||||||
* @CreateTime: 2024/1/10 22:00
|
* @CreateTime: 2024/1/10 22:00
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
public class DrugsKnowledge {
|
public class DrugsKnowledge {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
private Integer drugsCategoryId;
|
private Integer drugsCategoryId;
|
||||||
|
@ -27,123 +33,5 @@ public class DrugsKnowledge {
|
||||||
private String approvalNumber;
|
private String approvalNumber;
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
public Integer getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(Integer id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getDrugsCategoryId() {
|
|
||||||
return drugsCategoryId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDrugsCategoryId(Integer drugsCategoryId) {
|
|
||||||
this.drugsCategoryId = drugsCategoryId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Text getPicture() {
|
|
||||||
return picture;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPicture(Text picture) {
|
|
||||||
this.picture = picture;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEffect() {
|
|
||||||
return effect;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEffect(String effect) {
|
|
||||||
this.effect = effect;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Text getTaboo() {
|
|
||||||
return taboo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTaboo(Text taboo) {
|
|
||||||
this.taboo = taboo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getShape() {
|
|
||||||
return shape;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setShape(String shape) {
|
|
||||||
this.shape = shape;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPacking() {
|
|
||||||
return packing;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPacking(String packing) {
|
|
||||||
this.packing = packing;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Text getComponent() {
|
|
||||||
return component;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setComponent(Text component) {
|
|
||||||
this.component = component;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Text getUsage() {
|
|
||||||
return usage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUsage(Text usage) {
|
|
||||||
this.usage = usage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Text getSideEffects() {
|
|
||||||
return sideEffects;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSideEffects(Text sideEffects) {
|
|
||||||
this.sideEffects = sideEffects;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStorage() {
|
|
||||||
return storage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStorage(String storage) {
|
|
||||||
this.storage = storage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Text getMindMatter() {
|
|
||||||
return mindMatter;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMindMatter(Text mindMatter) {
|
|
||||||
this.mindMatter = mindMatter;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getApprovalNumber() {
|
|
||||||
return approvalNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setApprovalNumber(String approvalNumber) {
|
|
||||||
this.approvalNumber = approvalNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getCreateTime() {
|
|
||||||
return createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateTime(Date createTime) {
|
|
||||||
this.createTime = createTime;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,106 +1,54 @@
|
||||||
package doctor.domain.entity;
|
package doctor.domain.entity;
|
||||||
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName : InquiryDetailsRecordEntity
|
* @BelongsProject: Medical_Treatment
|
||||||
* @Description : 查询详情记录表
|
* @BelongsPackage: doctor.domain.entity
|
||||||
* @Author : FJJ
|
* @Author: jpz
|
||||||
* @Date: 2024-01-12 17:26
|
* @CreateTime: 2024/1/12 21:46
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
public class InquiryDetailsRecordEntity {
|
public class InquiryDetailsRecordEntity {
|
||||||
|
//主键id
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
//问诊记录
|
||||||
private Integer inquiryId;
|
private Integer inquiryId;
|
||||||
|
//用户id
|
||||||
private Integer userId;
|
private Integer userId;
|
||||||
|
//好友id
|
||||||
private Integer friendId;
|
private Integer friendId;
|
||||||
|
//问诊内容
|
||||||
private String askContent;
|
private String askContent;
|
||||||
|
//问诊图片
|
||||||
private String askImage;
|
private String askImage;
|
||||||
|
//语音聊天
|
||||||
private String voiceChat;
|
private String voiceChat;
|
||||||
|
//方向1=发送 2=接收
|
||||||
private Integer direction;
|
private Integer direction;
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
//问诊时间
|
||||||
private Date askTime;
|
private Date askTime;
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
//创建时间
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
public Integer getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(Integer id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getInquiryId() {
|
|
||||||
return inquiryId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInquiryId(Integer inquiryId) {
|
|
||||||
this.inquiryId = inquiryId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getUserId() {
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(Integer userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getFriendId() {
|
|
||||||
return friendId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFriendId(Integer friendId) {
|
|
||||||
this.friendId = friendId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAskContent() {
|
|
||||||
return askContent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAskContent(String askContent) {
|
|
||||||
this.askContent = askContent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAskImage() {
|
|
||||||
return askImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAskImage(String askImage) {
|
|
||||||
this.askImage = askImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVoiceChat() {
|
|
||||||
return voiceChat;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVoiceChat(String voiceChat) {
|
|
||||||
this.voiceChat = voiceChat;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getDirection() {
|
|
||||||
return direction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDirection(Integer direction) {
|
|
||||||
this.direction = direction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getAskTime() {
|
|
||||||
return askTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAskTime(Date askTime) {
|
|
||||||
this.askTime = askTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getCreateTime() {
|
|
||||||
return createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateTime(Date createTime) {
|
|
||||||
this.createTime = createTime;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: Medical_Treatment
|
||||||
|
* @BelongsPackage: doctor.domain.entity
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2024/1/12 21:52
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class InquiryRecordEntity {
|
||||||
|
private Integer id;
|
||||||
|
private Integer userId;
|
||||||
|
private Integer doctorId;
|
||||||
|
private Integer status;
|
||||||
|
private Integer showStatus;
|
||||||
|
private Date inquiryTime;
|
||||||
|
private Date createTime;
|
||||||
|
}
|
|
@ -0,0 +1,92 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName MySickEntity
|
||||||
|
* @Description 描述
|
||||||
|
* @Author 栗永斌
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MySickEntity {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
/**
|
||||||
|
* 整个治疗案例的详细信息
|
||||||
|
*/
|
||||||
|
private Integer sickCircleId;
|
||||||
|
/**
|
||||||
|
* 该治疗案例所属用户的ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
* 治疗案例的标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
/**
|
||||||
|
* 该治疗案例所属部门的ID
|
||||||
|
*/
|
||||||
|
private Integer departmentId;
|
||||||
|
/**
|
||||||
|
* 采纳的评论的ID,如果该治疗案例被采纳了
|
||||||
|
*/
|
||||||
|
private Integer adoptCommentId;
|
||||||
|
/**
|
||||||
|
* 患者所患病症
|
||||||
|
*/
|
||||||
|
private String disease;
|
||||||
|
/**
|
||||||
|
* 治疗案例的详细描述
|
||||||
|
*/
|
||||||
|
private String detail;
|
||||||
|
/**
|
||||||
|
* 治疗医院的名称
|
||||||
|
*/
|
||||||
|
private String treatmentHospital;
|
||||||
|
/**
|
||||||
|
* 治疗开始时间
|
||||||
|
*/
|
||||||
|
private Date treatmentStartTime;
|
||||||
|
/**
|
||||||
|
* 治疗结束时间
|
||||||
|
*/
|
||||||
|
private Date treatmentEndTime;
|
||||||
|
/**
|
||||||
|
* 治疗过程描述
|
||||||
|
*/
|
||||||
|
private String treatmentProcess;
|
||||||
|
/**
|
||||||
|
* 该治疗案例所附图片的ID,如果有
|
||||||
|
*/
|
||||||
|
private String picture;
|
||||||
|
/**
|
||||||
|
* 治疗案例发布的日期和时间
|
||||||
|
*/
|
||||||
|
private Date releaseTime;
|
||||||
|
/**
|
||||||
|
* 该治疗案例被采纳的日期和时间,如果是采纳的案例
|
||||||
|
*/
|
||||||
|
private Date adoptTime;
|
||||||
|
/**
|
||||||
|
* 治疗案例中包含的药品数量
|
||||||
|
*/
|
||||||
|
private Integer amount;
|
||||||
|
/**
|
||||||
|
* 治疗案例创建的日期和时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
/**
|
||||||
|
* 治疗案例的收藏数量
|
||||||
|
*/
|
||||||
|
private Integer collectionNum;
|
||||||
|
/**
|
||||||
|
* 治疗案例的评论数量
|
||||||
|
*/
|
||||||
|
private Integer commentNum;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: Medical_Treatment
|
||||||
|
* @BelongsPackage: doctor.domain.entity
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2024/1/14 16:00
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class PopularSearchEntity {
|
||||||
|
private Integer id;
|
||||||
|
private String name;
|
||||||
|
private Date createTime;
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SickConmentEntity
|
||||||
|
* @Description 评论表
|
||||||
|
* @Author 栗永斌
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SickCommentEntity {
|
||||||
|
|
||||||
|
// 私有变量,评论的ID
|
||||||
|
private String id;
|
||||||
|
// 私有变量,评论所属的圈子ID
|
||||||
|
private String sickCircleId;
|
||||||
|
// 私有变量,评论的用户ID
|
||||||
|
private String userId;
|
||||||
|
// 私有变量,评论的内容
|
||||||
|
private String content;
|
||||||
|
// 私有变量,评论的评论时间
|
||||||
|
private String commentTime;
|
||||||
|
// 私有变量,是否为医生评论
|
||||||
|
private String whetherDoctor;
|
||||||
|
// 私有变量,评论的创建时间
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : SignEntity
|
||||||
|
* @Description : 用户签到列表
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-17 16:18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SignEntity {
|
||||||
|
private Integer id;
|
||||||
|
private Integer userId;
|
||||||
|
private Date signTime;
|
||||||
|
private Integer signNum;
|
||||||
|
private Integer signReward;
|
||||||
|
private Date createTime;
|
||||||
|
}
|
|
@ -0,0 +1,78 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SymptomEntity
|
||||||
|
* @Description 描述
|
||||||
|
* @Author 栗永斌
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SymptomEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 私有变量,药品ID
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
/**
|
||||||
|
* 私有变量,药品分类ID
|
||||||
|
*/
|
||||||
|
private Integer drugsCategoryId;
|
||||||
|
/**
|
||||||
|
* 私有变量,药品名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 私有变量,药品图片
|
||||||
|
*/
|
||||||
|
private String picture;
|
||||||
|
/**
|
||||||
|
* 私有变量,药品功效
|
||||||
|
*/
|
||||||
|
private String effect;
|
||||||
|
/**
|
||||||
|
* 私有变量,药品禁忌
|
||||||
|
*/
|
||||||
|
private String taboo;
|
||||||
|
/**
|
||||||
|
* 私有变量,药品形状
|
||||||
|
*/
|
||||||
|
private String shape;
|
||||||
|
/**
|
||||||
|
* 私有变量,药品包装
|
||||||
|
*/
|
||||||
|
private String packing;
|
||||||
|
/**
|
||||||
|
* 私有变量,药品成分
|
||||||
|
*/
|
||||||
|
private String component;
|
||||||
|
/**
|
||||||
|
* 私有变量,药品用法
|
||||||
|
*/
|
||||||
|
private String usage;
|
||||||
|
/**
|
||||||
|
* 私有变量,药品副作用
|
||||||
|
*/
|
||||||
|
private String sideEffects;
|
||||||
|
/**
|
||||||
|
* 私有变量,药品存储
|
||||||
|
*/
|
||||||
|
private String storage;
|
||||||
|
/**
|
||||||
|
* 私有变量,药品注意事项
|
||||||
|
*/
|
||||||
|
private String mindMatter;
|
||||||
|
/**
|
||||||
|
* 私有变量,药品批准文号
|
||||||
|
*/
|
||||||
|
private String approvalNumber;
|
||||||
|
/**
|
||||||
|
* 私有变量,药品创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -42,9 +42,14 @@ public class UserEntity implements Serializable {
|
||||||
@NotBlank(message = "用户名不能为空")
|
@NotBlank(message = "用户名不能为空")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
|
private String headPic;
|
||||||
|
private Integer sex;
|
||||||
|
private Integer age;
|
||||||
|
private Integer height;
|
||||||
|
private Integer weight;
|
||||||
|
private String invitationCode;
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
private Long createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package doctor.domain.vo;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class Comment {
|
||||||
|
private String nickName;
|
||||||
|
private String headPic;
|
||||||
|
private String content;
|
||||||
|
private Long commentTime;
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package doctor.domain.vo;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class DoctorReceiveGift {
|
||||||
|
private Integer worth;
|
||||||
|
private Integer receiveNum;
|
||||||
|
private String giftPic;
|
||||||
|
private String giftName;
|
||||||
|
private String meaning;
|
||||||
|
}
|
|
@ -1,16 +1,35 @@
|
||||||
package doctor.domain.vo;
|
package doctor.domain.vo;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: Medical_Treatment
|
||||||
|
* @BelongsPackage: doctor.domain.vo
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2024/1/15 11:38
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
public class DoctorVo {
|
public class DoctorVo {
|
||||||
private Integer departmentId;
|
private Integer doctorId;
|
||||||
private String departmentName;
|
private String doctorName;
|
||||||
private String goodField;
|
|
||||||
private Integer id;
|
|
||||||
private String imagePic;
|
private String imagePic;
|
||||||
private String inauguralHospital;
|
|
||||||
private String jobTitle;
|
private String jobTitle;
|
||||||
private String name;
|
private String inauguralHospital;
|
||||||
|
private double praise;
|
||||||
|
private Integer serverNum;
|
||||||
|
private Integer servicePrice;
|
||||||
|
private Integer followFlag;
|
||||||
private String personalProfile;
|
private String personalProfile;
|
||||||
|
private String goodField;
|
||||||
|
private Integer commentNum;
|
||||||
|
private Integer praiseNum;
|
||||||
|
private Integer badNum;
|
||||||
|
private List<DoctorReceiveGift> doctorReceiveGiftList;
|
||||||
|
private List<Comment> commentVoList;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,5 +18,16 @@ public class DrugsKnowledgeVo {
|
||||||
private Integer drugsCategoryId;
|
private Integer drugsCategoryId;
|
||||||
private String name;
|
private String name;
|
||||||
private String picture;
|
private String picture;
|
||||||
|
private String effect;
|
||||||
|
private String taboo;
|
||||||
|
private String shape;
|
||||||
|
private String packing;
|
||||||
|
private String component;
|
||||||
|
private String usage;
|
||||||
|
private String sideEffects;
|
||||||
|
private String storage;
|
||||||
|
private String mindMatter;
|
||||||
|
private String approvalNumber;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,5 +19,6 @@ public class InformationVo {
|
||||||
private String thumbnail;
|
private String thumbnail;
|
||||||
private String source;
|
private String source;
|
||||||
private long releaseTime;
|
private long releaseTime;
|
||||||
|
private Integer whetherCollection;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
package doctor.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName SickCommentVo
|
||||||
|
* @Description 描述
|
||||||
|
* @Author 栗永斌
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SickCommentVo {
|
||||||
|
private Integer sickCircleId;
|
||||||
|
private String content;
|
||||||
|
}
|
|
@ -16,6 +16,20 @@ import javax.validation.constraints.Size;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class UserVo {
|
public class UserVo {
|
||||||
|
private Integer id;
|
||||||
|
private String userName;
|
||||||
|
private String jiGuangPwd;
|
||||||
|
private String headPic;
|
||||||
|
private Integer sex;
|
||||||
|
private Integer age;
|
||||||
|
private Integer height;
|
||||||
|
private Integer weight;
|
||||||
|
private Integer whetherBingWeChat;
|
||||||
|
private String invitationCode;
|
||||||
|
private Integer idCardFlag;
|
||||||
|
private Integer bankFlag;
|
||||||
|
private Integer faceFlag;
|
||||||
|
|
||||||
@NotBlank(message = "密码不能为空")
|
@NotBlank(message = "密码不能为空")
|
||||||
@Size(min = 4, message = "密码长度不能小于4")
|
@Size(min = 4, message = "密码长度不能小于4")
|
||||||
private String pwd;
|
private String pwd;
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package doctor.mapper;
|
||||||
|
|
||||||
|
import doctor.domain.entity.MySickEntity;
|
||||||
|
import doctor.domain.entity.SickCircleEntity;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName CollectSickMapper
|
||||||
|
* @Description 描述
|
||||||
|
*/
|
||||||
|
public interface CollectSickMapper {
|
||||||
|
SickCircleEntity shop(@Param("sickCircleId") Integer sickCircleId);
|
||||||
|
|
||||||
|
int ins(SickCircleEntity sickCircleEntity);
|
||||||
|
|
||||||
|
MySickEntity show(@Param("sickCircleId") Integer sickCircleId);
|
||||||
|
|
||||||
|
void del(@Param("sickCircleId") Integer sickCircleId);
|
||||||
|
|
||||||
|
void upd(@Param("sickCircleId") Integer sickCircleId);
|
||||||
|
|
||||||
|
void upda(@Param("sickCircleId") Integer sickCircleId);
|
||||||
|
|
||||||
|
}
|
|
@ -1,9 +1,6 @@
|
||||||
package doctor.mapper;
|
package doctor.mapper;
|
||||||
|
|
||||||
import doctor.domain.entity.DiseaseKnowledge;
|
import doctor.domain.entity.*;
|
||||||
import doctor.domain.entity.DrugsCategory;
|
|
||||||
import doctor.domain.entity.Information;
|
|
||||||
import doctor.domain.entity.InformationPlate;
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -23,4 +20,10 @@ public interface DiseaseKnowledgeMapper {
|
||||||
List<DrugsCategory> findDrugsKnowledgeList(Integer drugsCategoryId);
|
List<DrugsCategory> findDrugsKnowledgeList(Integer drugsCategoryId);
|
||||||
|
|
||||||
|
|
||||||
|
DrugsKnowledge findDrugsKnowledge(Integer id);
|
||||||
|
|
||||||
|
List<PopularSearchEntity> popularSeach();
|
||||||
|
|
||||||
|
List<Department> findDepartment();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
package doctor.mapper;
|
||||||
|
|
||||||
|
import doctor.domain.entity.DoctorEntity;
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: Medical_Treatment
|
||||||
|
* @BelongsPackage: doctor.mapper
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2024/1/15 11:54
|
||||||
|
*/
|
||||||
|
@MapperScan
|
||||||
|
public interface DoctorMapper {
|
||||||
|
List<DoctorEntity> findDoctorList(Integer deptId);
|
||||||
|
}
|
|
@ -18,4 +18,6 @@ public interface InformationMapper {
|
||||||
|
|
||||||
List<InformationPlate> findInformationPlateList();
|
List<InformationPlate> findInformationPlateList();
|
||||||
|
|
||||||
|
|
||||||
|
Information findInformation(Long infoId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
package doctor.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.github.pagehelper.Page;
|
||||||
|
import doctor.domain.entity.DepartmentEntity;
|
||||||
|
import doctor.domain.entity.SickCircleEntity;
|
||||||
|
import doctor.domain.entity.SickCommentEntity;
|
||||||
|
import doctor.domain.entity.SymptomEntity;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName PatientMapper
|
||||||
|
* @Description 描述
|
||||||
|
*/
|
||||||
|
public interface PatientMapper {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SickCircleEntity findSickCircleInfo(@Param("id") Integer id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<SymptomEntity> symptomList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<SickCircleEntity> sickCircleList(@Param("id") Integer id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<DepartmentEntity> DepartmentList(Page<DepartmentEntity> objects);
|
||||||
|
|
||||||
|
|
||||||
|
List<SickCommentEntity> findSickCircleCommentList(@Param("sickCircleId") Integer sickCircleId);
|
||||||
|
|
||||||
|
List<SickCircleEntity> searchSickCircle(@Param("keyWord") String keyWord);
|
||||||
|
|
||||||
|
}
|
|
@ -13,4 +13,8 @@ public interface SickCircleMapper {
|
||||||
SickCircleEntity findSickCircleInfo(Integer sickCircleId);
|
SickCircleEntity findSickCircleInfo(Integer sickCircleId);
|
||||||
|
|
||||||
SickCircleEntity findSickCircleInfoByKeyWord(String keyWord);
|
SickCircleEntity findSickCircleInfoByKeyWord(String keyWord);
|
||||||
|
|
||||||
|
void publishComment(Integer sickCircleId, Long userid, String content);
|
||||||
|
|
||||||
|
void publishSickCircle(SickCircleEntity sickCircleEntity);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package doctor.mapper;
|
package doctor.mapper;
|
||||||
|
|
||||||
import doctor.domain.dto.UserArchivesDto;
|
import doctor.domain.dto.UserArchivesDto;
|
||||||
|
import doctor.domain.dto.UserTaskRecordDto;
|
||||||
import doctor.domain.entity.*;
|
import doctor.domain.entity.*;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
@ -40,4 +41,9 @@ public interface UserVideoMapper {
|
||||||
void uploadUserArchivesImg(@Param("id") Integer id);
|
void uploadUserArchivesImg(@Param("id") Integer id);
|
||||||
|
|
||||||
|
|
||||||
|
List<UserDoctorFollowEntity> findUserDoctorFollowList();
|
||||||
|
|
||||||
|
List<UserTaskRecordDto> findUserTaskList();
|
||||||
|
|
||||||
|
List<SignEntity> findUserSign(@Param("userId") Integer userId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,8 @@ public interface VideoMapper {
|
||||||
|
|
||||||
List<VideoCommentEntity> findVideoCommentList(@Param("videoId") Integer videoId);
|
List<VideoCommentEntity> findVideoCommentList(@Param("videoId") Integer videoId);
|
||||||
|
|
||||||
|
void addVideoComment(@Param("userId") Integer userId, @Param("sessionId") String sessionId, @Param("videoId") Integer videoId, @Param("content") String content);
|
||||||
|
|
||||||
|
|
||||||
// UserWalletEntity FindById(@Param("userId") Integer userId);
|
// UserWalletEntity FindById(@Param("userId") Integer userId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package doctor.service;
|
||||||
|
|
||||||
|
import doctor.common.core.domain.HealthR;
|
||||||
|
import doctor.domain.entity.SickCircleEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName CollectSickService
|
||||||
|
* @Description 描述
|
||||||
|
*/
|
||||||
|
public interface CollectSickService {
|
||||||
|
HealthR<SickCircleEntity> cancelSickCollection(Integer sickCircleId);
|
||||||
|
|
||||||
|
HealthR<SickCircleEntity> addUserSickCollection(Integer sickCircleId);
|
||||||
|
|
||||||
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
package doctor.service;
|
package doctor.service;
|
||||||
|
|
||||||
import doctor.domain.entity.DiseaseKnowledge;
|
import doctor.domain.entity.*;
|
||||||
import doctor.domain.entity.DrugsCategory;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -19,4 +18,11 @@ public interface DiseaseKnowledgeService {
|
||||||
List<DrugsCategory> findDrugsKnowledgeList(Integer drugsCategoryId);
|
List<DrugsCategory> findDrugsKnowledgeList(Integer drugsCategoryId);
|
||||||
|
|
||||||
|
|
||||||
|
DrugsKnowledge findDrugsKnowledge(Integer id);
|
||||||
|
|
||||||
|
List<PopularSearchEntity> popularSeach();
|
||||||
|
|
||||||
|
List<Department> findDepartment();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package doctor.service;
|
||||||
|
|
||||||
|
import doctor.domain.entity.DoctorEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: Medical_Treatment
|
||||||
|
* @BelongsPackage: doctor.service
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2024/1/15 11:32
|
||||||
|
*/
|
||||||
|
public interface DoctorService {
|
||||||
|
List<DoctorEntity> findDoctorList(Integer deptId);
|
||||||
|
}
|
|
@ -16,4 +16,7 @@ public interface InformationService {
|
||||||
List<Information> findInformationList(Integer plateId);
|
List<Information> findInformationList(Integer plateId);
|
||||||
|
|
||||||
List<InformationPlate> findInformationPlateList();
|
List<InformationPlate> findInformationPlateList();
|
||||||
|
|
||||||
|
|
||||||
|
Information findInformation(Long infoId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package doctor.service;
|
package doctor.service;
|
||||||
|
|
||||||
|
import doctor.domain.vo.DoctorVo;
|
||||||
import doctor.domain.vo.InquiryDetailsRecordVo;
|
import doctor.domain.vo.InquiryDetailsRecordVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -12,4 +13,6 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface InquiryService {
|
public interface InquiryService {
|
||||||
List<InquiryDetailsRecordVo> findHistoryInquiryRecord();
|
List<InquiryDetailsRecordVo> findHistoryInquiryRecord();
|
||||||
|
|
||||||
|
DoctorVo findDoctorInfo(Integer doctorId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
package doctor.service;
|
||||||
|
|
||||||
|
import com.alibaba.nacos.api.model.v2.Result;
|
||||||
|
import doctor.common.core.domain.HealthR;
|
||||||
|
import doctor.domain.entity.SickCircleEntity;
|
||||||
|
import doctor.domain.entity.SickCommentEntity;
|
||||||
|
import doctor.domain.entity.SymptomEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName PatientService
|
||||||
|
* @Description 描述
|
||||||
|
*/
|
||||||
|
public interface PatientService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SickCircleEntity findSickCircleInfo(Integer id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Result<List<SymptomEntity>> symptomList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
HealthR<List<SickCircleEntity>> sickCircleList(Integer departmentId);
|
||||||
|
|
||||||
|
|
||||||
|
HealthR<List<SickCommentEntity>> findSickCircleCommentList(Integer sickCircleId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
HealthR<List<SickCircleEntity>> searchSickCircle(String keyWord);
|
||||||
|
|
||||||
|
}
|
|
@ -1,8 +1,11 @@
|
||||||
package doctor.service;
|
package doctor.service;
|
||||||
|
|
||||||
|
import com.alibaba.nacos.api.model.v2.Result;
|
||||||
import doctor.common.core.domain.HealthR;
|
import doctor.common.core.domain.HealthR;
|
||||||
|
import doctor.domain.entity.SickCircleEntity;
|
||||||
import doctor.domain.vo.SearchSickCircleVo;
|
import doctor.domain.vo.SearchSickCircleVo;
|
||||||
import doctor.domain.vo.SickCircleVo;
|
import doctor.domain.vo.SickCircleVo;
|
||||||
|
import doctor.domain.vo.SickCommentVo;
|
||||||
import doctor.domain.vo.SickInfoVo;
|
import doctor.domain.vo.SickInfoVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -13,4 +16,9 @@ public interface SickCircleService {
|
||||||
SickInfoVo findSickCircleInfo(Integer sickCircleId);
|
SickInfoVo findSickCircleInfo(Integer sickCircleId);
|
||||||
|
|
||||||
SearchSickCircleVo searchSickCircle(String keyWord);
|
SearchSickCircleVo searchSickCircle(String keyWord);
|
||||||
|
|
||||||
|
Result<SickCommentVo> publishComment(Integer sickCircleId, String content);
|
||||||
|
|
||||||
|
HealthR<SickCircleEntity> publishSickCircle(SickCircleEntity sickCircleEntity);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
package doctor.service;
|
package doctor.service;
|
||||||
|
|
||||||
import doctor.domain.dto.UserArchivesDto;
|
import doctor.domain.dto.UserArchivesDto;
|
||||||
import doctor.domain.entity.UserAdoptCommentEntity;
|
import doctor.domain.entity.*;
|
||||||
import doctor.domain.entity.UserArchivesEntity;
|
|
||||||
import doctor.domain.entity.UserEntity;
|
|
||||||
import doctor.domain.entity.UserWalletEntity;
|
|
||||||
import doctor.domain.vo.*;
|
import doctor.domain.vo.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -44,4 +41,9 @@ public interface UserVideoService {
|
||||||
|
|
||||||
void uploadUserArchivesImg(Integer id);
|
void uploadUserArchivesImg(Integer id);
|
||||||
|
|
||||||
|
List<UserDoctorFollowVo> findUserDoctorFollowList();
|
||||||
|
|
||||||
|
List<UserTaskRecordVo> findUserTaskList();
|
||||||
|
|
||||||
|
List<SignEntity> findUserSign(Integer userId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,4 +20,6 @@ public interface VideoService {
|
||||||
|
|
||||||
|
|
||||||
List<VideoCommentVo> findVideoCommentList(Integer videoId);
|
List<VideoCommentVo> findVideoCommentList(Integer videoId);
|
||||||
|
|
||||||
|
void addVideoComment(Integer userId, String sessionId, Integer videoId, String content);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
package doctor.service.impl;
|
||||||
|
|
||||||
|
import doctor.common.core.domain.HealthR;
|
||||||
|
import doctor.domain.entity.MySickEntity;
|
||||||
|
import doctor.domain.entity.SickCircleEntity;
|
||||||
|
import doctor.mapper.CollectSickMapper;
|
||||||
|
import doctor.service.CollectSickService;
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName CollectSickServiceImpl
|
||||||
|
* @Description 描述
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Log4j2
|
||||||
|
public class CollectSickServiceImpl implements CollectSickService {
|
||||||
|
@Autowired
|
||||||
|
private CollectSickMapper collectSickMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HealthR<SickCircleEntity> cancelSickCollection(Integer sickCircleId) {
|
||||||
|
//查询我的病友圈对象信息看是否存在
|
||||||
|
// 根据sickCircleId获取收藏信息
|
||||||
|
MySickEntity s = collectSickMapper.show(sickCircleId);
|
||||||
|
if (s != null) {
|
||||||
|
// 根据sickCircleId删除收藏信息
|
||||||
|
collectSickMapper.del(sickCircleId);
|
||||||
|
// 根据sickCircleId更新收藏信息
|
||||||
|
collectSickMapper.upda(sickCircleId);
|
||||||
|
// 返回取消收藏成功的提示信息
|
||||||
|
return HealthR.fail("取消收藏成功");
|
||||||
|
} else {
|
||||||
|
// 返回没有收藏过的提示信息
|
||||||
|
return HealthR.fail("没有收藏过");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HealthR<SickCircleEntity> addUserSickCollection(Integer sickCircleId) {
|
||||||
|
//查询我的病友圈对象信息看是否存在
|
||||||
|
MySickEntity s=collectSickMapper.show(sickCircleId);
|
||||||
|
|
||||||
|
if (s==null){
|
||||||
|
//查询病友圈对象信息
|
||||||
|
SickCircleEntity sickCircleEntity= collectSickMapper.shop(sickCircleId);
|
||||||
|
|
||||||
|
//添加我的收藏记录
|
||||||
|
collectSickMapper.ins(sickCircleEntity);
|
||||||
|
|
||||||
|
//更新病友圈的收藏数
|
||||||
|
collectSickMapper.upd(sickCircleId);
|
||||||
|
|
||||||
|
return HealthR.ok(sickCircleEntity);
|
||||||
|
}else {
|
||||||
|
return HealthR.fail("已经收藏过了");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
package doctor.service.impl;
|
package doctor.service.impl;
|
||||||
|
|
||||||
import doctor.domain.entity.DiseaseKnowledge;
|
import doctor.domain.entity.*;
|
||||||
import doctor.domain.entity.DrugsCategory;
|
|
||||||
import doctor.mapper.DiseaseKnowledgeMapper;
|
import doctor.mapper.DiseaseKnowledgeMapper;
|
||||||
import doctor.service.DiseaseKnowledgeService;
|
import doctor.service.DiseaseKnowledgeService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -34,5 +33,20 @@ public class DiseaseKnowledgeServiceimpl implements DiseaseKnowledgeService {
|
||||||
return diseaseKnowledgeMapper.findDrugsKnowledgeList(drugsCategoryId);
|
return diseaseKnowledgeMapper.findDrugsKnowledgeList(drugsCategoryId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DrugsKnowledge findDrugsKnowledge(Integer id) {
|
||||||
|
return diseaseKnowledgeMapper.findDrugsKnowledge(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PopularSearchEntity> popularSeach() {
|
||||||
|
return diseaseKnowledgeMapper.popularSeach();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Department> findDepartment() {
|
||||||
|
return diseaseKnowledgeMapper.findDepartment();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package doctor.service.impl;
|
||||||
|
|
||||||
|
import doctor.domain.entity.DoctorEntity;
|
||||||
|
import doctor.mapper.DoctorMapper;
|
||||||
|
import doctor.service.DoctorService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: Medical_Treatment
|
||||||
|
* @BelongsPackage: doctor.service.impl
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2024/1/15 11:45
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DoctorServiceimpl implements DoctorService {
|
||||||
|
@Autowired
|
||||||
|
private DoctorMapper doctorMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DoctorEntity> findDoctorList(Integer deptId) {
|
||||||
|
return doctorMapper.findDoctorList(deptId);
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ package doctor.service.impl;
|
||||||
|
|
||||||
import doctor.common.security.service.TokenService;
|
import doctor.common.security.service.TokenService;
|
||||||
import doctor.common.security.utils.SecurityUtils;
|
import doctor.common.security.utils.SecurityUtils;
|
||||||
|
import doctor.convert.VideoConvert;
|
||||||
import doctor.domain.entity.UserVideoBuyEntity;
|
import doctor.domain.entity.UserVideoBuyEntity;
|
||||||
import doctor.domain.entity.UserVideoCollectionEntity;
|
import doctor.domain.entity.UserVideoCollectionEntity;
|
||||||
import doctor.domain.entity.VideoCategoryEntity;
|
import doctor.domain.entity.VideoCategoryEntity;
|
||||||
|
@ -37,7 +38,7 @@ public class HealthUserVideoServiceImpl implements HealthUserVideoService {
|
||||||
@Override
|
@Override
|
||||||
public List<VideoVo> findVideoVoList(Integer categoryId, Integer userId) {
|
public List<VideoVo> findVideoVoList(Integer categoryId, Integer userId) {
|
||||||
List<VideoEntity> videoVoList = healthUserVideoMapper.findVideoVoList(categoryId);
|
List<VideoEntity> videoVoList = healthUserVideoMapper.findVideoVoList(categoryId);
|
||||||
List<VideoVo> videoVos = ConvertUtil.entityToVoList(videoVoList, VideoVo.class);
|
List<VideoVo> videoVos = VideoConvert.INSTANCE.videoEntityListToVideoVoList(videoVoList);
|
||||||
videoVos.forEach(video -> {
|
videoVos.forEach(video -> {
|
||||||
UserVideoCollectionEntity userVideoCollection = healthUserVideoMapper.selectWhetherCollectionByUserIdAndVideoId(userId,video.getId());
|
UserVideoCollectionEntity userVideoCollection = healthUserVideoMapper.selectWhetherCollectionByUserIdAndVideoId(userId,video.getId());
|
||||||
if(userVideoCollection!=null){
|
if(userVideoCollection!=null){
|
||||||
|
|
|
@ -29,4 +29,11 @@ public class InformationServiceimpl implements InformationService {
|
||||||
public List<InformationPlate> findInformationPlateList() {
|
public List<InformationPlate> findInformationPlateList() {
|
||||||
return informationMapper.findInformationPlateList();
|
return informationMapper.findInformationPlateList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Information findInformation(Long infoId) {
|
||||||
|
return informationMapper.findInformation(infoId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package doctor.service.impl;
|
package doctor.service.impl;
|
||||||
|
|
||||||
import doctor.domain.entity.InquiryDetailsRecordEntity;
|
import doctor.domain.entity.InquiryDetailsRecordEntity;
|
||||||
|
import doctor.domain.vo.DoctorVo;
|
||||||
import doctor.domain.vo.InquiryDetailsRecordVo;
|
import doctor.domain.vo.InquiryDetailsRecordVo;
|
||||||
import doctor.mapper.InquiryMapper;
|
import doctor.mapper.InquiryMapper;
|
||||||
import doctor.service.InquiryService;
|
import doctor.service.InquiryService;
|
||||||
|
@ -26,4 +27,10 @@ public class InquiryServiceImpl implements InquiryService {
|
||||||
List<InquiryDetailsRecordVo> inquiryDetailsRecordVos = ConvertUtil.entityToVoList(inquiryDetailsRecordEntity, InquiryDetailsRecordVo.class);
|
List<InquiryDetailsRecordVo> inquiryDetailsRecordVos = ConvertUtil.entityToVoList(inquiryDetailsRecordEntity, InquiryDetailsRecordVo.class);
|
||||||
return inquiryDetailsRecordVos;
|
return inquiryDetailsRecordVos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DoctorVo findDoctorInfo(Integer doctorId) {
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,99 @@
|
||||||
|
package doctor.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.nacos.api.model.v2.Result;
|
||||||
|
import doctor.common.core.constant.TokenConstants;
|
||||||
|
import doctor.common.core.domain.HealthR;
|
||||||
|
import doctor.common.security.service.TokenService;
|
||||||
|
import doctor.domain.entity.SickCircleEntity;
|
||||||
|
import doctor.domain.entity.SickCommentEntity;
|
||||||
|
import doctor.domain.entity.SymptomEntity;
|
||||||
|
import doctor.mapper.PatientMapper;
|
||||||
|
import doctor.service.PatientService;
|
||||||
|
import doctor.system.api.model.LoginUser;
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName PatientServiceImpl
|
||||||
|
* @Description 描述
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Log4j2
|
||||||
|
public class PatientServiceImpl implements PatientService {
|
||||||
|
@Autowired
|
||||||
|
private PatientMapper patientMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HealthR<List<SickCircleEntity>> sickCircleList(Integer departmentId) {
|
||||||
|
/**
|
||||||
|
* 根据科室id获取病人圈列表
|
||||||
|
* @param departmentId 科室id
|
||||||
|
* @return 病人圈列表
|
||||||
|
*/
|
||||||
|
List<SickCircleEntity> sickCircleEntity = patientMapper.sickCircleList(departmentId);
|
||||||
|
return HealthR.ok(sickCircleEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据病人圈id获取病人圈评论列表
|
||||||
|
* @param sickCircleId 病人圈id
|
||||||
|
* @return 病人圈评论列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public HealthR<List<SickCommentEntity>> findSickCircleCommentList(Integer sickCircleId) {
|
||||||
|
List<SickCommentEntity> sickCommentEntity = patientMapper.findSickCircleCommentList(sickCircleId);
|
||||||
|
return HealthR.ok(sickCommentEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HealthR<List<SickCircleEntity>> searchSickCircle(String keyWord) {
|
||||||
|
List<SickCircleEntity> list= patientMapper.searchSickCircle(keyWord);
|
||||||
|
return HealthR.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SickCircleEntity findSickCircleInfo(Integer id) {
|
||||||
|
SickCircleEntity sickCircleList = patientMapper.findSickCircleInfo(id);
|
||||||
|
return sickCircleList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
HttpServletRequest httpServletRequest;
|
||||||
|
@Autowired
|
||||||
|
RedisTemplate<String,String> redisTemplate;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
TokenService tokenService;
|
||||||
|
private LoginUser Login() {
|
||||||
|
|
||||||
|
String header = httpServletRequest.getHeader(TokenConstants.SESSIONID);
|
||||||
|
LoginUser loginUser = tokenService.getLoginUser(header);
|
||||||
|
return loginUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<List<SymptomEntity>> symptomList() {
|
||||||
|
List<SymptomEntity> symptomList = patientMapper.symptomList();
|
||||||
|
return Result.success(symptomList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,17 +1,24 @@
|
||||||
package doctor.service.impl;
|
package doctor.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.nacos.api.model.v2.Result;
|
||||||
|
import doctor.common.core.constant.TokenConstants;
|
||||||
import doctor.common.core.domain.HealthR;
|
import doctor.common.core.domain.HealthR;
|
||||||
|
import doctor.common.core.utils.StringUtils;
|
||||||
import doctor.common.core.web.controller.BaseController;
|
import doctor.common.core.web.controller.BaseController;
|
||||||
|
import doctor.common.security.service.TokenService;
|
||||||
import doctor.domain.entity.SickCircleEntity;
|
import doctor.domain.entity.SickCircleEntity;
|
||||||
import doctor.domain.vo.SearchSickCircleVo;
|
import doctor.domain.vo.SearchSickCircleVo;
|
||||||
import doctor.domain.vo.SickCircleVo;
|
import doctor.domain.vo.SickCircleVo;
|
||||||
|
import doctor.domain.vo.SickCommentVo;
|
||||||
import doctor.domain.vo.SickInfoVo;
|
import doctor.domain.vo.SickInfoVo;
|
||||||
import doctor.mapper.SickCircleMapper;
|
import doctor.mapper.SickCircleMapper;
|
||||||
import doctor.service.SickCircleService;
|
import doctor.service.SickCircleService;
|
||||||
|
import doctor.system.api.model.LoginUser;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -20,6 +27,11 @@ public class SickCircleServiceImpl extends BaseController implements SickCircleS
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SickCircleMapper sickCircleMapper;
|
private SickCircleMapper sickCircleMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
HttpServletRequest httpServletRequest;
|
||||||
|
@Autowired
|
||||||
|
TokenService tokenService;
|
||||||
@Override
|
@Override
|
||||||
public List<SickCircleVo> findSickCircleList(Integer page, Integer size, Integer departmentId) {
|
public List<SickCircleVo> findSickCircleList(Integer page, Integer size, Integer departmentId) {
|
||||||
List<SickCircleEntity> list = sickCircleMapper.findSickCircleList(departmentId);
|
List<SickCircleEntity> list = sickCircleMapper.findSickCircleList(departmentId);
|
||||||
|
@ -48,4 +60,46 @@ public class SickCircleServiceImpl extends BaseController implements SickCircleS
|
||||||
BeanUtils.copyProperties(sickCircleInfo,searchSickCircleVo);
|
BeanUtils.copyProperties(sickCircleInfo,searchSickCircleVo);
|
||||||
return searchSickCircleVo;
|
return searchSickCircleVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<SickCommentVo> publishComment(Integer sickCircleId, String content) {
|
||||||
|
//获取用户对象
|
||||||
|
LoginUser login = Login();
|
||||||
|
//获取用户id
|
||||||
|
Long userid = login.getUserid();
|
||||||
|
sickCircleMapper.publishComment(sickCircleId,userid, content);
|
||||||
|
|
||||||
|
return Result.success(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HealthR<SickCircleEntity> publishSickCircle(SickCircleEntity sickCircleEntity) {
|
||||||
|
if (StringUtils.isEmpty(sickCircleEntity.getTitle())) {
|
||||||
|
Result.failure("标题不能为空");
|
||||||
|
}
|
||||||
|
if (StringUtils.isEmpty(sickCircleEntity.getTitle())) {
|
||||||
|
Result.failure("标题不能为空");
|
||||||
|
}
|
||||||
|
if (StringUtils.isEmpty(sickCircleEntity.getDisease())) {
|
||||||
|
Result.failure("症状不能为空");
|
||||||
|
}
|
||||||
|
if (StringUtils.isEmpty(sickCircleEntity.getDetail())) {
|
||||||
|
Result.failure("描述不能为空");
|
||||||
|
}
|
||||||
|
if (StringUtils.isEmpty(sickCircleEntity.getTreatmentProcess())) {
|
||||||
|
Result.failure("治疗过程不能为空");
|
||||||
|
}
|
||||||
|
LoginUser login = Login();
|
||||||
|
sickCircleEntity.setUserId(login.getUserid().intValue());
|
||||||
|
|
||||||
|
sickCircleMapper.publishSickCircle(sickCircleEntity);
|
||||||
|
return HealthR.ok(sickCircleEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LoginUser Login() {
|
||||||
|
|
||||||
|
String header = httpServletRequest.getHeader(TokenConstants.SESSIONID);
|
||||||
|
LoginUser loginUser = tokenService.getLoginUser(header);
|
||||||
|
return loginUser;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package doctor.service.impl;
|
package doctor.service.impl;
|
||||||
|
|
||||||
import doctor.domain.dto.UserArchivesDto;
|
import doctor.domain.dto.UserArchivesDto;
|
||||||
|
import doctor.domain.dto.UserTaskRecordDto;
|
||||||
import doctor.domain.entity.*;
|
import doctor.domain.entity.*;
|
||||||
import doctor.domain.vo.*;
|
import doctor.domain.vo.*;
|
||||||
import doctor.mapper.UserVideoMapper;
|
import doctor.mapper.UserVideoMapper;
|
||||||
|
@ -79,7 +80,25 @@ public class UserVideoServiceImpl implements UserVideoService {
|
||||||
userVideoMapper.uploadUserArchivesImg(id);
|
userVideoMapper.uploadUserArchivesImg(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserDoctorFollowVo> findUserDoctorFollowList() {
|
||||||
|
List<UserDoctorFollowEntity> userDoctorFollowEntityList=userVideoMapper.findUserDoctorFollowList();
|
||||||
|
List<UserDoctorFollowVo> userDoctorFollowVoList = ConvertUtil.entityToVoList(userDoctorFollowEntityList, UserDoctorFollowVo.class);
|
||||||
|
return userDoctorFollowVoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserTaskRecordVo> findUserTaskList() {
|
||||||
|
List<UserTaskRecordDto> userTaskRecordDtos=userVideoMapper.findUserTaskList();
|
||||||
|
List<UserTaskRecordVo> userTaskRecordVoList = ConvertUtil.entityToVoList(userTaskRecordDtos, UserTaskRecordVo.class);
|
||||||
|
return userTaskRecordVoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SignEntity> findUserSign(Integer userId) {
|
||||||
|
List<SignEntity> userEntityList=userVideoMapper.findUserSign(userId);
|
||||||
|
return userEntityList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -59,5 +59,10 @@ public class VideoServiceImpl implements VideoService {
|
||||||
return videoCommentVoList;
|
return videoCommentVoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addVideoComment(Integer userId, String sessionId, Integer videoId, String content) {
|
||||||
|
videoMapper.addVideoComment(userId, sessionId, videoId, content);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,312 @@
|
||||||
|
package doctor.util;
|
||||||
|
|
||||||
|
import com.alibaba.csp.sentinel.util.StringUtil;
|
||||||
|
import doctor.common.core.utils.StringUtils;
|
||||||
|
import org.apache.http.HttpResponse;
|
||||||
|
import org.apache.http.NameValuePair;
|
||||||
|
import org.apache.http.client.HttpClient;
|
||||||
|
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||||
|
import org.apache.http.client.methods.HttpDelete;
|
||||||
|
import org.apache.http.client.methods.HttpGet;
|
||||||
|
import org.apache.http.client.methods.HttpPost;
|
||||||
|
import org.apache.http.client.methods.HttpPut;
|
||||||
|
import org.apache.http.conn.ClientConnectionManager;
|
||||||
|
import org.apache.http.conn.scheme.Scheme;
|
||||||
|
import org.apache.http.conn.scheme.SchemeRegistry;
|
||||||
|
import org.apache.http.conn.ssl.SSLSocketFactory;
|
||||||
|
import org.apache.http.entity.ByteArrayEntity;
|
||||||
|
import org.apache.http.entity.StringEntity;
|
||||||
|
import org.apache.http.impl.client.DefaultHttpClient;
|
||||||
|
import org.apache.http.message.BasicNameValuePair;
|
||||||
|
|
||||||
|
import javax.net.ssl.SSLContext;
|
||||||
|
import javax.net.ssl.TrustManager;
|
||||||
|
import javax.net.ssl.X509TrustManager;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.security.KeyManagementException;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
import java.security.cert.X509Certificate;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class HttpUtils {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get
|
||||||
|
*
|
||||||
|
* @param host
|
||||||
|
* @param path
|
||||||
|
* @param method
|
||||||
|
* @param headers
|
||||||
|
* @param querys
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static HttpResponse doGet(String host, String path, String method,
|
||||||
|
Map<String, String> headers,
|
||||||
|
Map<String, String> querys)
|
||||||
|
throws Exception {
|
||||||
|
HttpClient httpClient = wrapClient(host);
|
||||||
|
|
||||||
|
HttpGet request = new HttpGet(buildUrl(host, path, querys));
|
||||||
|
for (Map.Entry<String, String> e : headers.entrySet()) {
|
||||||
|
request.addHeader(e.getKey(), e.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
return httpClient.execute(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* post form
|
||||||
|
*
|
||||||
|
* @param host
|
||||||
|
* @param path
|
||||||
|
* @param method
|
||||||
|
* @param headers
|
||||||
|
* @param querys
|
||||||
|
* @param bodys
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static HttpResponse doPost(String host, String path, String method,
|
||||||
|
Map<String, String> headers,
|
||||||
|
Map<String, String> querys,
|
||||||
|
Map<String, String> bodys)
|
||||||
|
throws Exception {
|
||||||
|
HttpClient httpClient = wrapClient(host);
|
||||||
|
|
||||||
|
HttpPost request = new HttpPost(buildUrl(host, path, querys));
|
||||||
|
for (Map.Entry<String, String> e : headers.entrySet()) {
|
||||||
|
request.addHeader(e.getKey(), e.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bodys != null) {
|
||||||
|
List<NameValuePair> nameValuePairList = new ArrayList<NameValuePair>();
|
||||||
|
|
||||||
|
for (String key : bodys.keySet()) {
|
||||||
|
nameValuePairList.add(new BasicNameValuePair(key, bodys.get(key)));
|
||||||
|
}
|
||||||
|
UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(nameValuePairList, "utf-8");
|
||||||
|
formEntity.setContentType("application/x-www-form-urlencoded; charset=UTF-8");
|
||||||
|
request.setEntity(formEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
return httpClient.execute(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Post String
|
||||||
|
*
|
||||||
|
* @param host
|
||||||
|
* @param path
|
||||||
|
* @param method
|
||||||
|
* @param headers
|
||||||
|
* @param querys
|
||||||
|
* @param body
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static HttpResponse doPost(String host, String path, String method,
|
||||||
|
Map<String, String> headers,
|
||||||
|
Map<String, String> querys,
|
||||||
|
String body)
|
||||||
|
throws Exception {
|
||||||
|
HttpClient httpClient = wrapClient(host);
|
||||||
|
|
||||||
|
HttpPost request = new HttpPost(buildUrl(host, path, querys));
|
||||||
|
for (Map.Entry<String, String> e : headers.entrySet()) {
|
||||||
|
request.addHeader(e.getKey(), e.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtil.isNotBlank(body)) {
|
||||||
|
request.setEntity(new StringEntity(body, "utf-8"));
|
||||||
|
}
|
||||||
|
|
||||||
|
return httpClient.execute(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Post stream
|
||||||
|
*
|
||||||
|
* @param host
|
||||||
|
* @param path
|
||||||
|
* @param method
|
||||||
|
* @param headers
|
||||||
|
* @param querys
|
||||||
|
* @param body
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static HttpResponse doPost(String host, String path, String method,
|
||||||
|
Map<String, String> headers,
|
||||||
|
Map<String, String> querys,
|
||||||
|
byte[] body)
|
||||||
|
throws Exception {
|
||||||
|
HttpClient httpClient = wrapClient(host);
|
||||||
|
|
||||||
|
HttpPost request = new HttpPost(buildUrl(host, path, querys));
|
||||||
|
for (Map.Entry<String, String> e : headers.entrySet()) {
|
||||||
|
request.addHeader(e.getKey(), e.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (body != null) {
|
||||||
|
request.setEntity(new ByteArrayEntity(body));
|
||||||
|
}
|
||||||
|
|
||||||
|
return httpClient.execute(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Put String
|
||||||
|
* @param host
|
||||||
|
* @param path
|
||||||
|
* @param method
|
||||||
|
* @param headers
|
||||||
|
* @param querys
|
||||||
|
* @param body
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static HttpResponse doPut(String host, String path, String method,
|
||||||
|
Map<String, String> headers,
|
||||||
|
Map<String, String> querys,
|
||||||
|
String body)
|
||||||
|
throws Exception {
|
||||||
|
HttpClient httpClient = wrapClient(host);
|
||||||
|
|
||||||
|
HttpPut request = new HttpPut(buildUrl(host, path, querys));
|
||||||
|
for (Map.Entry<String, String> e : headers.entrySet()) {
|
||||||
|
request.addHeader(e.getKey(), e.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(body)) {
|
||||||
|
request.setEntity(new StringEntity(body, "utf-8"));
|
||||||
|
}
|
||||||
|
|
||||||
|
return httpClient.execute(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Put stream
|
||||||
|
* @param host
|
||||||
|
* @param path
|
||||||
|
* @param method
|
||||||
|
* @param headers
|
||||||
|
* @param querys
|
||||||
|
* @param body
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static HttpResponse doPut(String host, String path, String method,
|
||||||
|
Map<String, String> headers,
|
||||||
|
Map<String, String> querys,
|
||||||
|
byte[] body)
|
||||||
|
throws Exception {
|
||||||
|
HttpClient httpClient = wrapClient(host);
|
||||||
|
|
||||||
|
HttpPut request = new HttpPut(buildUrl(host, path, querys));
|
||||||
|
for (Map.Entry<String, String> e : headers.entrySet()) {
|
||||||
|
request.addHeader(e.getKey(), e.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (body != null) {
|
||||||
|
request.setEntity(new ByteArrayEntity(body));
|
||||||
|
}
|
||||||
|
|
||||||
|
return httpClient.execute(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete
|
||||||
|
*
|
||||||
|
* @param host
|
||||||
|
* @param path
|
||||||
|
* @param method
|
||||||
|
* @param headers
|
||||||
|
* @param querys
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static HttpResponse doDelete(String host, String path, String method,
|
||||||
|
Map<String, String> headers,
|
||||||
|
Map<String, String> querys)
|
||||||
|
throws Exception {
|
||||||
|
HttpClient httpClient = wrapClient(host);
|
||||||
|
|
||||||
|
HttpDelete request = new HttpDelete(buildUrl(host, path, querys));
|
||||||
|
for (Map.Entry<String, String> e : headers.entrySet()) {
|
||||||
|
request.addHeader(e.getKey(), e.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
return httpClient.execute(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String buildUrl(String host, String path, Map<String, String> querys) throws UnsupportedEncodingException {
|
||||||
|
StringBuilder sbUrl = new StringBuilder();
|
||||||
|
sbUrl.append(host);
|
||||||
|
if (!StringUtils.isBlank(path)) {
|
||||||
|
sbUrl.append(path);
|
||||||
|
}
|
||||||
|
if (null != querys) {
|
||||||
|
StringBuilder sbQuery = new StringBuilder();
|
||||||
|
for (Map.Entry<String, String> query : querys.entrySet()) {
|
||||||
|
if (0 < sbQuery.length()) {
|
||||||
|
sbQuery.append("&");
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(query.getKey()) && !StringUtils.isBlank(query.getValue())) {
|
||||||
|
sbQuery.append(query.getValue());
|
||||||
|
}
|
||||||
|
if (!StringUtils.isBlank(query.getKey())) {
|
||||||
|
sbQuery.append(query.getKey());
|
||||||
|
if (!StringUtils.isBlank(query.getValue())) {
|
||||||
|
sbQuery.append("=");
|
||||||
|
sbQuery.append(URLEncoder.encode(query.getValue(), "utf-8"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (0 < sbQuery.length()) {
|
||||||
|
sbUrl.append("?").append(sbQuery);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return sbUrl.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static HttpClient wrapClient(String host) {
|
||||||
|
HttpClient httpClient = new DefaultHttpClient();
|
||||||
|
if (host.startsWith("https://")) {
|
||||||
|
sslClient(httpClient);
|
||||||
|
}
|
||||||
|
|
||||||
|
return httpClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void sslClient(HttpClient httpClient) {
|
||||||
|
try {
|
||||||
|
SSLContext ctx = SSLContext.getInstance("TLS");
|
||||||
|
X509TrustManager tm = new X509TrustManager() {
|
||||||
|
public X509Certificate[] getAcceptedIssuers() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
public void checkClientTrusted(X509Certificate[] xcs, String str) {
|
||||||
|
|
||||||
|
}
|
||||||
|
public void checkServerTrusted(X509Certificate[] xcs, String str) {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
ctx.init(null, new TrustManager[] { tm }, null);
|
||||||
|
SSLSocketFactory ssf = new SSLSocketFactory(ctx);
|
||||||
|
ssf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
|
||||||
|
ClientConnectionManager ccm = httpClient.getConnectionManager();
|
||||||
|
SchemeRegistry registry = ccm.getSchemeRegistry();
|
||||||
|
registry.register(new Scheme("https", 443, ssf));
|
||||||
|
} catch (KeyManagementException ex) {
|
||||||
|
throw new RuntimeException(ex);
|
||||||
|
} catch (NoSuchAlgorithmException ex) {
|
||||||
|
throw new RuntimeException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,11 +15,11 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="doctor.mapper.CollectSickMapper">
|
||||||
|
<insert id="ins">
|
||||||
|
INSERT INTO `doctor`.`user_sick_circle` (`sick_circle_id`, `user_id`, `title`, `department_id`, `adopt_comment_id`, `disease`, `detail`, `treatment_hospital`, `treatment_start_time`, `treatment_end_time`, `treatment_process`, `picture`, `release_time`, `adopt_time`, `amount`, `create_time`, `collection_num`, `comment_num`)
|
||||||
|
VALUES (#{sickCircleId},#{userId},#{title},#{departmentId},#{adoptCommentId},#{disease},#{detail},#{treatmentHospital},#{treatmentStartTime},#{treatmentEndTime},#{treatmentProcess},#{picture},#{releaseTime},#{adoptTime},#{amount},#{createTime},#{collectionNum},#{commentNum});
|
||||||
|
</insert>
|
||||||
|
<update id="upd">
|
||||||
|
update sick_circle set collection_num=collection_num + 1 where sick_circle_id = #{sickCircleId}
|
||||||
|
</update>
|
||||||
|
<update id="upda">
|
||||||
|
update sick_circle set collection_num=collection_num - 1 where sick_circle_id = #{sickCircleId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="del">
|
||||||
|
delete from user_sick_circle where sick_circle_id = #{sickCircleId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="shop" resultType="doctor.domain.entity.SickCircleEntity">
|
||||||
|
select * from sick_circle where sick_circle_id = #{sickCircleId}
|
||||||
|
</select>
|
||||||
|
<select id="show" resultType="doctor.domain.entity.MySickEntity">
|
||||||
|
select * from user_sick_circle where sick_circle_id = #{sickCircleId}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -16,5 +16,15 @@
|
||||||
select *
|
select *
|
||||||
from drugs_knowledge where drugs_category_id = #{drugsCategoryId}
|
from drugs_knowledge where drugs_category_id = #{drugsCategoryId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="findDrugsKnowledge" resultType="doctor.domain.entity.DrugsKnowledge">
|
||||||
|
select *from drugs_knowledge where id=#{id}
|
||||||
|
</select>
|
||||||
|
<select id="popularSeach" resultType="doctor.domain.entity.PopularSearchEntity">
|
||||||
|
select *from popular_search
|
||||||
|
</select>
|
||||||
|
<select id="findDepartment" resultType="doctor.domain.entity.Department">
|
||||||
|
select *from department
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="doctor.mapper.DoctorMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="findDoctorList" resultType="doctor.domain.entity.DoctorEntity">
|
||||||
|
select *
|
||||||
|
from doctor where department_id = #{deptId}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -14,4 +14,9 @@
|
||||||
select *
|
select *
|
||||||
from information where plate_id = #{plateId}
|
from information where plate_id = #{plateId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="findInformation" resultType="doctor.domain.entity.Information">
|
||||||
|
select *
|
||||||
|
from information where plate_id=#{infoId}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="doctor.mapper.PatientMapper">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="DepartmentList" resultType="doctor.domain.entity.DepartmentEntity">
|
||||||
|
select id, department_name, pic, rank, create_time from department
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="symptomList" resultType="doctor.domain.entity.SymptomEntity">
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="sickCircleList" resultType="doctor.domain.entity.SickCircleEntity">
|
||||||
|
select sick_circle_id , `user_id`, `title`, `department_id`, `adopt_comment_id`, `disease`, `detail`, `treatment_hospital`, `treatment_start_time`, `treatment_end_time`, `treatment_process`, `picture`, `release_time`, `adopt_time`, `amount`, `create_time`, `collection_num`, `comment_num`
|
||||||
|
from sick_circle where department_id=#{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="findSickCircleInfo" resultType="doctor.domain.entity.SickCircleEntity">
|
||||||
|
SELECT sick_circle.*,department.department_name department FROM sick_circle LEFT JOIN department on sick_circle.department_id=department.id
|
||||||
|
WHERE sick_circle.sick_circle_id=#{id}
|
||||||
|
</select>
|
||||||
|
<select id="findSickCircleCommentList" resultType="doctor.domain.entity.SickCommentEntity">
|
||||||
|
select * from sick_circle_comment where sick_circle_id=#{sickCircleId}
|
||||||
|
</select>
|
||||||
|
<select id="searchSickCircle" resultType="doctor.domain.entity.SickCircleEntity">
|
||||||
|
select sick_circle_id , `user_id`, `title`, `department_id`, `adopt_comment_id`, `disease`, `detail`, `treatment_hospital`, `treatment_start_time`, `treatment_end_time`, `treatment_process`, `picture`, `release_time`, `adopt_time`, `amount`, `create_time`, `collection_num`, `comment_num`
|
||||||
|
from sick_circle where
|
||||||
|
|
||||||
|
disease like '%${keyWord}%';
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -14,4 +14,14 @@
|
||||||
<select id="findSickCircleInfoByKeyWord" resultType="doctor.domain.entity.SickCircleEntity">
|
<select id="findSickCircleInfoByKeyWord" resultType="doctor.domain.entity.SickCircleEntity">
|
||||||
SELECT * FROM sick_circle WHERE title LIKE CONCAT('%', #{keyWord}, '%')
|
SELECT * FROM sick_circle WHERE title LIKE CONCAT('%', #{keyWord}, '%')
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<insert id="publishSickCircle">
|
||||||
|
INSERT INTO `doctor`.`sick_circle` ( `user_id`, `title`, `department_id`, `adopt_comment_id`, `disease`, `detail`, `treatment_hospital`, `treatment_start_time`, `treatment_end_time`, `treatment_process`, `picture`, `release_time`, `adopt_time`, `amount`, `create_time`, `collection_num`, `comment_num`)
|
||||||
|
VALUES (#{userId},#{title},#{departmentId},#{adoptCommentId},#{disease},#{detail},#{treatmentHospital},#{treatmentStartTime},#{treatmentEndTime},#{treatmentProcess},#{picture},now(),now(),#{amount},now(),#{collectionNum},#{commentNum});
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="publishComment">
|
||||||
|
INSERT INTO `doctor`.`sick_circle_comment` ( `sick_circle_id`, `user_id`, `content`, `comment_time`, `whether_doctor`, `create_time`)
|
||||||
|
VALUES (#{sickCircleId},#{userid},#{content},now(),1,now())
|
||||||
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -75,5 +75,16 @@ create_time
|
||||||
select *
|
select *
|
||||||
from user_archives where user_id=#{userId}
|
from user_archives where user_id=#{userId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="findUserDoctorFollowList" resultType="doctor.domain.entity.UserDoctorFollowEntity">
|
||||||
|
select *
|
||||||
|
from user_doctor_follow
|
||||||
|
</select>
|
||||||
|
<select id="findUserTaskList" resultType="doctor.domain.dto.UserTaskRecordDto">
|
||||||
|
SELECT user_task_record.*,task.task_name,task.task_type,task.reward FROM user_task_record LEFT JOIN task ON user_task_record.task_id=task.id
|
||||||
|
</select>
|
||||||
|
<select id="findUserSign" resultType="doctor.domain.entity.SignEntity">
|
||||||
|
select *
|
||||||
|
from sign where user_id=#{userId}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -13,6 +13,19 @@
|
||||||
#{videoId},
|
#{videoId},
|
||||||
now());
|
now());
|
||||||
</insert>
|
</insert>
|
||||||
|
<insert id="addVideoComment">
|
||||||
|
INSERT INTO video_comment (
|
||||||
|
video_id,
|
||||||
|
user_id,
|
||||||
|
content,
|
||||||
|
create_time
|
||||||
|
)VALUES(
|
||||||
|
#{videoId},
|
||||||
|
#{userId},
|
||||||
|
#{content},
|
||||||
|
now()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
<update id="updateVideoCount">
|
<update id="updateVideoCount">
|
||||||
update video_count
|
update video_count
|
||||||
set collection_num=collection_num + 1
|
set collection_num=collection_num + 1
|
||||||
|
|
17
pom.xml
17
pom.xml
|
@ -35,6 +35,7 @@
|
||||||
<minio.version>8.2.2</minio.version>
|
<minio.version>8.2.2</minio.version>
|
||||||
<poi.version>4.1.2</poi.version>
|
<poi.version>4.1.2</poi.version>
|
||||||
<transmittable-thread-local.version>2.14.4</transmittable-thread-local.version>
|
<transmittable-thread-local.version>2.14.4</transmittable-thread-local.version>
|
||||||
|
<mapstruct.version>1.4.2.Final</mapstruct.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- 依赖声明 -->
|
<!-- 依赖声明 -->
|
||||||
|
@ -206,22 +207,6 @@
|
||||||
<version>${doctor.version}</version>
|
<version>${doctor.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-validation</artifactId>
|
|
||||||
<version>2.7.18</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.xiaoymin</groupId>
|
|
||||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
|
||||||
<version>2.0.9</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue