Merge branch 'master' of https://gitea.qinmian.online/cbx/Medical_Treatment into cbx
# Conflicts: # doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/User.java # doctor-auth/src/main/java/doctor/auth/service/HealthUserService.javacbx
commit
04dc67459d
|
@ -22,6 +22,10 @@
|
||||||
<groupId>doctor</groupId>
|
<groupId>doctor</groupId>
|
||||||
<artifactId>doctor-common-core</artifactId>
|
<artifactId>doctor-common-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,36 @@
|
||||||
package doctor.system.api.domain;
|
package doctor.system.api.domain;
|
||||||
|
|
||||||
public class User {
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
private int id;
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : User
|
||||||
|
* @Description : 用户表
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 20:46
|
||||||
|
*/
|
||||||
|
public class User {
|
||||||
|
private Integer id;
|
||||||
private String phone;
|
private String phone;
|
||||||
private String pwd;
|
private String pwd;
|
||||||
private String email;
|
private String email;
|
||||||
private String nickName;
|
private String nickName;
|
||||||
private String userName;
|
private String userName;
|
||||||
private String headPic;
|
private String headPic;
|
||||||
private int sex;
|
private Integer sex;
|
||||||
private int age;
|
private Integer age;
|
||||||
private int height;
|
private String height;
|
||||||
private int weight;
|
private String weight;
|
||||||
private String invitationCode;
|
private String invitationCode;
|
||||||
private long updateTime;
|
private Date updateTime;
|
||||||
private long createTime;
|
private Long createTime;
|
||||||
|
|
||||||
public int getId() {
|
public Integer getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(int id) {
|
public void setId(Integer id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,35 +82,35 @@ public class User {
|
||||||
this.headPic = headPic;
|
this.headPic = headPic;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSex() {
|
public Integer getSex() {
|
||||||
return sex;
|
return sex;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSex(int sex) {
|
public void setSex(Integer sex) {
|
||||||
this.sex = sex;
|
this.sex = sex;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAge() {
|
public Integer getAge() {
|
||||||
return age;
|
return age;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAge(int age) {
|
public void setAge(Integer age) {
|
||||||
this.age = age;
|
this.age = age;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHeight() {
|
public String getHeight() {
|
||||||
return height;
|
return height;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHeight(int height) {
|
public void setHeight(String height) {
|
||||||
this.height = height;
|
this.height = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getWeight() {
|
public String getWeight() {
|
||||||
return weight;
|
return weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWeight(int weight) {
|
public void setWeight(String weight) {
|
||||||
this.weight = weight;
|
this.weight = weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,11 +122,11 @@ public class User {
|
||||||
this.invitationCode = invitationCode;
|
this.invitationCode = invitationCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUpdateTime() {
|
public Date getUpdateTime() {
|
||||||
return updateTime;
|
return updateTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUpdateTime(long updateTime) {
|
public void setUpdateTime(Date updateTime) {
|
||||||
this.updateTime = updateTime;
|
this.updateTime = updateTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
package doctor.system.api.domain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : UserVideoBuy
|
||||||
|
* @Description : 用户购买视频表
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 15:20
|
||||||
|
*/
|
||||||
|
public class UserVideoBuy {
|
||||||
|
private Integer id;
|
||||||
|
private Integer userId;
|
||||||
|
private Integer videoId;
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Integer userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getVideoId() {
|
||||||
|
return videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoId(Integer videoId) {
|
||||||
|
this.videoId = videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Long createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserVideoBuy(Integer id, Integer userId, Integer videoId, Long createTime) {
|
||||||
|
this.id = id;
|
||||||
|
this.userId = userId;
|
||||||
|
this.videoId = videoId;
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserVideoBuy() {
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package doctor.system.api.domain;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : UserVideoCollection
|
||||||
|
* @Description : 用户视频收藏表
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 14:28
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class UserVideoCollection {
|
||||||
|
private Integer id;
|
||||||
|
private Integer userId;
|
||||||
|
private Integer videoId;
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Integer userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getVideoId() {
|
||||||
|
return videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoId(Integer videoId) {
|
||||||
|
this.videoId = videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Long createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserVideoCollection(Integer id, Integer userId, Integer videoId, Long createTime) {
|
||||||
|
this.id = id;
|
||||||
|
this.userId = userId;
|
||||||
|
this.videoId = videoId;
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserVideoCollection() {
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,68 @@
|
||||||
|
package doctor.system.api.domain;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : UserWallet
|
||||||
|
* @Description : 用户钱包
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 20:30
|
||||||
|
*/
|
||||||
|
public class UserWallet {
|
||||||
|
private Integer id;
|
||||||
|
private Integer userId;
|
||||||
|
private Integer balance;
|
||||||
|
private Long updateTime;
|
||||||
|
private Integer version;
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Integer userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getBalance() {
|
||||||
|
return balance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBalance(Integer balance) {
|
||||||
|
this.balance = balance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Long updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getVersion() {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVersion(Integer version) {
|
||||||
|
this.version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Long createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,110 @@
|
||||||
|
package doctor.system.api.domain;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : Video
|
||||||
|
* @Description : 健康课堂视频表
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 15:59
|
||||||
|
*/
|
||||||
|
public class Video {
|
||||||
|
private Integer id;
|
||||||
|
private String title;
|
||||||
|
private Integer categoryId;
|
||||||
|
private String shearUrl;
|
||||||
|
private String abstracts;
|
||||||
|
private String originalUrl;
|
||||||
|
private Integer duration;
|
||||||
|
private Integer price;
|
||||||
|
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 Integer getCategoryId() {
|
||||||
|
return categoryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryId(Integer categoryId) {
|
||||||
|
this.categoryId = categoryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShearUrl() {
|
||||||
|
return shearUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShearUrl(String shearUrl) {
|
||||||
|
this.shearUrl = shearUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAbstracts() {
|
||||||
|
return abstracts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAbstracts(String abstracts) {
|
||||||
|
this.abstracts = abstracts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOriginalUrl() {
|
||||||
|
return originalUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginalUrl(String originalUrl) {
|
||||||
|
this.originalUrl = originalUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDuration() {
|
||||||
|
return duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDuration(Integer duration) {
|
||||||
|
this.duration = duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPrice() {
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrice(Integer price) {
|
||||||
|
this.price = price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Long createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Video(Integer id, String title, Integer categoryId, String shearUrl, String abstracts, String originalUrl, Integer duration, Integer price, Long createTime) {
|
||||||
|
this.id = id;
|
||||||
|
this.title = title;
|
||||||
|
this.categoryId = categoryId;
|
||||||
|
this.shearUrl = shearUrl;
|
||||||
|
this.abstracts = abstracts;
|
||||||
|
this.originalUrl = originalUrl;
|
||||||
|
this.duration = duration;
|
||||||
|
this.price = price;
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Video() {
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
package doctor.system.api.domain;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : VideoComment
|
||||||
|
* @Description : 评论表
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 21:54
|
||||||
|
*/
|
||||||
|
public class VideoComment {
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer userId;
|
||||||
|
private Integer videoId;
|
||||||
|
private String content;
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Integer userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getVideoId() {
|
||||||
|
return videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoId(Integer videoId) {
|
||||||
|
this.videoId = videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,70 @@
|
||||||
|
package doctor.system.api.domain;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : VideoCount
|
||||||
|
* @Description : 视频数
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 16:24
|
||||||
|
*/
|
||||||
|
public class VideoCount {
|
||||||
|
private Integer id;
|
||||||
|
private Integer videoId;
|
||||||
|
private Integer buyNum;
|
||||||
|
private Integer collectionNum;
|
||||||
|
private Integer commentNum;
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getVideoId() {
|
||||||
|
return videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoId(Integer videoId) {
|
||||||
|
this.videoId = videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getBuyNum() {
|
||||||
|
return buyNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBuyNum(Integer buyNum) {
|
||||||
|
this.buyNum = buyNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCollectionNum() {
|
||||||
|
return collectionNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCollectionNum(Integer collectionNum) {
|
||||||
|
this.collectionNum = collectionNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCommentNum() {
|
||||||
|
return commentNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCommentNum(Integer commentNum) {
|
||||||
|
this.commentNum = commentNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
package doctor.system.api.model;
|
package doctor.system.api.model;
|
||||||
|
|
||||||
|
import doctor.system.api.domain.Doctor;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import doctor.system.api.domain.Department;
|
|
||||||
import doctor.system.api.domain.Doctor;
|
import doctor.system.api.domain.Doctor;
|
||||||
import doctor.system.api.domain.SysUser;
|
import doctor.system.api.domain.SysUser;
|
||||||
import doctor.system.api.domain.User;
|
import doctor.system.api.domain.User;
|
||||||
|
|
|
@ -3,7 +3,6 @@ package doctor.auth.service;
|
||||||
import doctor.auth.util.RSAUtils;
|
import doctor.auth.util.RSAUtils;
|
||||||
import doctor.auth.util.RsaKey;
|
import doctor.auth.util.RsaKey;
|
||||||
import doctor.auth.vo.UserVo;
|
import doctor.auth.vo.UserVo;
|
||||||
import doctor.common.core.domain.HealthR;
|
|
||||||
import doctor.common.core.domain.R;
|
import doctor.common.core.domain.R;
|
||||||
import doctor.common.security.service.TokenService;
|
import doctor.common.security.service.TokenService;
|
||||||
import doctor.system.api.RemoteDoctorService;
|
import doctor.system.api.RemoteDoctorService;
|
||||||
|
@ -56,15 +55,4 @@ public class HealthUserService {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
String pwd = "byMycC4k7TflJmrDH/mGQTF7sJa47DQD9E9dk1js5deJ5i9BKVw4YwIF1e9d6dd3G2poWMuTwS5lxEWU1vP2QfuGC2L54b4BsMw7A3IzWs5aOHtuAr3yQAPhcFLrjFdjlXFucIXJ165iPZB1WE1EtusPvb8cE8nnwkM8g2KrP0I=";
|
|
||||||
|
|
||||||
try {
|
|
||||||
String s = RSAUtils.rsaDecrypt(pwd, RsaKey.PRIVATE_KEY);
|
|
||||||
System.out.printf("明文为:"+s);
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,130 @@
|
||||||
|
package doctor.auth.vo;
|
||||||
|
|
||||||
|
public class DoctorUserVo {
|
||||||
|
private Integer userId;
|
||||||
|
private String sessionId;
|
||||||
|
private String nickName;
|
||||||
|
private String userName;
|
||||||
|
private String jiGuangPwd;
|
||||||
|
private String headPic;
|
||||||
|
private Integer sex;
|
||||||
|
private Integer age;
|
||||||
|
private Integer height;
|
||||||
|
private Integer weight;
|
||||||
|
private String email;
|
||||||
|
private Integer whetherBingWeChat;
|
||||||
|
private String invitationCode;
|
||||||
|
private Integer faceFlag;
|
||||||
|
|
||||||
|
public Integer getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Integer userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSessionId() {
|
||||||
|
return sessionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSessionId(String sessionId) {
|
||||||
|
this.sessionId = sessionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNickName() {
|
||||||
|
return nickName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNickName(String nickName) {
|
||||||
|
this.nickName = nickName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserName() {
|
||||||
|
return userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserName(String userName) {
|
||||||
|
this.userName = userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJiGuangPwd() {
|
||||||
|
return jiGuangPwd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJiGuangPwd(String jiGuangPwd) {
|
||||||
|
this.jiGuangPwd = jiGuangPwd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHeadPic() {
|
||||||
|
return headPic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeadPic(String headPic) {
|
||||||
|
this.headPic = headPic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSex() {
|
||||||
|
return sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSex(Integer sex) {
|
||||||
|
this.sex = sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getAge() {
|
||||||
|
return age;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAge(Integer age) {
|
||||||
|
this.age = age;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeight(Integer height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWeight(Integer weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEmail() {
|
||||||
|
return email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmail(String email) {
|
||||||
|
this.email = email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getWhetherBingWeChat() {
|
||||||
|
return whetherBingWeChat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWhetherBingWeChat(Integer whetherBingWeChat) {
|
||||||
|
this.whetherBingWeChat = whetherBingWeChat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInvitationCode() {
|
||||||
|
return invitationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInvitationCode(String invitationCode) {
|
||||||
|
this.invitationCode = invitationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFaceFlag() {
|
||||||
|
return faceFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFaceFlag(Integer faceFlag) {
|
||||||
|
this.faceFlag = faceFlag;
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,21 +15,13 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
# feign 配置
|
|
||||||
feign:
|
|
||||||
compression:
|
|
||||||
request:
|
|
||||||
enabled: true
|
|
||||||
min-request-size: 10000
|
|
||||||
response:
|
|
||||||
enabled: true
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package doctor.common.core.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用常量信息
|
* 通用常量信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public class Constants
|
public class Constants
|
||||||
|
@ -57,6 +57,16 @@ public class Constants
|
||||||
*/
|
*/
|
||||||
public static final Integer FAIL = 500;
|
public static final Integer FAIL = 500;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成功标记
|
||||||
|
*/
|
||||||
|
public static final String SUCCESS_HEALTH = "0000";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败标记
|
||||||
|
*/
|
||||||
|
public static final String FAIL_HEALTH = "9001";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录成功状态
|
* 登录成功状态
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package doctor.common.core.domain;
|
package doctor.common.core.domain;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import doctor.common.core.constant.Constants;
|
import doctor.common.core.constant.Constants;
|
||||||
import doctor.common.core.constant.HealthConstants;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@ -15,25 +16,25 @@ public class HealthR<T> implements Serializable
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 成功 */
|
/** 成功 */
|
||||||
public static final String SUCCESS = HealthConstants.SUCCESS;
|
public static final String SUCCESS = Constants.SUCCESS_HEALTH;
|
||||||
|
|
||||||
/** 失败 */
|
/** 失败 */
|
||||||
public static final String FAIL = HealthConstants.FAIL;
|
public static final String FAIL = Constants.FAIL_HEALTH;
|
||||||
|
|
||||||
private String message;
|
|
||||||
|
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
private T result;
|
private T result;
|
||||||
|
|
||||||
public static <T> HealthR<T> ok()
|
public static <T> HealthR<T> ok()
|
||||||
{
|
{
|
||||||
return restResult(null,SUCCESS, null);
|
return restResult(null, SUCCESS, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> HealthR<T> ok(T result)
|
public static <T> HealthR<T> ok(T result)
|
||||||
{
|
{
|
||||||
return restResult(result,SUCCESS, null);
|
return restResult(result, SUCCESS, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> HealthR<T> ok(T result, String message)
|
public static <T> HealthR<T> ok(T result, String message)
|
||||||
|
@ -43,7 +44,7 @@ public class HealthR<T> implements Serializable
|
||||||
|
|
||||||
public static <T> HealthR<T> fail()
|
public static <T> HealthR<T> fail()
|
||||||
{
|
{
|
||||||
return restResult(null,FAIL, null);
|
return restResult(null, FAIL, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> HealthR<T> fail(String message)
|
public static <T> HealthR<T> fail(String message)
|
||||||
|
@ -53,12 +54,12 @@ public class HealthR<T> implements Serializable
|
||||||
|
|
||||||
public static <T> HealthR<T> fail(T result)
|
public static <T> HealthR<T> fail(T result)
|
||||||
{
|
{
|
||||||
return restResult(result,FAIL, null);
|
return restResult(result, FAIL, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> HealthR<T> fail(T result, String message)
|
public static <T> HealthR<T> fail(T result, String message)
|
||||||
{
|
{
|
||||||
return restResult(result,FAIL, message);
|
return restResult(result, FAIL, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> HealthR<T> fail(String status, String message)
|
public static <T> HealthR<T> fail(String status, String message)
|
||||||
|
@ -69,39 +70,33 @@ public class HealthR<T> implements Serializable
|
||||||
private static <T> HealthR<T> restResult(T result, String status, String message)
|
private static <T> HealthR<T> restResult(T result, String status, String message)
|
||||||
{
|
{
|
||||||
HealthR<T> apiResult = new HealthR<>();
|
HealthR<T> apiResult = new HealthR<>();
|
||||||
apiResult.setStatus(status);
|
|
||||||
apiResult.setResult(result);
|
apiResult.setResult(result);
|
||||||
apiResult.setMessage(message);
|
apiResult.setMessage(message);
|
||||||
|
apiResult.setStatus(status);
|
||||||
return apiResult;
|
return apiResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMessage()
|
public String getStatus() {
|
||||||
{
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMessage(String message)
|
|
||||||
{
|
|
||||||
this.message = message;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus()
|
|
||||||
{
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStatus(String status)
|
public void setStatus(String status) {
|
||||||
{
|
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public T getResult()
|
public String getMessage() {
|
||||||
{
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public T getResult() {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setResult(T result)
|
public void setResult(T result) {
|
||||||
{
|
|
||||||
this.result = result;
|
this.result = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,6 +107,8 @@ public class HealthR<T> implements Serializable
|
||||||
|
|
||||||
public static <T> Boolean isSuccess(HealthR<T> ret)
|
public static <T> Boolean isSuccess(HealthR<T> ret)
|
||||||
{
|
{
|
||||||
return HealthR.SUCCESS .equals(ret.getStatus()) ;
|
return HealthR.SUCCESS == ret.getStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ import doctor.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web层通用数据处理
|
* web层通用数据处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public class BaseController
|
public class BaseController
|
||||||
|
@ -120,7 +120,7 @@ public class BaseController
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 响应返回结果
|
* 响应返回结果
|
||||||
*
|
*
|
||||||
* @param rows 影响行数
|
* @param rows 影响行数
|
||||||
* @return 操作结果
|
* @return 操作结果
|
||||||
*/
|
*/
|
||||||
|
@ -131,7 +131,7 @@ public class BaseController
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 响应返回结果
|
* 响应返回结果
|
||||||
*
|
*
|
||||||
* @param result 结果
|
* @param result 结果
|
||||||
* @return 操作结果
|
* @return 操作结果
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -30,7 +30,7 @@ import doctor.gen.service.IGenTableService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码生成 操作处理
|
* 代码生成 操作处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/gen")
|
@RequestMapping("/gen")
|
||||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package ${packageName}.controller;
|
package ${packageName}.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.io.IOException;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
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;
|
||||||
|
@ -27,7 +26,7 @@ import doctor.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${functionName}Controller
|
* ${functionName}Controller
|
||||||
*
|
*
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${datetime}
|
* @date ${datetime}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -74,6 +74,10 @@
|
||||||
<groupId>doctor</groupId>
|
<groupId>doctor</groupId>
|
||||||
<artifactId>doctor-common-swagger</artifactId>
|
<artifactId>doctor-common-swagger</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>doctor</groupId>
|
<groupId>doctor</groupId>
|
||||||
|
|
|
@ -4,9 +4,9 @@ import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import doctor.common.core.domain.HealthR;
|
import doctor.common.core.domain.HealthR;
|
||||||
import doctor.common.core.domain.R;
|
import doctor.common.core.domain.R;
|
||||||
import doctor.system.api.domain.Doctor;
|
import doctor.system.api.domain.Doctor;
|
||||||
import doctor.system.api.domain.User;
|
|
||||||
import doctor.service.DoctorUserService;
|
import doctor.service.DoctorUserService;
|
||||||
import doctor.system.api.domain.SysUser;
|
import doctor.system.api.domain.SysUser;
|
||||||
|
import doctor.system.api.domain.User;
|
||||||
import doctor.system.api.model.LoginUser;
|
import doctor.system.api.model.LoginUser;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
package doctor.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import doctor.common.core.domain.HealthR;
|
||||||
|
import doctor.common.core.web.controller.BaseController;
|
||||||
|
import doctor.common.core.web.page.TableDataInfo;
|
||||||
|
import doctor.domain.dto.VideoDto;
|
||||||
|
import doctor.domain.entity.VideoCategoryEntity;
|
||||||
|
import doctor.domain.entity.VideoEntity;
|
||||||
|
import doctor.domain.vo.VideoCategoryVo;
|
||||||
|
import doctor.domain.vo.VideoVo;
|
||||||
|
import doctor.service.HealthUserVideoService;
|
||||||
|
import doctor.util.ConvertUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.github.pagehelper.page.PageMethod.startPage;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/video/v1")
|
||||||
|
public class HealthUserVideoController{
|
||||||
|
@Autowired
|
||||||
|
private HealthUserVideoService healthUserVideoService;
|
||||||
|
|
||||||
|
@GetMapping("/findVideoCategoryList")
|
||||||
|
public HealthR<List<VideoCategoryVo>> findVideoCategoryList(){
|
||||||
|
List<VideoCategoryVo> List = healthUserVideoService.findVideoCategoryList();
|
||||||
|
return HealthR.ok(List);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/findVideoVoList")
|
||||||
|
public HealthR<List<VideoVo>> findVideoVoList(@RequestBody VideoDto videoDto){
|
||||||
|
startPage(videoDto.getPage(), videoDto.getCount());
|
||||||
|
List<VideoVo> List = healthUserVideoService.findVideoVoList(videoDto);
|
||||||
|
return HealthR.ok(List);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
package doctor.controller;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import doctor.common.core.domain.R;
|
||||||
|
import doctor.domain.entity.DoctorUser;
|
||||||
|
import doctor.service.IDoctorUserService;
|
||||||
|
import doctor.system.api.domain.SysUser;
|
||||||
|
import doctor.system.api.model.LoginUser;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/doctor")
|
||||||
|
@DS("master")
|
||||||
|
public class SysDoctorController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IDoctorUserService iDoctorUserService;
|
||||||
|
|
||||||
|
@PostMapping("/getUser")
|
||||||
|
public R<LoginUser> getUser(String email) {
|
||||||
|
DoctorUser user = iDoctorUserService.getUser(email);
|
||||||
|
LoginUser loginUser = new LoginUser();
|
||||||
|
SysUser sysUser = new SysUser();
|
||||||
|
sysUser.setUserId(Long.valueOf(user.getId()));
|
||||||
|
sysUser.setNickName(user.getNickName());
|
||||||
|
sysUser.setUserName(user.getUserName());
|
||||||
|
sysUser.setPhonenumber(user.getPhone());
|
||||||
|
sysUser.setPassword(user.getPwd());
|
||||||
|
if (user.getSex()==0){
|
||||||
|
sysUser.setSex("男");
|
||||||
|
}else {
|
||||||
|
sysUser.setSex("女");
|
||||||
|
}
|
||||||
|
loginUser.setSysUser(sysUser);
|
||||||
|
return R.ok(loginUser);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
package doctor.controller;
|
||||||
|
|
||||||
|
import doctor.common.core.domain.R;
|
||||||
|
import doctor.domain.entity.UserVideoBuy;
|
||||||
|
import doctor.domain.entity.UserVideoCollection;
|
||||||
|
import doctor.domain.entity.UserWallet;
|
||||||
|
import doctor.service.UserVideoService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : UserVideoController
|
||||||
|
* @Description : 用户视频
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 14:32
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/verify/v1")
|
||||||
|
public class UserVideoController {
|
||||||
|
@Autowired
|
||||||
|
private UserVideoService userVideoService;
|
||||||
|
|
||||||
|
//用户视频收藏列表
|
||||||
|
@GetMapping("/findVideoCollectionList")
|
||||||
|
public R<List<UserVideoCollection>>findVideoCollectionList(){
|
||||||
|
List<UserVideoCollection> userVideoCollectionList =userVideoService.findVideoCollectionList();
|
||||||
|
return R.ok(userVideoCollectionList);
|
||||||
|
}
|
||||||
|
//用户取消视频收藏
|
||||||
|
@GetMapping("/cancelVideoCollection/{id}")
|
||||||
|
public R cancelVideoCollection(@PathVariable Integer id){
|
||||||
|
userVideoService.cancelVideoCollection(id);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
//用户购买视频列表
|
||||||
|
@GetMapping("/findUserVideoBuyList")
|
||||||
|
public R<List<UserVideoBuy>>findUserVideoBuyList(){
|
||||||
|
List<UserVideoBuy> userVideoBuys =userVideoService.findUserVideoBuyList();
|
||||||
|
return R.ok(userVideoBuys);
|
||||||
|
}
|
||||||
|
//用户删除购买的视频
|
||||||
|
@DeleteMapping("/deleteVideoBuy/{id}")
|
||||||
|
public R deleteVideoBuy(@PathVariable Integer id){
|
||||||
|
userVideoService.deleteVideoBuy(id);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
//我的钱包
|
||||||
|
@GetMapping("/findUserWallet")
|
||||||
|
public R<List<UserWallet>> findUserWallet(){
|
||||||
|
List<UserWallet> userWallets = userVideoService.findUserWallet();
|
||||||
|
return R.ok(userWallets);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
package doctor.controller;
|
||||||
|
|
||||||
|
import doctor.common.core.domain.R;
|
||||||
|
import doctor.domain.entity.*;
|
||||||
|
import doctor.service.VideoService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : VideoController
|
||||||
|
* @Description : 健康课堂视频
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 15:58
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user/video")
|
||||||
|
public class VideoController {
|
||||||
|
@Autowired
|
||||||
|
private VideoService videoService;
|
||||||
|
//收藏健康讲堂视频列表
|
||||||
|
@PostMapping("/verify/v1/addUserVideoCollection")
|
||||||
|
public R addUserVideoCollection(@RequestBody UserVideoCollection userVideoCollection){
|
||||||
|
videoService.addUserVideoCollection(userVideoCollection);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
//购买健康讲堂视频
|
||||||
|
@PostMapping("/verify/v1/videoBuy")
|
||||||
|
public R videoBuy(@RequestBody UserVideoBuy userVideoBuy){
|
||||||
|
videoService.videoBuy(userVideoBuy);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
//视频评论列表
|
||||||
|
@GetMapping("/v1/findVideoCommentList")
|
||||||
|
public R<List<VideoComment>> findVideoCommentList(){
|
||||||
|
List<VideoComment> videoCommentList = videoService.findVideoCommentList();
|
||||||
|
return R.ok(videoCommentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package doctor.domain.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class VideoDto {
|
||||||
|
private Integer categoryId;
|
||||||
|
private Integer page=1;
|
||||||
|
private Integer count=1;
|
||||||
|
}
|
|
@ -0,0 +1,134 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import java.security.Timestamp;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class DoctorUser {
|
||||||
|
|
||||||
|
private int id;
|
||||||
|
private String phone;
|
||||||
|
private String pwd;
|
||||||
|
private String email;
|
||||||
|
private String nickName;
|
||||||
|
private String userName;
|
||||||
|
private String headPic;
|
||||||
|
private int sex;
|
||||||
|
private int age;
|
||||||
|
private int height;
|
||||||
|
private int weight;
|
||||||
|
private String invitationCode;
|
||||||
|
private Date updateTime;
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhone() {
|
||||||
|
return phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhone(String phone) {
|
||||||
|
this.phone = phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPwd() {
|
||||||
|
return pwd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPwd(String pwd) {
|
||||||
|
this.pwd = pwd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEmail() {
|
||||||
|
return email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmail(String email) {
|
||||||
|
this.email = email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNickName() {
|
||||||
|
return nickName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNickName(String nickName) {
|
||||||
|
this.nickName = nickName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserName() {
|
||||||
|
return userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserName(String userName) {
|
||||||
|
this.userName = userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHeadPic() {
|
||||||
|
return headPic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeadPic(String headPic) {
|
||||||
|
this.headPic = headPic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSex() {
|
||||||
|
return sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSex(int sex) {
|
||||||
|
this.sex = sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAge() {
|
||||||
|
return age;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAge(int age) {
|
||||||
|
this.age = age;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeight(int height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWeight(int weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInvitationCode() {
|
||||||
|
return invitationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInvitationCode(String invitationCode) {
|
||||||
|
this.invitationCode = invitationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,140 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : User
|
||||||
|
* @Description : 用户表
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 20:46
|
||||||
|
*/
|
||||||
|
public class User {
|
||||||
|
private Integer id;
|
||||||
|
private String phone;
|
||||||
|
private String pwd;
|
||||||
|
private String email;
|
||||||
|
private String nickName;
|
||||||
|
private String userName;
|
||||||
|
private String headPic;
|
||||||
|
private Integer sex;
|
||||||
|
private Integer age;
|
||||||
|
private String height;
|
||||||
|
private String weight;
|
||||||
|
private String invitationCode;
|
||||||
|
private Date updateTime;
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhone() {
|
||||||
|
return phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhone(String phone) {
|
||||||
|
this.phone = phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPwd() {
|
||||||
|
return pwd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPwd(String pwd) {
|
||||||
|
this.pwd = pwd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEmail() {
|
||||||
|
return email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmail(String email) {
|
||||||
|
this.email = email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNickName() {
|
||||||
|
return nickName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNickName(String nickName) {
|
||||||
|
this.nickName = nickName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserName() {
|
||||||
|
return userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserName(String userName) {
|
||||||
|
this.userName = userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHeadPic() {
|
||||||
|
return headPic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeadPic(String headPic) {
|
||||||
|
this.headPic = headPic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSex() {
|
||||||
|
return sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSex(Integer sex) {
|
||||||
|
this.sex = sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getAge() {
|
||||||
|
return age;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAge(Integer age) {
|
||||||
|
this.age = age;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeight(String height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWeight(String weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInvitationCode() {
|
||||||
|
return invitationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInvitationCode(String invitationCode) {
|
||||||
|
this.invitationCode = invitationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Long createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : UserVideoBuy
|
||||||
|
* @Description : 用户购买视频表
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 15:20
|
||||||
|
*/
|
||||||
|
public class UserVideoBuy {
|
||||||
|
private Integer id;
|
||||||
|
private Integer userId;
|
||||||
|
private Integer videoId;
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Integer userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getVideoId() {
|
||||||
|
return videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoId(Integer videoId) {
|
||||||
|
this.videoId = videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Long createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserVideoBuy(Integer id, Integer userId, Integer videoId, Long createTime) {
|
||||||
|
this.id = id;
|
||||||
|
this.userId = userId;
|
||||||
|
this.videoId = videoId;
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserVideoBuy() {
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : UserVideoCollection
|
||||||
|
* @Description : 用户视频收藏表
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 14:28
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class UserVideoCollection {
|
||||||
|
private Integer id;
|
||||||
|
private Integer userId;
|
||||||
|
private Integer videoId;
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Integer userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getVideoId() {
|
||||||
|
return videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoId(Integer videoId) {
|
||||||
|
this.videoId = videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Long createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserVideoCollection(Integer id, Integer userId, Integer videoId, Long createTime) {
|
||||||
|
this.id = id;
|
||||||
|
this.userId = userId;
|
||||||
|
this.videoId = videoId;
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserVideoCollection() {
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,68 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : UserWallet
|
||||||
|
* @Description : 用户钱包
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 20:30
|
||||||
|
*/
|
||||||
|
public class UserWallet {
|
||||||
|
private Integer id;
|
||||||
|
private Integer userId;
|
||||||
|
private Integer balance;
|
||||||
|
private Long updateTime;
|
||||||
|
private Integer version;
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Integer userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getBalance() {
|
||||||
|
return balance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBalance(Integer balance) {
|
||||||
|
this.balance = balance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Long updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getVersion() {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVersion(Integer version) {
|
||||||
|
this.version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Long createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,110 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : Video
|
||||||
|
* @Description : 健康课堂视频表
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 15:59
|
||||||
|
*/
|
||||||
|
public class Video {
|
||||||
|
private Integer id;
|
||||||
|
private String title;
|
||||||
|
private Integer categoryId;
|
||||||
|
private String shearUrl;
|
||||||
|
private String abstracts;
|
||||||
|
private String originalUrl;
|
||||||
|
private Integer duration;
|
||||||
|
private Integer price;
|
||||||
|
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 Integer getCategoryId() {
|
||||||
|
return categoryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryId(Integer categoryId) {
|
||||||
|
this.categoryId = categoryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShearUrl() {
|
||||||
|
return shearUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShearUrl(String shearUrl) {
|
||||||
|
this.shearUrl = shearUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAbstracts() {
|
||||||
|
return abstracts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAbstracts(String abstracts) {
|
||||||
|
this.abstracts = abstracts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOriginalUrl() {
|
||||||
|
return originalUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginalUrl(String originalUrl) {
|
||||||
|
this.originalUrl = originalUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDuration() {
|
||||||
|
return duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDuration(Integer duration) {
|
||||||
|
this.duration = duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPrice() {
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrice(Integer price) {
|
||||||
|
this.price = price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Long createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Video(Integer id, String title, Integer categoryId, String shearUrl, String abstracts, String originalUrl, Integer duration, Integer price, Long createTime) {
|
||||||
|
this.id = id;
|
||||||
|
this.title = title;
|
||||||
|
this.categoryId = categoryId;
|
||||||
|
this.shearUrl = shearUrl;
|
||||||
|
this.abstracts = abstracts;
|
||||||
|
this.originalUrl = originalUrl;
|
||||||
|
this.duration = duration;
|
||||||
|
this.price = price;
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Video() {
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class VideoCategoryEntity {
|
||||||
|
private Integer id;
|
||||||
|
private String name;
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
|
private Date createTime;
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : VideoComment
|
||||||
|
* @Description : 评论表
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 21:54
|
||||||
|
*/
|
||||||
|
public class VideoComment {
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer userId;
|
||||||
|
private Integer videoId;
|
||||||
|
private String content;
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Integer userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getVideoId() {
|
||||||
|
return videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoId(Integer videoId) {
|
||||||
|
this.videoId = videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class VideoCommentEntity {
|
||||||
|
private Integer id;
|
||||||
|
private Integer userId;
|
||||||
|
private Integer videoId;
|
||||||
|
private String content;
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
|
private Date createTime;
|
||||||
|
}
|
|
@ -0,0 +1,70 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : VideoCount
|
||||||
|
* @Description : 视频数
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 16:24
|
||||||
|
*/
|
||||||
|
public class VideoCount {
|
||||||
|
private Integer id;
|
||||||
|
private Integer videoId;
|
||||||
|
private Integer buyNum;
|
||||||
|
private Integer collectionNum;
|
||||||
|
private Integer commentNum;
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getVideoId() {
|
||||||
|
return videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoId(Integer videoId) {
|
||||||
|
this.videoId = videoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getBuyNum() {
|
||||||
|
return buyNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBuyNum(Integer buyNum) {
|
||||||
|
this.buyNum = buyNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCollectionNum() {
|
||||||
|
return collectionNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCollectionNum(Integer collectionNum) {
|
||||||
|
this.collectionNum = collectionNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCommentNum() {
|
||||||
|
return commentNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCommentNum(Integer commentNum) {
|
||||||
|
this.commentNum = commentNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class VideoCountEntity {
|
||||||
|
private Integer id;
|
||||||
|
private Integer videoId;
|
||||||
|
private Integer buyNum;
|
||||||
|
private Integer collectionNum;
|
||||||
|
private Integer commentNum;
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
|
private Date createTime;
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package doctor.domain.entity;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class VideoEntity {
|
||||||
|
private Integer id;
|
||||||
|
private String title;
|
||||||
|
private Integer categoryId;
|
||||||
|
private String shearUrl;
|
||||||
|
private String abstracts;
|
||||||
|
private String originalUrl;
|
||||||
|
private Integer duration;
|
||||||
|
private Integer price;
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
|
private Date createTime;
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package doctor.domain.vo;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class VideoCategoryVo {
|
||||||
|
private Integer id;
|
||||||
|
private String name;
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package doctor.domain.vo;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class VideoVo {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
private Integer categoryId;
|
||||||
|
private String title;
|
||||||
|
private String shearUrl;
|
||||||
|
private String abstracts;
|
||||||
|
private String originalUrl;
|
||||||
|
private Integer price;
|
||||||
|
private Integer duration;
|
||||||
|
private Integer whetherCollection;
|
||||||
|
private Integer whetherBuy;
|
||||||
|
private Integer buyNum;
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package doctor.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import doctor.domain.dto.VideoDto;
|
||||||
|
import doctor.domain.entity.VideoCategoryEntity;
|
||||||
|
import doctor.domain.entity.VideoEntity;
|
||||||
|
import doctor.domain.vo.VideoCategoryVo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface HealthUserVideoMapper {
|
||||||
|
List<VideoCategoryEntity> findVideoCategoryList();
|
||||||
|
|
||||||
|
List<VideoEntity> findVideoVoList(VideoDto videoDto);
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
package doctor.mapper;
|
||||||
|
|
||||||
|
import doctor.domain.entity.DoctorUser;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
|
||||||
|
@MapperScan
|
||||||
|
public interface IDoctorUserMapper {
|
||||||
|
DoctorUser selectDoctorUserByEmail(@Param("email") String email);
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package doctor.mapper;
|
||||||
|
|
||||||
|
import doctor.domain.entity.UserVideoBuy;
|
||||||
|
import doctor.domain.entity.UserVideoCollection;
|
||||||
|
import doctor.domain.entity.UserWallet;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : UserVideoMapper
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 14:33
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface UserVideoMapper {
|
||||||
|
List<UserVideoCollection> findVideoCollectionList();
|
||||||
|
|
||||||
|
void cancelVideoCollection(@Param("id") Integer id);
|
||||||
|
|
||||||
|
List<UserVideoBuy> findUserVideoBuyList();
|
||||||
|
|
||||||
|
void deleteVideoBuy(@Param("id") Integer id);
|
||||||
|
|
||||||
|
List<UserWallet> findUserWallet();
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
package doctor.mapper;
|
||||||
|
|
||||||
|
import doctor.domain.entity.*;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : VideoMapper
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 16:03
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface VideoMapper {
|
||||||
|
|
||||||
|
|
||||||
|
void addUserVideoCollection(UserVideoCollection userVideoCollection);
|
||||||
|
|
||||||
|
Video findById(@Param("videoId") Integer videoId);
|
||||||
|
|
||||||
|
VideoCount FindVideoId(@Param("id") Integer id);
|
||||||
|
|
||||||
|
void updateVideoCount(VideoCount videoCount);
|
||||||
|
|
||||||
|
User FindById(@Param("userId") Integer userId);
|
||||||
|
|
||||||
|
UserWallet FindUserWallet(@Param("id") Integer id);
|
||||||
|
|
||||||
|
Video findByVideoId(@Param("videoId") Integer videoId);
|
||||||
|
|
||||||
|
void updateUserWallet(@Param("newblance") int newblance, @Param("id") Integer id);
|
||||||
|
|
||||||
|
List<VideoComment> findVideoCommentList();
|
||||||
|
|
||||||
|
|
||||||
|
// UserWallet FindById(@Param("userId") Integer userId);
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package doctor.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import doctor.domain.dto.VideoDto;
|
||||||
|
import doctor.domain.entity.VideoCategoryEntity;
|
||||||
|
import doctor.domain.entity.VideoEntity;
|
||||||
|
import doctor.domain.vo.VideoCategoryVo;
|
||||||
|
import doctor.domain.vo.VideoVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface HealthUserVideoService {
|
||||||
|
List<VideoCategoryVo> findVideoCategoryList();
|
||||||
|
|
||||||
|
List<VideoVo> findVideoVoList(VideoDto videoDto);
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package doctor.service;
|
||||||
|
|
||||||
|
import doctor.domain.entity.DoctorUser;
|
||||||
|
import doctor.system.api.model.LoginUser;
|
||||||
|
|
||||||
|
public interface IDoctorUserService {
|
||||||
|
DoctorUser getUser(String email);
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package doctor.service;
|
||||||
|
|
||||||
|
import doctor.domain.entity.UserVideoBuy;
|
||||||
|
import doctor.domain.entity.UserVideoCollection;
|
||||||
|
import doctor.domain.entity.UserWallet;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : UserVideoService
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 14:33
|
||||||
|
*/
|
||||||
|
public interface UserVideoService {
|
||||||
|
List<UserVideoCollection> findVideoCollectionList();
|
||||||
|
|
||||||
|
void cancelVideoCollection(Integer id);
|
||||||
|
|
||||||
|
List<UserVideoBuy> findUserVideoBuyList();
|
||||||
|
|
||||||
|
void deleteVideoBuy(Integer id);
|
||||||
|
|
||||||
|
List<UserWallet> findUserWallet();
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package doctor.service;
|
||||||
|
|
||||||
|
import doctor.domain.entity.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : VideoService
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 16:04
|
||||||
|
*/
|
||||||
|
public interface VideoService {
|
||||||
|
|
||||||
|
void addUserVideoCollection(UserVideoCollection userVideoCollection);
|
||||||
|
|
||||||
|
|
||||||
|
void videoBuy(UserVideoBuy userVideoBuy);
|
||||||
|
|
||||||
|
List<VideoComment> findVideoCommentList();
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
package doctor.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import doctor.domain.dto.VideoDto;
|
||||||
|
import doctor.domain.entity.VideoCategoryEntity;
|
||||||
|
import doctor.domain.entity.VideoEntity;
|
||||||
|
import doctor.domain.vo.VideoCategoryVo;
|
||||||
|
import doctor.domain.vo.VideoVo;
|
||||||
|
import doctor.mapper.HealthUserVideoMapper;
|
||||||
|
import doctor.service.HealthUserVideoService;
|
||||||
|
import doctor.util.ConvertUtil;
|
||||||
|
import io.netty.util.internal.StringUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class HealthUserVideoServiceImpl implements HealthUserVideoService {
|
||||||
|
@Autowired
|
||||||
|
private HealthUserVideoMapper healthUserVideoMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<VideoCategoryVo> findVideoCategoryList() {
|
||||||
|
|
||||||
|
List<VideoCategoryEntity> videoCategoryList =healthUserVideoMapper.findVideoCategoryList();
|
||||||
|
List<VideoCategoryVo> videoCategoryVos = ConvertUtil.entityToVoList(videoCategoryList, VideoCategoryVo.class);
|
||||||
|
return videoCategoryVos;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<VideoVo> findVideoVoList(VideoDto videoDto) {
|
||||||
|
List<VideoEntity> videoVoList = healthUserVideoMapper.findVideoVoList(videoDto);
|
||||||
|
List<VideoVo> videoVos = ConvertUtil.entityToVoList(videoVoList, VideoVo.class);
|
||||||
|
return videoVos;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
package doctor.service.impl;
|
||||||
|
|
||||||
|
import doctor.mapper.IDoctorUserMapper;
|
||||||
|
import doctor.domain.entity.DoctorUser;
|
||||||
|
import doctor.service.IDoctorUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class IDoctorUserServiceImpl implements IDoctorUserService {
|
||||||
|
@Autowired
|
||||||
|
private IDoctorUserMapper iDoctorUserMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DoctorUser getUser(String email) {
|
||||||
|
DoctorUser doctorUser = iDoctorUserMapper.selectDoctorUserByEmail(email);
|
||||||
|
return doctorUser;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
package doctor.service.impl;
|
||||||
|
|
||||||
|
import doctor.domain.entity.UserVideoBuy;
|
||||||
|
import doctor.domain.entity.UserVideoCollection;
|
||||||
|
import doctor.domain.entity.UserWallet;
|
||||||
|
import doctor.mapper.UserVideoMapper;
|
||||||
|
import doctor.service.UserVideoService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : UserVideoServiceImpl
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 14:34
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class UserVideoServiceImpl implements UserVideoService {
|
||||||
|
@Autowired
|
||||||
|
private UserVideoMapper userVideoMapper;
|
||||||
|
@Override
|
||||||
|
public List<UserVideoCollection> findVideoCollectionList() {
|
||||||
|
return userVideoMapper.findVideoCollectionList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void cancelVideoCollection(Integer id) {
|
||||||
|
userVideoMapper.cancelVideoCollection(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserVideoBuy> findUserVideoBuyList() {
|
||||||
|
return userVideoMapper.findUserVideoBuyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteVideoBuy(Integer id) {
|
||||||
|
userVideoMapper.deleteVideoBuy(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserWallet> findUserWallet() {
|
||||||
|
return userVideoMapper.findUserWallet();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
package doctor.service.impl;
|
||||||
|
|
||||||
|
import doctor.domain.entity.*;
|
||||||
|
import doctor.mapper.VideoMapper;
|
||||||
|
import doctor.service.VideoService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : VideoServiceImpl
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2024-01-10 16:04
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class VideoServiceImpl implements VideoService {
|
||||||
|
@Autowired
|
||||||
|
private VideoMapper videoMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addUserVideoCollection(UserVideoCollection userVideoCollection) {
|
||||||
|
// 添加收藏
|
||||||
|
videoMapper.addUserVideoCollection(userVideoCollection);
|
||||||
|
// 更新视频收藏数
|
||||||
|
Video video = videoMapper.findById(userVideoCollection.getVideoId());
|
||||||
|
VideoCount videoCount = videoMapper.FindVideoId(video.getId());
|
||||||
|
videoMapper.updateVideoCount(videoCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void videoBuy(UserVideoBuy userVideoBuy) {
|
||||||
|
//查询用户信息
|
||||||
|
User user = videoMapper.FindById(userVideoBuy.getUserId());
|
||||||
|
//查询视频信息
|
||||||
|
Video video = videoMapper.findByVideoId(userVideoBuy.getVideoId());
|
||||||
|
//查询用户钱包
|
||||||
|
UserWallet userWallet = videoMapper.FindUserWallet(user.getId());
|
||||||
|
//判断用户钱包是否足够
|
||||||
|
if (userWallet.getBalance() >= video.getPrice()) {
|
||||||
|
//更新用户钱包
|
||||||
|
int newblance=userWallet.getBalance() - video.getPrice();
|
||||||
|
//更新用户钱包
|
||||||
|
videoMapper.updateUserWallet(newblance,userWallet.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<VideoComment> findVideoCommentList() {
|
||||||
|
return videoMapper.findVideoCommentList();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
package doctor.util;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author ifredom
|
||||||
|
* @Description 类型转换: Entity - Vo转换
|
||||||
|
* @Date 2022/5/10 15:59
|
||||||
|
* @Param [params]
|
||||||
|
**/
|
||||||
|
public class ConvertUtil {
|
||||||
|
public static final Logger logger = LoggerFactory.getLogger(ConvertUtil.class);
|
||||||
|
|
||||||
|
public static <T> T entityToVo(Object source, Class<T> target) {
|
||||||
|
if (source == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
T targetObject = null;
|
||||||
|
try {
|
||||||
|
targetObject = target.newInstance();
|
||||||
|
BeanUtils.copyProperties(source, targetObject);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return targetObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> List<T> entityToVoList(Collection<?> sourceList, Class<T> target) {
|
||||||
|
if (sourceList == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
List<T> targetList = new ArrayList<>(sourceList.size());
|
||||||
|
|
||||||
|
try {
|
||||||
|
for (Object source : sourceList) {
|
||||||
|
T targetObject = target.newInstance();
|
||||||
|
BeanUtils.copyProperties(source, targetObject);
|
||||||
|
targetList.add(targetObject);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("convert error ", e);
|
||||||
|
}
|
||||||
|
return targetList;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -15,21 +15,13 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
# feign 配置
|
|
||||||
feign:
|
|
||||||
compression:
|
|
||||||
request:
|
|
||||||
enabled: true
|
|
||||||
min-request-size: 10000
|
|
||||||
response:
|
|
||||||
enabled: true
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?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.HealthUserVideoMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="findVideoCategoryList" resultType="doctor.domain.entity.VideoCategoryEntity">
|
||||||
|
select * from video_category
|
||||||
|
</select>
|
||||||
|
<select id="findVideoVoList" resultType="doctor.domain.entity.VideoEntity">
|
||||||
|
select * from video where category_id=#{categoryId}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?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.IDoctorUserMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectDoctorUserByEmail" resultType="doctor.domain.entity.DoctorUser">
|
||||||
|
select * from user where email = #{email}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -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.UserVideoMapper">
|
||||||
|
<delete id="cancelVideoCollection">
|
||||||
|
delete
|
||||||
|
from user_video_collection
|
||||||
|
where id = #{id}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteVideoBuy">
|
||||||
|
delete
|
||||||
|
from user_video_buy
|
||||||
|
where id = #{id}
|
||||||
|
</delete>
|
||||||
|
<select id="findVideoCollectionList" resultType="doctor.domain.entity.UserVideoCollection">
|
||||||
|
select *
|
||||||
|
from user_video_collection
|
||||||
|
</select>
|
||||||
|
<select id="findUserVideoBuyList" resultType="doctor.domain.entity.UserVideoBuy">
|
||||||
|
select *
|
||||||
|
from user_video_buy
|
||||||
|
</select>
|
||||||
|
<select id="findUserWallet" resultType="doctor.domain.entity.UserWallet">
|
||||||
|
select *
|
||||||
|
from user_wallet
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,61 @@
|
||||||
|
<?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.VideoMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="addUserVideoCollection">
|
||||||
|
insert into user_video_collection (user_id,
|
||||||
|
video_id,
|
||||||
|
create_time)
|
||||||
|
values (#{userId},
|
||||||
|
#{videoId},
|
||||||
|
now());
|
||||||
|
</insert>
|
||||||
|
<update id="updateVideoCount">
|
||||||
|
update video_count
|
||||||
|
set collection_num=collection_num + 1
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
<update id="updateUserWallet">
|
||||||
|
update user_wallet
|
||||||
|
set blance==#{newblance}
|
||||||
|
where id=#{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="findById" resultType="doctor.domain.entity.Video">
|
||||||
|
SELECT user_video_collection.*
|
||||||
|
FROM user_video_collection
|
||||||
|
LEFT JOIN video ON user_video_collection.video_id = video.id
|
||||||
|
WHERE video.id = #{videoId}
|
||||||
|
</select>
|
||||||
|
<select id="FindVideoId" resultType="doctor.domain.entity.VideoCount">
|
||||||
|
select *
|
||||||
|
from video_count
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
<select id="FindById" resultType="doctor.domain.entity.User">
|
||||||
|
SELECT user.*
|
||||||
|
FROM user_video_buy
|
||||||
|
LEFT JOIN user ON user.id = user_video_buy.user_id
|
||||||
|
WHERE user_video_buy.user_id = #{userId}
|
||||||
|
</select>
|
||||||
|
<select id="FindUserWallet" resultType="doctor.domain.entity.UserWallet">
|
||||||
|
SELECT user.*
|
||||||
|
FROM user_wallet
|
||||||
|
LEFT JOIN user ON user.id = user_wallet.user_id
|
||||||
|
WHERE user_wallet.user_id==#{id}
|
||||||
|
</select>
|
||||||
|
<select id="findByVideoId" resultType="doctor.domain.entity.Video">
|
||||||
|
SELECT user_video_buy.*
|
||||||
|
FROM user_video_buy
|
||||||
|
LEFT JOIN video ON video.id = user_video_buy.video_id
|
||||||
|
WHERE video.video.id = #{videoId}
|
||||||
|
</select>
|
||||||
|
<select id="findVideoCommentList" resultType="doctor.domain.entity.VideoComment">
|
||||||
|
select *
|
||||||
|
from video_comment
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -30,7 +30,7 @@ import doctor.job.util.ScheduleUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调度任务信息操作处理
|
* 调度任务信息操作处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
|
|
@ -21,7 +21,7 @@ import doctor.job.service.ISysJobLogService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调度日志操作处理
|
* 调度日志操作处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -25,7 +25,7 @@ import doctor.system.service.ISysConfigService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参数配置 信息操作处理
|
* 参数配置 信息操作处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
|
|
@ -28,7 +28,7 @@ import doctor.system.service.ISysDictTypeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据字典信息
|
* 数据字典信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
@ -37,7 +37,7 @@ public class SysDictDataController extends BaseController
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysDictDataService dictDataService;
|
private ISysDictDataService dictDataService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysDictTypeService dictTypeService;
|
private ISysDictTypeService dictTypeService;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ import doctor.system.service.ISysDictTypeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据字典信息
|
* 数据字典信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
|
|
@ -25,7 +25,7 @@ import doctor.system.service.ISysLogininforService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统访问记录
|
* 系统访问记录
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
|
|
@ -23,7 +23,7 @@ import doctor.system.service.ISysNoticeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公告 信息操作处理
|
* 公告 信息操作处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
|
|
@ -23,7 +23,7 @@ import doctor.system.service.ISysOperLogService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志记录
|
* 操作日志记录
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
|
|
@ -25,7 +25,7 @@ import doctor.system.service.ISysPostService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位信息操作处理
|
* 岗位信息操作处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
|
|
@ -30,7 +30,7 @@ import doctor.system.service.ISysUserService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色信息
|
* 角色信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
Loading…
Reference in New Issue