From 9d9d3aa146978c787b404ef68a131d54d5192144 Mon Sep 17 00:00:00 2001 From: chenbingxuan <3581044601@qq.com> Date: Thu, 11 Jan 2024 16:53:15 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=AE=8C=E7=BB=93?= =?UTF-8?q?=E6=92=92=E8=8A=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/api/RemoteDoctorService.java | 5 ++- .../java/doctor/system/api/domain/Doctor.java | 18 ++++---- .../java/doctor/system/api/domain/User.java | 14 +++--- .../factory/RemoteDoctorFallbackFactory.java | 45 +++++++------------ .../auth/service/HealthDoctorService.java | 5 +-- .../auth/service/HealthUserService.java | 14 +++++- .../controller/HealthLoginController.java | 2 +- .../service/impl/DoctorUserServiceImpl.java | 1 + 8 files changed, 52 insertions(+), 52 deletions(-) diff --git a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/RemoteDoctorService.java b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/RemoteDoctorService.java index 98eff03..06b7374 100644 --- a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/RemoteDoctorService.java +++ b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/RemoteDoctorService.java @@ -1,6 +1,7 @@ package doctor.system.api; import doctor.common.core.constant.ServiceNameConstants; +import doctor.common.core.domain.HealthR; import doctor.common.core.domain.R; import doctor.system.api.factory.RemoteDoctorFallbackFactory; import doctor.system.api.model.LoginUser; @@ -8,11 +9,11 @@ import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; -@FeignClient(contextId = "remoteDoctorService", value = ServiceNameConstants.FILE_DOCTOR, fallback = RemoteDoctorFallbackFactory.class) +@FeignClient(contextId = "remoteDoctorService", value = ServiceNameConstants.FILE_DOCTOR, fallbackFactory = RemoteDoctorFallbackFactory.class) public interface RemoteDoctorService { @PostMapping("/doctor/getDoctor") - public R getDoctorInfo(@RequestParam("email") String email); + public R getDoctorInfo(@RequestParam("email") String email); @PostMapping("/doctor/getUser") public R getUser(@RequestParam("email") String email); diff --git a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Doctor.java b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Doctor.java index 99c9769..e611f1b 100644 --- a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Doctor.java +++ b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Doctor.java @@ -12,7 +12,7 @@ public class Doctor { private String userName; private Integer reviewStatus; private String phone; - private String password; + private String pwd; private String name; private String imagePic; private String jobTitle; @@ -20,6 +20,10 @@ public class Doctor { private String personalProfile; private String goodField; + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date createTime; + private Department department; public Department getDepartment() { @@ -30,10 +34,6 @@ public class Doctor { this.department = department; } - @DateTimeFormat(pattern = "yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") - private Date createTime; - public Integer getId() { return id; } @@ -82,12 +82,12 @@ public class Doctor { this.phone = phone; } - public String getPassword() { - return password; + public String getPwd() { + return pwd; } - public void setPassword(String password) { - this.password = password; + public void setPwd(String password) { + this.pwd = password; } public String getName() { 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 c5fea58..4560243 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,7 +1,5 @@ package doctor.system.api.domain; -import java.security.Timestamp; - public class User { private int id; @@ -16,8 +14,8 @@ public class User { private int height; private int weight; private String invitationCode; - private Timestamp updateTime; - private Timestamp createTime; + private long updateTime; + private long createTime; public int getId() { return id; @@ -115,19 +113,19 @@ public class User { this.invitationCode = invitationCode; } - public Timestamp getUpdateTime() { + public long getUpdateTime() { return updateTime; } - public void setUpdateTime(Timestamp updateTime) { + public void setUpdateTime(long updateTime) { this.updateTime = updateTime; } - public Timestamp getCreateTime() { + public long getCreateTime() { return createTime; } - public void setCreateTime(Timestamp createTime) { + public void setCreateTime(long createTime) { this.createTime = createTime; } } diff --git a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/factory/RemoteDoctorFallbackFactory.java b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/factory/RemoteDoctorFallbackFactory.java index e9ac517..a3b6565 100644 --- a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/factory/RemoteDoctorFallbackFactory.java +++ b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/factory/RemoteDoctorFallbackFactory.java @@ -1,45 +1,34 @@ package doctor.system.api.factory; +import doctor.common.core.domain.HealthR; import doctor.common.core.domain.R; import doctor.system.api.RemoteDoctorService; import doctor.system.api.model.LoginUser; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.cloud.openfeign.FallbackFactory; import org.springframework.stereotype.Component; @Component -public class RemoteDoctorFallbackFactory implements RemoteDoctorService { +public class RemoteDoctorFallbackFactory implements FallbackFactory { private static final Logger log = LoggerFactory.getLogger(RemoteDoctorFallbackFactory.class); @Override - public R getDoctorInfo(String email) { - log.error("文件服务调用失败"); - return R.fail("登录超时"); - } + public RemoteDoctorService create(Throwable throwable) + { + log.error("文件服务调用失败:{}", throwable.getMessage()); + return new RemoteDoctorService() { + @Override + public R getDoctorInfo(String email) { + return R.fail("登录失败"); + } - @Override - public R getUser(String email) { - log.error("文件服务调用失败"); - return R.fail("登录超时"); - } + @Override + public R getUser(String email) { + return R.fail("登录失败"); + } -// @Override -// public RemoteDoctorService create(Throwable throwable) -// { -// log.error("文件服务调用失败:{}", throwable.getMessage()); -// return new RemoteDoctorService() { -// @Override -// public R getDoctorInfo(String email) { -// return R.fail("登录超时"); -// } -// -// @Override -// public R getUser(String email) { -// return R.fail("登录失败"); -// } -// -// -// }; -// } + }; + } } diff --git a/doctor-auth/src/main/java/doctor/auth/service/HealthDoctorService.java b/doctor-auth/src/main/java/doctor/auth/service/HealthDoctorService.java index eed8814..7d65188 100644 --- a/doctor-auth/src/main/java/doctor/auth/service/HealthDoctorService.java +++ b/doctor-auth/src/main/java/doctor/auth/service/HealthDoctorService.java @@ -3,7 +3,7 @@ package doctor.auth.service; import doctor.auth.util.RSAUtils; import doctor.auth.util.RsaKey; import doctor.auth.vo.DoctorVo; -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; @@ -12,7 +12,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.Map; -import java.util.UUID; @Component public class HealthDoctorService { @@ -31,7 +30,7 @@ public class HealthDoctorService { } catch (Exception e) { throw new RuntimeException(e); } - if (s.equals(data.getSysUser().getPassword())){ + if (s.equals(data.getDoctor().getPwd())){ Map token = tokenService.createToken(data); String accessToken = (String) token.get("access_token"); doctorVo.setSessionId(accessToken); 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 e087ba5..2f6f18b 100644 --- a/doctor-auth/src/main/java/doctor/auth/service/HealthUserService.java +++ b/doctor-auth/src/main/java/doctor/auth/service/HealthUserService.java @@ -3,6 +3,7 @@ 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; @@ -32,7 +33,7 @@ public class HealthUserService { } catch (Exception e) { throw new RuntimeException(e); } - if (s.equals(data.getSysUser().getPassword())){ + if (s.equals(data.getUser().getPwd())){ Map token = tokenService.createToken(data); String accessToken = (String) token.get("access_token"); doctorUserVo.setSessionId(accessToken); @@ -55,4 +56,15 @@ 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-modules/doctor-health/src/main/java/doctor/controller/HealthLoginController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthLoginController.java index ece2bf2..c63aa20 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 @@ -1,6 +1,7 @@ package doctor.controller; 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; @@ -12,7 +13,6 @@ import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/doctor") -@DS("master") public class HealthLoginController { @Autowired diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/DoctorUserServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/DoctorUserServiceImpl.java index a858c79..b26f8c5 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/DoctorUserServiceImpl.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/DoctorUserServiceImpl.java @@ -26,4 +26,5 @@ public class DoctorUserServiceImpl implements DoctorUserService { doctor.setDepartment(department); return doctor; } + } From 227ba63d995966d81327be27d1e6bd8c5f4df1ee Mon Sep 17 00:00:00 2001 From: fjj <–1066869486@qq.com> Date: Thu, 11 Jan 2024 22:26:52 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E5=90=88=E5=B9=B61?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/doctor/system/api/domain/Doctor.java | 10 +++++----- .../java/doctor/auth/service/HealthDoctorService.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Doctor.java b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Doctor.java index 99c9769..f97c181 100644 --- a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Doctor.java +++ b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Doctor.java @@ -12,7 +12,7 @@ public class Doctor { private String userName; private Integer reviewStatus; private String phone; - private String password; + private String pwd; private String name; private String imagePic; private String jobTitle; @@ -82,12 +82,12 @@ public class Doctor { this.phone = phone; } - public String getPassword() { - return password; + public String getPwd() { + return pwd; } - public void setPassword(String password) { - this.password = password; + public void setPwd(String pwd) { + this.pwd = pwd; } public String getName() { diff --git a/doctor-auth/src/main/java/doctor/auth/service/HealthDoctorService.java b/doctor-auth/src/main/java/doctor/auth/service/HealthDoctorService.java index eed8814..0494e68 100644 --- a/doctor-auth/src/main/java/doctor/auth/service/HealthDoctorService.java +++ b/doctor-auth/src/main/java/doctor/auth/service/HealthDoctorService.java @@ -31,7 +31,7 @@ public class HealthDoctorService { } catch (Exception e) { throw new RuntimeException(e); } - if (s.equals(data.getSysUser().getPassword())){ + if (s.equals(data.getDoctor().getPwd())){ Map token = tokenService.createToken(data); String accessToken = (String) token.get("access_token"); doctorVo.setSessionId(accessToken); From 2c072927275dad11c8915f5238ff4a4a2590b4c1 Mon Sep 17 00:00:00 2001 From: chenbingxuan <3581044601@qq.com> Date: Fri, 12 Jan 2024 10:58:34 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=AE=8C=E7=BB=93?= =?UTF-8?q?=E6=92=92=E8=8A=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/doctor/system/api/domain/User.java | 12 +++--- doctor-common/doctor-common-core/pom.xml | 9 +++++ .../annotation/EnableCustomSwagger2.java | 1 - .../controller/SysDoctorController.java | 40 ------------------- .../java/doctor/domain/dto/applyJoinDto.java | 17 ++++++++ .../doctor/service/IDoctorUserService.java | 8 ---- .../service/impl/IDoctorUserServiceImpl.java | 19 --------- 7 files changed, 32 insertions(+), 74 deletions(-) delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/controller/SysDoctorController.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/domain/dto/applyJoinDto.java delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/service/IDoctorUserService.java delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/service/impl/IDoctorUserServiceImpl.java 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 ec97663..4e977a2 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 @@ -20,8 +20,8 @@ public class User { private String headPic; private Integer sex; private Integer age; - private String height; - private String weight; + private Integer height; + private Integer weight; private String invitationCode; private Date updateTime; private Long createTime; @@ -98,19 +98,19 @@ public class User { this.age = age; } - public String getHeight() { + public Integer getHeight() { return height; } - public void setHeight(String height) { + public void setHeight(Integer height) { this.height = height; } - public String getWeight() { + public Integer getWeight() { return weight; } - public void setWeight(String weight) { + public void setWeight(Integer weight) { this.weight = weight; } diff --git a/doctor-common/doctor-common-core/pom.xml b/doctor-common/doctor-common-core/pom.xml index 32f7577..241f6c2 100644 --- a/doctor-common/doctor-common-core/pom.xml +++ b/doctor-common/doctor-common-core/pom.xml @@ -113,6 +113,15 @@ swagger-annotations + + + org.projectlombok + lombok + 1.18.30 + + + + diff --git a/doctor-common/doctor-common-swagger/src/main/java/doctor/common/swagger/annotation/EnableCustomSwagger2.java b/doctor-common/doctor-common-swagger/src/main/java/doctor/common/swagger/annotation/EnableCustomSwagger2.java index 2f87b3e..fda0bad 100644 --- a/doctor-common/doctor-common-swagger/src/main/java/doctor/common/swagger/annotation/EnableCustomSwagger2.java +++ b/doctor-common/doctor-common-swagger/src/main/java/doctor/common/swagger/annotation/EnableCustomSwagger2.java @@ -16,5 +16,4 @@ import doctor.common.swagger.config.SwaggerAutoConfiguration; @Import({ SwaggerAutoConfiguration.class }) public @interface EnableCustomSwagger2 { - } 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 deleted file mode 100644 index 746fd64..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/SysDoctorController.java +++ /dev/null @@ -1,40 +0,0 @@ -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/domain/dto/applyJoinDto.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/dto/applyJoinDto.java new file mode 100644 index 0000000..00ed866 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/dto/applyJoinDto.java @@ -0,0 +1,17 @@ +package doctor.domain.dto; + +import lombok.Data; + +@Data +public class applyJoinDto { + private String email; + private String code; + private String pwd1; + private String pwd2; + private String name; + private String inauguralHospital; + private Integer departmentId; + private Integer jobTitleId; + private String personalProfile; + private String goodFieId; +} 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 deleted file mode 100644 index b967765..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/IDoctorUserService.java +++ /dev/null @@ -1,8 +0,0 @@ -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/impl/IDoctorUserServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/IDoctorUserServiceImpl.java deleted file mode 100644 index 193c931..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/IDoctorUserServiceImpl.java +++ /dev/null @@ -1,19 +0,0 @@ -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; - } -} From a49d47c6ae7eb6472188b1ca5ef099d2a435d78e Mon Sep 17 00:00:00 2001 From: fjj <–1066869486@qq.com> Date: Fri, 12 Jan 2024 19:47:56 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=8E=A5=E5=8F=A31?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/doctor/ConvertUtil.java | 53 +++++++++ .../doctor/controller/InquiryController.java | 35 ++++++ .../controller/UserVideoController.java | 40 ++++--- .../doctor/controller/VideoController.java | 27 ++--- ...{DoctorUser.java => DoctorUserEntity.java} | 3 +- .../entity/InquiryDetailsRecordEntity.java | 106 ++++++++++++++++++ .../entity/{User.java => UserEntity.java} | 6 +- ...rVideoBuy.java => UserVideoBuyEntity.java} | 8 +- ...on.java => UserVideoCollectionEntity.java} | 13 +-- ...{UserWallet.java => UserWalletEntity.java} | 8 +- ...eoComment.java => VideoCommentEntity.java} | 6 +- ...{VideoCount.java => VideoCountEntity.java} | 6 +- .../entity/{Video.java => VideoEntity.java} | 12 +- .../domain/vo/InquiryDetailsRecordVo.java | 100 +++++++++++++++++ .../java/doctor/domain/vo/UserArchivesVo.java | 11 ++ .../java/doctor/domain/vo/UserVideoBuyVo.java | 64 +++++++++++ .../domain/vo/UserVideoCollectionVo.java | 91 +++++++++++++++ .../java/doctor/mapper/DoctorUserMapper.java | 3 +- .../java/doctor/mapper/InquiryMapper.java | 17 +++ .../java/doctor/mapper/UserVideoMapper.java | 12 +- .../main/java/doctor/mapper/VideoMapper.java | 17 ++- .../java/doctor/service/InquiryService.java | 15 +++ .../java/doctor/service/UserVideoService.java | 16 ++- .../java/doctor/service/VideoService.java | 6 +- .../service/impl/InquiryServiceImpl.java | 29 +++++ .../service/impl/UserVideoServiceImpl.java | 27 +++-- .../doctor/service/impl/VideoServiceImpl.java | 39 +++---- .../resources/mapper/doctor/InquiryMapper.xml | 12 ++ .../mapper/doctor/UserVideoMapper.xml | 10 +- .../resources/mapper/doctor/VideoMapper.xml | 19 +--- 30 files changed, 670 insertions(+), 141 deletions(-) create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/ConvertUtil.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/controller/InquiryController.java rename doctor-modules/doctor-health/src/main/java/doctor/domain/entity/{DoctorUser.java => DoctorUserEntity.java} (97%) create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/domain/entity/InquiryDetailsRecordEntity.java rename doctor-modules/doctor-health/src/main/java/doctor/domain/entity/{User.java => UserEntity.java} (96%) rename doctor-modules/doctor-health/src/main/java/doctor/domain/entity/{UserVideoBuy.java => UserVideoBuyEntity.java} (82%) rename doctor-modules/doctor-health/src/main/java/doctor/domain/entity/{UserVideoCollection.java => UserVideoCollectionEntity.java} (74%) rename doctor-modules/doctor-health/src/main/java/doctor/domain/entity/{UserWallet.java => UserWalletEntity.java} (89%) rename doctor-modules/doctor-health/src/main/java/doctor/domain/entity/{VideoComment.java => VideoCommentEntity.java} (89%) rename doctor-modules/doctor-health/src/main/java/doctor/domain/entity/{VideoCount.java => VideoCountEntity.java} (91%) rename doctor-modules/doctor-health/src/main/java/doctor/domain/entity/{Video.java => VideoEntity.java} (86%) create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/domain/vo/InquiryDetailsRecordVo.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserArchivesVo.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserVideoBuyVo.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserVideoCollectionVo.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/mapper/InquiryMapper.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/service/InquiryService.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/service/impl/InquiryServiceImpl.java create mode 100644 doctor-modules/doctor-health/src/main/resources/mapper/doctor/InquiryMapper.xml diff --git a/doctor-modules/doctor-health/src/main/java/doctor/ConvertUtil.java b/doctor-modules/doctor-health/src/main/java/doctor/ConvertUtil.java new file mode 100644 index 0000000..e0d53da --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/ConvertUtil.java @@ -0,0 +1,53 @@ +package doctor; + +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/java/doctor/controller/InquiryController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/InquiryController.java new file mode 100644 index 0000000..814704b --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/InquiryController.java @@ -0,0 +1,35 @@ +package doctor.controller; + +import doctor.common.core.domain.HealthR; +import doctor.domain.vo.InquiryDetailsRecordVo; +import doctor.service.InquiryService; +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 : InquiryController + * @Description : 问诊 + * @Author : FJJ + * @Date: 2024-01-12 19:09 + */ +@RestController +@RequestMapping("/user/inquiry/verify/v1") +public class InquiryController { + @Autowired + private InquiryService inquiryService; + //历史问诊记录列表 + @GetMapping("/findHistoryInquiryRecord") + public HealthR> findHistoryInquiryRecord(@RequestParam Integer page,@RequestParam Integer count){ + startPage(page,count); + List inquiryDetailsRecordVoList = inquiryService.findHistoryInquiryRecord(); + return HealthR.ok(inquiryDetailsRecordVoList); + } + +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java index 410f514..436d7fe 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java @@ -1,15 +1,21 @@ package doctor.controller; +import doctor.common.core.domain.HealthR; import doctor.common.core.domain.R; -import doctor.domain.entity.UserVideoBuy; -import doctor.domain.entity.UserVideoCollection; -import doctor.domain.entity.UserWallet; +import doctor.domain.entity.UserVideoBuyEntity; +import doctor.domain.entity.UserVideoCollectionEntity; +import doctor.domain.entity.UserWalletEntity; +import doctor.domain.vo.UserVideoBuyVo; +import doctor.domain.vo.UserVideoCollectionVo; import doctor.service.UserVideoService; 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; + + /** * @ClassName : UserVideoController * @Description : 用户视频 @@ -24,34 +30,36 @@ public class UserVideoController { //用户视频收藏列表 @GetMapping("/findVideoCollectionList") - public R>findVideoCollectionList(){ - List userVideoCollectionList =userVideoService.findVideoCollectionList(); - return R.ok(userVideoCollectionList); + public HealthR> findVideoCollectionList(@RequestParam Integer page,@RequestParam Integer count){ + startPage(page,count); + List userVideoCollectionVos=userVideoService.findVideoCollectionList(); + return HealthR.ok(userVideoCollectionVos); } //用户取消视频收藏 @GetMapping("/cancelVideoCollection/{id}") - public R cancelVideoCollection(@PathVariable Integer id){ + public HealthR cancelVideoCollection(@PathVariable Integer id){ userVideoService.cancelVideoCollection(id); - return R.ok(); + return HealthR.ok(); } //用户购买视频列表 @GetMapping("/findUserVideoBuyList") - public R>findUserVideoBuyList(){ - List userVideoBuys =userVideoService.findUserVideoBuyList(); - return R.ok(userVideoBuys); + public HealthR>findUserVideoBuyList(@RequestParam Integer page, @RequestParam Integer count){ + startPage(page,count); + List userVideoCollectionVos =userVideoService.findUserVideoBuyList(); + return HealthR.ok(userVideoCollectionVos); } //用户删除购买的视频 @DeleteMapping("/deleteVideoBuy/{id}") - public R deleteVideoBuy(@PathVariable Integer id){ + public HealthR deleteVideoBuy(@PathVariable Integer id){ userVideoService.deleteVideoBuy(id); - return R.ok(); + return HealthR.ok(); } //我的钱包 @GetMapping("/findUserWallet") - public R> findUserWallet(){ - List userWallets = userVideoService.findUserWallet(); - return R.ok(userWallets); + public HealthR> findUserWallet(){ + List userWallets = userVideoService.findUserWallet(); + return HealthR.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 index 4cc9573..fd029d0 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/VideoController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/VideoController.java @@ -1,5 +1,6 @@ package doctor.controller; +import doctor.common.core.domain.HealthR; import doctor.common.core.domain.R; import doctor.domain.entity.*; import doctor.service.VideoService; @@ -20,22 +21,22 @@ 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/addUserVideoCollection/{videoId}") + public HealthR addUserVideoCollection(@RequestParam Integer videoId){ + videoService.addUserVideoCollection(videoId); + return HealthR.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); + public HealthR videoBuy(@RequestParam Integer videoId, @RequestParam Integer price){ + videoService.videoBuy(videoId,price); + return HealthR.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/entity/DoctorUser.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorUserEntity.java similarity index 97% rename from doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorUser.java rename to doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorUserEntity.java index ee7dfe0..0fbc91a 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorUser.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorUserEntity.java @@ -1,9 +1,8 @@ package doctor.domain.entity; -import java.security.Timestamp; import java.util.Date; -public class DoctorUser { +public class DoctorUserEntity { private int id; private String phone; diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/InquiryDetailsRecordEntity.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/InquiryDetailsRecordEntity.java new file mode 100644 index 0000000..b4e379a --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/InquiryDetailsRecordEntity.java @@ -0,0 +1,106 @@ +package doctor.domain.entity; + +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * @ClassName : InquiryDetailsRecordEntity + * @Description : 查询详情记录表 + * @Author : FJJ + * @Date: 2024-01-12 17:26 + */ +public class InquiryDetailsRecordEntity { + private Integer id; + private Integer inquiryId; + private Integer userId; + private Integer friendId; + private String askContent; + private String askImage; + private String voiceChat; + private Integer direction; + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date askTime; + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getInquiryId() { + return inquiryId; + } + + public void setInquiryId(Integer inquiryId) { + this.inquiryId = inquiryId; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public Integer getFriendId() { + return friendId; + } + + public void setFriendId(Integer friendId) { + this.friendId = friendId; + } + + public String getAskContent() { + return askContent; + } + + public void setAskContent(String askContent) { + this.askContent = askContent; + } + + public String getAskImage() { + return askImage; + } + + public void setAskImage(String askImage) { + this.askImage = askImage; + } + + public String getVoiceChat() { + return voiceChat; + } + + public void setVoiceChat(String voiceChat) { + this.voiceChat = voiceChat; + } + + public Integer getDirection() { + return direction; + } + + public void setDirection(Integer direction) { + this.direction = direction; + } + + public Date getAskTime() { + return askTime; + } + + public void setAskTime(Date askTime) { + this.askTime = askTime; + } + + 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/UserEntity.java similarity index 96% rename from doctor-modules/doctor-health/src/main/java/doctor/domain/entity/User.java rename to doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserEntity.java index 6f0f2cb..b4974f0 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/User.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserEntity.java @@ -1,16 +1,14 @@ package doctor.domain.entity; -import org.springframework.format.annotation.DateTimeFormat; - import java.util.Date; /** - * @ClassName : User + * @ClassName : UserEntity * @Description : 用户表 * @Author : FJJ * @Date: 2024-01-10 20:46 */ -public class User { +public class UserEntity { private Integer id; private String phone; private String pwd; 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/UserVideoBuyEntity.java similarity index 82% rename from doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoBuy.java rename to doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoBuyEntity.java index 5903ee7..d6e4cf0 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoBuy.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoBuyEntity.java @@ -1,12 +1,12 @@ package doctor.domain.entity; /** - * @ClassName : UserVideoBuy + * @ClassName : UserVideoBuyEntity * @Description : 用户购买视频表 * @Author : FJJ * @Date: 2024-01-10 15:20 */ -public class UserVideoBuy { +public class UserVideoBuyEntity { private Integer id; private Integer userId; private Integer videoId; @@ -44,13 +44,13 @@ public class UserVideoBuy { this.createTime = createTime; } - public UserVideoBuy(Integer id, Integer userId, Integer videoId, Long createTime) { + public UserVideoBuyEntity(Integer id, Integer userId, Integer videoId, Long createTime) { this.id = id; this.userId = userId; this.videoId = videoId; this.createTime = createTime; } - public UserVideoBuy() { + public UserVideoBuyEntity() { } } 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/UserVideoCollectionEntity.java similarity index 74% rename from doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollection.java rename to doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollectionEntity.java index b9ab680..063f7c6 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollection.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollectionEntity.java @@ -1,18 +1,13 @@ package doctor.domain.entity; -import io.swagger.models.auth.In; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; - /** - * @ClassName : UserVideoCollection + * @ClassName : UserVideoCollectionEntity * @Description : 用户视频收藏表 * @Author : FJJ * @Date: 2024-01-10 14:28 */ -public class UserVideoCollection { +public class UserVideoCollectionEntity { private Integer id; private Integer userId; private Integer videoId; @@ -50,13 +45,13 @@ public class UserVideoCollection { this.createTime = createTime; } - public UserVideoCollection(Integer id, Integer userId, Integer videoId, Long createTime) { + public UserVideoCollectionEntity(Integer id, Integer userId, Integer videoId, Long createTime) { this.id = id; this.userId = userId; this.videoId = videoId; this.createTime = createTime; } - public UserVideoCollection() { + public UserVideoCollectionEntity() { } } 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/UserWalletEntity.java similarity index 89% rename from doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserWallet.java rename to doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserWalletEntity.java index 1da779d..978e108 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserWallet.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserWalletEntity.java @@ -1,16 +1,12 @@ package doctor.domain.entity; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; - /** - * @ClassName : UserWallet + * @ClassName : UserWalletEntity * @Description : 用户钱包 * @Author : FJJ * @Date: 2024-01-10 20:30 */ -public class UserWallet { +public class UserWalletEntity { private Integer id; private Integer userId; private Integer balance; 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/VideoCommentEntity.java similarity index 89% rename from doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoComment.java rename to doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCommentEntity.java index 84db8bf..9ab5ec2 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoComment.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCommentEntity.java @@ -1,16 +1,14 @@ package doctor.domain.entity; -import org.springframework.format.annotation.DateTimeFormat; - import java.util.Date; /** - * @ClassName : VideoComment + * @ClassName : VideoCommentEntity * @Description : 评论表 * @Author : FJJ * @Date: 2024-01-10 21:54 */ -public class VideoComment { +public class VideoCommentEntity { private Integer id; private Integer userId; 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/VideoCountEntity.java similarity index 91% rename from doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCount.java rename to doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCountEntity.java index c2e626c..af8087e 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCount.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoCountEntity.java @@ -1,16 +1,14 @@ package doctor.domain.entity; -import org.springframework.format.annotation.DateTimeFormat; - import java.util.Date; /** - * @ClassName : VideoCount + * @ClassName : VideoCountEntity * @Description : 视频数 * @Author : FJJ * @Date: 2024-01-10 16:24 */ -public class VideoCount { +public class VideoCountEntity { private Integer id; private Integer videoId; private Integer buyNum; 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/VideoEntity.java similarity index 86% rename from doctor-modules/doctor-health/src/main/java/doctor/domain/entity/Video.java rename to doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoEntity.java index a09e715..4668148 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/Video.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/VideoEntity.java @@ -1,16 +1,12 @@ package doctor.domain.entity; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; - /** - * @ClassName : Video + * @ClassName : VideoEntity * @Description : 健康课堂视频表 * @Author : FJJ * @Date: 2024-01-10 15:59 */ -public class Video { +public class VideoEntity { private Integer id; private String title; private Integer categoryId; @@ -93,7 +89,7 @@ public class Video { this.createTime = createTime; } - public Video(Integer id, String title, Integer categoryId, String shearUrl, String abstracts, String originalUrl, Integer duration, Integer price, Long createTime) { + public VideoEntity(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; @@ -105,6 +101,6 @@ public class Video { this.createTime = createTime; } - public Video() { + public VideoEntity() { } } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/InquiryDetailsRecordVo.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/InquiryDetailsRecordVo.java new file mode 100644 index 0000000..a51a641 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/InquiryDetailsRecordVo.java @@ -0,0 +1,100 @@ +package doctor.domain.vo; + +/** + * @ClassName : InquiryDetailsRecordVo + * @Description : 历史问诊记录 + * @Author : FJJ + * @Date: 2024-01-12 19:02 + */ +public class InquiryDetailsRecordVo { + private Integer recordId; + private Integer doctorId; + private String imagePic; + private String doctorName; + private String department; + private String jobTitle; + private Integer evaluateStatus; + private String userName; + private String jiGuangPwd; + private Long inquiryTime; + + public Integer getRecordId() { + return recordId; + } + + public void setRecordId(Integer recordId) { + this.recordId = recordId; + } + + public Integer getDoctorId() { + return doctorId; + } + + public void setDoctorId(Integer doctorId) { + this.doctorId = doctorId; + } + + public String getImagePic() { + return imagePic; + } + + public void setImagePic(String imagePic) { + this.imagePic = imagePic; + } + + public String getDoctorName() { + return doctorName; + } + + public void setDoctorName(String doctorName) { + this.doctorName = doctorName; + } + + public String getDepartment() { + return department; + } + + public void setDepartment(String department) { + this.department = department; + } + + public String getJobTitle() { + return jobTitle; + } + + public void setJobTitle(String jobTitle) { + this.jobTitle = jobTitle; + } + + public Integer getEvaluateStatus() { + return evaluateStatus; + } + + public void setEvaluateStatus(Integer evaluateStatus) { + this.evaluateStatus = evaluateStatus; + } + + 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 Long getInquiryTime() { + return inquiryTime; + } + + public void setInquiryTime(Long inquiryTime) { + this.inquiryTime = inquiryTime; + } +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserArchivesVo.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserArchivesVo.java new file mode 100644 index 0000000..2605ce7 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserArchivesVo.java @@ -0,0 +1,11 @@ +package doctor.domain.vo; + +/** + * @ClassName : UserArchivesVo + * @Description : 历史问诊 + * @Author : FJJ + * @Date: 2024-01-12 18:52 + */ +public class UserArchivesVo { + private Integer recordId; +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserVideoBuyVo.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserVideoBuyVo.java new file mode 100644 index 0000000..54352d4 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserVideoBuyVo.java @@ -0,0 +1,64 @@ +package doctor.domain.vo; + +/** + * @ClassName : UserVideoBuyVo + * @Description : 购买视频表 + * @Author : FJJ + * @Date: 2024-01-12 16:37 + */ +public class UserVideoBuyVo { + private Integer id; + private Integer videoId; + private String title; + private String original; + private Integer duration; + private Long 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 String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getOriginal() { + return original; + } + + public void setOriginal(String original) { + this.original = original; + } + + public Integer getDuration() { + return duration; + } + + public void setDuration(Integer duration) { + this.duration = duration; + } + + 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/vo/UserVideoCollectionVo.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserVideoCollectionVo.java new file mode 100644 index 0000000..784595e --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserVideoCollectionVo.java @@ -0,0 +1,91 @@ +package doctor.domain.vo; + +/** + * @ClassName : UserVideoCollectionVo + * @Description : 用户视频收藏表 + * @Author : FJJ + * @Date: 2024-01-12 16:11 + */ +public class UserVideoCollectionVo { + private Integer id; + private String title; + private String shearUrl; + private String original; + private Integer price; + private Integer duration; + private Integer whetherBuy; + private Integer buyNum; + private Long createTime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getShearUrl() { + return shearUrl; + } + + public void setShearUrl(String shearUrl) { + this.shearUrl = shearUrl; + } + + public String getOriginal() { + return original; + } + + public void setOriginal(String original) { + this.original = original; + } + + public Integer getPrice() { + return price; + } + + public void setPrice(Integer price) { + this.price = price; + } + + public Integer getDuration() { + return duration; + } + + public void setDuration(Integer duration) { + this.duration = duration; + } + + public Integer getWhetherBuy() { + return whetherBuy; + } + + public void setWhetherBuy(Integer whetherBuy) { + this.whetherBuy = whetherBuy; + } + + public Integer getBuyNum() { + return buyNum; + } + + public void setBuyNum(Integer buyNum) { + this.buyNum = buyNum; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/mapper/DoctorUserMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/DoctorUserMapper.java index 74c9d21..0ec23f4 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/mapper/DoctorUserMapper.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/DoctorUserMapper.java @@ -3,10 +3,11 @@ package doctor.mapper; import doctor.system.api.domain.Department; import doctor.system.api.domain.Doctor; import doctor.system.api.domain.User; +import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.mybatis.spring.annotation.MapperScan; -@MapperScan +@Mapper public interface DoctorUserMapper { User selectUserByEmail(@Param("email") String email); diff --git a/doctor-modules/doctor-health/src/main/java/doctor/mapper/InquiryMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/InquiryMapper.java new file mode 100644 index 0000000..081f354 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/InquiryMapper.java @@ -0,0 +1,17 @@ +package doctor.mapper; + +import doctor.domain.entity.InquiryDetailsRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @ClassName : InquiryMapper + * @Description : + * @Author : FJJ + * @Date: 2024-01-12 19:18 + */ +@Mapper +public interface InquiryMapper { + List findHistoryInquiryRecord(); +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java index 32bb5d3..a71cd12 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java @@ -1,8 +1,8 @@ package doctor.mapper; -import doctor.domain.entity.UserVideoBuy; -import doctor.domain.entity.UserVideoCollection; -import doctor.domain.entity.UserWallet; +import doctor.domain.entity.UserVideoBuyEntity; +import doctor.domain.entity.UserVideoCollectionEntity; +import doctor.domain.entity.UserWalletEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -16,13 +16,13 @@ import java.util.List; */ @Mapper public interface UserVideoMapper { - List findVideoCollectionList(); + List findVideoCollectionList(); void cancelVideoCollection(@Param("id") Integer id); - List findUserVideoBuyList(); + List findUserVideoBuyList(); void deleteVideoBuy(@Param("id") Integer id); - List findUserWallet(); + 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 index 6c886cb..3d235d7 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/mapper/VideoMapper.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/VideoMapper.java @@ -16,24 +16,23 @@ import java.util.List; public interface VideoMapper { - void addUserVideoCollection(UserVideoCollection userVideoCollection); + void addUserVideoCollection(@Param("userId") Integer userId, @Param("videoId") Integer videoId); - Video findById(@Param("videoId") Integer videoId); + VideoEntity findById(@Param("videoId") Integer videoId); - VideoCount FindVideoId(@Param("id") Integer id); + VideoCountEntity FindVideoId(@Param("id") Integer id); - void updateVideoCount(VideoCount videoCount); + void updateVideoCount(VideoCountEntity videoCount); - User FindById(@Param("userId") Integer userId); + UserEntity FindById(@Param("userId") Integer userId); - UserWallet FindUserWallet(@Param("id") Integer id); + UserWalletEntity 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); + +// UserWalletEntity FindById(@Param("userId") Integer userId); } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/InquiryService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/InquiryService.java new file mode 100644 index 0000000..41e58c6 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/InquiryService.java @@ -0,0 +1,15 @@ +package doctor.service; + +import doctor.domain.vo.InquiryDetailsRecordVo; + +import java.util.List; + +/** + * @ClassName : InquiryService + * @Description : + * @Author : FJJ + * @Date: 2024-01-12 19:18 + */ +public interface InquiryService { + List findHistoryInquiryRecord(); +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java index b024c7e..c9a8fb7 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java @@ -1,8 +1,10 @@ package doctor.service; -import doctor.domain.entity.UserVideoBuy; -import doctor.domain.entity.UserVideoCollection; -import doctor.domain.entity.UserWallet; +import doctor.domain.entity.UserVideoBuyEntity; +import doctor.domain.entity.UserVideoCollectionEntity; +import doctor.domain.entity.UserWalletEntity; +import doctor.domain.vo.UserVideoBuyVo; +import doctor.domain.vo.UserVideoCollectionVo; import java.util.List; @@ -13,13 +15,15 @@ import java.util.List; * @Date: 2024-01-10 14:33 */ public interface UserVideoService { - List findVideoCollectionList(); + void cancelVideoCollection(Integer id); - List findUserVideoBuyList(); + List findUserVideoBuyList(); void deleteVideoBuy(Integer id); - List findUserWallet(); + List findUserWallet(); + + List findVideoCollectionList(); } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/VideoService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/VideoService.java index bab5ee1..1892009 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/VideoService.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/VideoService.java @@ -12,10 +12,10 @@ import java.util.List; */ public interface VideoService { - void addUserVideoCollection(UserVideoCollection userVideoCollection); + void addUserVideoCollection(Integer videoId); - void videoBuy(UserVideoBuy userVideoBuy); + void videoBuy(Integer videoId,Integer price); + - List findVideoCommentList(); } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/InquiryServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/InquiryServiceImpl.java new file mode 100644 index 0000000..f0ba559 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/InquiryServiceImpl.java @@ -0,0 +1,29 @@ +package doctor.service.impl; + +import doctor.ConvertUtil; +import doctor.domain.entity.InquiryDetailsRecordEntity; +import doctor.domain.vo.InquiryDetailsRecordVo; +import doctor.mapper.InquiryMapper; +import doctor.service.InquiryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @ClassName : InquiryServiceImpl + * @Description : + * @Author : FJJ + * @Date: 2024-01-12 19:19 + */ +@Service +public class InquiryServiceImpl implements InquiryService { + @Autowired + private InquiryMapper inquiryMapper; + @Override + public List findHistoryInquiryRecord() { + List inquiryDetailsRecordEntity = inquiryMapper.findHistoryInquiryRecord(); + List inquiryDetailsRecordVos = ConvertUtil.entityToVoList(inquiryDetailsRecordEntity, InquiryDetailsRecordVo.class); + return inquiryDetailsRecordVos; + } +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java index 74708ca..efd4466 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java @@ -1,8 +1,11 @@ package doctor.service.impl; -import doctor.domain.entity.UserVideoBuy; -import doctor.domain.entity.UserVideoCollection; -import doctor.domain.entity.UserWallet; +import doctor.ConvertUtil; +import doctor.domain.entity.UserVideoBuyEntity; +import doctor.domain.entity.UserVideoCollectionEntity; +import doctor.domain.entity.UserWalletEntity; +import doctor.domain.vo.UserVideoBuyVo; +import doctor.domain.vo.UserVideoCollectionVo; import doctor.mapper.UserVideoMapper; import doctor.service.UserVideoService; import org.springframework.beans.factory.annotation.Autowired; @@ -20,9 +23,13 @@ import java.util.List; public class UserVideoServiceImpl implements UserVideoService { @Autowired private UserVideoMapper userVideoMapper; + + @Override - public List findVideoCollectionList() { - return userVideoMapper.findVideoCollectionList(); + public List findVideoCollectionList() { + List userVideoCollectionEntityList=userVideoMapper.findVideoCollectionList(); + List userVideoCollectionVoList = ConvertUtil.entityToVoList(userVideoCollectionEntityList, UserVideoCollectionVo.class); + return userVideoCollectionVoList; } @Override @@ -31,8 +38,10 @@ public class UserVideoServiceImpl implements UserVideoService { } @Override - public List findUserVideoBuyList() { - return userVideoMapper.findUserVideoBuyList(); + public List findUserVideoBuyList() { + List userVideoCollectionEntityList=userVideoMapper.findUserVideoBuyList(); + List userVideoBuyList = ConvertUtil.entityToVoList(userVideoCollectionEntityList, UserVideoBuyVo.class); + return userVideoBuyList; } @Override @@ -41,7 +50,9 @@ public class UserVideoServiceImpl implements UserVideoService { } @Override - public List findUserWallet() { + 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 index 1c45fe1..c559e88 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/VideoServiceImpl.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/VideoServiceImpl.java @@ -1,11 +1,13 @@ package doctor.service.impl; +import doctor.common.core.utils.JwtUtils; 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 javax.servlet.http.HttpServletRequest; import java.util.List; /** @@ -18,39 +20,38 @@ import java.util.List; public class VideoServiceImpl implements VideoService { @Autowired private VideoMapper videoMapper; - + @Autowired + private HttpServletRequest request; @Override - public void addUserVideoCollection(UserVideoCollection userVideoCollection) { + public void addUserVideoCollection(Integer videoId) { + //获取用户id + String token = request.getHeader("token"); + Integer userId = Integer.valueOf(JwtUtils.getUserId(token)); // 添加收藏 - videoMapper.addUserVideoCollection(userVideoCollection); + videoMapper.addUserVideoCollection(userId,videoId); // 更新视频收藏数 - Video video = videoMapper.findById(userVideoCollection.getVideoId()); - VideoCount videoCount = videoMapper.FindVideoId(video.getId()); + VideoEntity video = videoMapper.findById(videoId); + VideoCountEntity videoCount = videoMapper.FindVideoId(video.getId()); videoMapper.updateVideoCount(videoCount); } @Override - public void videoBuy(UserVideoBuy userVideoBuy) { + public void videoBuy(Integer videoId,Integer price) { + //获取用户id + String token = request.getHeader("token"); + Integer userId = Integer.valueOf(JwtUtils.getUserId(token)); //查询用户信息 - User user = videoMapper.FindById(userVideoBuy.getUserId()); - //查询视频信息 - Video video = videoMapper.findByVideoId(userVideoBuy.getVideoId()); + UserEntity user = videoMapper.FindById(userId); //查询用户钱包 - UserWallet userWallet = videoMapper.FindUserWallet(user.getId()); + UserWalletEntity userWallet = videoMapper.FindUserWallet(user.getId()); //判断用户钱包是否足够 - if (userWallet.getBalance() >= video.getPrice()) { + if (userWallet.getBalance() >= price) { //更新用户钱包 - int newblance=userWallet.getBalance() - video.getPrice(); + int newblance = userWallet.getBalance() -price; //更新用户钱包 - videoMapper.updateUserWallet(newblance,userWallet.getId()); + videoMapper.updateUserWallet(newblance, userWallet.getId()); } - - } - @Override - public List findVideoCommentList() { - return videoMapper.findVideoCommentList(); - } } diff --git a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/InquiryMapper.xml b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/InquiryMapper.xml new file mode 100644 index 0000000..0da48d0 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/InquiryMapper.xml @@ -0,0 +1,12 @@ + + + + + + + diff --git a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml index cb586ad..2201c0c 100644 --- a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml +++ b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml @@ -6,22 +6,22 @@ delete from user_video_collection - where id = #{id} + where video_id = #{id} delete from user_video_buy - where id = #{id} + where video_id = #{id} - select * from user_video_collection - select * from user_video_buy - select * from user_wallet 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 index 7903f85..21fd79e 100644 --- a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/VideoMapper.xml +++ b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/VideoMapper.xml @@ -24,38 +24,29 @@ where id=#{id} - SELECT user_video_collection.* FROM user_video_collection LEFT JOIN video ON user_video_collection.video_id = video.id WHERE video.id = #{videoId} - select * from video_count where id = #{id} - SELECT user.* FROM user_video_buy LEFT JOIN user ON user.id = user_video_buy.user_id WHERE user_video_buy.user_id = #{userId} - SELECT user.* FROM user_wallet LEFT JOIN user ON user.id = user_wallet.user_id WHERE user_wallet.user_id==#{id} - - + From 33d722d0b27493379a78cfd9d2d1a49007ece06e Mon Sep 17 00:00:00 2001 From: fjj <–1066869486@qq.com> Date: Fri, 12 Jan 2024 21:31:39 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=8E=A5=E5=8F=A32?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/SickCircleCommentEntity.java | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/domain/entity/SickCircleCommentEntity.java diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/SickCircleCommentEntity.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/SickCircleCommentEntity.java new file mode 100644 index 0000000..e7f67e7 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/SickCircleCommentEntity.java @@ -0,0 +1,75 @@ +package doctor.domain.entity; + +import java.util.Date; + +/** + * @ClassName : SickCircleCommentEntity + * @Description : 病友圈评论表 + * @Author : FJJ + * @Date: 2024-01-12 19:57 + */ +public class SickCircleCommentEntity { + private Integer id; + private Integer sickCircleId; + private Integer userId; + private String content; + private Date commentTime; + private Integer whetherDoctor; + private Long createTime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getSickCircleId() { + return sickCircleId; + } + + public void setSickCircleId(Integer sickCircleId) { + this.sickCircleId = sickCircleId; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Date getCommentTime() { + return commentTime; + } + + public void setCommentTime(Date commentTime) { + this.commentTime = commentTime; + } + + public Integer getWhetherDoctor() { + return whetherDoctor; + } + + public void setWhetherDoctor(Integer whetherDoctor) { + this.whetherDoctor = whetherDoctor; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } +} From bb50f5a2b9a9588f19fd689481e786fa4c9fca61 Mon Sep 17 00:00:00 2001 From: chenbingxuan <3581044601@qq.com> Date: Fri, 12 Jan 2024 21:47:55 +0800 Subject: [PATCH 06/18] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=85=A5=E9=A9=BB?= =?UTF-8?q?=E5=AE=8C=E7=BB=93=E6=92=92=E8=8A=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doctor-auth/src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- doctor-modules/doctor-health/pom.xml | 5 + .../HealthDepartmentController.java | 25 ++++ .../controller/HealthJobTitleController.java | 35 +++++ .../controller/UserVideoController.java | 18 +-- .../doctor/controller/VideoController.java | 4 +- .../{applyJoinDto.java => ApplyJoinDto.java} | 2 +- .../domain/entity/DepartmentEntity.java | 20 +++ .../domain/entity/DoctorJobTitleEntity.java | 18 +++ ...{DoctorUser.java => DoctorUserEntity.java} | 3 +- .../entity/{User.java => UserEntity.java} | 4 +- ...rVideoBuy.java => UserVideoBuyEntity.java} | 6 +- ...on.java => UserVideoCollectionEntity.java} | 11 +- ...{UserWallet.java => UserWalletEntity.java} | 6 +- .../main/java/doctor/domain/entity/Video.java | 88 +----------- .../doctor/mapper/HealthDepartmentMapper.java | 12 ++ .../doctor/mapper/HealthJobTitleMapper.java | 14 ++ .../java/doctor/mapper/IDoctorUserMapper.java | 10 -- .../java/doctor/mapper/UserVideoMapper.java | 12 +- .../main/java/doctor/mapper/VideoMapper.java | 6 +- .../service/HealthDepartmentService.java | 10 ++ .../doctor/service/HealthJobTitleService.java | 15 ++ .../java/doctor/service/UserVideoService.java | 12 +- .../java/doctor/service/VideoService.java | 4 +- .../impl/HealthDepartmentServiceImpl.java | 20 +++ .../impl/HealthJobTitleServiceImpl.java | 86 +++++++++++ .../service/impl/UserVideoServiceImpl.java | 12 +- .../doctor/service/impl/VideoServiceImpl.java | 8 +- .../src/main/java/doctor/util/RSAUtils.java | 133 ++++++++++++++++++ .../src/main/java/doctor/util/RsaKey.java | 20 +++ .../src/main/java/doctor/util/SendEmail.java | 26 ++++ .../src/main/resources/bootstrap.yml | 15 +- .../mapper/doctor/HealthDepartmentMapper.xml | 11 ++ .../mapper/doctor/HealthJobTitleMapper.xml | 16 +++ .../{ => doctor}/HealthUserVideoMapper.xml | 0 .../doctor/IDoctorUserServiceMapper.xml | 11 -- .../mapper/doctor/UserVideoMapper.xml | 6 +- .../resources/mapper/doctor/VideoMapper.xml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- 44 files changed, 548 insertions(+), 188 deletions(-) create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/controller/HealthDepartmentController.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/controller/HealthJobTitleController.java rename doctor-modules/doctor-health/src/main/java/doctor/domain/dto/{applyJoinDto.java => ApplyJoinDto.java} (92%) create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DepartmentEntity.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorJobTitleEntity.java rename doctor-modules/doctor-health/src/main/java/doctor/domain/entity/{DoctorUser.java => DoctorUserEntity.java} (97%) rename doctor-modules/doctor-health/src/main/java/doctor/domain/entity/{User.java => UserEntity.java} (96%) rename doctor-modules/doctor-health/src/main/java/doctor/domain/entity/{UserVideoBuy.java => UserVideoBuyEntity.java} (85%) rename doctor-modules/doctor-health/src/main/java/doctor/domain/entity/{UserVideoCollection.java => UserVideoCollectionEntity.java} (77%) rename doctor-modules/doctor-health/src/main/java/doctor/domain/entity/{UserWallet.java => UserWalletEntity.java} (91%) create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthDepartmentMapper.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthJobTitleMapper.java delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/mapper/IDoctorUserMapper.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/service/HealthDepartmentService.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/service/HealthJobTitleService.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthDepartmentServiceImpl.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthJobTitleServiceImpl.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/util/RSAUtils.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/util/RsaKey.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/util/SendEmail.java create mode 100644 doctor-modules/doctor-health/src/main/resources/mapper/doctor/HealthDepartmentMapper.xml create mode 100644 doctor-modules/doctor-health/src/main/resources/mapper/doctor/HealthJobTitleMapper.xml rename doctor-modules/doctor-health/src/main/resources/mapper/{ => doctor}/HealthUserVideoMapper.xml (100%) delete mode 100644 doctor-modules/doctor-health/src/main/resources/mapper/doctor/IDoctorUserServiceMapper.xml diff --git a/doctor-auth/src/main/resources/bootstrap.yml b/doctor-auth/src/main/resources/bootstrap.yml index 084f03f..47c2dad 100644 --- a/doctor-auth/src/main/resources/bootstrap.yml +++ b/doctor-auth/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-gateway/src/main/resources/bootstrap.yml b/doctor-gateway/src/main/resources/bootstrap.yml index 2eaa492..cc0e562 100644 --- a/doctor-gateway/src/main/resources/bootstrap.yml +++ b/doctor-gateway/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-file/src/main/resources/bootstrap.yml b/doctor-modules/doctor-file/src/main/resources/bootstrap.yml index 0ecdb89..c992149 100644 --- a/doctor-modules/doctor-file/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-file/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml b/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml index 823a6a8..007713f 100644 --- a/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-health/pom.xml b/doctor-modules/doctor-health/pom.xml index 52c8401..e89da6a 100644 --- a/doctor-modules/doctor-health/pom.xml +++ b/doctor-modules/doctor-health/pom.xml @@ -84,6 +84,11 @@ doctor-api-system + + org.springframework.boot + spring-boot-starter-mail + + diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthDepartmentController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthDepartmentController.java new file mode 100644 index 0000000..78e2c84 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthDepartmentController.java @@ -0,0 +1,25 @@ +package doctor.controller; + +import doctor.common.core.domain.HealthR; +import doctor.domain.entity.DepartmentEntity; +import doctor.service.HealthDepartmentService; +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.RestController; + +import java.util.List; + +@RestController +@RequestMapping("/knowledgeBase/v1") +public class HealthDepartmentController { + + @Autowired + private HealthDepartmentService healthV1Service; + + @GetMapping("/findDepartment") + public HealthR> findDepartment(){ + List departmentEntities=healthV1Service.findDepartment(); + return HealthR.ok(departmentEntities); + } +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthJobTitleController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthJobTitleController.java new file mode 100644 index 0000000..a4f50d9 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthJobTitleController.java @@ -0,0 +1,35 @@ +package doctor.controller; + +import doctor.common.core.domain.HealthR; +import doctor.domain.dto.ApplyJoinDto; +import doctor.domain.entity.DoctorJobTitleEntity; +import doctor.service.HealthJobTitleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@RestController +@RequestMapping("/v1") +public class HealthJobTitleController { + @Autowired + private HealthJobTitleService healthJobTitleService; + + @GetMapping("/findJobTitleList") + public HealthR> findJobTitleList() { + List doctorJobTitleEntities=healthJobTitleService.findJobTitleList(); + return HealthR.ok(doctorJobTitleEntities); + } + + @PostMapping("/sendEmailCode") + public HealthR sendEmailCode(@RequestParam("email") String email) { + HealthR healthR= healthJobTitleService.sendEmailCode(email); + return HealthR.ok(healthR); + } + + @PostMapping("/applyJoin") + public HealthR applyJoin(@RequestBody ApplyJoinDto applyJoinDto) { + HealthR healthR= healthJobTitleService.applyJoin(applyJoinDto); + return HealthR.ok(healthR); + } +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java index 410f514..5b93c0f 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java @@ -1,9 +1,9 @@ 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.domain.entity.UserVideoBuyEntity; +import doctor.domain.entity.UserVideoCollectionEntity; +import doctor.domain.entity.UserWalletEntity; import doctor.service.UserVideoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -24,8 +24,8 @@ public class UserVideoController { //用户视频收藏列表 @GetMapping("/findVideoCollectionList") - public R>findVideoCollectionList(){ - List userVideoCollectionList =userVideoService.findVideoCollectionList(); + public R>findVideoCollectionList(){ + List userVideoCollectionList =userVideoService.findVideoCollectionList(); return R.ok(userVideoCollectionList); } //用户取消视频收藏 @@ -36,8 +36,8 @@ public class UserVideoController { } //用户购买视频列表 @GetMapping("/findUserVideoBuyList") - public R>findUserVideoBuyList(){ - List userVideoBuys =userVideoService.findUserVideoBuyList(); + public R>findUserVideoBuyList(){ + List userVideoBuys =userVideoService.findUserVideoBuyList(); return R.ok(userVideoBuys); } //用户删除购买的视频 @@ -49,8 +49,8 @@ public class UserVideoController { //我的钱包 @GetMapping("/findUserWallet") - public R> findUserWallet(){ - List userWallets = userVideoService.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 index 4cc9573..7ce5e44 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/VideoController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/VideoController.java @@ -21,13 +21,13 @@ public class VideoController { private VideoService videoService; //收藏健康讲堂视频列表 @PostMapping("/verify/v1/addUserVideoCollection") - public R addUserVideoCollection(@RequestBody UserVideoCollection userVideoCollection){ + public R addUserVideoCollection(@RequestBody UserVideoCollectionEntity userVideoCollection){ videoService.addUserVideoCollection(userVideoCollection); return R.ok(); } //购买健康讲堂视频 @PostMapping("/verify/v1/videoBuy") - public R videoBuy(@RequestBody UserVideoBuy userVideoBuy){ + public R videoBuy(@RequestBody UserVideoBuyEntity userVideoBuy){ videoService.videoBuy(userVideoBuy); return R.ok(); } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/dto/applyJoinDto.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/dto/ApplyJoinDto.java similarity index 92% rename from doctor-modules/doctor-health/src/main/java/doctor/domain/dto/applyJoinDto.java rename to doctor-modules/doctor-health/src/main/java/doctor/domain/dto/ApplyJoinDto.java index 00ed866..c5ef08e 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/dto/applyJoinDto.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/dto/ApplyJoinDto.java @@ -3,7 +3,7 @@ package doctor.domain.dto; import lombok.Data; @Data -public class applyJoinDto { +public class ApplyJoinDto { private String email; private String code; private String pwd1; diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DepartmentEntity.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DepartmentEntity.java new file mode 100644 index 0000000..e56dfdf --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DepartmentEntity.java @@ -0,0 +1,20 @@ +package doctor.domain.entity; + + +import lombok.Data; + +import java.util.Date; + +@Data +public class DepartmentEntity { + private Integer id; + + private String departmentName; + + private String pic; + + private Integer rank; + + private Date createTime; + +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorJobTitleEntity.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorJobTitleEntity.java new file mode 100644 index 0000000..dbbc4c6 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorJobTitleEntity.java @@ -0,0 +1,18 @@ +package doctor.domain.entity; + + +import lombok.Data; + +import java.util.Date; +@Data +public class DoctorJobTitleEntity { + + private Integer id; + + + private String jobTitle; + + + private Date createTime; + +} 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/DoctorUserEntity.java similarity index 97% rename from doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorUser.java rename to doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorUserEntity.java index ee7dfe0..0fbc91a 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorUser.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/DoctorUserEntity.java @@ -1,9 +1,8 @@ package doctor.domain.entity; -import java.security.Timestamp; import java.util.Date; -public class DoctorUser { +public class DoctorUserEntity { private int id; private String phone; 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/UserEntity.java similarity index 96% rename from doctor-modules/doctor-health/src/main/java/doctor/domain/entity/User.java rename to doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserEntity.java index 6f0f2cb..eff8146 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/User.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserEntity.java @@ -1,7 +1,5 @@ package doctor.domain.entity; -import org.springframework.format.annotation.DateTimeFormat; - import java.util.Date; /** @@ -10,7 +8,7 @@ import java.util.Date; * @Author : FJJ * @Date: 2024-01-10 20:46 */ -public class User { +public class UserEntity { private Integer id; private String phone; private String pwd; 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/UserVideoBuyEntity.java similarity index 85% rename from doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoBuy.java rename to doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoBuyEntity.java index 5903ee7..a8bc0d3 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoBuy.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoBuyEntity.java @@ -6,7 +6,7 @@ package doctor.domain.entity; * @Author : FJJ * @Date: 2024-01-10 15:20 */ -public class UserVideoBuy { +public class UserVideoBuyEntity { private Integer id; private Integer userId; private Integer videoId; @@ -44,13 +44,13 @@ public class UserVideoBuy { this.createTime = createTime; } - public UserVideoBuy(Integer id, Integer userId, Integer videoId, Long createTime) { + public UserVideoBuyEntity(Integer id, Integer userId, Integer videoId, Long createTime) { this.id = id; this.userId = userId; this.videoId = videoId; this.createTime = createTime; } - public UserVideoBuy() { + public UserVideoBuyEntity() { } } 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/UserVideoCollectionEntity.java similarity index 77% rename from doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollection.java rename to doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollectionEntity.java index b9ab680..117a67a 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollection.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollectionEntity.java @@ -1,10 +1,5 @@ package doctor.domain.entity; -import io.swagger.models.auth.In; -import org.springframework.format.annotation.DateTimeFormat; - -import java.util.Date; - /** * @ClassName : UserVideoCollection * @Description : 用户视频收藏表 @@ -12,7 +7,7 @@ import java.util.Date; * @Date: 2024-01-10 14:28 */ -public class UserVideoCollection { +public class UserVideoCollectionEntity { private Integer id; private Integer userId; private Integer videoId; @@ -50,13 +45,13 @@ public class UserVideoCollection { this.createTime = createTime; } - public UserVideoCollection(Integer id, Integer userId, Integer videoId, Long createTime) { + public UserVideoCollectionEntity(Integer id, Integer userId, Integer videoId, Long createTime) { this.id = id; this.userId = userId; this.videoId = videoId; this.createTime = createTime; } - public UserVideoCollection() { + public UserVideoCollectionEntity() { } } 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/UserWalletEntity.java similarity index 91% rename from doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserWallet.java rename to doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserWalletEntity.java index 1da779d..07e5b23 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserWallet.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserWalletEntity.java @@ -1,16 +1,12 @@ 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 { +public class UserWalletEntity { private Integer id; private Integer userId; private Integer balance; 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 index a09e715..1a114bd 100644 --- 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 @@ -1,5 +1,6 @@ package doctor.domain.entity; +import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; @@ -10,6 +11,7 @@ import java.util.Date; * @Author : FJJ * @Date: 2024-01-10 15:59 */ +@Data public class Video { private Integer id; private String title; @@ -21,90 +23,4 @@ public class Video { 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/mapper/HealthDepartmentMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthDepartmentMapper.java new file mode 100644 index 0000000..4c2ff2e --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthDepartmentMapper.java @@ -0,0 +1,12 @@ +package doctor.mapper; + +import doctor.domain.entity.DepartmentEntity; +import org.mybatis.spring.annotation.MapperScan; + +import java.util.List; + +@MapperScan +public interface HealthDepartmentMapper { + List findDepartments(); + +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthJobTitleMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthJobTitleMapper.java new file mode 100644 index 0000000..ed82146 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthJobTitleMapper.java @@ -0,0 +1,14 @@ +package doctor.mapper; + +import doctor.domain.entity.DoctorJobTitleEntity; +import doctor.system.api.domain.Doctor; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface HealthJobTitleMapper { + List findJobTitleList(); + + void insertDoctor(Doctor doctor); +} 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 deleted file mode 100644 index 8d7f5e3..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/mapper/IDoctorUserMapper.java +++ /dev/null @@ -1,10 +0,0 @@ -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 index 32bb5d3..a71cd12 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java @@ -1,8 +1,8 @@ package doctor.mapper; -import doctor.domain.entity.UserVideoBuy; -import doctor.domain.entity.UserVideoCollection; -import doctor.domain.entity.UserWallet; +import doctor.domain.entity.UserVideoBuyEntity; +import doctor.domain.entity.UserVideoCollectionEntity; +import doctor.domain.entity.UserWalletEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -16,13 +16,13 @@ import java.util.List; */ @Mapper public interface UserVideoMapper { - List findVideoCollectionList(); + List findVideoCollectionList(); void cancelVideoCollection(@Param("id") Integer id); - List findUserVideoBuyList(); + List findUserVideoBuyList(); void deleteVideoBuy(@Param("id") Integer id); - List findUserWallet(); + 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 index 6c886cb..f7f97d6 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/mapper/VideoMapper.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/VideoMapper.java @@ -16,7 +16,7 @@ import java.util.List; public interface VideoMapper { - void addUserVideoCollection(UserVideoCollection userVideoCollection); + void addUserVideoCollection(UserVideoCollectionEntity userVideoCollection); Video findById(@Param("videoId") Integer videoId); @@ -24,9 +24,9 @@ public interface VideoMapper { void updateVideoCount(VideoCount videoCount); - User FindById(@Param("userId") Integer userId); + UserEntity FindById(@Param("userId") Integer userId); - UserWallet FindUserWallet(@Param("id") Integer id); + UserWalletEntity FindUserWallet(@Param("id") Integer id); Video findByVideoId(@Param("videoId") Integer videoId); diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/HealthDepartmentService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/HealthDepartmentService.java new file mode 100644 index 0000000..36fb487 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/HealthDepartmentService.java @@ -0,0 +1,10 @@ +package doctor.service; + +import doctor.domain.entity.DepartmentEntity; + +import java.util.List; + +public interface HealthDepartmentService { + List findDepartment(); + +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/HealthJobTitleService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/HealthJobTitleService.java new file mode 100644 index 0000000..106aa37 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/HealthJobTitleService.java @@ -0,0 +1,15 @@ +package doctor.service; + +import doctor.common.core.domain.HealthR; +import doctor.domain.dto.ApplyJoinDto; +import doctor.domain.entity.DoctorJobTitleEntity; + +import java.util.List; + +public interface HealthJobTitleService { + List findJobTitleList(); + + HealthR sendEmailCode(String email); + + HealthR applyJoin(ApplyJoinDto applyJoinDto); +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java index b024c7e..90f20f7 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java @@ -1,8 +1,8 @@ package doctor.service; -import doctor.domain.entity.UserVideoBuy; -import doctor.domain.entity.UserVideoCollection; -import doctor.domain.entity.UserWallet; +import doctor.domain.entity.UserVideoBuyEntity; +import doctor.domain.entity.UserVideoCollectionEntity; +import doctor.domain.entity.UserWalletEntity; import java.util.List; @@ -13,13 +13,13 @@ import java.util.List; * @Date: 2024-01-10 14:33 */ public interface UserVideoService { - List findVideoCollectionList(); + List findVideoCollectionList(); void cancelVideoCollection(Integer id); - List findUserVideoBuyList(); + List findUserVideoBuyList(); void deleteVideoBuy(Integer id); - List findUserWallet(); + 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 index bab5ee1..5c259c1 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/VideoService.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/VideoService.java @@ -12,10 +12,10 @@ import java.util.List; */ public interface VideoService { - void addUserVideoCollection(UserVideoCollection userVideoCollection); + void addUserVideoCollection(UserVideoCollectionEntity userVideoCollection); - void videoBuy(UserVideoBuy userVideoBuy); + void videoBuy(UserVideoBuyEntity userVideoBuy); List findVideoCommentList(); } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthDepartmentServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthDepartmentServiceImpl.java new file mode 100644 index 0000000..ccac7b5 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthDepartmentServiceImpl.java @@ -0,0 +1,20 @@ +package doctor.service.impl; + +import doctor.domain.entity.DepartmentEntity; +import doctor.mapper.HealthDepartmentMapper; +import doctor.service.HealthDepartmentService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class HealthDepartmentServiceImpl implements HealthDepartmentService { + @Autowired + private HealthDepartmentMapper healthV1Mapper; + + @Override + public List findDepartment() { + return healthV1Mapper.findDepartments(); + } +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthJobTitleServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthJobTitleServiceImpl.java new file mode 100644 index 0000000..36aed46 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthJobTitleServiceImpl.java @@ -0,0 +1,86 @@ +package doctor.service.impl; + +import doctor.common.core.domain.HealthR; +import doctor.domain.dto.ApplyJoinDto; +import doctor.domain.entity.DoctorJobTitleEntity; +import doctor.mapper.HealthJobTitleMapper; +import doctor.service.HealthJobTitleService; +import doctor.system.api.domain.Doctor; +import doctor.util.RSAUtils; +import doctor.util.RsaKey; +import doctor.util.SendEmail; +import org.bouncycastle.jcajce.provider.asymmetric.rsa.RSAUtil; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; +import java.util.Random; +import java.util.concurrent.TimeUnit; + +@Service +public class HealthJobTitleServiceImpl implements HealthJobTitleService { + @Autowired + private HealthJobTitleMapper healthJobTitleMapper; + @Autowired + private SendEmail sendEmail; + @Resource + private RedisTemplate redisTemplate; + + @Override + public List findJobTitleList() { + return healthJobTitleMapper.findJobTitleList(); + } + + @Override + public HealthR sendEmailCode(String email) { + if (!redisTemplate.hasKey(email)){ + Integer integer = redisTemplate.opsForValue().get(email); + sendEmail.sendEmail(email,integer); + } + if (email==null){ + return HealthR.fail(); + } + Integer code=0; + Random random = new Random(); + for (int i = 0; i < 4; i++) { + int i1 = random.nextInt(); + code=i+=i1; + } + sendEmail.sendEmail(email,code); + redisTemplate.opsForValue().set(email,code,2, TimeUnit.MINUTES); + return HealthR.ok(); + } + + @Override + public HealthR applyJoin(ApplyJoinDto applyJoinDto) { + if (applyJoinDto==null){ + return HealthR.fail("参数为空"); + } + String s=""; + try { + s= RSAUtils.rsaDecrypt(applyJoinDto.getPwd1(), RsaKey.PRIVATE_KEY); + String s2 = RSAUtils.rsaDecrypt(applyJoinDto.getPwd2(), RsaKey.PRIVATE_KEY); + if (!s.equals(s2)){ + return HealthR.fail("请输入相同的密码"); + } + } catch (Exception e) { + throw new RuntimeException(e); + } + if (!redisTemplate.hasKey(applyJoinDto.getEmail())){ + return HealthR.fail("验证码过去请重新发送"); + } + Integer integer = redisTemplate.opsForValue().get(applyJoinDto.getEmail()); + if (!String.valueOf(integer).equals(applyJoinDto.getCode())){ + return HealthR.fail("验车码错误"); + } + Doctor doctor = new Doctor(); + BeanUtils.copyProperties(applyJoinDto,doctor); + doctor.setCreateTime(new Date()); + healthJobTitleMapper.insertDoctor(doctor); + return HealthR.ok(); + } +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java index 74708ca..ceeb928 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java @@ -1,8 +1,8 @@ package doctor.service.impl; -import doctor.domain.entity.UserVideoBuy; -import doctor.domain.entity.UserVideoCollection; -import doctor.domain.entity.UserWallet; +import doctor.domain.entity.UserVideoBuyEntity; +import doctor.domain.entity.UserVideoCollectionEntity; +import doctor.domain.entity.UserWalletEntity; import doctor.mapper.UserVideoMapper; import doctor.service.UserVideoService; import org.springframework.beans.factory.annotation.Autowired; @@ -21,7 +21,7 @@ public class UserVideoServiceImpl implements UserVideoService { @Autowired private UserVideoMapper userVideoMapper; @Override - public List findVideoCollectionList() { + public List findVideoCollectionList() { return userVideoMapper.findVideoCollectionList(); } @@ -31,7 +31,7 @@ public class UserVideoServiceImpl implements UserVideoService { } @Override - public List findUserVideoBuyList() { + public List findUserVideoBuyList() { return userVideoMapper.findUserVideoBuyList(); } @@ -41,7 +41,7 @@ public class UserVideoServiceImpl implements UserVideoService { } @Override - public List findUserWallet() { + 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 index 1c45fe1..2154fd9 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/VideoServiceImpl.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/VideoServiceImpl.java @@ -20,7 +20,7 @@ public class VideoServiceImpl implements VideoService { private VideoMapper videoMapper; @Override - public void addUserVideoCollection(UserVideoCollection userVideoCollection) { + public void addUserVideoCollection(UserVideoCollectionEntity userVideoCollection) { // 添加收藏 videoMapper.addUserVideoCollection(userVideoCollection); // 更新视频收藏数 @@ -30,13 +30,13 @@ public class VideoServiceImpl implements VideoService { } @Override - public void videoBuy(UserVideoBuy userVideoBuy) { + public void videoBuy(UserVideoBuyEntity userVideoBuy) { //查询用户信息 - User user = videoMapper.FindById(userVideoBuy.getUserId()); + UserEntity user = videoMapper.FindById(userVideoBuy.getUserId()); //查询视频信息 Video video = videoMapper.findByVideoId(userVideoBuy.getVideoId()); //查询用户钱包 - UserWallet userWallet = videoMapper.FindUserWallet(user.getId()); + UserWalletEntity userWallet = videoMapper.FindUserWallet(user.getId()); //判断用户钱包是否足够 if (userWallet.getBalance() >= video.getPrice()) { //更新用户钱包 diff --git a/doctor-modules/doctor-health/src/main/java/doctor/util/RSAUtils.java b/doctor-modules/doctor-health/src/main/java/doctor/util/RSAUtils.java new file mode 100644 index 0000000..a1bede5 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/util/RSAUtils.java @@ -0,0 +1,133 @@ +package doctor.util; +import org.apache.commons.codec.binary.Base64; + +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; +import java.security.*; +import java.security.interfaces.RSAPrivateKey; +import java.security.interfaces.RSAPublicKey; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import java.util.*; + + +/** + * RSA工具类 生成秘钥 加解密 + * @author : WangZhanpeng + * @date : 2024/1/9 15:13 + */ +public class RSAUtils { + + + private static Map keyMap = new HashMap(); + + public static void getKey() throws NoSuchAlgorithmException { + genKeyPair(); + System.out.println("公钥===:"+keyMap.get(0)); + System.out.println("私钥===:"+keyMap.get(1)); + } + /** + * 随机生成密钥对 + * + * @throws NoSuchAlgorithmException + */ + public static void genKeyPair() throws NoSuchAlgorithmException { + // KeyPairGenerator类用于生成公钥和私钥对,基于RSA算法生成对象 + KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("RSA"); + // 初始化密钥对生成器,密钥大小为96-1024位 + keyPairGen.initialize(1024, new SecureRandom()); + // 生成一个密钥对,保存在keyPair中 + KeyPair keyPair = keyPairGen.generateKeyPair(); + // 得到私钥 + RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate(); + // 得到公钥 + RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic(); + String publicKeyString = new String(Base64.encodeBase64(publicKey.getEncoded())); + // 得到私钥字符串 + String privateKeyString = new String(Base64.encodeBase64((privateKey.getEncoded()))); + // 将公钥和私钥保存到Map + //0表示公钥 + keyMap.put(0, publicKeyString); + //1表示私钥 + keyMap.put(1, privateKeyString); + } + + /** + * RSA私钥解密 + * @param str 解密字符串 + * @param privateKey 私钥 + * @return 明文 + */ + public static String rsaDecrypt(String str, String privateKey) throws Exception { + //base64编码的私钥 + byte[] decoded = Base64.decodeBase64(privateKey); + RSAPrivateKey priKey = (RSAPrivateKey) KeyFactory.getInstance("RSA").generatePrivate(new PKCS8EncodedKeySpec(decoded)); + //RSA解密 + Cipher cipher = Cipher.getInstance("RSA"); + cipher.init(Cipher.DECRYPT_MODE, priKey); + byte[] inputArray = Base64.decodeBase64(str.getBytes("UTF-8")); + int inputLength = inputArray.length; + // 最大加密字节数,超出最大字节数需要分组加密 + int MAX_ENCRYPT_BLOCK = 128; + // 标识 + int offSet = 0; + byte[] resultBytes = {}; + byte[] cache; + while (inputLength - offSet > 0) { + if (inputLength - offSet > MAX_ENCRYPT_BLOCK) { + cache = cipher.doFinal(inputArray, offSet, MAX_ENCRYPT_BLOCK); + offSet += MAX_ENCRYPT_BLOCK; + } else { + cache = cipher.doFinal(inputArray, offSet, inputLength - offSet); + offSet = inputLength; + } + resultBytes = Arrays.copyOf(resultBytes, resultBytes.length + cache.length); + System.arraycopy(cache, 0, resultBytes, resultBytes.length - cache.length, cache.length); + } + String outStr = new String(resultBytes); + return outStr; + } + + /** + * RSA公钥加密 + * @param input 需要加密的字符串 + * @param rsaPublicKey 公钥 + * @return 密文 + * @throws Exception 加密过程中的异常信息 + */ + public static List rsaEncrypt(String input, String rsaPublicKey) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException { + String result = ""; + // 将Base64编码后的公钥转换成PublicKey对象 + byte[] buffer = Base64.decodeBase64(rsaPublicKey); + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + X509EncodedKeySpec keySpec = new X509EncodedKeySpec(buffer); + PublicKey publicKey = keyFactory.generatePublic(keySpec); + // 加密 + Cipher cipher = Cipher.getInstance("RSA"); + cipher.init(Cipher.ENCRYPT_MODE, publicKey); + byte[] inputArray = input.getBytes(); + int inputLength = inputArray.length; + System.out.println("加密字节数:" + inputLength); + // 最大加密字节数,超出最大字节数需要分组加密 + int MAX_ENCRYPT_BLOCK = 117; + // 标识 + int offSet = 0; + List results=new ArrayList<>(); + byte[] cache; + while (inputLength - offSet > 0) { + if (inputLength - offSet > MAX_ENCRYPT_BLOCK) { + cache = cipher.doFinal(inputArray, offSet, MAX_ENCRYPT_BLOCK); + offSet += MAX_ENCRYPT_BLOCK; + } else { + cache = cipher.doFinal(inputArray, offSet, inputLength - offSet); + offSet = inputLength; + } + results.add(Base64.encodeBase64String(cache)); + } + return results; + } + +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/util/RsaKey.java b/doctor-modules/doctor-health/src/main/java/doctor/util/RsaKey.java new file mode 100644 index 0000000..bd03c09 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/util/RsaKey.java @@ -0,0 +1,20 @@ +package doctor.util; + +/** + * 存放RSA 公钥和私钥 + * @author : WangZhanpeng + * @date : 2024/1/9 15:49 + */ +public class RsaKey { + + /** + * 公钥 + */ + public static final String PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7xkwklONlHn8TGmTH6yyvv7Bv9AcxXgpkAhuPxpOCVHgkpGGJUJVc8JCMOAhmqI4zdJRqTJa1aOk1glcOaOWja28o6lqNzxn3X3fqdkcWoF/L9Znw1MSDK7oFeSsHqubc9wA2GKb4EFt2TWuaFB+dWfPUhFeJ1GoZhpjjgZLO9QIDAQAB"; + /** + * 私钥 + */ + public static final String PRIVATE_KEY = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALvGTCSU42UefxMaZMfrLK+/sG/0BzFeCmQCG4/Gk4JUeCSkYYlQlVzwkIw4CGaojjN0lGpMlrVo6TWCVw5o5aNrbyjqWo3PGfdfd+p2RxagX8v1mfDUxIMrugV5Kweq5tz3ADYYpvgQW3ZNa5oUH51Z89SEV4nUahmGmOOBks71AgMBAAECgYAQNJTts0vMtk0RQP3hoxJAOLLpdo4IXK1Y5DWsut6QKOoVf3pLd4DsfHZ9I3jWI0XievU0F1gKX/uAerc4ryTiR6dxHRyKQxhAamLCFqAgTd6GQf6nl7LlKJkHOKZ1/Un0l245zSLoUzNYxzLZhXfOX8lMNfnXpznfZV43nJJMIQJBAPEeKpEzK8/lEJCszBCXgAH75Qcwu+J/LjZFXChsEqx0ubbhg9orgwg+z5Z2uLXVbeScTkBIi+yY6Jd5RUbyhTsCQQDHXUUcylpo0vo9z/xMPTcd5m5UqTm6ZVacdnrkOQtGJJCKOLYTLhWGUPmE0s+cgn9/24H0H8FjOM/ta8tdTPmPAkEAyV5lNICk7WojzH/TqWOtb3q8yqWDtGR85qxEjCm96rNNSpPKt1ExjJhQbBvYpVuK/KshmwQ7f6wwTBjmp5rxcwJAVbJPAggtgr+l16ourmrl5VFm/bdcXDYxW8JGIxIuOXGAPBoSkf4OPJVUHHctzP3/Zmtp2hFIZKlIH6tlWG69GwJAUcnD0XMH8+h9mYUFdwgD0JtaEbeY3ofkO+RymFdcYO//ZjwnVWyGRIhi/lJ5URPiiDzt2MmX5G2a0NJPwP60Lg=="; + + +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/util/SendEmail.java b/doctor-modules/doctor-health/src/main/java/doctor/util/SendEmail.java new file mode 100644 index 0000000..2db7daa --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/util/SendEmail.java @@ -0,0 +1,26 @@ +package doctor.util; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.mail.javamail.JavaMailSender; +import org.springframework.mail.javamail.MimeMessageHelper; +import org.springframework.stereotype.Component; + +import javax.mail.internet.MimeMessage; +@Component +public class SendEmail { + @Autowired + private JavaMailSender javaMailSender; + public void sendEmail(String email,Integer code){ + MimeMessage mimeMessage = javaMailSender.createMimeMessage(); + try { + MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(mimeMessage, true); + mimeMessageHelper.setTo(email); + mimeMessageHelper.setFrom("3581044601@qq.com"); + mimeMessageHelper.setSubject("发送验证码"); + mimeMessageHelper.setText("验证码为:"+code); + javaMailSender.send(mimeMessage); + } catch (Exception e) { + throw new RuntimeException(e); + } + } +} diff --git a/doctor-modules/doctor-health/src/main/resources/bootstrap.yml b/doctor-modules/doctor-health/src/main/resources/bootstrap.yml index 205fb38..5b5ac25 100644 --- a/doctor-modules/doctor-health/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-health/src/main/resources/bootstrap.yml @@ -15,13 +15,24 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 file-extension: yml # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + mail: + host: smtp.qq.com + port: 587 + username: 3581044601@qq.com + password: bwscqgqpkagjciih + default-encoding: UTF8 + properties: + mail: + smtp: + socketFactoryClass: javax.net.ssl.SSLSocketFactory + debug: true diff --git a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/HealthDepartmentMapper.xml b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/HealthDepartmentMapper.xml new file mode 100644 index 0000000..6e99d20 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/HealthDepartmentMapper.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/HealthJobTitleMapper.xml b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/HealthJobTitleMapper.xml new file mode 100644 index 0000000..61245b8 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/HealthJobTitleMapper.xml @@ -0,0 +1,16 @@ + + + + + INSERT INTO doctor (id, department_id, email, user_name, review_status, phone, pwd, name, image_pic, job_title, inaugural_hospital, personal_profile, good_field, create_time) + VALUES (0,#{departmentId},#{email},#{userName},#{reviewStatus},#{phone},#{pwd},#{name},#{imagePic},#{jobTitle},#{inauguralHospital},#{personalProfile},#{goodField},#{createTime}); + + + + + + diff --git a/doctor-modules/doctor-health/src/main/resources/mapper/HealthUserVideoMapper.xml b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/HealthUserVideoMapper.xml similarity index 100% rename from doctor-modules/doctor-health/src/main/resources/mapper/HealthUserVideoMapper.xml rename to doctor-modules/doctor-health/src/main/resources/mapper/doctor/HealthUserVideoMapper.xml 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 deleted file mode 100644 index 41b82ff..0000000 --- a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/IDoctorUserServiceMapper.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml index cb586ad..207cfde 100644 --- a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml +++ b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml @@ -13,15 +13,15 @@ from user_video_buy where id = #{id} - select * from user_video_collection - select * from user_video_buy - select * from user_wallet 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 index 7903f85..b457749 100644 --- a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/VideoMapper.xml +++ b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/VideoMapper.xml @@ -35,13 +35,13 @@ from video_count where id = #{id} - SELECT user.* FROM user_video_buy LEFT JOIN user ON user.id = user_video_buy.user_id WHERE user_video_buy.user_id = #{userId} - SELECT user.* FROM user_wallet LEFT JOIN user ON user.id = user_wallet.user_id diff --git a/doctor-modules/doctor-job/src/main/resources/bootstrap.yml b/doctor-modules/doctor-job/src/main/resources/bootstrap.yml index 0bffaa1..537c5d6 100644 --- a/doctor-modules/doctor-job/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-job/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-system/src/main/resources/bootstrap.yml b/doctor-modules/doctor-system/src/main/resources/bootstrap.yml index d48b98a..8def34f 100644 --- a/doctor-modules/doctor-system/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-system/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml b/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml index ed199de..979155f 100644 --- a/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml +++ b/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e34f104-f333-4828-b36a-02146e521c9a + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 file-extension: yml # 共享配置 From fb9a01a9583efc83d1693d491daa775c679efaeb Mon Sep 17 00:00:00 2001 From: chenbingxuan <3581044601@qq.com> Date: Sat, 13 Jan 2024 08:41:13 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=85=A5=E9=A9=BB?= =?UTF-8?q?=E5=AE=8C=E7=BB=93=E6=92=92=E8=8A=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/doctor/common/core/constant/Constants.java | 5 ----- .../src/main/java/doctor/mapper/DoctorUserMapper.java | 4 ++-- .../java/doctor/service/impl/HealthJobTitleServiceImpl.java | 1 + 3 files changed, 3 insertions(+), 7 deletions(-) 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 5dcfec9..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 @@ -51,11 +51,6 @@ public class Constants * 成功标记 */ public static final Integer SUCCESS = 200; - /** - * 维度健康成功标识 - */ - public static final String SUCCESS_HEALTH = "0000"; - public static final String FAIL_HEALTH = "9001"; /** * 失败标记 diff --git a/doctor-modules/doctor-health/src/main/java/doctor/mapper/DoctorUserMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/DoctorUserMapper.java index 74c9d21..bcaa563 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/mapper/DoctorUserMapper.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/DoctorUserMapper.java @@ -3,10 +3,10 @@ package doctor.mapper; import doctor.system.api.domain.Department; import doctor.system.api.domain.Doctor; import doctor.system.api.domain.User; +import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.mybatis.spring.annotation.MapperScan; -@MapperScan +@Mapper public interface DoctorUserMapper { User selectUserByEmail(@Param("email") String email); diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthJobTitleServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthJobTitleServiceImpl.java index 36aed46..3e98162 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthJobTitleServiceImpl.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthJobTitleServiceImpl.java @@ -81,6 +81,7 @@ public class HealthJobTitleServiceImpl implements HealthJobTitleService { BeanUtils.copyProperties(applyJoinDto,doctor); doctor.setCreateTime(new Date()); healthJobTitleMapper.insertDoctor(doctor); + redisTemplate.delete(applyJoinDto.getEmail()); return HealthR.ok(); } } From a3dbe5e0c5ce0281df251b0483624980bd0823b3 Mon Sep 17 00:00:00 2001 From: fjj <–1066869486@qq.com> Date: Sat, 13 Jan 2024 08:42:59 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=8E=A5=E5=8F=A33?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doctor-auth/src/main/resources/bootstrap.yml | 4 +- .../common/core/constant/Constants.java | 3 +- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- .../controller/SysDoctorController.java | 40 ----- .../java/doctor/domain/entity/UserEntity.java | 141 +----------------- .../doctor/domain/entity/VideoEntity.java | 90 ----------- .../java/doctor/mapper/IDoctorUserMapper.java | 10 -- .../doctor/service/IDoctorUserService.java | 8 - .../service/impl/IDoctorUserServiceImpl.java | 19 --- .../src/main/resources/bootstrap.yml | 4 +- .../doctor/IDoctorUserServiceMapper.xml | 11 -- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- 16 files changed, 24 insertions(+), 330 deletions(-) delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/controller/SysDoctorController.java delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/mapper/IDoctorUserMapper.java delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/service/IDoctorUserService.java delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/service/impl/IDoctorUserServiceImpl.java delete mode 100644 doctor-modules/doctor-health/src/main/resources/mapper/doctor/IDoctorUserServiceMapper.xml diff --git a/doctor-auth/src/main/resources/bootstrap.yml b/doctor-auth/src/main/resources/bootstrap.yml index 7f241e4..80f11fd 100644 --- a/doctor-auth/src/main/resources/bootstrap.yml +++ b/doctor-auth/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 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 5dcfec9..a651960 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 @@ -54,8 +54,7 @@ public class Constants /** * 维度健康成功标识 */ - public static final String SUCCESS_HEALTH = "0000"; - public static final String FAIL_HEALTH = "9001"; + /** * 失败标记 diff --git a/doctor-gateway/src/main/resources/bootstrap.yml b/doctor-gateway/src/main/resources/bootstrap.yml index e0b9071..d3e056c 100644 --- a/doctor-gateway/src/main/resources/bootstrap.yml +++ b/doctor-gateway/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-file/src/main/resources/bootstrap.yml b/doctor-modules/doctor-file/src/main/resources/bootstrap.yml index 400e098..66f9597 100644 --- a/doctor-modules/doctor-file/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-file/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml b/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml index 9b8484d..81bc32c 100644 --- a/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 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 deleted file mode 100644 index 746fd64..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/SysDoctorController.java +++ /dev/null @@ -1,40 +0,0 @@ -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/domain/entity/UserEntity.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserEntity.java index 088253f..f37475a 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserEntity.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserEntity.java @@ -1,5 +1,9 @@ package doctor.domain.entity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + import java.util.Date; /** @@ -8,6 +12,9 @@ import java.util.Date; * @Author : FJJ * @Date: 2024-01-10 20:46 */ +@Data +@AllArgsConstructor +@NoArgsConstructor public class UserEntity { private Integer id; private String phone; @@ -24,139 +31,5 @@ public class UserEntity { 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; - } - -<<<<<<< HEAD - public String getHeight() { - return height; - } - - public void setHeight(String height) { - this.height = height; - } - - public String getWeight() { - return weight; - } - - public void setWeight(String weight) { -======= - public Integer getHeight() { - return height; - } - - public void setHeight(Integer height) { - this.height = height; - } - - public Integer getWeight() { - return weight; - } - - public void setWeight(Integer weight) { ->>>>>>> 16030f8df7026b88eca021372724f5ad3641a7be - 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; - } - -<<<<<<< HEAD - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { -======= - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { ->>>>>>> 16030f8df7026b88eca021372724f5ad3641a7be - this.createTime = 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 index 65faf6a..b11e957 100644 --- 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 @@ -27,94 +27,4 @@ public class VideoEntity { 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 VideoEntity(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 VideoEntity() { - } - @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/mapper/IDoctorUserMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/IDoctorUserMapper.java deleted file mode 100644 index 8d7f5e3..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/mapper/IDoctorUserMapper.java +++ /dev/null @@ -1,10 +0,0 @@ -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/service/IDoctorUserService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/IDoctorUserService.java deleted file mode 100644 index b967765..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/IDoctorUserService.java +++ /dev/null @@ -1,8 +0,0 @@ -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/impl/IDoctorUserServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/IDoctorUserServiceImpl.java deleted file mode 100644 index 193c931..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/IDoctorUserServiceImpl.java +++ /dev/null @@ -1,19 +0,0 @@ -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/resources/bootstrap.yml b/doctor-modules/doctor-health/src/main/resources/bootstrap.yml index 691386c..203e553 100644 --- a/doctor-modules/doctor-health/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-health/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 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 deleted file mode 100644 index 41b82ff..0000000 --- a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/IDoctorUserServiceMapper.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/doctor-modules/doctor-job/src/main/resources/bootstrap.yml b/doctor-modules/doctor-job/src/main/resources/bootstrap.yml index 687623f..ab123c4 100644 --- a/doctor-modules/doctor-job/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-job/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-system/src/main/resources/bootstrap.yml b/doctor-modules/doctor-system/src/main/resources/bootstrap.yml index 632b0bd..14e7505 100644 --- a/doctor-modules/doctor-system/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-system/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml b/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml index f378a98..d94bf20 100644 --- a/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml +++ b/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 From ca6ab998301e2918ed9e02a45622682e0e1cfc36 Mon Sep 17 00:00:00 2001 From: chenbingxuan <3581044601@qq.com> Date: Sat, 13 Jan 2024 09:13:39 +0800 Subject: [PATCH 09/18] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UserVideoController.java | 21 ++++++++++--------- .../doctor/controller/VideoController.java | 13 ++++++------ 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java index 5b93c0f..f226f19 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java @@ -1,5 +1,6 @@ package doctor.controller; +import doctor.common.core.domain.HealthR; import doctor.common.core.domain.R; import doctor.domain.entity.UserVideoBuyEntity; import doctor.domain.entity.UserVideoCollectionEntity; @@ -24,34 +25,34 @@ public class UserVideoController { //用户视频收藏列表 @GetMapping("/findVideoCollectionList") - public R>findVideoCollectionList(){ + public HealthR>findVideoCollectionList(){ List userVideoCollectionList =userVideoService.findVideoCollectionList(); - return R.ok(userVideoCollectionList); + return HealthR.ok(userVideoCollectionList); } //用户取消视频收藏 @GetMapping("/cancelVideoCollection/{id}") - public R cancelVideoCollection(@PathVariable Integer id){ + public HealthR cancelVideoCollection(@PathVariable Integer id){ userVideoService.cancelVideoCollection(id); - return R.ok(); + return HealthR.ok(); } //用户购买视频列表 @GetMapping("/findUserVideoBuyList") - public R>findUserVideoBuyList(){ + public HealthR>findUserVideoBuyList(){ List userVideoBuys =userVideoService.findUserVideoBuyList(); - return R.ok(userVideoBuys); + return HealthR.ok(userVideoBuys); } //用户删除购买的视频 @DeleteMapping("/deleteVideoBuy/{id}") - public R deleteVideoBuy(@PathVariable Integer id){ + public HealthR deleteVideoBuy(@PathVariable Integer id){ userVideoService.deleteVideoBuy(id); - return R.ok(); + return HealthR.ok(); } //我的钱包 @GetMapping("/findUserWallet") - public R> findUserWallet(){ + public HealthR> findUserWallet(){ List userWallets = userVideoService.findUserWallet(); - return R.ok(userWallets); + return HealthR.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 index 7ce5e44..3749e2c 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/VideoController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/VideoController.java @@ -1,5 +1,6 @@ package doctor.controller; +import doctor.common.core.domain.HealthR; import doctor.common.core.domain.R; import doctor.domain.entity.*; import doctor.service.VideoService; @@ -21,21 +22,21 @@ public class VideoController { private VideoService videoService; //收藏健康讲堂视频列表 @PostMapping("/verify/v1/addUserVideoCollection") - public R addUserVideoCollection(@RequestBody UserVideoCollectionEntity userVideoCollection){ + public HealthR addUserVideoCollection(@RequestBody UserVideoCollectionEntity userVideoCollection){ videoService.addUserVideoCollection(userVideoCollection); - return R.ok(); + return HealthR.ok(); } //购买健康讲堂视频 @PostMapping("/verify/v1/videoBuy") - public R videoBuy(@RequestBody UserVideoBuyEntity userVideoBuy){ + public HealthR videoBuy(@RequestBody UserVideoBuyEntity userVideoBuy){ videoService.videoBuy(userVideoBuy); - return R.ok(); + return HealthR.ok(); } //视频评论列表 @GetMapping("/v1/findVideoCommentList") - public R> findVideoCommentList(){ + public HealthR> findVideoCommentList(){ List videoCommentList = videoService.findVideoCommentList(); - return R.ok(videoCommentList); + return HealthR.ok(videoCommentList); } } From 0d16cc8f0e87f283e0a836f15e2134b9da62a6e0 Mon Sep 17 00:00:00 2001 From: fjj <–1066869486@qq.com> Date: Sat, 13 Jan 2024 09:15:21 +0800 Subject: [PATCH 10/18] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=8E=A5=E5=8F=A33?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doctor-auth/src/main/resources/bootstrap.yml | 4 +- .../common/core/constant/Constants.java | 3 +- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- .../controller/SysDoctorController.java | 40 ----- .../java/doctor/domain/entity/UserEntity.java | 141 +----------------- .../doctor/domain/entity/VideoEntity.java | 90 ----------- .../java/doctor/mapper/IDoctorUserMapper.java | 10 -- .../doctor/service/IDoctorUserService.java | 8 - .../service/impl/IDoctorUserServiceImpl.java | 19 --- .../src/main/resources/bootstrap.yml | 4 +- .../doctor/IDoctorUserServiceMapper.xml | 11 -- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- 16 files changed, 24 insertions(+), 330 deletions(-) delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/controller/SysDoctorController.java delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/mapper/IDoctorUserMapper.java delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/service/IDoctorUserService.java delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/service/impl/IDoctorUserServiceImpl.java delete mode 100644 doctor-modules/doctor-health/src/main/resources/mapper/doctor/IDoctorUserServiceMapper.xml diff --git a/doctor-auth/src/main/resources/bootstrap.yml b/doctor-auth/src/main/resources/bootstrap.yml index 7f241e4..80f11fd 100644 --- a/doctor-auth/src/main/resources/bootstrap.yml +++ b/doctor-auth/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 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 5dcfec9..a651960 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 @@ -54,8 +54,7 @@ public class Constants /** * 维度健康成功标识 */ - public static final String SUCCESS_HEALTH = "0000"; - public static final String FAIL_HEALTH = "9001"; + /** * 失败标记 diff --git a/doctor-gateway/src/main/resources/bootstrap.yml b/doctor-gateway/src/main/resources/bootstrap.yml index e0b9071..d3e056c 100644 --- a/doctor-gateway/src/main/resources/bootstrap.yml +++ b/doctor-gateway/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-file/src/main/resources/bootstrap.yml b/doctor-modules/doctor-file/src/main/resources/bootstrap.yml index 400e098..66f9597 100644 --- a/doctor-modules/doctor-file/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-file/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml b/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml index 9b8484d..81bc32c 100644 --- a/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 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 deleted file mode 100644 index 746fd64..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/SysDoctorController.java +++ /dev/null @@ -1,40 +0,0 @@ -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/domain/entity/UserEntity.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserEntity.java index 088253f..f37475a 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserEntity.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserEntity.java @@ -1,5 +1,9 @@ package doctor.domain.entity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + import java.util.Date; /** @@ -8,6 +12,9 @@ import java.util.Date; * @Author : FJJ * @Date: 2024-01-10 20:46 */ +@Data +@AllArgsConstructor +@NoArgsConstructor public class UserEntity { private Integer id; private String phone; @@ -24,139 +31,5 @@ public class UserEntity { 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; - } - -<<<<<<< HEAD - public String getHeight() { - return height; - } - - public void setHeight(String height) { - this.height = height; - } - - public String getWeight() { - return weight; - } - - public void setWeight(String weight) { -======= - public Integer getHeight() { - return height; - } - - public void setHeight(Integer height) { - this.height = height; - } - - public Integer getWeight() { - return weight; - } - - public void setWeight(Integer weight) { ->>>>>>> 16030f8df7026b88eca021372724f5ad3641a7be - 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; - } - -<<<<<<< HEAD - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { -======= - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { ->>>>>>> 16030f8df7026b88eca021372724f5ad3641a7be - this.createTime = 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 index 65faf6a..b11e957 100644 --- 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 @@ -27,94 +27,4 @@ public class VideoEntity { 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 VideoEntity(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 VideoEntity() { - } - @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/mapper/IDoctorUserMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/IDoctorUserMapper.java deleted file mode 100644 index 8d7f5e3..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/mapper/IDoctorUserMapper.java +++ /dev/null @@ -1,10 +0,0 @@ -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/service/IDoctorUserService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/IDoctorUserService.java deleted file mode 100644 index b967765..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/IDoctorUserService.java +++ /dev/null @@ -1,8 +0,0 @@ -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/impl/IDoctorUserServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/IDoctorUserServiceImpl.java deleted file mode 100644 index 193c931..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/IDoctorUserServiceImpl.java +++ /dev/null @@ -1,19 +0,0 @@ -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/resources/bootstrap.yml b/doctor-modules/doctor-health/src/main/resources/bootstrap.yml index 691386c..203e553 100644 --- a/doctor-modules/doctor-health/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-health/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 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 deleted file mode 100644 index 41b82ff..0000000 --- a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/IDoctorUserServiceMapper.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/doctor-modules/doctor-job/src/main/resources/bootstrap.yml b/doctor-modules/doctor-job/src/main/resources/bootstrap.yml index 687623f..ab123c4 100644 --- a/doctor-modules/doctor-job/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-job/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-system/src/main/resources/bootstrap.yml b/doctor-modules/doctor-system/src/main/resources/bootstrap.yml index 632b0bd..14e7505 100644 --- a/doctor-modules/doctor-system/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-system/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml b/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml index f378a98..d94bf20 100644 --- a/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml +++ b/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 From 7bf693b9d62bce6425b17a6c57ff711ff8c700c8 Mon Sep 17 00:00:00 2001 From: chenbingxuan <3581044601@qq.com> Date: Sat, 13 Jan 2024 09:37:06 +0800 Subject: [PATCH 11/18] =?UTF-8?q?=E5=90=88=E5=B9=B6=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=B7=AF=E5=BE=84(=E6=82=A3=E8=80=85)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../doctor/controller/BannersController.java | 31 ----------- .../controller/DepartmentController.java | 30 ---------- .../controller/DiseaseCategoryController.java | 33 ----------- .../DiseaseKnowledgeController.java | 55 ------------------- .../HealthDepartmentController.java | 39 ++++++++++++- .../controller/HealthJobTitleController.java | 10 ++++ .../controller/InformationController.java | 2 +- 7 files changed, 49 insertions(+), 151 deletions(-) delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/controller/BannersController.java delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/controller/DepartmentController.java delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/controller/DiseaseCategoryController.java delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/controller/DiseaseKnowledgeController.java diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/BannersController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/BannersController.java deleted file mode 100644 index 59cd42c..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/BannersController.java +++ /dev/null @@ -1,31 +0,0 @@ -package doctor.controller; - -import doctor.common.core.domain.HealthR; -import doctor.common.core.domain.R; -import doctor.domain.entity.Banners; -import doctor.service.BannersService; -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.RestController; - -import java.util.List; - -/** - * @BelongsProject: Medical_Treatment - * @BelongsPackage: doctor.controller - * @Author: jpz - * @CreateTime: 2024/1/10 15:54 - */ -@RestController -@RequestMapping("/share/v1") - -public class BannersController { - @Autowired - private BannersService bannersService; - @GetMapping("/bannersShow") - public HealthR> bannersShow(){ - List banners = bannersService.bannersShow(); - return HealthR.ok(banners); - } -} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/DepartmentController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/DepartmentController.java deleted file mode 100644 index 68efab3..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/DepartmentController.java +++ /dev/null @@ -1,30 +0,0 @@ -package doctor.controller; - -import doctor.common.core.domain.HealthR; -import doctor.common.core.domain.R; -import doctor.domain.entity.Department; -import doctor.service.DepartmentService; -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.RestController; - -import java.util.List; - -/** - * @BelongsProject: Medical_Treatment - * @BelongsPackage: doctor.controller - * @Author: jpz - * @CreateTime: 2024/1/10 16:49 - */ -@RestController -@RequestMapping("/share/knowledgeBase/v1") -public class DepartmentController { - @Autowired - private DepartmentService departmentService; - @GetMapping("/findDepartment") - public HealthR> findDepartment(){ - List list=departmentService.findDepartment(); - return HealthR.ok(list); - } -} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/DiseaseCategoryController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/DiseaseCategoryController.java deleted file mode 100644 index 8b16640..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/DiseaseCategoryController.java +++ /dev/null @@ -1,33 +0,0 @@ -package doctor.controller; - -import doctor.common.core.domain.HealthR; -import doctor.common.core.domain.R; -import doctor.domain.entity.DiseaseCategory; -import doctor.service.DiseaseCategoryService; -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 javax.xml.transform.Result; -import java.util.List; - -/** - * @BelongsProject: Medical_Treatment - * @BelongsPackage: doctor.controller - * @Author: jpz - * @CreateTime: 2024/1/10 17:16 - */ -@RestController -@RequestMapping("/share/knowledgeBase/v1") -public class DiseaseCategoryController { - @Autowired - private DiseaseCategoryService diseaseCategoryService; - - @GetMapping("/findDiseaseCategory") - public HealthR> findDiseaseCategory(@RequestParam Integer departmentId){ - List list=diseaseCategoryService.findDiseaseCategory(departmentId); - return HealthR.ok(list); - } -} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/DiseaseKnowledgeController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/DiseaseKnowledgeController.java deleted file mode 100644 index 1b249ac..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/DiseaseKnowledgeController.java +++ /dev/null @@ -1,55 +0,0 @@ -package doctor.controller; - - -import doctor.common.core.domain.HealthR; -import doctor.domain.entity.DiseaseKnowledge; -import doctor.domain.entity.DrugsCategory; -import doctor.service.DiseaseKnowledgeService; -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 doctor.common.core.utils.PageUtils.startPage; - -/** - * @BelongsProject: Medical_Treatment - * @BelongsPackage: doctor.controller - * @Author: jpz - * @CreateTime: 2024/1/10 20:56 - */ -@RestController -@RequestMapping("/share/knowledgeBase/v1") -public class DiseaseKnowledgeController { - @Autowired - private DiseaseKnowledgeService diseaseKnowledgeService; - //罕见病症详情 - @GetMapping("/findDiseaseKnowledge") - public HealthR> findDiseaseKnowledge(@RequestParam Integer diseaseCategoryId){ - return HealthR.ok(diseaseKnowledgeService.findDiseaseKnowledge(diseaseCategoryId)); - } - - @GetMapping("/findDrugsCategoryList") - public HealthR> findDrugsCategoryList(){ - return HealthR.ok(diseaseKnowledgeService.findDrugsCategoryList()); - } - @GetMapping("/findDrugsKnowledgeList") - public HealthR> findDrugsKnowledgeList(@RequestParam Integer drugsCategoryId, - @RequestParam(value = "page",defaultValue = "1") Integer page, - @RequestParam(value = "count",defaultValue = "5") Integer count){ - - startPage(page,count); - List list=diseaseKnowledgeService.findDrugsKnowledgeList(drugsCategoryId); - return HealthR.ok(list); - } - - - - - - - -} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthDepartmentController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthDepartmentController.java index 78e2c84..bd8a3b5 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthDepartmentController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthDepartmentController.java @@ -1,21 +1,58 @@ package doctor.controller; import doctor.common.core.domain.HealthR; -import doctor.domain.entity.DepartmentEntity; +import doctor.domain.entity.*; +import doctor.service.DepartmentService; +import doctor.service.DiseaseCategoryService; +import doctor.service.DiseaseKnowledgeService; import doctor.service.HealthDepartmentService; 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; + @RestController @RequestMapping("/knowledgeBase/v1") public class HealthDepartmentController { @Autowired private HealthDepartmentService healthV1Service; + @Autowired + private DiseaseCategoryService diseaseCategoryService; + + @Autowired + private DiseaseKnowledgeService diseaseKnowledgeService; + //罕见病症详情 + @GetMapping("/findDiseaseKnowledge") + public HealthR> findDiseaseKnowledge(@RequestParam Integer diseaseCategoryId){ + return HealthR.ok(diseaseKnowledgeService.findDiseaseKnowledge(diseaseCategoryId)); + } + + @GetMapping("/findDrugsCategoryList") + public HealthR> findDrugsCategoryList(){ + return HealthR.ok(diseaseKnowledgeService.findDrugsCategoryList()); + } + @GetMapping("/findDrugsKnowledgeList") + public HealthR> findDrugsKnowledgeList(@RequestParam Integer drugsCategoryId, + @RequestParam(value = "page",defaultValue = "1") Integer page, + @RequestParam(value = "count",defaultValue = "5") Integer count){ + + startPage(page,count); + List list=diseaseKnowledgeService.findDrugsKnowledgeList(drugsCategoryId); + return HealthR.ok(list); + } + + + @GetMapping("/findDiseaseCategory") + public HealthR> findDiseaseCategory(@RequestParam Integer departmentId){ + List list=diseaseCategoryService.findDiseaseCategory(departmentId); + return HealthR.ok(list); + } @GetMapping("/findDepartment") public HealthR> findDepartment(){ diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthJobTitleController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthJobTitleController.java index a4f50d9..68e80b4 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthJobTitleController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthJobTitleController.java @@ -2,7 +2,9 @@ package doctor.controller; import doctor.common.core.domain.HealthR; import doctor.domain.dto.ApplyJoinDto; +import doctor.domain.entity.Banners; import doctor.domain.entity.DoctorJobTitleEntity; +import doctor.service.BannersService; import doctor.service.HealthJobTitleService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -15,6 +17,14 @@ public class HealthJobTitleController { @Autowired private HealthJobTitleService healthJobTitleService; + @Autowired + private BannersService bannersService; + @GetMapping("/bannersShow") + public HealthR> bannersShow(){ + List banners = bannersService.bannersShow(); + return HealthR.ok(banners); + } + @GetMapping("/findJobTitleList") public HealthR> findJobTitleList() { List doctorJobTitleEntities=healthJobTitleService.findJobTitleList(); diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/InformationController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/InformationController.java index 83f772f..7260aeb 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/InformationController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/InformationController.java @@ -21,7 +21,7 @@ import static com.github.pagehelper.page.PageMethod.startPage; * @CreateTime: 2024/1/11 16:19 */ @RestController -@RequestMapping("/share/information/v1") +@RequestMapping("/information/v1") public class InformationController { @Autowired private InformationService informationService; From 936c3c3391821f96a23e57eab909ca6d03029d7b Mon Sep 17 00:00:00 2001 From: chenbingxuan <3581044601@qq.com> Date: Sat, 13 Jan 2024 09:42:03 +0800 Subject: [PATCH 12/18] =?UTF-8?q?=E5=90=88=E5=B9=B6=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=B7=AF=E5=BE=84(=E6=82=A3=E8=80=85)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/doctor/controller/UserVideoController.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java index 64822fb..ab9643a 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java @@ -1,8 +1,6 @@ package doctor.controller; -import doctor.common.core.domain.R; -import doctor.domain.entity.UserVideoBuyEntity; -import doctor.domain.entity.UserVideoCollectionEntity; +import doctor.common.core.domain.HealthR; import doctor.domain.entity.UserWalletEntity; import doctor.domain.vo.UserVideoBuyVo; import doctor.domain.vo.UserVideoCollectionVo; @@ -29,7 +27,7 @@ public class UserVideoController { //用户视频收藏列表 @GetMapping("/findVideoCollectionList") - public HealthR> findVideoCollectionList(@RequestParam Integer page,@RequestParam Integer count){ + public HealthR> findVideoCollectionList(@RequestParam Integer page, @RequestParam Integer count){ startPage(page,count); List userVideoCollectionVos=userVideoService.findVideoCollectionList(); return HealthR.ok(userVideoCollectionVos); From 48a29d725f29f74203b5bf8c68dc4a98faf40f64 Mon Sep 17 00:00:00 2001 From: chenbingxuan <3581044601@qq.com> Date: Sat, 13 Jan 2024 10:00:27 +0800 Subject: [PATCH 13/18] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doctor-auth/src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/java/doctor/ConvertUtil.java | 53 ------------------- .../service/impl/InquiryServiceImpl.java | 2 +- .../service/impl/UserVideoServiceImpl.java | 2 +- .../src/main/resources/bootstrap.yml | 15 +++++- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- .../src/main/resources/bootstrap.yml | 4 +- 11 files changed, 29 insertions(+), 71 deletions(-) delete mode 100644 doctor-modules/doctor-health/src/main/java/doctor/ConvertUtil.java diff --git a/doctor-auth/src/main/resources/bootstrap.yml b/doctor-auth/src/main/resources/bootstrap.yml index 80f11fd..c30cba2 100644 --- a/doctor-auth/src/main/resources/bootstrap.yml +++ b/doctor-auth/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-gateway/src/main/resources/bootstrap.yml b/doctor-gateway/src/main/resources/bootstrap.yml index d3e056c..cc0e562 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: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 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 66f9597..c992149 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: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml b/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml index 81bc32c..007713f 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: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-health/src/main/java/doctor/ConvertUtil.java b/doctor-modules/doctor-health/src/main/java/doctor/ConvertUtil.java deleted file mode 100644 index e0d53da..0000000 --- a/doctor-modules/doctor-health/src/main/java/doctor/ConvertUtil.java +++ /dev/null @@ -1,53 +0,0 @@ -package doctor; - -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/java/doctor/service/impl/InquiryServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/InquiryServiceImpl.java index f0ba559..00d24bc 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/InquiryServiceImpl.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/InquiryServiceImpl.java @@ -1,10 +1,10 @@ package doctor.service.impl; -import doctor.ConvertUtil; import doctor.domain.entity.InquiryDetailsRecordEntity; import doctor.domain.vo.InquiryDetailsRecordVo; import doctor.mapper.InquiryMapper; import doctor.service.InquiryService; +import doctor.util.ConvertUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java index efd4466..e87338c 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java @@ -1,6 +1,5 @@ package doctor.service.impl; -import doctor.ConvertUtil; import doctor.domain.entity.UserVideoBuyEntity; import doctor.domain.entity.UserVideoCollectionEntity; import doctor.domain.entity.UserWalletEntity; @@ -8,6 +7,7 @@ import doctor.domain.vo.UserVideoBuyVo; import doctor.domain.vo.UserVideoCollectionVo; import doctor.mapper.UserVideoMapper; import doctor.service.UserVideoService; +import doctor.util.ConvertUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/doctor-modules/doctor-health/src/main/resources/bootstrap.yml b/doctor-modules/doctor-health/src/main/resources/bootstrap.yml index 203e553..5b5ac25 100644 --- a/doctor-modules/doctor-health/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-health/src/main/resources/bootstrap.yml @@ -15,13 +15,24 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 file-extension: yml # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + mail: + host: smtp.qq.com + port: 587 + username: 3581044601@qq.com + password: bwscqgqpkagjciih + default-encoding: UTF8 + properties: + mail: + smtp: + socketFactoryClass: javax.net.ssl.SSLSocketFactory + debug: true diff --git a/doctor-modules/doctor-job/src/main/resources/bootstrap.yml b/doctor-modules/doctor-job/src/main/resources/bootstrap.yml index ab123c4..537c5d6 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: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-system/src/main/resources/bootstrap.yml b/doctor-modules/doctor-system/src/main/resources/bootstrap.yml index 14e7505..8def34f 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: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 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 d94bf20..979155f 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: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 + namespace: 9de208a6-cb30-41ae-a880-78196c99c050 # 配置文件格式 file-extension: yml # 共享配置 From 54c88e0c6e86a170b30afb2a35d11bd1541aa8e0 Mon Sep 17 00:00:00 2001 From: chenbingxuan <3581044601@qq.com> Date: Sat, 13 Jan 2024 10:10:44 +0800 Subject: [PATCH 14/18] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/doctor/auth/service/HealthUserService.java | 2 -- 1 file changed, 2 deletions(-) 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 774c72c..f0bab6b 100644 --- a/doctor-auth/src/main/java/doctor/auth/service/HealthUserService.java +++ b/doctor-auth/src/main/java/doctor/auth/service/HealthUserService.java @@ -6,8 +6,6 @@ import doctor.auth.vo.UserVo; import doctor.common.core.domain.R; import doctor.common.security.service.TokenService; import doctor.system.api.RemoteDoctorService; -import doctor.system.api.RemoteUserService; -import doctor.system.api.factory.RemoteUserFallbackFactory; import doctor.system.api.model.LoginUser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; From bf29dcfee2d5a6e8eb63238afc4c4980d564a287 Mon Sep 17 00:00:00 2001 From: chenbingxuan <3581044601@qq.com> Date: Sun, 14 Jan 2024 15:13:38 +0800 Subject: [PATCH 15/18] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87+?= =?UTF-8?q?=E5=9B=9E=E6=98=BE=E5=8C=BB=E7=94=9F=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/doctor/system/api/domain/Doctor.java | 114 +------------ .../java/doctor/system/api/domain/User.java | 121 +------------- .../auth/service/HealthDoctorService.java | 3 + .../auth/service/HealthUserService.java | 3 + doctor-modules/doctor-health/pom.xml | 7 + .../controller/HealthJobTitleController.java | 21 +++ .../main/java/doctor/domain/vo/DoctorVo.java | 16 ++ .../java/doctor/domain/vo/FindImagePicVo.java | 8 + .../doctor/mapper/HealthJobTitleMapper.java | 12 ++ .../doctor/service/HealthJobTitleService.java | 10 ++ .../impl/HealthJobTitleServiceImpl.java | 46 ++++++ .../src/main/java/doctor/util/OssUtil.java | 154 ++++++++++++++++++ .../mapper/doctor/HealthJobTitleMapper.xml | 15 ++ 13 files changed, 300 insertions(+), 230 deletions(-) create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/domain/vo/DoctorVo.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/domain/vo/FindImagePicVo.java create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/util/OssUtil.java diff --git a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Doctor.java b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Doctor.java index f97c181..918da40 100644 --- a/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Doctor.java +++ b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/Doctor.java @@ -1,10 +1,11 @@ package doctor.system.api.domain; import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; - +@Data public class Doctor { private Integer id; private Integer departmentId; @@ -34,115 +35,4 @@ public class Doctor { @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date createTime; - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getDepartmentId() { - return departmentId; - } - - public void setDepartmentId(Integer departmentId) { - this.departmentId = departmentId; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public Integer getReviewStatus() { - return reviewStatus; - } - - public void setReviewStatus(Integer reviewStatus) { - this.reviewStatus = reviewStatus; - } - - 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 getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getImagePic() { - return imagePic; - } - - public void setImagePic(String imagePic) { - this.imagePic = imagePic; - } - - public String getJobTitle() { - return jobTitle; - } - - public void setJobTitle(String jobTitle) { - this.jobTitle = jobTitle; - } - - public String getInauguralHospital() { - return inauguralHospital; - } - - public void setInauguralHospital(String inauguralHospital) { - this.inauguralHospital = inauguralHospital; - } - - public String getPersonalProfile() { - return personalProfile; - } - - public void setPersonalProfile(String personalProfile) { - this.personalProfile = personalProfile; - } - - public String getGoodField() { - return goodField; - } - - public void setGoodField(String goodField) { - this.goodField = goodField; - } - - 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/User.java b/doctor-api/doctor-api-system/src/main/java/doctor/system/api/domain/User.java index 4e977a2..dfe6f57 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,15 +1,11 @@ package doctor.system.api.domain; +import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; -/** - * @ClassName : User - * @Description : 用户表 - * @Author : FJJ - * @Date: 2024-01-10 20:46 - */ +@Data public class User { private Integer id; private String phone; @@ -24,117 +20,6 @@ public class User { private Integer weight; private String invitationCode; private Date updateTime; - private Long createTime; + private Date 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 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 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-auth/src/main/java/doctor/auth/service/HealthDoctorService.java b/doctor-auth/src/main/java/doctor/auth/service/HealthDoctorService.java index 7d65188..c542545 100644 --- a/doctor-auth/src/main/java/doctor/auth/service/HealthDoctorService.java +++ b/doctor-auth/src/main/java/doctor/auth/service/HealthDoctorService.java @@ -30,6 +30,9 @@ public class HealthDoctorService { } catch (Exception e) { throw new RuntimeException(e); } + if (data==null){ + return null; + } if (s.equals(data.getDoctor().getPwd())){ Map token = tokenService.createToken(data); String accessToken = (String) token.get("access_token"); 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 f0bab6b..8ebd6f7 100644 --- a/doctor-auth/src/main/java/doctor/auth/service/HealthUserService.java +++ b/doctor-auth/src/main/java/doctor/auth/service/HealthUserService.java @@ -30,6 +30,9 @@ public class HealthUserService { } catch (Exception e) { throw new RuntimeException(e); } + if (data==null){ + return null; + } if (s.equals(data.getUser().getPwd())){ Map token = tokenService.createToken(data); String accessToken = (String) token.get("access_token"); diff --git a/doctor-modules/doctor-health/pom.xml b/doctor-modules/doctor-health/pom.xml index e89da6a..bad8103 100644 --- a/doctor-modules/doctor-health/pom.xml +++ b/doctor-modules/doctor-health/pom.xml @@ -14,6 +14,13 @@ + + + com.aliyun.oss + aliyun-sdk-oss + 3.10.2 + + com.alibaba.cloud diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthJobTitleController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthJobTitleController.java index 68e80b4..8053894 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthJobTitleController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthJobTitleController.java @@ -4,10 +4,13 @@ import doctor.common.core.domain.HealthR; import doctor.domain.dto.ApplyJoinDto; import doctor.domain.entity.Banners; import doctor.domain.entity.DoctorJobTitleEntity; +import doctor.domain.vo.DoctorVo; +import doctor.domain.vo.FindImagePicVo; import doctor.service.BannersService; import doctor.service.HealthJobTitleService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; import java.util.List; @@ -42,4 +45,22 @@ public class HealthJobTitleController { HealthR healthR= healthJobTitleService.applyJoin(applyJoinDto); return HealthR.ok(healthR); } + + @GetMapping("/findDoctorById") + public HealthR findDoctorById(@RequestHeader Integer doctorId, + @RequestHeader String sessionId) { + return HealthR.ok(healthJobTitleService.findDoctorById(doctorId)); + } + @GetMapping("/findSystemImagePic") + public HealthR> findSystemImagePic() { + return HealthR.ok(healthJobTitleService.findSystemImagePic()); + } + + @PostMapping("/uploadImagePic") + public HealthR uploadImagePic(@RequestParam("imagePic") MultipartFile imagePic, + @RequestHeader String sessionId, + @RequestHeader Integer doctorId) { + return HealthR.ok(healthJobTitleService.uploadImagePic(imagePic,doctorId,sessionId)); + } + } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/DoctorVo.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/DoctorVo.java new file mode 100644 index 0000000..6d47825 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/DoctorVo.java @@ -0,0 +1,16 @@ +package doctor.domain.vo; + +import lombok.Data; + +@Data +public class DoctorVo { + private Integer departmentId; + private String departmentName; + private String goodField; + private Integer id; + private String imagePic; + private String inauguralHospital; + private String jobTitle; + private String name; + private String personalProfile; +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/FindImagePicVo.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/FindImagePicVo.java new file mode 100644 index 0000000..70a8291 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/FindImagePicVo.java @@ -0,0 +1,8 @@ +package doctor.domain.vo; + +import lombok.Data; + +@Data +public class FindImagePicVo { + private String imagePic; +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthJobTitleMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthJobTitleMapper.java index ed82146..c20b840 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthJobTitleMapper.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthJobTitleMapper.java @@ -1,8 +1,10 @@ package doctor.mapper; import doctor.domain.entity.DoctorJobTitleEntity; +import doctor.system.api.domain.Department; import doctor.system.api.domain.Doctor; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -11,4 +13,14 @@ public interface HealthJobTitleMapper { List findJobTitleList(); void insertDoctor(Doctor doctor); + + Doctor findDoctorById(Integer id); + + Department findDepartmentById(Integer departmentId); + + DoctorJobTitleEntity findDoctorJobTitleById(Integer id); + + List findDoctorImgPic(); + + void updDoctorImgPicBuyId(@Param("doctorId") Integer doctorId, @Param("s") String s); } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/HealthJobTitleService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/HealthJobTitleService.java index 106aa37..2e4a985 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/HealthJobTitleService.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/HealthJobTitleService.java @@ -3,6 +3,10 @@ package doctor.service; import doctor.common.core.domain.HealthR; import doctor.domain.dto.ApplyJoinDto; import doctor.domain.entity.DoctorJobTitleEntity; +import doctor.domain.vo.DoctorVo; +import doctor.domain.vo.FindImagePicVo; +import io.swagger.models.auth.In; +import org.springframework.web.multipart.MultipartFile; import java.util.List; @@ -12,4 +16,10 @@ public interface HealthJobTitleService { HealthR sendEmailCode(String email); HealthR applyJoin(ApplyJoinDto applyJoinDto); + + DoctorVo findDoctorById(Integer doctorId); + + List findSystemImagePic(); + + HealthR uploadImagePic(MultipartFile imagePic, Integer doctorId, String sessionId); } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthJobTitleServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthJobTitleServiceImpl.java index 3e98162..b2b1a16 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthJobTitleServiceImpl.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthJobTitleServiceImpl.java @@ -1,11 +1,17 @@ package doctor.service.impl; import doctor.common.core.domain.HealthR; +import doctor.common.security.service.TokenService; import doctor.domain.dto.ApplyJoinDto; import doctor.domain.entity.DoctorJobTitleEntity; +import doctor.domain.vo.DoctorVo; +import doctor.domain.vo.FindImagePicVo; import doctor.mapper.HealthJobTitleMapper; import doctor.service.HealthJobTitleService; +import doctor.system.api.domain.Department; import doctor.system.api.domain.Doctor; +import doctor.system.api.model.LoginUser; +import doctor.util.OssUtil; import doctor.util.RSAUtils; import doctor.util.RsaKey; import doctor.util.SendEmail; @@ -14,8 +20,10 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; +import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Random; @@ -27,6 +35,8 @@ public class HealthJobTitleServiceImpl implements HealthJobTitleService { private HealthJobTitleMapper healthJobTitleMapper; @Autowired private SendEmail sendEmail; + @Autowired + private TokenService tokenService; @Resource private RedisTemplate redisTemplate; @@ -80,8 +90,44 @@ public class HealthJobTitleServiceImpl implements HealthJobTitleService { Doctor doctor = new Doctor(); BeanUtils.copyProperties(applyJoinDto,doctor); doctor.setCreateTime(new Date()); + Integer jobTitleId = applyJoinDto.getJobTitleId(); + DoctorJobTitleEntity doctorJobTitleEntity=healthJobTitleMapper.findDoctorJobTitleById(jobTitleId); + doctor.setJobTitle(doctorJobTitleEntity.getJobTitle()); healthJobTitleMapper.insertDoctor(doctor); redisTemplate.delete(applyJoinDto.getEmail()); return HealthR.ok(); } + + @Override + public DoctorVo findDoctorById(Integer doctorId) { + DoctorVo doctorVo = new DoctorVo(); + Doctor doctor=healthJobTitleMapper.findDoctorById(doctorId); + Department department=healthJobTitleMapper.findDepartmentById(doctor.getDepartmentId()); + BeanUtils.copyProperties(doctor,doctorVo); + BeanUtils.copyProperties(department,doctorVo); + return doctorVo; + } + + @Override + public List findSystemImagePic() { + ArrayList findImagePicVos = new ArrayList<>(); + FindImagePicVo findImagePicVo = new FindImagePicVo(); + List imgPics= healthJobTitleMapper.findDoctorImgPic(); + for (String imgPic : imgPics) { + findImagePicVo.setImagePic(imgPic); + findImagePicVos.add(findImagePicVo); + } + return findImagePicVos; + } + + @Override + public HealthR uploadImagePic(MultipartFile imagePic,Integer doctorId,String sessionId) { + String s = OssUtil.uploadMultipartFile(imagePic); + healthJobTitleMapper.updDoctorImgPicBuyId(doctorId,s); + LoginUser loginUser = tokenService.getLoginUser(sessionId); + Doctor doctor = loginUser.getDoctor(); + doctor.setImagePic(s); + tokenService.createToken(loginUser); + return HealthR.ok(s); + } } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/util/OssUtil.java b/doctor-modules/doctor-health/src/main/java/doctor/util/OssUtil.java new file mode 100644 index 0000000..20f9275 --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/util/OssUtil.java @@ -0,0 +1,154 @@ +package doctor.util; + + + +import com.aliyun.oss.OSS; +import com.aliyun.oss.OSSClientBuilder; +import com.aliyun.oss.model.GetObjectRequest; +import com.aliyun.oss.model.PutObjectRequest; +import lombok.extern.log4j.Log4j2; +import org.springframework.web.multipart.MultipartFile; +import java.io.*; +import java.time.LocalDateTime; +import java.util.UUID; + +/** + * Oss服务调用 + */ +@Log4j2 +public class OssUtil { + + /** + * Endpoint 存储对象概述 阿里云主账号AccessKey,accessKeySecret拥有所有API的访问权限 访问路径前缀 存储对象概述 + */ + private static String endPoint = "oss-cn-shanghai.aliyuncs.com"; + private static String accessKeyId = "LTAI5tLE4XbyvvbuT7D2stCk"; + private static String accessKeySecret = "W7ZeT4dMrMPP0c8BBwcyIPnhe3P4E8"; + private static String accessPre = "https://lyb1314.oss-cn-shanghai.aliyuncs.com/"; + + /** + * bucket名称 + * @return + */ + private static String bucketName = "lyb1314"; + + private static OSS ossClient ; + + static { + ossClient = new OSSClientBuilder().build( + endPoint, + accessKeyId, + accessKeySecret); + log.info("oss服务连接成功!"); + } + + /** + * 默认路径上传本地文件 + * @param filePath + */ + public static String uploadFile(String filePath){ + return uploadFileForBucket(bucketName,getOssFilePath(filePath) ,filePath); + } + + /** + * 默认路径上传multipartFile文件 + * @param multipartFile + */ + public static String uploadMultipartFile(MultipartFile multipartFile) { + return uploadMultipartFile(bucketName,getOssFilePath(multipartFile.getOriginalFilename()),multipartFile); + } + /** + * 上传 multipartFile 类型文件 + * @param bucketName + * @param ossPath + * @param multipartFile + */ + public static String uploadMultipartFile(String bucketName , String ossPath , MultipartFile multipartFile){ + InputStream inputStream = null; + try { + inputStream = multipartFile.getInputStream(); + } catch (IOException e) { + e.printStackTrace(); + } + uploadFileInputStreamForBucket(bucketName, ossPath, inputStream); + return accessPre+ossPath; + } + + /** + * 使用File上传PutObject上传文件 ** 程序默认使用次方法上传 + * @param bucketName 实例名称 + * @param ossPath oss存储路径 + * @param filePath 本地文件路径 + */ + public static String uploadFileForBucket(String bucketName , String ossPath , String filePath) { + // 创建PutObjectRequest对象。 + PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, ossPath, new File(filePath)); + + // 上传 + ossClient.putObject(putObjectRequest); + return accessPre+ossPath; + } + + /** + * 使用文件流上传到指定的bucket实例 + * @param bucketName 实例名称 + * @param ossPath oss存储路径 + * @param filePath 本地文件路径 + */ + public static String uploadFileInputStreamForBucket(String bucketName , String ossPath , String filePath){ + + // 填写本地文件的完整路径。如果未指定本地路径,则默认从示例程序所属项目对应本地路径中上传文件流。 + InputStream inputStream = null; + try { + inputStream = new FileInputStream(filePath); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + // 填写Bucket名称和Object完整路径。Object完整路径中不能包含Bucket名称。 + uploadFileInputStreamForBucket(bucketName, ossPath, inputStream); + return accessPre+ossPath; + } + + public static void uploadFileInputStreamForBucket(String bucketName , String ossPath , InputStream inputStream ){ + ossClient.putObject(bucketName, ossPath, inputStream); + } + + /** + * 下载 + * @param ossFilePath + * @param filePath + */ + public static void downloadFile(String ossFilePath , String filePath ){ + downloadFileForBucket(bucketName , ossFilePath , filePath); + } + /** + * 下载 + * @param bucketName 实例名称 + * @param ossFilePath oss存储路径 + * @param filePath 本地文件路径 + */ + public static void downloadFileForBucket(String bucketName , String ossFilePath , String filePath ){ + ossClient.getObject(new GetObjectRequest(bucketName, ossFilePath), new File(filePath)); + } + + /** + * + * @return + */ + public static String getOssDefaultPath(){ + LocalDateTime now = LocalDateTime.now(); + String url = + now.getYear()+"/"+ + now.getMonth()+"/"+ + now.getDayOfMonth()+"/"+ + now.getHour()+"/"+ + now.getMinute()+"/"; + return url; + } + + public static String getOssFilePath(String filePath){ + String fileSuf = filePath.substring(filePath.indexOf(".") + 1); + return getOssDefaultPath() + UUID.randomUUID().toString() + "." + fileSuf; + } + +} diff --git a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/HealthJobTitleMapper.xml b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/HealthJobTitleMapper.xml index 61245b8..8401276 100644 --- a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/HealthJobTitleMapper.xml +++ b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/HealthJobTitleMapper.xml @@ -8,9 +8,24 @@ VALUES (0,#{departmentId},#{email},#{userName},#{reviewStatus},#{phone},#{pwd},#{name},#{imagePic},#{jobTitle},#{inauguralHospital},#{personalProfile},#{goodField},#{createTime}); + + update doctor set image_pic=#{s} where id=#{doctorId} + + + + + From 2670eeb00b2b39c5001b0945d6be9ad96b7fb39d Mon Sep 17 00:00:00 2001 From: fjj <–1066869486@qq.com> Date: Sun, 14 Jan 2024 16:11:22 +0800 Subject: [PATCH 16/18] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=8E=A5=E5=8F=A34?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/doctor/system/api/domain/User.java | 2 +- .../controller/UserVideoController.java | 20 +++++-- .../entity/UserVideoCollectionEntity.java | 16 ++---- .../domain/vo/UserConsumptionRecordVo.java | 55 +++++++++++++++++++ .../java/doctor/mapper/UserVideoMapper.java | 7 ++- .../java/doctor/service/UserVideoService.java | 9 ++- .../service/impl/UserVideoServiceImpl.java | 18 ++++-- .../mapper/doctor/UserVideoMapper.xml | 8 ++- 8 files changed, 107 insertions(+), 28 deletions(-) create mode 100644 doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserConsumptionRecordVo.java 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 4e977a2..95babc1 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 @@ -24,7 +24,7 @@ public class User { private Integer weight; private String invitationCode; private Date updateTime; - private Long createTime; + private long createTime; public Integer getId() { return id; diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java index ab9643a..6b8d89c 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java @@ -2,6 +2,7 @@ package doctor.controller; import doctor.common.core.domain.HealthR; import doctor.domain.entity.UserWalletEntity; +import doctor.domain.vo.UserConsumptionRecordVo; import doctor.domain.vo.UserVideoBuyVo; import doctor.domain.vo.UserVideoCollectionVo; import doctor.service.UserVideoService; @@ -33,9 +34,9 @@ public class UserVideoController { return HealthR.ok(userVideoCollectionVos); } //用户取消视频收藏 - @GetMapping("/cancelVideoCollection/{id}") - public HealthR cancelVideoCollection(@PathVariable Integer id){ - userVideoService.cancelVideoCollection(id); + @DeleteMapping("/cancelVideoCollection") + public HealthR cancelVideoCollection(@RequestHeader Integer userId,@RequestHeader String sessionId,@RequestParam Integer videoId ){ + userVideoService.cancelVideoCollection(userId,sessionId,videoId); return HealthR.ok(); } //用户购买视频列表 @@ -46,9 +47,9 @@ public class UserVideoController { return HealthR.ok(userVideoCollectionVos); } //用户删除购买的视频 - @DeleteMapping("/deleteVideoBuy/{id}") - public HealthR deleteVideoBuy(@PathVariable Integer id){ - userVideoService.deleteVideoBuy(id); + @DeleteMapping("/deleteVideoBuy/{videoId}") + public HealthR deleteVideoBuy(@PathVariable Integer videoId){ + userVideoService.deleteVideoBuy(videoId); return HealthR.ok(); } @@ -58,6 +59,13 @@ public class UserVideoController { List userWallets = userVideoService.findUserWallet(); return HealthR.ok(userWallets); } + //用户消费记录 + @GetMapping("/findUserConsumptionRecordList") + public HealthR> findUserConsumptionRecordList(@RequestParam Integer page,@RequestParam Integer count){ + startPage(page,count); + List userConsumptionRecordVos = userVideoService.findUserConsumptionRecordList(); + return HealthR.ok(userConsumptionRecordVos); + } } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollectionEntity.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollectionEntity.java index 063f7c6..a00ae93 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollectionEntity.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/entity/UserVideoCollectionEntity.java @@ -1,5 +1,7 @@ package doctor.domain.entity; +import java.util.Date; + /** * @ClassName : UserVideoCollectionEntity * @Description : 用户视频收藏表 @@ -11,7 +13,7 @@ public class UserVideoCollectionEntity { private Integer id; private Integer userId; private Integer videoId; - private Long createTime; + private Date createTime; public Integer getId() { return id; @@ -37,21 +39,13 @@ public class UserVideoCollectionEntity { this.videoId = videoId; } - public Long getCreateTime() { + public Date getCreateTime() { return createTime; } - public void setCreateTime(Long createTime) { + public void setCreateTime(Date createTime) { this.createTime = createTime; } - public UserVideoCollectionEntity(Integer id, Integer userId, Integer videoId, Long createTime) { - this.id = id; - this.userId = userId; - this.videoId = videoId; - this.createTime = createTime; - } - public UserVideoCollectionEntity() { - } } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserConsumptionRecordVo.java b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserConsumptionRecordVo.java new file mode 100644 index 0000000..2c164ad --- /dev/null +++ b/doctor-modules/doctor-health/src/main/java/doctor/domain/vo/UserConsumptionRecordVo.java @@ -0,0 +1,55 @@ +package doctor.domain.vo; + +/** + * @ClassName : UserConsumptionRecordVo + * @Description : 消费记录表 + * @Author : FJJ + * @Date: 2024-01-14 15:30 + */ +public class UserConsumptionRecordVo { + private Integer direction; + private Integer type; + private Integer changeNum; + private String remark; + private long createTime; + + public Integer getDirection() { + return direction; + } + + public void setDirection(Integer direction) { + this.direction = direction; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public Integer getChangeNum() { + return changeNum; + } + + public void setChangeNum(Integer changeNum) { + this.changeNum = changeNum; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public long getCreateTime() { + return createTime; + } + + public void setCreateTime(long createTime) { + this.createTime = createTime; + } +} diff --git a/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java index a71cd12..c558185 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java @@ -1,5 +1,6 @@ package doctor.mapper; +import doctor.domain.entity.UserConsumptionRecordEntity; import doctor.domain.entity.UserVideoBuyEntity; import doctor.domain.entity.UserVideoCollectionEntity; import doctor.domain.entity.UserWalletEntity; @@ -18,11 +19,13 @@ import java.util.List; public interface UserVideoMapper { List findVideoCollectionList(); - void cancelVideoCollection(@Param("id") Integer id); + void cancelVideoCollection(@Param("videoId") Integer videoId); List findUserVideoBuyList(); - void deleteVideoBuy(@Param("id") Integer id); + void deleteVideoBuy(@Param("videoId") Integer videoId); List findUserWallet(); + + List findUserConsumptionRecordList(); } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java index c9a8fb7..9868a70 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java @@ -3,6 +3,7 @@ package doctor.service; import doctor.domain.entity.UserVideoBuyEntity; import doctor.domain.entity.UserVideoCollectionEntity; import doctor.domain.entity.UserWalletEntity; +import doctor.domain.vo.UserConsumptionRecordVo; import doctor.domain.vo.UserVideoBuyVo; import doctor.domain.vo.UserVideoCollectionVo; @@ -17,13 +18,17 @@ import java.util.List; public interface UserVideoService { - void cancelVideoCollection(Integer id); + List findUserVideoBuyList(); - void deleteVideoBuy(Integer id); + void deleteVideoBuy(Integer videoId); List findUserWallet(); List findVideoCollectionList(); + + void cancelVideoCollection(Integer userId, String sessionId, Integer videoId); + + List findUserConsumptionRecordList(); } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java index e87338c..6564c2c 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java @@ -1,8 +1,10 @@ package doctor.service.impl; +import doctor.domain.entity.UserConsumptionRecordEntity; import doctor.domain.entity.UserVideoBuyEntity; import doctor.domain.entity.UserVideoCollectionEntity; import doctor.domain.entity.UserWalletEntity; +import doctor.domain.vo.UserConsumptionRecordVo; import doctor.domain.vo.UserVideoBuyVo; import doctor.domain.vo.UserVideoCollectionVo; import doctor.mapper.UserVideoMapper; @@ -33,10 +35,18 @@ public class UserVideoServiceImpl implements UserVideoService { } @Override - public void cancelVideoCollection(Integer id) { - userVideoMapper.cancelVideoCollection(id); + public void cancelVideoCollection(Integer userId, String sessionId, Integer videoId) { + userVideoMapper.cancelVideoCollection(videoId); } + @Override + public List findUserConsumptionRecordList() { + List userConsumptionRecordEntityList=userVideoMapper.findUserConsumptionRecordList(); + List userConsumptionRecordVoList = ConvertUtil.entityToVoList(userConsumptionRecordEntityList, UserConsumptionRecordVo.class); + return userConsumptionRecordVoList; + } + + @Override public List findUserVideoBuyList() { List userVideoCollectionEntityList=userVideoMapper.findUserVideoBuyList(); @@ -45,8 +55,8 @@ public class UserVideoServiceImpl implements UserVideoService { } @Override - public void deleteVideoBuy(Integer id) { - userVideoMapper.deleteVideoBuy(id); + public void deleteVideoBuy(Integer videoId) { + userVideoMapper.deleteVideoBuy(videoId); } @Override diff --git a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml index 2201c0c..7e40b37 100644 --- a/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml +++ b/doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml @@ -6,12 +6,12 @@ delete from user_video_collection - where video_id = #{id} + where video_id = #{videoId} delete from user_video_buy - where video_id = #{id} + where video_id = #{videoId} + From 335c3ac82f0675e8c8270c8a275100cfc275508e Mon Sep 17 00:00:00 2001 From: fjj <–1066869486@qq.com> Date: Sun, 14 Jan 2024 16:11:48 +0800 Subject: [PATCH 17/18] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=8E=A5=E5=8F=A34?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doctor-auth/src/main/resources/bootstrap.yml | 4 ++-- doctor-gateway/src/main/resources/bootstrap.yml | 4 ++-- doctor-modules/doctor-file/src/main/resources/bootstrap.yml | 4 ++-- doctor-modules/doctor-gen/src/main/resources/bootstrap.yml | 4 ++-- doctor-modules/doctor-health/src/main/resources/bootstrap.yml | 4 ++-- doctor-modules/doctor-job/src/main/resources/bootstrap.yml | 4 ++-- doctor-modules/doctor-system/src/main/resources/bootstrap.yml | 4 ++-- doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/doctor-auth/src/main/resources/bootstrap.yml b/doctor-auth/src/main/resources/bootstrap.yml index c30cba2..80f11fd 100644 --- a/doctor-auth/src/main/resources/bootstrap.yml +++ b/doctor-auth/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-gateway/src/main/resources/bootstrap.yml b/doctor-gateway/src/main/resources/bootstrap.yml index cc0e562..d3e056c 100644 --- a/doctor-gateway/src/main/resources/bootstrap.yml +++ b/doctor-gateway/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-file/src/main/resources/bootstrap.yml b/doctor-modules/doctor-file/src/main/resources/bootstrap.yml index c992149..66f9597 100644 --- a/doctor-modules/doctor-file/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-file/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml b/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml index 007713f..81bc32c 100644 --- a/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-gen/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-health/src/main/resources/bootstrap.yml b/doctor-modules/doctor-health/src/main/resources/bootstrap.yml index 5b5ac25..793ba90 100644 --- a/doctor-modules/doctor-health/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-health/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: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-job/src/main/resources/bootstrap.yml b/doctor-modules/doctor-job/src/main/resources/bootstrap.yml index 537c5d6..ab123c4 100644 --- a/doctor-modules/doctor-job/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-job/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-modules/doctor-system/src/main/resources/bootstrap.yml b/doctor-modules/doctor-system/src/main/resources/bootstrap.yml index 8def34f..14e7505 100644 --- a/doctor-modules/doctor-system/src/main/resources/bootstrap.yml +++ b/doctor-modules/doctor-system/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml b/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml index 979155f..d94bf20 100644 --- a/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml +++ b/doctor-visual/doctor-monitor/src/main/resources/bootstrap.yml @@ -15,11 +15,11 @@ spring: discovery: # 服务注册地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 config: # 配置中心地址 server-addr: 101.34.77.101:8848 - namespace: 9de208a6-cb30-41ae-a880-78196c99c050 + namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040 # 配置文件格式 file-extension: yml # 共享配置 From 23eba7490ad7f4cc5a26e258b5a1e73e3f779a2d Mon Sep 17 00:00:00 2001 From: fjj <–1066869486@qq.com> Date: Sun, 14 Jan 2024 16:18:47 +0800 Subject: [PATCH 18/18] =?UTF-8?q?=E6=9C=80=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doctor-auth/src/main/resources/bootstrap.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doctor-auth/src/main/resources/bootstrap.yml b/doctor-auth/src/main/resources/bootstrap.yml index 80f11fd..2e1cf69 100644 --- a/doctor-auth/src/main/resources/bootstrap.yml +++ b/doctor-auth/src/main/resources/bootstrap.yml @@ -1,9 +1,9 @@ # Tomcat -server: +server: port: 9200 # Spring -spring: +spring: application: # 应用名称 name: doctor-auth