diff --git a/doctor-api/doctor-api-system/pom.xml b/doctor-api/doctor-api-system/pom.xml
index 8e3aef1..e2d0bf9 100644
--- a/doctor-api/doctor-api-system/pom.xml
+++ b/doctor-api/doctor-api-system/pom.xml
@@ -22,6 +22,10 @@
doctor
doctor-common-core
+
+ org.projectlombok
+ lombok
+
diff --git a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/User.java b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/User.java
index 4560243..ec97663 100644
--- a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/User.java
+++ b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/User.java
@@ -1,27 +1,36 @@
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 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 Integer sex;
+ private Integer age;
+ private String height;
+ private String weight;
private String invitationCode;
- private long updateTime;
- private long createTime;
+ private Date updateTime;
+ private Long createTime;
- public int getId() {
+ public Integer getId() {
return id;
}
- public void setId(int id) {
+ public void setId(Integer id) {
this.id = id;
}
@@ -73,35 +82,35 @@ public class User {
this.headPic = headPic;
}
- public int getSex() {
+ public Integer getSex() {
return sex;
}
- public void setSex(int sex) {
+ public void setSex(Integer sex) {
this.sex = sex;
}
- public int getAge() {
+ public Integer getAge() {
return age;
}
- public void setAge(int age) {
+ public void setAge(Integer age) {
this.age = age;
}
- public int getHeight() {
+ public String getHeight() {
return height;
}
- public void setHeight(int height) {
+ public void setHeight(String height) {
this.height = height;
}
- public int getWeight() {
+ public String getWeight() {
return weight;
}
- public void setWeight(int weight) {
+ public void setWeight(String weight) {
this.weight = weight;
}
@@ -113,11 +122,11 @@ public class User {
this.invitationCode = invitationCode;
}
- public long getUpdateTime() {
+ public Date getUpdateTime() {
return updateTime;
}
- public void setUpdateTime(long updateTime) {
+ public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
diff --git a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/UserVideoBuy.java b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/UserVideoBuy.java
new file mode 100644
index 0000000..3e67b8c
--- /dev/null
+++ b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/UserVideoBuy.java
@@ -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() {
+ }
+}
diff --git a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/UserVideoCollection.java b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/UserVideoCollection.java
new file mode 100644
index 0000000..f087ba6
--- /dev/null
+++ b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/UserVideoCollection.java
@@ -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() {
+ }
+}
diff --git a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/UserWallet.java b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/UserWallet.java
new file mode 100644
index 0000000..486cc7c
--- /dev/null
+++ b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/UserWallet.java
@@ -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;
+ }
+}
diff --git a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Video.java b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Video.java
new file mode 100644
index 0000000..f4fc420
--- /dev/null
+++ b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Video.java
@@ -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() {
+ }
+}
diff --git a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/VideoComment.java b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/VideoComment.java
new file mode 100644
index 0000000..c472775
--- /dev/null
+++ b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/VideoComment.java
@@ -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;
+ }
+}
diff --git a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/VideoCount.java b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/VideoCount.java
new file mode 100644
index 0000000..a135252
--- /dev/null
+++ b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/VideoCount.java
@@ -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;
+ }
+
+
+}
diff --git a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/model/LoginUser.java b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/model/LoginUser.java
index 75c2832..a134825 100644
--- a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/model/LoginUser.java
+++ b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/model/LoginUser.java
@@ -1,9 +1,9 @@
package doctor.system.api.model;
+import doctor.system.api.domain.Doctor;
import java.io.Serializable;
import java.util.Set;
-import doctor.system.api.domain.Department;
import doctor.system.api.domain.Doctor;
import doctor.system.api.domain.SysUser;
import doctor.system.api.domain.User;
diff --git a/doctor-auth/src/main/java/doctor/auth/service/HealthUserService.java b/doctor-auth/src/main/java/doctor/auth/service/HealthUserService.java
index 2f6f18b..774c72c 100644
--- a/doctor-auth/src/main/java/doctor/auth/service/HealthUserService.java
+++ b/doctor-auth/src/main/java/doctor/auth/service/HealthUserService.java
@@ -3,7 +3,6 @@ package doctor.auth.service;
import doctor.auth.util.RSAUtils;
import doctor.auth.util.RsaKey;
import doctor.auth.vo.UserVo;
-import doctor.common.core.domain.HealthR;
import doctor.common.core.domain.R;
import doctor.common.security.service.TokenService;
import doctor.system.api.RemoteDoctorService;
@@ -56,15 +55,4 @@ public class HealthUserService {
}
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);
- }
- }
}
diff --git a/doctor-auth/src/main/java/doctor/auth/vo/DoctorUserVo.java b/doctor-auth/src/main/java/doctor/auth/vo/DoctorUserVo.java
new file mode 100644
index 0000000..fc6f292
--- /dev/null
+++ b/doctor-auth/src/main/java/doctor/auth/vo/DoctorUserVo.java
@@ -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;
+ }
+}
diff --git a/doctor-auth/src/main/resources/bootstrap.yml b/doctor-auth/src/main/resources/bootstrap.yml
index 34e6524..084f03f 100644
--- a/doctor-auth/src/main/resources/bootstrap.yml
+++ b/doctor-auth/src/main/resources/bootstrap.yml
@@ -15,21 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 101.34.77.101:8848
- namespace: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
config:
# 配置中心地址
server-addr: 101.34.77.101:8848
- namespace: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
- # feign 配置
-feign:
- compression:
- request:
- enabled: true
- min-request-size: 10000
- response:
- enabled: true
diff --git a/doctor-common/doctor-common-core/src/main/java/doctor/common/core/constant/Constants.java b/doctor-common/doctor-common-core/src/main/java/doctor/common/core/constant/Constants.java
index 9554ee4..30c56fd 100644
--- a/doctor-common/doctor-common-core/src/main/java/doctor/common/core/constant/Constants.java
+++ b/doctor-common/doctor-common-core/src/main/java/doctor/common/core/constant/Constants.java
@@ -2,7 +2,7 @@ package doctor.common.core.constant;
/**
* 通用常量信息
- *
+ *
* @author ruoyi
*/
public class Constants
@@ -57,6 +57,16 @@ public class Constants
*/
public static final Integer FAIL = 500;
+ /**
+ * 成功标记
+ */
+ public static final String SUCCESS_HEALTH = "0000";
+
+ /**
+ * 失败标记
+ */
+ public static final String FAIL_HEALTH = "9001";
+
/**
* 登录成功状态
*/
diff --git a/doctor-common/doctor-common-core/src/main/java/doctor/common/core/domain/HealthR.java b/doctor-common/doctor-common-core/src/main/java/doctor/common/core/domain/HealthR.java
index b15d23e..64b5893 100644
--- a/doctor-common/doctor-common-core/src/main/java/doctor/common/core/domain/HealthR.java
+++ b/doctor-common/doctor-common-core/src/main/java/doctor/common/core/domain/HealthR.java
@@ -1,7 +1,8 @@
package doctor.common.core.domain;
+
+
import doctor.common.core.constant.Constants;
-import doctor.common.core.constant.HealthConstants;
import java.io.Serializable;
@@ -15,25 +16,25 @@ public class HealthR implements Serializable
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;
-
- private String message;
+ public static final String FAIL = Constants.FAIL_HEALTH;
private String status;
+ private String message;
+
private T result;
public static HealthR ok()
{
- return restResult(null,SUCCESS, null);
+ return restResult(null, SUCCESS, null);
}
public static HealthR ok(T result)
{
- return restResult(result,SUCCESS, null);
+ return restResult(result, SUCCESS, null);
}
public static HealthR ok(T result, String message)
@@ -43,7 +44,7 @@ public class HealthR implements Serializable
public static HealthR fail()
{
- return restResult(null,FAIL, null);
+ return restResult(null, FAIL, null);
}
public static HealthR fail(String message)
@@ -53,12 +54,12 @@ public class HealthR implements Serializable
public static HealthR fail(T result)
{
- return restResult(result,FAIL, null);
+ return restResult(result, FAIL, null);
}
public static HealthR fail(T result, String message)
{
- return restResult(result,FAIL, message);
+ return restResult(result, FAIL, message);
}
public static HealthR fail(String status, String message)
@@ -69,39 +70,33 @@ public class HealthR implements Serializable
private static HealthR restResult(T result, String status, String message)
{
HealthR apiResult = new HealthR<>();
- apiResult.setStatus(status);
apiResult.setResult(result);
apiResult.setMessage(message);
+ apiResult.setStatus(status);
return apiResult;
}
- public String getMessage()
- {
- return message;
- }
-
- public void setMessage(String message)
- {
- this.message = message;
- }
-
- public String getStatus()
- {
+ public String getStatus() {
return status;
}
- public void setStatus(String status)
- {
+ public void setStatus(String 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;
}
- public void setResult(T result)
- {
+ public void setResult(T result) {
this.result = result;
}
@@ -112,6 +107,8 @@ public class HealthR implements Serializable
public static Boolean isSuccess(HealthR ret)
{
- return HealthR.SUCCESS .equals(ret.getStatus()) ;
+ return HealthR.SUCCESS == ret.getStatus();
}
+
+
}
diff --git a/doctor-common/doctor-common-core/src/main/java/doctor/common/core/web/controller/BaseController.java b/doctor-common/doctor-common-core/src/main/java/doctor/common/core/web/controller/BaseController.java
index 40cc094..f9e086b 100644
--- a/doctor-common/doctor-common-core/src/main/java/doctor/common/core/web/controller/BaseController.java
+++ b/doctor-common/doctor-common-core/src/main/java/doctor/common/core/web/controller/BaseController.java
@@ -16,7 +16,7 @@ import doctor.common.core.web.page.TableDataInfo;
/**
* web层通用数据处理
- *
+ *
* @author ruoyi
*/
public class BaseController
@@ -120,7 +120,7 @@ public class BaseController
/**
* 响应返回结果
- *
+ *
* @param rows 影响行数
* @return 操作结果
*/
@@ -131,7 +131,7 @@ public class BaseController
/**
* 响应返回结果
- *
+ *
* @param result 结果
* @return 操作结果
*/
diff --git a/doctor-gateway/src/main/resources/bootstrap.yml b/doctor-gateway/src/main/resources/bootstrap.yml
index cc0e562..2eaa492 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: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
config:
# 配置中心地址
server-addr: 101.34.77.101:8848
- namespace: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
# 配置文件格式
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 c992149..0ecdb89 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: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
config:
# 配置中心地址
server-addr: 101.34.77.101:8848
- namespace: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/doctor-modules/doctor-gen/src/main/java/doctor/gen/controller/GenController.java b/doctor-modules/doctor-gen/src/main/java/doctor/gen/controller/GenController.java
index 2594b3f..974c31a 100644
--- a/doctor-modules/doctor-gen/src/main/java/doctor/gen/controller/GenController.java
+++ b/doctor-modules/doctor-gen/src/main/java/doctor/gen/controller/GenController.java
@@ -30,7 +30,7 @@ import doctor.gen.service.IGenTableService;
/**
* 代码生成 操作处理
- *
+ *
* @author ruoyi
*/
@RequestMapping("/gen")
diff --git a/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml b/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml
index 007713f..823a6a8 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: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
config:
# 配置中心地址
server-addr: 101.34.77.101:8848
- namespace: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/doctor-modules/doctor-gen/src/main/resources/vm/java/controller.java.vm b/doctor-modules/doctor-gen/src/main/resources/vm/java/controller.java.vm
index ff7baeb..ffe3e10 100644
--- a/doctor-modules/doctor-gen/src/main/resources/vm/java/controller.java.vm
+++ b/doctor-modules/doctor-gen/src/main/resources/vm/java/controller.java.vm
@@ -1,7 +1,6 @@
package ${packageName}.controller;
import java.util.List;
-import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -27,7 +26,7 @@ import doctor.common.core.web.page.TableDataInfo;
/**
* ${functionName}Controller
- *
+ *
* @author ${author}
* @date ${datetime}
*/
diff --git a/doctor-modules/doctor-health/pom.xml b/doctor-modules/doctor-health/pom.xml
index ccec9f7..52c8401 100644
--- a/doctor-modules/doctor-health/pom.xml
+++ b/doctor-modules/doctor-health/pom.xml
@@ -74,6 +74,10 @@
doctor
doctor-common-swagger
+
+ org.projectlombok
+ lombok
+
doctor
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthLoginController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthLoginController.java
index c63aa20..b22f24a 100644
--- a/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthLoginController.java
+++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthLoginController.java
@@ -4,9 +4,9 @@ import com.baomidou.dynamic.datasource.annotation.DS;
import doctor.common.core.domain.HealthR;
import doctor.common.core.domain.R;
import doctor.system.api.domain.Doctor;
-import doctor.system.api.domain.User;
import doctor.service.DoctorUserService;
import doctor.system.api.domain.SysUser;
+import doctor.system.api.domain.User;
import doctor.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthUserVideoController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthUserVideoController.java
new file mode 100644
index 0000000..f3311e7
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthUserVideoController.java
@@ -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> findVideoCategoryList(){
+ List List = healthUserVideoService.findVideoCategoryList();
+ return HealthR.ok(List);
+ }
+
+ @GetMapping("/findVideoVoList")
+ public HealthR> findVideoVoList(@RequestBody VideoDto videoDto){
+ startPage(videoDto.getPage(), videoDto.getCount());
+ List List = healthUserVideoService.findVideoVoList(videoDto);
+ return HealthR.ok(List);
+ }
+
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/SysDoctorController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/SysDoctorController.java
new file mode 100644
index 0000000..746fd64
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/SysDoctorController.java
@@ -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 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);
+ }
+}
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
new file mode 100644
index 0000000..410f514
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java
@@ -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>findVideoCollectionList(){
+ List 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>findUserVideoBuyList(){
+ List 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> findUserWallet(){
+ List userWallets = userVideoService.findUserWallet();
+ return R.ok(userWallets);
+ }
+
+
+}
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
new file mode 100644
index 0000000..4cc9573
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/VideoController.java
@@ -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> findVideoCommentList(){
+ List videoCommentList = videoService.findVideoCommentList();
+ return R.ok(videoCommentList);
+ }
+
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/dto/VideoDto.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/dto/VideoDto.java
new file mode 100644
index 0000000..3ed0734
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/dto/VideoDto.java
@@ -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;
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorUser.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorUser.java
new file mode 100644
index 0000000..ee7dfe0
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorUser.java
@@ -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;
+ }
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/User.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/User.java
new file mode 100644
index 0000000..6f0f2cb
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/User.java
@@ -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;
+ }
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoBuy.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoBuy.java
new file mode 100644
index 0000000..5903ee7
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoBuy.java
@@ -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() {
+ }
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollection.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollection.java
new file mode 100644
index 0000000..b9ab680
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollection.java
@@ -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() {
+ }
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserWallet.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserWallet.java
new file mode 100644
index 0000000..1da779d
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserWallet.java
@@ -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;
+ }
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/Video.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/Video.java
new file mode 100644
index 0000000..a09e715
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/Video.java
@@ -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() {
+ }
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCategoryEntity.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCategoryEntity.java
new file mode 100644
index 0000000..903c042
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCategoryEntity.java
@@ -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;
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoComment.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoComment.java
new file mode 100644
index 0000000..84db8bf
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoComment.java
@@ -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;
+ }
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCommentEntity.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCommentEntity.java
new file mode 100644
index 0000000..cf35c5a
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCommentEntity.java
@@ -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;
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCount.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCount.java
new file mode 100644
index 0000000..c2e626c
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCount.java
@@ -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;
+ }
+
+
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCountEntity.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCountEntity.java
new file mode 100644
index 0000000..6393a84
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCountEntity.java
@@ -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;
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoEntity.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoEntity.java
new file mode 100644
index 0000000..4c120a2
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoEntity.java
@@ -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;
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/VideoCategoryVo.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/VideoCategoryVo.java
new file mode 100644
index 0000000..3e74d75
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/VideoCategoryVo.java
@@ -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;
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/VideoVo.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/VideoVo.java
new file mode 100644
index 0000000..81fc60b
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/VideoVo.java
@@ -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;
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthUserVideoMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthUserVideoMapper.java
new file mode 100644
index 0000000..bba93fb
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthUserVideoMapper.java
@@ -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 findVideoCategoryList();
+
+ List findVideoVoList(VideoDto videoDto);
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/mapper/IDoctorUserMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/IDoctorUserMapper.java
new file mode 100644
index 0000000..8d7f5e3
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/IDoctorUserMapper.java
@@ -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);
+}
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
new file mode 100644
index 0000000..32bb5d3
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java
@@ -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 findVideoCollectionList();
+
+ void cancelVideoCollection(@Param("id") Integer id);
+
+ List findUserVideoBuyList();
+
+ void deleteVideoBuy(@Param("id") Integer id);
+
+ List findUserWallet();
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/mapper/VideoMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/VideoMapper.java
new file mode 100644
index 0000000..6c886cb
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/VideoMapper.java
@@ -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 findVideoCommentList();
+
+
+// UserWallet FindById(@Param("userId") Integer userId);
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/HealthUserVideoService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/HealthUserVideoService.java
new file mode 100644
index 0000000..5540cce
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/service/HealthUserVideoService.java
@@ -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 findVideoCategoryList();
+
+ List findVideoVoList(VideoDto videoDto);
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/IDoctorUserService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/IDoctorUserService.java
new file mode 100644
index 0000000..b967765
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/service/IDoctorUserService.java
@@ -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);
+}
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
new file mode 100644
index 0000000..b024c7e
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java
@@ -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 findVideoCollectionList();
+
+ void cancelVideoCollection(Integer id);
+
+ List findUserVideoBuyList();
+
+ void deleteVideoBuy(Integer id);
+
+ List findUserWallet();
+}
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
new file mode 100644
index 0000000..bab5ee1
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/service/VideoService.java
@@ -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 findVideoCommentList();
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthUserVideoServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthUserVideoServiceImpl.java
new file mode 100644
index 0000000..49236b6
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthUserVideoServiceImpl.java
@@ -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 findVideoCategoryList() {
+
+ List videoCategoryList =healthUserVideoMapper.findVideoCategoryList();
+ List videoCategoryVos = ConvertUtil.entityToVoList(videoCategoryList, VideoCategoryVo.class);
+ return videoCategoryVos;
+ }
+
+ @Override
+ public List findVideoVoList(VideoDto videoDto) {
+ List videoVoList = healthUserVideoMapper.findVideoVoList(videoDto);
+ List videoVos = ConvertUtil.entityToVoList(videoVoList, VideoVo.class);
+ return videoVos;
+ }
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/IDoctorUserServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/IDoctorUserServiceImpl.java
new file mode 100644
index 0000000..193c931
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/IDoctorUserServiceImpl.java
@@ -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;
+ }
+}
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
new file mode 100644
index 0000000..74708ca
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java
@@ -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 findVideoCollectionList() {
+ return userVideoMapper.findVideoCollectionList();
+ }
+
+ @Override
+ public void cancelVideoCollection(Integer id) {
+ userVideoMapper.cancelVideoCollection(id);
+ }
+
+ @Override
+ public List findUserVideoBuyList() {
+ return userVideoMapper.findUserVideoBuyList();
+ }
+
+ @Override
+ public void deleteVideoBuy(Integer id) {
+ userVideoMapper.deleteVideoBuy(id);
+ }
+
+ @Override
+ public List findUserWallet() {
+ return userVideoMapper.findUserWallet();
+ }
+}
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
new file mode 100644
index 0000000..1c45fe1
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/VideoServiceImpl.java
@@ -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 findVideoCommentList() {
+ return videoMapper.findVideoCommentList();
+ }
+
+}
diff --git a/doctor-modules/doctor-health/src/main/java/doctor/util/ConvertUtil.java b/doctor-modules/doctor-health/src/main/java/doctor/util/ConvertUtil.java
new file mode 100644
index 0000000..16bda75
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/java/doctor/util/ConvertUtil.java
@@ -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 entityToVo(Object source, Class 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 List entityToVoList(Collection> sourceList, Class target) {
+ if (sourceList == null) {
+ return null;
+ }
+ List 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;
+ }
+}
+
diff --git a/doctor-modules/doctor-health/src/main/resources/bootstrap.yml b/doctor-modules/doctor-health/src/main/resources/bootstrap.yml
index f74d4bf..205fb38 100644
--- a/doctor-modules/doctor-health/src/main/resources/bootstrap.yml
+++ b/doctor-modules/doctor-health/src/main/resources/bootstrap.yml
@@ -15,21 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 101.34.77.101:8848
- namespace: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
config:
# 配置中心地址
server-addr: 101.34.77.101:8848
- namespace: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
- # feign 配置
-feign:
- compression:
- request:
- enabled: true
- min-request-size: 10000
- response:
- enabled: true
diff --git a/doctor-modules/doctor-health/src/main/resources/mapper/HealthUserVideoMapper.xml b/doctor-modules/doctor-health/src/main/resources/mapper/HealthUserVideoMapper.xml
new file mode 100644
index 0000000..25c0127
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/resources/mapper/HealthUserVideoMapper.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/IDoctorUserServiceMapper.xml b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/IDoctorUserServiceMapper.xml
new file mode 100644
index 0000000..41b82ff
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/IDoctorUserServiceMapper.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
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
new file mode 100644
index 0000000..cb586ad
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml
@@ -0,0 +1,28 @@
+
+
+
+
+ delete
+ from user_video_collection
+ where id = #{id}
+
+
+ delete
+ from user_video_buy
+ where id = #{id}
+
+
+
+
+
diff --git a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/VideoMapper.xml b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/VideoMapper.xml
new file mode 100644
index 0000000..7903f85
--- /dev/null
+++ b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/VideoMapper.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+ insert into user_video_collection (user_id,
+ video_id,
+ create_time)
+ values (#{userId},
+ #{videoId},
+ now());
+
+
+ update video_count
+ set collection_num=collection_num + 1
+ where id = #{id}
+
+
+ update user_wallet
+ set blance==#{newblance}
+ where id=#{id}
+
+
+
+
+
+
+
+
+
+
diff --git a/doctor-modules/doctor-job/src/main/java/doctor/job/controller/SysJobController.java b/doctor-modules/doctor-job/src/main/java/doctor/job/controller/SysJobController.java
index d46226a..b2f6981 100644
--- a/doctor-modules/doctor-job/src/main/java/doctor/job/controller/SysJobController.java
+++ b/doctor-modules/doctor-job/src/main/java/doctor/job/controller/SysJobController.java
@@ -30,7 +30,7 @@ import doctor.job.util.ScheduleUtils;
/**
* 调度任务信息操作处理
- *
+ *
* @author ruoyi
*/
@RestController
diff --git a/doctor-modules/doctor-job/src/main/java/doctor/job/controller/SysJobLogController.java b/doctor-modules/doctor-job/src/main/java/doctor/job/controller/SysJobLogController.java
index f14d447..965c1ca 100644
--- a/doctor-modules/doctor-job/src/main/java/doctor/job/controller/SysJobLogController.java
+++ b/doctor-modules/doctor-job/src/main/java/doctor/job/controller/SysJobLogController.java
@@ -21,7 +21,7 @@ import doctor.job.service.ISysJobLogService;
/**
* 调度日志操作处理
- *
+ *
* @author ruoyi
*/
@RestController
diff --git a/doctor-modules/doctor-job/src/main/resources/bootstrap.yml b/doctor-modules/doctor-job/src/main/resources/bootstrap.yml
index 537c5d6..0bffaa1 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: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
config:
# 配置中心地址
server-addr: 101.34.77.101:8848
- namespace: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysConfigController.java b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysConfigController.java
index 5609697..5f8e0c5 100644
--- a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysConfigController.java
+++ b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysConfigController.java
@@ -25,7 +25,7 @@ import doctor.system.service.ISysConfigService;
/**
* 参数配置 信息操作处理
- *
+ *
* @author ruoyi
*/
@RestController
diff --git a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysDictDataController.java b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysDictDataController.java
index 2a55c84..0ab27fc 100644
--- a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysDictDataController.java
+++ b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysDictDataController.java
@@ -28,7 +28,7 @@ import doctor.system.service.ISysDictTypeService;
/**
* 数据字典信息
- *
+ *
* @author ruoyi
*/
@RestController
@@ -37,7 +37,7 @@ public class SysDictDataController extends BaseController
{
@Autowired
private ISysDictDataService dictDataService;
-
+
@Autowired
private ISysDictTypeService dictTypeService;
diff --git a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysDictTypeController.java b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysDictTypeController.java
index 626c35d..1644dec 100644
--- a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysDictTypeController.java
+++ b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysDictTypeController.java
@@ -25,7 +25,7 @@ import doctor.system.service.ISysDictTypeService;
/**
* 数据字典信息
- *
+ *
* @author ruoyi
*/
@RestController
diff --git a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysLogininforController.java b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysLogininforController.java
index 910777a..1b0fe37 100644
--- a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysLogininforController.java
+++ b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysLogininforController.java
@@ -25,7 +25,7 @@ import doctor.system.service.ISysLogininforService;
/**
* 系统访问记录
- *
+ *
* @author ruoyi
*/
@RestController
diff --git a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysNoticeController.java b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysNoticeController.java
index ff0f974..3ed7127 100644
--- a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysNoticeController.java
+++ b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysNoticeController.java
@@ -23,7 +23,7 @@ import doctor.system.service.ISysNoticeService;
/**
* 公告 信息操作处理
- *
+ *
* @author ruoyi
*/
@RestController
diff --git a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysOperlogController.java b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysOperlogController.java
index d92e73d..205f330 100644
--- a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysOperlogController.java
+++ b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysOperlogController.java
@@ -23,7 +23,7 @@ import doctor.system.service.ISysOperLogService;
/**
* 操作日志记录
- *
+ *
* @author ruoyi
*/
@RestController
diff --git a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysPostController.java b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysPostController.java
index 8d42c0f..28885a7 100644
--- a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysPostController.java
+++ b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysPostController.java
@@ -25,7 +25,7 @@ import doctor.system.service.ISysPostService;
/**
* 岗位信息操作处理
- *
+ *
* @author ruoyi
*/
@RestController
diff --git a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysRoleController.java b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysRoleController.java
index 1d1748d..fed0b21 100644
--- a/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysRoleController.java
+++ b/doctor-modules/doctor-system/src/main/java/doctor/system/controller/SysRoleController.java
@@ -30,7 +30,7 @@ import doctor.system.service.ISysUserService;
/**
* 角色信息
- *
+ *
* @author ruoyi
*/
@RestController
diff --git a/doctor-modules/doctor-system/src/main/resources/bootstrap.yml b/doctor-modules/doctor-system/src/main/resources/bootstrap.yml
index 8def34f..d48b98a 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: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
config:
# 配置中心地址
server-addr: 101.34.77.101:8848
- namespace: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
# 配置文件格式
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 979155f..ed199de 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: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
config:
# 配置中心地址
server-addr: 101.34.77.101:8848
- namespace: 9de208a6-cb30-41ae-a880-78196c99c050
+ namespace: 7e34f104-f333-4828-b36a-02146e521c9a
# 配置文件格式
file-extension: yml
# 共享配置