cbx
parent
b0012027c5
commit
18acab8006
|
@ -4,6 +4,9 @@ import doctor.auth.service.HealthDoctorService;
|
|||
import doctor.auth.service.HealthUserService;
|
||||
import doctor.auth.vo.DoctorVo;
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -12,13 +15,15 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
|
||||
@RestController
|
||||
@RequestMapping("/doctor/v1")
|
||||
@Api(tags = "登录")
|
||||
public class HealthDoctorController {
|
||||
|
||||
@Autowired
|
||||
private HealthDoctorService healthDoctorService;
|
||||
|
||||
@PostMapping("/login")
|
||||
public HealthR<?> login(@RequestParam String email, @RequestParam String pwd) {
|
||||
@ApiOperation("邮箱密码登录")
|
||||
public HealthR<?> login(@RequestParam @ApiParam("email") String email, @RequestParam @ApiParam("pwd") String pwd) {
|
||||
DoctorVo userInfo = healthDoctorService.login(email,pwd);
|
||||
if (userInfo!=null){
|
||||
return HealthR.ok(userInfo,"登录成功");
|
||||
|
|
|
@ -1,39 +1,27 @@
|
|||
package doctor.auth.form;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
/**
|
||||
* 用户登录对象
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("用户登录")
|
||||
public class LoginBody
|
||||
{
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@NotBlank(message = "用户名不能为空")
|
||||
@ApiModelProperty("姓名")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 用户密码
|
||||
*/
|
||||
@NotBlank(message = "密码不能为空")
|
||||
@Size(min = 1, message = "密码长度不能小于1")
|
||||
@ApiModelProperty("密码")
|
||||
private String password;
|
||||
|
||||
public String getUsername()
|
||||
{
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username)
|
||||
{
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword()
|
||||
{
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password)
|
||||
{
|
||||
this.password = password;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,112 +1,58 @@
|
|||
package doctor.auth.vo;
|
||||
|
||||
public class DoctorVo {
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class DoctorVo implements Serializable {
|
||||
@NotNull(message = "医生ID不能为空")
|
||||
@ApiModelProperty("医生ID")
|
||||
private int doctorId;
|
||||
|
||||
@NotBlank(message = "会话ID不能为空")
|
||||
@ApiModelProperty("会话ID")
|
||||
private String sessionId;
|
||||
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@NotBlank(message = "用户名不能为空")
|
||||
@ApiModelProperty("用户名")
|
||||
private String userName;
|
||||
|
||||
@NotNull(message = "审核状态不能为空")
|
||||
@ApiModelProperty("审核状态")
|
||||
private int reviewStatus;
|
||||
|
||||
@NotBlank(message = "极光密码不能为空")
|
||||
@ApiModelProperty("极光密码")
|
||||
private String jiGuangPwd;
|
||||
|
||||
@ApiModelProperty("图片")
|
||||
private String imagePic;
|
||||
|
||||
@NotBlank(message = "就职医院不能为空")
|
||||
@ApiModelProperty("就职医院")
|
||||
private String inauguralHospital;
|
||||
|
||||
@NotBlank(message = "职称不能为空")
|
||||
@ApiModelProperty("职称")
|
||||
private String jobTitle;
|
||||
|
||||
@NotNull(message = "科室ID不能为空")
|
||||
@ApiModelProperty("科室ID")
|
||||
private int departmentId;
|
||||
|
||||
@NotBlank(message = "科室名称不能为空")
|
||||
@ApiModelProperty("科室名称")
|
||||
private String departmentName;
|
||||
|
||||
@NotNull(message = "是否有图文咨询权限不能为空")
|
||||
@ApiModelProperty("图文咨询权限")
|
||||
private int whetherHaveImagePic;
|
||||
|
||||
public int getDoctorId() {
|
||||
return doctorId;
|
||||
}
|
||||
|
||||
public void setDoctorId(int doctorId) {
|
||||
this.doctorId = doctorId;
|
||||
}
|
||||
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
||||
public void setSessionId(String sessionId) {
|
||||
this.sessionId = sessionId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public int getReviewStatus() {
|
||||
return reviewStatus;
|
||||
}
|
||||
|
||||
public void setReviewStatus(int reviewStatus) {
|
||||
this.reviewStatus = reviewStatus;
|
||||
}
|
||||
|
||||
public String getJiGuangPwd() {
|
||||
return jiGuangPwd;
|
||||
}
|
||||
|
||||
public void setJiGuangPwd(String jiGuangPwd) {
|
||||
this.jiGuangPwd = jiGuangPwd;
|
||||
}
|
||||
|
||||
public String getImagePic() {
|
||||
return imagePic;
|
||||
}
|
||||
|
||||
public void setImagePic(String imagePic) {
|
||||
this.imagePic = imagePic;
|
||||
}
|
||||
|
||||
public String getInauguralHospital() {
|
||||
return inauguralHospital;
|
||||
}
|
||||
|
||||
public void setInauguralHospital(String inauguralHospital) {
|
||||
this.inauguralHospital = inauguralHospital;
|
||||
}
|
||||
|
||||
public String getJobTitle() {
|
||||
return jobTitle;
|
||||
}
|
||||
|
||||
public void setJobTitle(String jobTitle) {
|
||||
this.jobTitle = jobTitle;
|
||||
}
|
||||
|
||||
public int getDepartmentId() {
|
||||
return departmentId;
|
||||
}
|
||||
|
||||
public void setDepartmentId(int departmentId) {
|
||||
this.departmentId = departmentId;
|
||||
}
|
||||
|
||||
public String getDepartmentName() {
|
||||
return departmentName;
|
||||
}
|
||||
|
||||
public void setDepartmentName(String departmentName) {
|
||||
this.departmentName = departmentName;
|
||||
}
|
||||
|
||||
public int getWhetherHaveImagePic() {
|
||||
return whetherHaveImagePic;
|
||||
}
|
||||
|
||||
public void setWhetherHaveImagePic(int whetherHaveImagePic) {
|
||||
this.whetherHaveImagePic = whetherHaveImagePic;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,130 +1,53 @@
|
|||
package doctor.auth.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class UserVo {
|
||||
@NotNull(message = "用户ID不能为空")
|
||||
private Integer userId;
|
||||
|
||||
@NotBlank(message = "会话ID不能为空")
|
||||
private String sessionId;
|
||||
|
||||
@NotBlank(message = "昵称不能为空")
|
||||
private String nickName;
|
||||
|
||||
@NotBlank(message = "用户名不能为空")
|
||||
private String userName;
|
||||
|
||||
|
||||
@NotBlank(message = "极光密码不能为空")
|
||||
private String jiGuangPwd;
|
||||
|
||||
private String headPic;
|
||||
|
||||
@NotNull(message = "性别不能为空")
|
||||
private Integer sex;
|
||||
|
||||
@Min(value = 0, message = "年龄不能小于0")
|
||||
private Integer age;
|
||||
|
||||
@Min(value = 0, message = "身高不能小于0")
|
||||
private Integer height;
|
||||
|
||||
@Min(value = 0, message = "体重不能小于0")
|
||||
private Integer weight;
|
||||
|
||||
@Email(message = "请输入有效的邮箱地址")
|
||||
private String email;
|
||||
|
||||
@NotNull(message = "是否绑定微信不能为空")
|
||||
private Integer whetherBingWeChat;
|
||||
|
||||
private String invitationCode;
|
||||
|
||||
@NotNull(message = "面部标志不能为空")
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
package doctor.common.core;
|
||||
|
||||
import org.hibernate.validator.HibernateValidator;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;
|
||||
|
||||
import javax.validation.Validation;
|
||||
import javax.validation.Validator;
|
||||
import javax.validation.ValidatorFactory;
|
||||
|
||||
/**
|
||||
* @ClassName : WebConfig
|
||||
* @Description : 校验参数配置
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-16 14:29
|
||||
*/
|
||||
@Configuration
|
||||
public class WebConfig {
|
||||
|
||||
@Bean
|
||||
public Validator validator() {
|
||||
ValidatorFactory validatorFactory = Validation.byProvider(HibernateValidator.class)
|
||||
.configure()
|
||||
//failFast为true出现校验失败的情况,立即结束校验,不再进行后续的校验
|
||||
.failFast(true)
|
||||
.buildValidatorFactory();
|
||||
|
||||
return validatorFactory.getValidator();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public MethodValidationPostProcessor methodValidationPostProcessor() {
|
||||
MethodValidationPostProcessor methodValidationPostProcessor = new MethodValidationPostProcessor();
|
||||
methodValidationPostProcessor.setValidator(validator());
|
||||
return methodValidationPostProcessor;
|
||||
}
|
||||
}
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
<dependencies>
|
||||
|
||||
|
||||
<!-- Oss上传 -->
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
|
|
|
@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
|
@ -41,7 +42,7 @@ public class HealthJobTitleController {
|
|||
}
|
||||
|
||||
@PostMapping("/applyJoin")
|
||||
public HealthR applyJoin(@RequestBody ApplyJoinDto applyJoinDto) {
|
||||
public HealthR applyJoin(@RequestBody @Valid ApplyJoinDto applyJoinDto) {
|
||||
HealthR healthR= healthJobTitleService.applyJoin(applyJoinDto);
|
||||
return HealthR.ok(healthR);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package doctor.controller;
|
|||
|
||||
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.dto.VideoDto;
|
||||
import doctor.domain.vo.VideoCategoryVo;
|
||||
import doctor.domain.vo.VideoVo;
|
||||
import doctor.service.HealthUserVideoService;
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
package doctor.controller;
|
||||
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.vo.UserSickCircleVo;
|
||||
import doctor.service.UserSickCircleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.github.pagehelper.page.PageMethod.startPage;
|
||||
|
||||
/**
|
||||
* @ClassName : SickCircleController
|
||||
* @Description : 病友圈
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-16 22:08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/sickCircle/verify/v1")
|
||||
public class UserSickCircleController {
|
||||
@Autowired
|
||||
private UserSickCircleService userSickCircleService;
|
||||
//查看我的病友圈
|
||||
@GetMapping("/findMySickCircleList")
|
||||
public HealthR<List<UserSickCircleVo>> findMySickCircleList(@RequestParam Integer page, @RequestParam Integer count){
|
||||
startPage(page,count);
|
||||
List<UserSickCircleVo> userFriendCircles = userSickCircleService.findMySickCircleList();
|
||||
return HealthR.ok(userFriendCircles);
|
||||
}
|
||||
|
||||
}
|
|
@ -2,15 +2,13 @@ package doctor.controller;
|
|||
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.dto.UserArchivesDto;
|
||||
import doctor.domain.entity.UserAdoptCommentEntity;
|
||||
import doctor.domain.entity.UserEntity;
|
||||
import doctor.domain.entity.UserInfoCollectionEntity;
|
||||
import doctor.domain.entity.UserWalletEntity;
|
||||
import doctor.domain.entity.*;
|
||||
import doctor.domain.vo.*;
|
||||
import doctor.service.UserVideoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
import static com.github.pagehelper.page.PageMethod.startPage;
|
||||
|
@ -96,9 +94,17 @@ public class UserVideoController {
|
|||
}
|
||||
//添加用户档案
|
||||
@PostMapping("/addUserArchives")
|
||||
public HealthR addUserArchives(@RequestBody UserArchivesDto userArchivesDto){
|
||||
userVideoService.addUserArchives(userArchivesDto);
|
||||
public HealthR addUserArchives(@RequestBody UserArchivesEntity userArchivesEntity, @RequestHeader Integer userId){
|
||||
userVideoService.addUserArchives(userArchivesEntity,userId);
|
||||
return HealthR.ok();
|
||||
}
|
||||
//上传用户档案图片
|
||||
@PostMapping("/uploadArchivesPicture")
|
||||
public HealthR uploadUserArchivesImg(@RequestParam Integer id){
|
||||
userVideoService.uploadUserArchivesImg(id);
|
||||
return HealthR.ok();
|
||||
}
|
||||
|
||||
//用户关注医生列表
|
||||
|
||||
}
|
||||
|
|
|
@ -2,15 +2,37 @@ package doctor.domain.dto;
|
|||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class ApplyJoinDto {
|
||||
public class ApplyJoinDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Email(message = "请输入有效的邮箱地址")
|
||||
private String email;
|
||||
|
||||
@NotBlank(message = "验证码不能为空")
|
||||
private String code;
|
||||
|
||||
@Size(min = 4, message = "密码长度不能小于4")
|
||||
private String pwd1;
|
||||
|
||||
@Size(min = 4, message = "确认密码长度不能小于4")
|
||||
private String pwd2;
|
||||
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
private String name;
|
||||
|
||||
@NotBlank(message = "就职医院不能为空")
|
||||
private String inauguralHospital;
|
||||
|
||||
@NotNull(message = "部门ID不能为空")
|
||||
private Integer departmentId;
|
||||
|
||||
@NotNull(message = "职称ID不能为空")
|
||||
private Integer jobTitleId;
|
||||
private String personalProfile;
|
||||
private String goodFieId;
|
||||
|
|
|
@ -1,82 +1,41 @@
|
|||
package doctor.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @ClassName : UserArchivesDto
|
||||
* @Description : 添加用户档案
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-15 21:51
|
||||
*/
|
||||
@Data
|
||||
public class UserArchivesDto {
|
||||
private Integer userId;
|
||||
|
||||
|
||||
private String picture;
|
||||
|
||||
|
||||
private String diseaseMain;
|
||||
|
||||
|
||||
private String diseaseNow;
|
||||
|
||||
|
||||
private String diseaseBefore;
|
||||
|
||||
|
||||
private String treatmentHospitalRecent;
|
||||
|
||||
|
||||
private String treatmentProcess;
|
||||
|
||||
|
||||
private String treatmentStartTime;
|
||||
|
||||
private String treatmentEndTime;
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getDiseaseMain() {
|
||||
return diseaseMain;
|
||||
}
|
||||
|
||||
public void setDiseaseMain(String diseaseMain) {
|
||||
this.diseaseMain = diseaseMain;
|
||||
}
|
||||
|
||||
public String getDiseaseNow() {
|
||||
return diseaseNow;
|
||||
}
|
||||
|
||||
public void setDiseaseNow(String diseaseNow) {
|
||||
this.diseaseNow = diseaseNow;
|
||||
}
|
||||
|
||||
public String getDiseaseBefore() {
|
||||
return diseaseBefore;
|
||||
}
|
||||
|
||||
public void setDiseaseBefore(String diseaseBefore) {
|
||||
this.diseaseBefore = diseaseBefore;
|
||||
}
|
||||
|
||||
public String getTreatmentHospitalRecent() {
|
||||
return treatmentHospitalRecent;
|
||||
}
|
||||
|
||||
public void setTreatmentHospitalRecent(String treatmentHospitalRecent) {
|
||||
this.treatmentHospitalRecent = treatmentHospitalRecent;
|
||||
}
|
||||
|
||||
public String getTreatmentProcess() {
|
||||
return treatmentProcess;
|
||||
}
|
||||
|
||||
public void setTreatmentProcess(String treatmentProcess) {
|
||||
this.treatmentProcess = treatmentProcess;
|
||||
}
|
||||
|
||||
public String getTreatmentStartTime() {
|
||||
return treatmentStartTime;
|
||||
}
|
||||
|
||||
public void setTreatmentStartTime(String treatmentStartTime) {
|
||||
this.treatmentStartTime = treatmentStartTime;
|
||||
}
|
||||
|
||||
public String getTreatmentEndTime() {
|
||||
return treatmentEndTime;
|
||||
}
|
||||
|
||||
public void setTreatmentEndTime(String treatmentEndTime) {
|
||||
this.treatmentEndTime = treatmentEndTime;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,11 +4,22 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class VideoDto {
|
||||
@NotNull(message = "分类ID不能为空")
|
||||
private Integer categoryId;
|
||||
|
||||
@NotNull(message = "页码不能为空")
|
||||
@Min(value = 1, message = "页码不能小于1")
|
||||
private Integer page = 1;
|
||||
|
||||
@NotNull(message = "每页数量不能为空")
|
||||
@Min(value = 1, message = "每页数量不能小于1")
|
||||
private Integer count = 1;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package doctor.domain.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
@ -19,10 +20,13 @@ public class UserArchivesEntity {
|
|||
private String diseaseBefore;
|
||||
private String treatmentHospitalRecent;
|
||||
private String treatmentProcess;
|
||||
private Date treatmentStartTime;
|
||||
private Date treatmentEndTime;
|
||||
private String treatmentStartTime;
|
||||
|
||||
private String treatmentEndTime;
|
||||
private String picture;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date updateTime;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
|
||||
public Integer getId() {
|
||||
|
@ -81,19 +85,19 @@ public class UserArchivesEntity {
|
|||
this.treatmentProcess = treatmentProcess;
|
||||
}
|
||||
|
||||
public Date getTreatmentStartTime() {
|
||||
public String getTreatmentStartTime() {
|
||||
return treatmentStartTime;
|
||||
}
|
||||
|
||||
public void setTreatmentStartTime(Date treatmentStartTime) {
|
||||
public void setTreatmentStartTime(String treatmentStartTime) {
|
||||
this.treatmentStartTime = treatmentStartTime;
|
||||
}
|
||||
|
||||
public Date getTreatmentEndTime() {
|
||||
public String getTreatmentEndTime() {
|
||||
return treatmentEndTime;
|
||||
}
|
||||
|
||||
public void setTreatmentEndTime(Date treatmentEndTime) {
|
||||
public void setTreatmentEndTime(String treatmentEndTime) {
|
||||
this.treatmentEndTime = treatmentEndTime;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,11 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
@ -15,19 +20,29 @@ import java.util.Date;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserEntity {
|
||||
public class UserEntity implements Serializable {
|
||||
@NotBlank(message = "用户ID不能为空")
|
||||
private Integer id;
|
||||
|
||||
@NotBlank(message = "手机号不能为空")
|
||||
@Pattern(regexp = "^1[0-9]{10}$", message = "请输入有效的手机号")
|
||||
private String phone;
|
||||
|
||||
@NotBlank(message = "密码不能为空")
|
||||
@Size(min = 1, message = "密码长度不能小于1")
|
||||
private String pwd;
|
||||
|
||||
@NotBlank(message = "邮箱不能为空")
|
||||
@Email(message = "请输入有效的邮箱地址")
|
||||
private String email;
|
||||
|
||||
@NotBlank(message = "昵称不能为空")
|
||||
private String nickName;
|
||||
|
||||
@NotBlank(message = "用户名不能为空")
|
||||
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;
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
package doctor.domain.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName : UserSickCircleEntity
|
||||
* @Description : 患者病友圈列表
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-16 22:02
|
||||
*/
|
||||
@Data
|
||||
public class UserSickCircleEntity {
|
||||
private String sickCircleId;
|
||||
private String userId;
|
||||
private String title;
|
||||
private String departmentId;
|
||||
private String adoptCommentId;
|
||||
private String disease;
|
||||
private String detail;
|
||||
private String treatmentHospital;
|
||||
private String treatmentStartTime;
|
||||
private String treatmentEndTime;
|
||||
private String treatmentProcess;
|
||||
private String picture;
|
||||
private String releaseTime;
|
||||
private String adoptTime;
|
||||
private String amount;
|
||||
private String createTime;
|
||||
private String collectionNum;
|
||||
private String commentNum;
|
||||
private String id;
|
||||
}
|
|
@ -4,6 +4,8 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @BelongsProject: Medical_Treatment
|
||||
* @BelongsPackage: doctor.domain.vo
|
||||
|
@ -15,6 +17,7 @@ import lombok.NoArgsConstructor;
|
|||
@NoArgsConstructor
|
||||
public class DepartmentVo {
|
||||
|
||||
@NotNull(message = "id不能为空")
|
||||
private Integer id;
|
||||
private String departmentName;
|
||||
private String pic;
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package doctor.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName : UserDoctorFollowVo
|
||||
* @Description : 用户关注医生
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-16 22:20
|
||||
*/
|
||||
@Data
|
||||
public class UserDoctorFollowVo {
|
||||
private Integer id;
|
||||
private Integer doctorId;
|
||||
private String name;
|
||||
private String imagePic;
|
||||
private String jobTitle;
|
||||
private String inauguralHospital;
|
||||
private Integer departmentId;
|
||||
private String departmentName;
|
||||
private Integer praiseNum;
|
||||
private Integer badNum;
|
||||
private Integer number;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package doctor.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName : UserSickCircleVo
|
||||
* @Description : 患者朋友圈
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-16 22:04
|
||||
*/
|
||||
@Data
|
||||
public class UserSickCircleVo {
|
||||
private Integer sickCircleId;
|
||||
private String title;
|
||||
private String detail;
|
||||
private Integer amount;
|
||||
private Integer collectionNum;
|
||||
private Integer commentNum;
|
||||
private long releaseTime;
|
||||
}
|
|
@ -3,6 +3,11 @@ package doctor.domain.vo;
|
|||
import lombok.Data;
|
||||
import org.apache.catalina.User;
|
||||
|
||||
import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
/**
|
||||
* @BelongsProject: Medical_Treatment
|
||||
* @BelongsPackage: doctor.vo
|
||||
|
@ -11,15 +16,19 @@ import org.apache.catalina.User;
|
|||
*/
|
||||
@Data
|
||||
public class UserVo {
|
||||
@NotBlank(message = "密码不能为空")
|
||||
@Size(min = 4, message = "密码长度不能小于4")
|
||||
private String pwd;
|
||||
//邮箱
|
||||
|
||||
@NotBlank(message = "邮箱不能为空")
|
||||
@Email(message = "请输入有效的邮箱地址")
|
||||
private String email;
|
||||
//昵称
|
||||
|
||||
@NotBlank(message = "昵称不能为空")
|
||||
private String nickName;
|
||||
//验证码
|
||||
|
||||
@NotBlank(message = "验证码不能为空")
|
||||
@Pattern(regexp = "\\d{4}", message = "验证码必须是6位数字")
|
||||
private String code;
|
||||
|
||||
public static User toUser(UserVo userVo) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package doctor.mapper;
|
||||
|
||||
import doctor.domain.entity.UserSickCircleEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : UserSickCircleMapper
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-16 22:09
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserSickCircleMapper {
|
||||
List<UserSickCircleEntity> findUserSickCircleList();
|
||||
}
|
|
@ -35,5 +35,9 @@ public interface UserVideoMapper {
|
|||
|
||||
List<UserArchivesEntity> findUserArchives(@Param("userId") Integer userId);
|
||||
|
||||
void addUserArchives(UserArchivesDto userArchivesDto);
|
||||
void addUserArchives(UserArchivesEntity userArchivesEntity, @Param("userId") Integer userId);
|
||||
|
||||
void uploadUserArchivesImg(@Param("id") Integer id);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package doctor.service;
|
||||
|
||||
import doctor.domain.vo.UserSickCircleVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : UserSickCircleService
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-16 22:09
|
||||
*/
|
||||
public interface UserSickCircleService {
|
||||
|
||||
List<UserSickCircleVo> findMySickCircleList();
|
||||
}
|
|
@ -2,6 +2,7 @@ package doctor.service;
|
|||
|
||||
import doctor.domain.dto.UserArchivesDto;
|
||||
import doctor.domain.entity.UserAdoptCommentEntity;
|
||||
import doctor.domain.entity.UserArchivesEntity;
|
||||
import doctor.domain.entity.UserEntity;
|
||||
import doctor.domain.entity.UserWalletEntity;
|
||||
import doctor.domain.vo.*;
|
||||
|
@ -39,5 +40,8 @@ public interface UserVideoService {
|
|||
|
||||
List<UserArchivesVo> findUserArchives(Integer userId);
|
||||
|
||||
void addUserArchives(UserArchivesDto userArchivesDto);
|
||||
void addUserArchives(UserArchivesEntity userArchivesEntity, Integer userId);
|
||||
|
||||
void uploadUserArchivesImg(Integer id);
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package doctor.service.impl;
|
||||
|
||||
import doctor.domain.entity.UserSickCircleEntity;
|
||||
import doctor.domain.vo.UserSickCircleVo;
|
||||
import doctor.mapper.UserSickCircleMapper;
|
||||
import doctor.mapper.UserVideoMapper;
|
||||
import doctor.service.UserSickCircleService;
|
||||
import doctor.util.ConvertUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : UserSickCircleServiceImpl
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-16 22:10
|
||||
*/
|
||||
@Service
|
||||
public class UserSickCircleServiceImpl implements UserSickCircleService {
|
||||
@Autowired
|
||||
private UserSickCircleMapper userSickCircleMapper;
|
||||
@Override
|
||||
public List<UserSickCircleVo> findMySickCircleList() {
|
||||
List<UserSickCircleEntity> userSickCircleEntityList=userSickCircleMapper.findUserSickCircleList();
|
||||
List<UserSickCircleVo> userSickCircleVoList = ConvertUtil.entityToVoList(userSickCircleEntityList, UserSickCircleVo.class);
|
||||
return userSickCircleVoList;
|
||||
}
|
||||
}
|
|
@ -70,10 +70,17 @@ public class UserVideoServiceImpl implements UserVideoService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addUserArchives(UserArchivesDto userArchivesDto) {
|
||||
userVideoMapper.addUserArchives(userArchivesDto);
|
||||
public void addUserArchives(UserArchivesEntity userArchivesEntity,Integer userId) {
|
||||
userVideoMapper.addUserArchives(userArchivesEntity,userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadUserArchivesImg(Integer id) {
|
||||
userVideoMapper.uploadUserArchivesImg(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<UserVideoBuyVo> findUserVideoBuyList() {
|
||||
|
|
|
@ -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.UserSickCircleMapper">
|
||||
|
||||
<select id="findUserSickCircleList" resultType="doctor.domain.entity.UserSickCircleEntity">
|
||||
select *
|
||||
from user_sick_circle
|
||||
</select>
|
||||
</mapper>
|
|
@ -30,6 +30,11 @@ create_time
|
|||
now()
|
||||
);
|
||||
</insert>
|
||||
<update id="uploadUserArchivesImg">
|
||||
update user_archives
|
||||
set picture = #{picture}
|
||||
where id=#{id}
|
||||
</update>
|
||||
<delete id="cancelVideoCollection">
|
||||
delete
|
||||
from user_video_collection
|
||||
|
@ -70,4 +75,5 @@ create_time
|
|||
select *
|
||||
from user_archives where user_id=#{userId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
16
pom.xml
16
pom.xml
|
@ -206,6 +206,22 @@
|
|||
<version>${doctor.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
<version>2.7.18</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
<version>2.0.9</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
|
Loading…
Reference in New Issue