Merge branch 'newMaster' of https://gitea.qinmian.online/cbx/Medical_Treatment into zmy
# Conflicts: # doctor-modules/doctor-health/src/main/resources/bootstrap.ymlcbx
commit
95219e8eec
|
@ -15,11 +15,11 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package doctor.controller;
|
||||
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.dto.UserArchivesDto;
|
||||
import doctor.domain.entity.UserAdoptCommentEntity;
|
||||
import doctor.domain.entity.UserEntity;
|
||||
import doctor.domain.entity.UserInfoCollectionEntity;
|
||||
import doctor.domain.entity.UserWalletEntity;
|
||||
import doctor.domain.vo.UserConsumptionRecordVo;
|
||||
import doctor.domain.vo.UserVideoBuyVo;
|
||||
import doctor.domain.vo.UserVideoCollectionVo;
|
||||
import doctor.domain.vo.*;
|
||||
import doctor.service.UserVideoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -28,9 +30,9 @@ public class UserVideoController {
|
|||
|
||||
//用户视频收藏列表
|
||||
@GetMapping("/findVideoCollectionList")
|
||||
public HealthR<List<UserVideoCollectionVo>> findVideoCollectionList(@RequestParam Integer page, @RequestParam Integer count){
|
||||
public HealthR<List<UserVideoCollectionVo>> findVideoCollectionList(@RequestParam Integer page, @RequestParam Integer count,@RequestHeader Integer userId){
|
||||
startPage(page,count);
|
||||
List<UserVideoCollectionVo> userVideoCollectionVos=userVideoService.findVideoCollectionList();
|
||||
List<UserVideoCollectionVo> userVideoCollectionVos=userVideoService.findVideoCollectionList(userId);
|
||||
return HealthR.ok(userVideoCollectionVos);
|
||||
}
|
||||
//用户取消视频收藏
|
||||
|
@ -47,8 +49,8 @@ public class UserVideoController {
|
|||
return HealthR.ok(userVideoCollectionVos);
|
||||
}
|
||||
//用户删除购买的视频
|
||||
@DeleteMapping("/deleteVideoBuy/{videoId}")
|
||||
public HealthR deleteVideoBuy(@PathVariable Integer videoId){
|
||||
@DeleteMapping("/deleteVideoBuy}")
|
||||
public HealthR deleteVideoBuy(@RequestParam Integer videoId){
|
||||
userVideoService.deleteVideoBuy(videoId);
|
||||
return HealthR.ok();
|
||||
}
|
||||
|
@ -67,5 +69,36 @@ public class UserVideoController {
|
|||
return HealthR.ok(userConsumptionRecordVos);
|
||||
}
|
||||
|
||||
//用户详情页面
|
||||
@GetMapping("/whetherSignToday")
|
||||
public HealthR<List<UserEntity>> whetherSignToday(@RequestHeader Integer userId){
|
||||
List<UserEntity> userEntities = userVideoService.whetherSignToday(userId);
|
||||
return HealthR.ok(userEntities);
|
||||
}
|
||||
// 用户资讯收藏列表
|
||||
@GetMapping("/findUserInfoCollectionList")
|
||||
public HealthR<List<UserInfoCollectionVo>> findUserInfoCollectionList(){
|
||||
List<UserInfoCollectionVo> userInfoCollections = userVideoService.findUserInfoCollectionList();
|
||||
return HealthR.ok(userInfoCollections);
|
||||
}
|
||||
//用户被采纳意见列表
|
||||
@GetMapping("/findMyAdoptedCommentList")
|
||||
public HealthR<List<UserAdoptCommentVo>> findMyAdoptedCommentList(@RequestParam Integer page,@RequestParam Integer count){
|
||||
startPage(page,count);
|
||||
List<UserAdoptCommentVo> userAdoptCommentEntities = userVideoService.findMyAdoptedCommentList();
|
||||
return HealthR.ok(userAdoptCommentEntities);
|
||||
}
|
||||
//用户查看自己的档案
|
||||
@GetMapping("/findUserArchives")
|
||||
public HealthR<List<UserArchivesVo>> findUserArchives(@RequestHeader Integer userId){
|
||||
List<UserArchivesVo> userArchivesVos = userVideoService.findUserArchives(userId);
|
||||
return HealthR.ok(userArchivesVos);
|
||||
}
|
||||
//添加用户档案
|
||||
@PostMapping("/addUserArchives")
|
||||
public HealthR addUserArchives(@RequestBody UserArchivesDto userArchivesDto){
|
||||
userVideoService.addUserArchives(userArchivesDto);
|
||||
return HealthR.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,9 +22,9 @@ public class VideoController {
|
|||
@Autowired
|
||||
private VideoService videoService;
|
||||
//收藏健康讲堂视频列表
|
||||
@PostMapping("/verify/v1/addUserVideoCollection/{videoId}")
|
||||
public HealthR addUserVideoCollection(@PathVariable Integer videoId){
|
||||
videoService.addUserVideoCollection(videoId);
|
||||
@PostMapping("/verify/v1/addUserVideoCollection")
|
||||
public HealthR addUserVideoCollection(@RequestParam Integer videoId,@RequestHeader Integer userId){
|
||||
videoService.addUserVideoCollection(videoId,userId);
|
||||
return HealthR.ok();
|
||||
}
|
||||
//购买健康讲堂视频
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
package doctor.domain.dto;
|
||||
|
||||
/**
|
||||
* @ClassName : UserArchivesDto
|
||||
* @Description : 添加用户档案
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-15 21:51
|
||||
*/
|
||||
public class UserArchivesDto {
|
||||
private Integer userId;
|
||||
private String diseaseMain;
|
||||
private String diseaseNow;
|
||||
private String diseaseBefore;
|
||||
private String treatmentHospitalRecent;
|
||||
private String treatmentProcess;
|
||||
private String treatmentStartTime;
|
||||
private String treatmentEndTime;
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getDiseaseMain() {
|
||||
return diseaseMain;
|
||||
}
|
||||
|
||||
public void setDiseaseMain(String diseaseMain) {
|
||||
this.diseaseMain = diseaseMain;
|
||||
}
|
||||
|
||||
public String getDiseaseNow() {
|
||||
return diseaseNow;
|
||||
}
|
||||
|
||||
public void setDiseaseNow(String diseaseNow) {
|
||||
this.diseaseNow = diseaseNow;
|
||||
}
|
||||
|
||||
public String getDiseaseBefore() {
|
||||
return diseaseBefore;
|
||||
}
|
||||
|
||||
public void setDiseaseBefore(String diseaseBefore) {
|
||||
this.diseaseBefore = diseaseBefore;
|
||||
}
|
||||
|
||||
public String getTreatmentHospitalRecent() {
|
||||
return treatmentHospitalRecent;
|
||||
}
|
||||
|
||||
public void setTreatmentHospitalRecent(String treatmentHospitalRecent) {
|
||||
this.treatmentHospitalRecent = treatmentHospitalRecent;
|
||||
}
|
||||
|
||||
public String getTreatmentProcess() {
|
||||
return treatmentProcess;
|
||||
}
|
||||
|
||||
public void setTreatmentProcess(String treatmentProcess) {
|
||||
this.treatmentProcess = treatmentProcess;
|
||||
}
|
||||
|
||||
public String getTreatmentStartTime() {
|
||||
return treatmentStartTime;
|
||||
}
|
||||
|
||||
public void setTreatmentStartTime(String treatmentStartTime) {
|
||||
this.treatmentStartTime = treatmentStartTime;
|
||||
}
|
||||
|
||||
public String getTreatmentEndTime() {
|
||||
return treatmentEndTime;
|
||||
}
|
||||
|
||||
public void setTreatmentEndTime(String treatmentEndTime) {
|
||||
this.treatmentEndTime = treatmentEndTime;
|
||||
}
|
||||
}
|
|
@ -14,9 +14,14 @@ import java.util.Date;
|
|||
public class UserArchivesEntity {
|
||||
private Integer id;
|
||||
private Integer userId;
|
||||
private String bankCardNumber;
|
||||
private String bankName;
|
||||
private Integer bankCardType;
|
||||
private String diseaseMain;
|
||||
private String diseaseNow;
|
||||
private String diseaseBefore;
|
||||
private String treatmentHospitalRecent;
|
||||
private String treatmentProcess;
|
||||
private Date treatmentStartTime;
|
||||
private Date treatmentEndTime;
|
||||
private String picture;
|
||||
private Date updateTime;
|
||||
private Date createTime;
|
||||
|
||||
|
@ -36,28 +41,68 @@ public class UserArchivesEntity {
|
|||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getBankCardNumber() {
|
||||
return bankCardNumber;
|
||||
public String getDiseaseMain() {
|
||||
return diseaseMain;
|
||||
}
|
||||
|
||||
public void setBankCardNumber(String bankCardNumber) {
|
||||
this.bankCardNumber = bankCardNumber;
|
||||
public void setDiseaseMain(String diseaseMain) {
|
||||
this.diseaseMain = diseaseMain;
|
||||
}
|
||||
|
||||
public String getBankName() {
|
||||
return bankName;
|
||||
public String getDiseaseNow() {
|
||||
return diseaseNow;
|
||||
}
|
||||
|
||||
public void setBankName(String bankName) {
|
||||
this.bankName = bankName;
|
||||
public void setDiseaseNow(String diseaseNow) {
|
||||
this.diseaseNow = diseaseNow;
|
||||
}
|
||||
|
||||
public Integer getBankCardType() {
|
||||
return bankCardType;
|
||||
public String getDiseaseBefore() {
|
||||
return diseaseBefore;
|
||||
}
|
||||
|
||||
public void setBankCardType(Integer bankCardType) {
|
||||
this.bankCardType = bankCardType;
|
||||
public void setDiseaseBefore(String diseaseBefore) {
|
||||
this.diseaseBefore = diseaseBefore;
|
||||
}
|
||||
|
||||
public String getTreatmentHospitalRecent() {
|
||||
return treatmentHospitalRecent;
|
||||
}
|
||||
|
||||
public void setTreatmentHospitalRecent(String treatmentHospitalRecent) {
|
||||
this.treatmentHospitalRecent = treatmentHospitalRecent;
|
||||
}
|
||||
|
||||
public String getTreatmentProcess() {
|
||||
return treatmentProcess;
|
||||
}
|
||||
|
||||
public void setTreatmentProcess(String treatmentProcess) {
|
||||
this.treatmentProcess = treatmentProcess;
|
||||
}
|
||||
|
||||
public Date getTreatmentStartTime() {
|
||||
return treatmentStartTime;
|
||||
}
|
||||
|
||||
public void setTreatmentStartTime(Date treatmentStartTime) {
|
||||
this.treatmentStartTime = treatmentStartTime;
|
||||
}
|
||||
|
||||
public Date getTreatmentEndTime() {
|
||||
return treatmentEndTime;
|
||||
}
|
||||
|
||||
public void setTreatmentEndTime(Date treatmentEndTime) {
|
||||
this.treatmentEndTime = treatmentEndTime;
|
||||
}
|
||||
|
||||
public String getPicture() {
|
||||
return picture;
|
||||
}
|
||||
|
||||
public void setPicture(String picture) {
|
||||
this.picture = picture;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
|
|
|
@ -16,6 +16,8 @@ public class UserVideoCollectionEntity {
|
|||
private Integer id;
|
||||
private Integer userId;
|
||||
private Integer videoId;
|
||||
|
||||
private String original;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
@ -52,5 +54,11 @@ public class UserVideoCollectionEntity {
|
|||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getOriginal() {
|
||||
return original;
|
||||
}
|
||||
|
||||
public void setOriginal(String original) {
|
||||
this.original = original;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
package doctor.domain.vo;
|
||||
|
||||
/**
|
||||
* @ClassName : UserAdoptCommentVo
|
||||
* @Description : 用户被采纳的建议
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-15 19:46
|
||||
*/
|
||||
public class UserAdoptCommentVo {
|
||||
private Integer releaseUserId;
|
||||
private String releaseUserNickName;
|
||||
private String releaseUserHeadPic;
|
||||
private String title;
|
||||
private String disease;
|
||||
private long adoptTime;
|
||||
private String content;
|
||||
|
||||
public Integer getReleaseUserId() {
|
||||
return releaseUserId;
|
||||
}
|
||||
|
||||
public void setReleaseUserId(Integer releaseUserId) {
|
||||
this.releaseUserId = releaseUserId;
|
||||
}
|
||||
|
||||
public String getReleaseUserNickName() {
|
||||
return releaseUserNickName;
|
||||
}
|
||||
|
||||
public void setReleaseUserNickName(String releaseUserNickName) {
|
||||
this.releaseUserNickName = releaseUserNickName;
|
||||
}
|
||||
|
||||
public String getReleaseUserHeadPic() {
|
||||
return releaseUserHeadPic;
|
||||
}
|
||||
|
||||
public void setReleaseUserHeadPic(String releaseUserHeadPic) {
|
||||
this.releaseUserHeadPic = releaseUserHeadPic;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getDisease() {
|
||||
return disease;
|
||||
}
|
||||
|
||||
public void setDisease(String disease) {
|
||||
this.disease = disease;
|
||||
}
|
||||
|
||||
public long getAdoptTime() {
|
||||
return adoptTime;
|
||||
}
|
||||
|
||||
public void setAdoptTime(long adoptTime) {
|
||||
this.adoptTime = adoptTime;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
}
|
|
@ -7,5 +7,14 @@ package doctor.domain.vo;
|
|||
* @Date: 2024-01-12 18:52
|
||||
*/
|
||||
public class UserArchivesVo {
|
||||
private Integer recordId;
|
||||
private Integer userId;
|
||||
private Integer archivesId;
|
||||
private String diseaseMain;
|
||||
private String diseaseNow;
|
||||
private String diseaseBefore;
|
||||
private String treatmentHospitalRecent;
|
||||
private String treatmentProcess;
|
||||
private long treatmentStartTime;
|
||||
private long treatmentEndTime;
|
||||
private String picture;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
package doctor.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName : UserInfoCollectionVo
|
||||
* @Description : 用户资讯列表
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-15 11:52
|
||||
*/
|
||||
public class UserInfoCollectionVo {
|
||||
private Integer id;
|
||||
private Integer infoId;
|
||||
private String title;
|
||||
private String thumbnail;
|
||||
private Date createTime;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getInfoId() {
|
||||
return infoId;
|
||||
}
|
||||
|
||||
public void setInfoId(Integer infoId) {
|
||||
this.infoId = infoId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getThumbnail() {
|
||||
return thumbnail;
|
||||
}
|
||||
|
||||
public void setThumbnail(String thumbnail) {
|
||||
this.thumbnail = thumbnail;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
|
@ -1,13 +1,21 @@
|
|||
package doctor.domain.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @ClassName : UserVideoCollectionVo
|
||||
* @Description : 用户视频收藏表
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-12 16:11
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserVideoCollectionVo {
|
||||
private Integer id;
|
||||
private Integer videoId;
|
||||
private String title;
|
||||
private String shearUrl;
|
||||
private String original;
|
||||
|
@ -16,76 +24,4 @@ public class UserVideoCollectionVo {
|
|||
private Integer whetherBuy;
|
||||
private Integer buyNum;
|
||||
private Long createTime;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getShearUrl() {
|
||||
return shearUrl;
|
||||
}
|
||||
|
||||
public void setShearUrl(String shearUrl) {
|
||||
this.shearUrl = shearUrl;
|
||||
}
|
||||
|
||||
public String getOriginal() {
|
||||
return original;
|
||||
}
|
||||
|
||||
public void setOriginal(String original) {
|
||||
this.original = original;
|
||||
}
|
||||
|
||||
public Integer getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(Integer price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public Integer getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
public void setDuration(Integer duration) {
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public Integer getWhetherBuy() {
|
||||
return whetherBuy;
|
||||
}
|
||||
|
||||
public void setWhetherBuy(Integer whetherBuy) {
|
||||
this.whetherBuy = whetherBuy;
|
||||
}
|
||||
|
||||
public Integer getBuyNum() {
|
||||
return buyNum;
|
||||
}
|
||||
|
||||
public void setBuyNum(Integer buyNum) {
|
||||
this.buyNum = buyNum;
|
||||
}
|
||||
|
||||
public Long getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Long createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package doctor.mapper;
|
||||
|
||||
import doctor.domain.entity.UserConsumptionRecordEntity;
|
||||
import doctor.domain.entity.UserVideoBuyEntity;
|
||||
import doctor.domain.entity.UserVideoCollectionEntity;
|
||||
import doctor.domain.entity.UserWalletEntity;
|
||||
import doctor.domain.dto.UserArchivesDto;
|
||||
import doctor.domain.entity.*;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
@ -17,7 +15,7 @@ import java.util.List;
|
|||
*/
|
||||
@Mapper
|
||||
public interface UserVideoMapper {
|
||||
List<UserVideoCollectionEntity> findVideoCollectionList();
|
||||
List<UserVideoCollectionEntity> findVideoCollectionList(@Param("userId") Integer userId);
|
||||
|
||||
void cancelVideoCollection(@Param("videoId") Integer videoId);
|
||||
|
||||
|
@ -28,4 +26,14 @@ public interface UserVideoMapper {
|
|||
List<UserWalletEntity> findUserWallet();
|
||||
|
||||
List<UserConsumptionRecordEntity> findUserConsumptionRecordList();
|
||||
|
||||
List<UserEntity> findUserEntityList(@Param("userId") Integer userId);
|
||||
|
||||
List<UserInfoCollectionEntity> findUserInfoCollectionList();
|
||||
|
||||
List<UserAdoptCommentEntity> findMyAdoptedCommentList();
|
||||
|
||||
List<UserArchivesEntity> findUserArchives(@Param("userId") Integer userId);
|
||||
|
||||
void addUserArchives(UserArchivesDto userArchivesDto);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package doctor.service;
|
||||
|
||||
import doctor.domain.entity.UserVideoBuyEntity;
|
||||
import doctor.domain.entity.UserVideoCollectionEntity;
|
||||
import doctor.domain.dto.UserArchivesDto;
|
||||
import doctor.domain.entity.UserAdoptCommentEntity;
|
||||
import doctor.domain.entity.UserEntity;
|
||||
import doctor.domain.entity.UserWalletEntity;
|
||||
import doctor.domain.vo.UserConsumptionRecordVo;
|
||||
import doctor.domain.vo.UserVideoBuyVo;
|
||||
import doctor.domain.vo.UserVideoCollectionVo;
|
||||
import doctor.domain.vo.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -26,9 +25,19 @@ public interface UserVideoService {
|
|||
|
||||
List<UserWalletEntity> findUserWallet();
|
||||
|
||||
List<UserVideoCollectionVo> findVideoCollectionList();
|
||||
List<UserVideoCollectionVo> findVideoCollectionList(Integer userId);
|
||||
|
||||
void cancelVideoCollection(Integer userId, String sessionId, Integer videoId);
|
||||
|
||||
List<UserConsumptionRecordVo> findUserConsumptionRecordList();
|
||||
|
||||
List<UserEntity> whetherSignToday(Integer userId);
|
||||
|
||||
List<UserInfoCollectionVo> findUserInfoCollectionList();
|
||||
|
||||
List<UserAdoptCommentVo> findMyAdoptedCommentList();
|
||||
|
||||
List<UserArchivesVo> findUserArchives(Integer userId);
|
||||
|
||||
void addUserArchives(UserArchivesDto userArchivesDto);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.List;
|
|||
*/
|
||||
public interface VideoService {
|
||||
|
||||
void addUserVideoCollection(Integer videoId);
|
||||
void addUserVideoCollection(Integer videoId,Integer userId);
|
||||
|
||||
|
||||
void videoBuy(Integer videoId,Integer price);
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
package doctor.service.impl;
|
||||
|
||||
import doctor.domain.entity.UserConsumptionRecordEntity;
|
||||
import doctor.domain.entity.UserVideoBuyEntity;
|
||||
import doctor.domain.entity.UserVideoCollectionEntity;
|
||||
import doctor.domain.entity.UserWalletEntity;
|
||||
import doctor.domain.vo.UserConsumptionRecordVo;
|
||||
import doctor.domain.vo.UserVideoBuyVo;
|
||||
import doctor.domain.vo.UserVideoCollectionVo;
|
||||
import doctor.domain.dto.UserArchivesDto;
|
||||
import doctor.domain.entity.*;
|
||||
import doctor.domain.vo.*;
|
||||
import doctor.mapper.UserVideoMapper;
|
||||
import doctor.service.UserVideoService;
|
||||
import doctor.util.ConvertUtil;
|
||||
|
@ -28,8 +24,8 @@ public class UserVideoServiceImpl implements UserVideoService {
|
|||
|
||||
|
||||
@Override
|
||||
public List<UserVideoCollectionVo> findVideoCollectionList() {
|
||||
List<UserVideoCollectionEntity> userVideoCollectionEntityList=userVideoMapper.findVideoCollectionList();
|
||||
public List<UserVideoCollectionVo> findVideoCollectionList(Integer userId) {
|
||||
List<UserVideoCollectionEntity> userVideoCollectionEntityList=userVideoMapper.findVideoCollectionList(userId);
|
||||
List<UserVideoCollectionVo> userVideoCollectionVoList = ConvertUtil.entityToVoList(userVideoCollectionEntityList, UserVideoCollectionVo.class);
|
||||
return userVideoCollectionVoList;
|
||||
}
|
||||
|
@ -46,6 +42,38 @@ public class UserVideoServiceImpl implements UserVideoService {
|
|||
return userConsumptionRecordVoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserEntity> whetherSignToday(Integer userId) {
|
||||
List<UserEntity> userEntityList=userVideoMapper.findUserEntityList(userId);
|
||||
return userEntityList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserInfoCollectionVo> findUserInfoCollectionList() {
|
||||
List<UserInfoCollectionEntity> userVideoCollectionEntityList=userVideoMapper.findUserInfoCollectionList();
|
||||
List<UserInfoCollectionVo> userVideoCollectionVoList = ConvertUtil.entityToVoList(userVideoCollectionEntityList, UserInfoCollectionVo.class);
|
||||
return userVideoCollectionVoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserAdoptCommentVo> findMyAdoptedCommentList() {
|
||||
List<UserAdoptCommentEntity> userAdoptCommentEntityList=userVideoMapper.findMyAdoptedCommentList();
|
||||
List<UserAdoptCommentVo> userAdoptCommentVoList = ConvertUtil.entityToVoList(userAdoptCommentEntityList, UserAdoptCommentVo.class);
|
||||
return userAdoptCommentVoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserArchivesVo> findUserArchives(Integer userId) {
|
||||
List<UserArchivesEntity> userArchivesEntityList=userVideoMapper.findUserArchives(userId);
|
||||
List<UserArchivesVo> userArchivesVoList = ConvertUtil.entityToVoList(userArchivesEntityList, UserArchivesVo.class);
|
||||
return userArchivesVoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addUserArchives(UserArchivesDto userArchivesDto) {
|
||||
userVideoMapper.addUserArchives(userArchivesDto);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<UserVideoBuyVo> findUserVideoBuyList() {
|
||||
|
|
|
@ -25,10 +25,7 @@ public class VideoServiceImpl implements VideoService {
|
|||
@Autowired
|
||||
private HttpServletRequest request;
|
||||
@Override
|
||||
public void addUserVideoCollection(Integer videoId) {
|
||||
//获取用户id
|
||||
String token = request.getHeader("token");
|
||||
Integer userId = Integer.valueOf(JwtUtils.getUserId(token));
|
||||
public void addUserVideoCollection(Integer videoId,Integer userId) {
|
||||
// 添加收藏
|
||||
videoMapper.addUserVideoCollection(userId,videoId);
|
||||
// 更新视频收藏数
|
||||
|
|
|
@ -3,6 +3,33 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="doctor.mapper.UserVideoMapper">
|
||||
<insert id="addUserArchives">
|
||||
insert into user_archives (
|
||||
user_id,
|
||||
disease_main,
|
||||
disease_now,
|
||||
disease_before,
|
||||
treatment_hospital_recent,
|
||||
treatment_process,
|
||||
treatment_start_time,
|
||||
treatment_end_time,
|
||||
picture,
|
||||
create_time
|
||||
|
||||
)
|
||||
values (
|
||||
#{userId},
|
||||
#{diseaseMain},
|
||||
#{diseaseNow},
|
||||
#{diseaseBefore},
|
||||
#{treatmentHospitalRecent},
|
||||
#{treatmentProcess},
|
||||
#{treatmentStartTime},
|
||||
#{treatmentEndTime},
|
||||
#{picture},
|
||||
now()
|
||||
);
|
||||
</insert>
|
||||
<delete id="cancelVideoCollection">
|
||||
delete
|
||||
from user_video_collection
|
||||
|
@ -14,8 +41,7 @@
|
|||
where video_id = #{videoId}
|
||||
</delete>
|
||||
<select id="findVideoCollectionList" resultType="doctor.domain.entity.UserVideoCollectionEntity">
|
||||
select *
|
||||
from user_video_collection
|
||||
SELECT user_video_collection.*,video.original_url original FROM user_video_collection LEFT JOIN video ON video.id=user_video_collection.video_id where user_id=#{userId}
|
||||
</select>
|
||||
<select id="findUserVideoBuyList" resultType="doctor.domain.entity.UserVideoBuyEntity">
|
||||
select *
|
||||
|
@ -29,4 +55,19 @@
|
|||
select *
|
||||
from user_consumption_record
|
||||
</select>
|
||||
<select id="findUserEntityList" resultType="doctor.domain.entity.UserEntity">
|
||||
select *
|
||||
from user where id=#{userId}
|
||||
</select>
|
||||
<select id="findUserInfoCollectionList" resultType="doctor.domain.entity.UserInfoCollectionEntity">
|
||||
SELECT user_info_collection.*,information.title,information.content,information.source FROM user_info_collection LEFT JOIN information ON user_info_collection.info_id =information.id
|
||||
</select>
|
||||
<select id="findMyAdoptedCommentList" resultType="doctor.domain.entity.UserAdoptCommentEntity">
|
||||
select *
|
||||
from user_adopt_comment
|
||||
</select>
|
||||
<select id="findUserArchives" resultType="doctor.domain.entity.UserArchivesEntity">
|
||||
select *
|
||||
from user_archives where user_id=#{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
Loading…
Reference in New Issue