diff --git a/doctor-auth/src/main/resources/bootstrap.yml b/doctor-auth/src/main/resources/bootstrap.yml index 343a2f2..80f11fd 100644 --- a/doctor-auth/src/main/resources/bootstrap.yml +++ b/doctor-auth/src/main/resources/bootstrap.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 # 共享配置 diff --git a/doctor-gateway/src/main/resources/bootstrap.yml b/doctor-gateway/src/main/resources/bootstrap.yml index 2eaa492..d3e056c 100644 --- a/doctor-gateway/src/main/resources/bootstrap.yml +++ b/doctor-gateway/src/main/resources/bootstrap.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 # 共享配置 diff --git a/doctor-modules/doctor-file/src/main/resources/bootstrap.yml b/doctor-modules/doctor-file/src/main/resources/bootstrap.yml index 0ecdb89..66f9597 100644 --- a/doctor-modules/doctor-file/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-file/src/main/resources/bootstrap.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 # 共享配置 diff --git a/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml b/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml index 823a6a8..81bc32c 100644 --- a/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-gen/src/main/resources/bootstrap.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 # 共享配置 diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java index 6b8d89c..beaf89e 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java @@ -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> findVideoCollectionList(@RequestParam Integer page, @RequestParam Integer count){ + public HealthR> findVideoCollectionList(@RequestParam Integer page, @RequestParam Integer count,@RequestHeader Integer userId){ startPage(page,count); - List userVideoCollectionVos=userVideoService.findVideoCollectionList(); + List 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> whetherSignToday(@RequestHeader Integer userId){ + List userEntities = userVideoService.whetherSignToday(userId); + return HealthR.ok(userEntities); + } + // 用户资讯收藏列表 + @GetMapping("/findUserInfoCollectionList") + public HealthR> findUserInfoCollectionList(){ + List userInfoCollections = userVideoService.findUserInfoCollectionList(); + return HealthR.ok(userInfoCollections); + } + //用户被采纳意见列表 + @GetMapping("/findMyAdoptedCommentList") + public HealthR> findMyAdoptedCommentList(@RequestParam Integer page,@RequestParam Integer count){ + startPage(page,count); + List userAdoptCommentEntities = userVideoService.findMyAdoptedCommentList(); + return HealthR.ok(userAdoptCommentEntities); + } + //用户查看自己的档案 + @GetMapping("/findUserArchives") + public HealthR> findUserArchives(@RequestHeader Integer userId){ + List userArchivesVos = userVideoService.findUserArchives(userId); + return HealthR.ok(userArchivesVos); + } + //添加用户档案 + @PostMapping("/addUserArchives") + public HealthR addUserArchives(@RequestBody UserArchivesDto userArchivesDto){ + userVideoService.addUserArchives(userArchivesDto); + return HealthR.ok(); + } } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/VideoController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/VideoController.java index 8abca69..a9d8dc4 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/VideoController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/VideoController.java @@ -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(); } //购买健康讲堂视频 diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/dto/UserArchivesDto.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/dto/UserArchivesDto.java new file mode 100644 index 0000000..a3e2ed5 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/dto/UserArchivesDto.java @@ -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; + } +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserArchivesEntity.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserArchivesEntity.java index d5deb6e..5fb6e04 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserArchivesEntity.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserArchivesEntity.java @@ -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() { diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollectionEntity.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollectionEntity.java index 667b98f..c46f727 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollectionEntity.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollectionEntity.java @@ -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; + } } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserAdoptCommentVo.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserAdoptCommentVo.java new file mode 100644 index 0000000..0350a55 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserAdoptCommentVo.java @@ -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; + } +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserArchivesVo.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserArchivesVo.java index 2605ce7..5c8e4b2 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserArchivesVo.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserArchivesVo.java @@ -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; } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserInfoCollectionVo.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserInfoCollectionVo.java new file mode 100644 index 0000000..ad5dc66 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserInfoCollectionVo.java @@ -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; + } +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserVideoCollectionVo.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserVideoCollectionVo.java index 784595e..e5c8a1b 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserVideoCollectionVo.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserVideoCollectionVo.java @@ -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; - } } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java index c558185..c5d9f75 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java @@ -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 findVideoCollectionList(); + List findVideoCollectionList(@Param("userId") Integer userId); void cancelVideoCollection(@Param("videoId") Integer videoId); @@ -28,4 +26,14 @@ public interface UserVideoMapper { List findUserWallet(); List findUserConsumptionRecordList(); + + List findUserEntityList(@Param("userId") Integer userId); + + List findUserInfoCollectionList(); + + List findMyAdoptedCommentList(); + + List findUserArchives(@Param("userId") Integer userId); + + void addUserArchives(UserArchivesDto userArchivesDto); } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java index 9868a70..402a398 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java @@ -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 findUserWallet(); - List findVideoCollectionList(); + List findVideoCollectionList(Integer userId); void cancelVideoCollection(Integer userId, String sessionId, Integer videoId); List findUserConsumptionRecordList(); + + List whetherSignToday(Integer userId); + + List findUserInfoCollectionList(); + + List findMyAdoptedCommentList(); + + List findUserArchives(Integer userId); + + void addUserArchives(UserArchivesDto userArchivesDto); } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/VideoService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/VideoService.java index c860055..12ccac8 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/VideoService.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/VideoService.java @@ -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); diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java index 6564c2c..ce70aa8 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java @@ -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 findVideoCollectionList() { - List userVideoCollectionEntityList=userVideoMapper.findVideoCollectionList(); + public List findVideoCollectionList(Integer userId) { + List userVideoCollectionEntityList=userVideoMapper.findVideoCollectionList(userId); List userVideoCollectionVoList = ConvertUtil.entityToVoList(userVideoCollectionEntityList, UserVideoCollectionVo.class); return userVideoCollectionVoList; } @@ -46,6 +42,38 @@ public class UserVideoServiceImpl implements UserVideoService { return userConsumptionRecordVoList; } + @Override + public List whetherSignToday(Integer userId) { + List userEntityList=userVideoMapper.findUserEntityList(userId); + return userEntityList; + } + + @Override + public List findUserInfoCollectionList() { + List userVideoCollectionEntityList=userVideoMapper.findUserInfoCollectionList(); + List userVideoCollectionVoList = ConvertUtil.entityToVoList(userVideoCollectionEntityList, UserInfoCollectionVo.class); + return userVideoCollectionVoList; + } + + @Override + public List findMyAdoptedCommentList() { + List userAdoptCommentEntityList=userVideoMapper.findMyAdoptedCommentList(); + List userAdoptCommentVoList = ConvertUtil.entityToVoList(userAdoptCommentEntityList, UserAdoptCommentVo.class); + return userAdoptCommentVoList; + } + + @Override + public List findUserArchives(Integer userId) { + List userArchivesEntityList=userVideoMapper.findUserArchives(userId); + List userArchivesVoList = ConvertUtil.entityToVoList(userArchivesEntityList, UserArchivesVo.class); + return userArchivesVoList; + } + + @Override + public void addUserArchives(UserArchivesDto userArchivesDto) { + userVideoMapper.addUserArchives(userArchivesDto); + } + @Override public List findUserVideoBuyList() { diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/VideoServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/VideoServiceImpl.java index c48864e..b1e43ba 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/VideoServiceImpl.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/VideoServiceImpl.java @@ -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); // 更新视频收藏数 diff --git a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml index 7e40b37..f569431 100644 --- a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml +++ b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml @@ -3,6 +3,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + 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() + ); + delete from user_video_collection @@ -14,8 +41,7 @@ where video_id = #{videoId} + + + + diff --git a/doctor-modules/doctor-job/src/main/resources/bootstrap.yml b/doctor-modules/doctor-job/src/main/resources/bootstrap.yml index 0bffaa1..ab123c4 100644 --- a/doctor-modules/doctor-job/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-job/src/main/resources/bootstrap.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 # 共享配置 diff --git a/doctor-modules/doctor-system/src/main/resources/bootstrap.yml b/doctor-modules/doctor-system/src/main/resources/bootstrap.yml index d48b98a..14e7505 100644 --- a/doctor-modules/doctor-system/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-system/src/main/resources/bootstrap.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 # 共享配置 diff --git a/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml b/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml index ed199de..d94bf20 100644 --- a/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml +++ b/doctor-visual/doctor-monitor/src/main/resources/bootstrap.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 # 共享配置