Compare commits

..

13 Commits

Author SHA1 Message Date
fjj ca1c7154cd 完善用户信息 2024-01-19 20:24:13 +08:00
fjj 88ee5e376b 更新1 2024-01-17 16:49:31 +08:00
chenbingxuan 1eceecfdb2 1.17 2024-01-17 16:01:53 +08:00
fjj 20231281bc Merge remote-tracking branch 'origin/fjj' into newMaster
# Conflicts:
#	doctor-modules/doctor-health/src/main/java/doctor/controller/HealthJobTitleController.java
#	doctor-modules/doctor-health/src/main/java/doctor/controller/UserVideoController.java
#	doctor-modules/doctor-health/src/main/java/doctor/mapper/UserVideoMapper.java
#	doctor-modules/doctor-health/src/main/java/doctor/service/UserVideoService.java
#	doctor-modules/doctor-health/src/main/java/doctor/service/impl/UserVideoServiceImpl.java
#	doctor-modules/doctor-health/src/main/resources/mapper/doctor/UserVideoMapper.xml
2024-01-17 16:00:30 +08:00
fjj 61d82c1018 更新 2024-01-17 15:59:30 +08:00
chenbingxuan 228cef25a8 1.17 2024-01-17 15:57:05 +08:00
chenbingxuan a2035b5899 Merge remote-tracking branch 'origin/cbx' into newMaster 2024-01-17 15:56:29 +08:00
chenbingxuan b62f617ad0 1.17 2024-01-17 15:54:39 +08:00
chenbingxuan 690e465eea Revert "1.17"
This reverts commit f0c7d44551.
2024-01-17 11:46:46 +08:00
chenbingxuan f0c7d44551 1.17 2024-01-17 11:35:47 +08:00
chenbingxuan d294516c49 1.16 2024-01-16 22:30:44 +08:00
chenbingxuan 0a15f6acdd 更新网关 2024-01-16 14:32:40 +08:00
chenbingxuan e00d68ef89 1.15日 2024-01-15 22:32:04 +08:00
45 changed files with 915 additions and 44 deletions

View File

@ -121,6 +121,13 @@
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>2.2</version>
</dependency>
</dependencies>

View File

@ -11,7 +11,7 @@ public class TokenConstants
*
*/
public static final String AUTHENTICATION = "Authorization";
public static final String SESSIONID = "SESSIONID";
public static final String SESSIONID = "Sessionid";
/**
*

View File

@ -48,6 +48,13 @@ public class BaseController
PageUtils.startPage();
}
protected void startPage(Integer page,Integer count)
{
PageUtils.startPage(page,count);
}
/**
* 线
*/

View File

@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.core.Ordered;
import org.springframework.http.HttpHeaders;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
@ -52,6 +53,7 @@ public class AuthFilter implements GlobalFilter, Ordered
{
return chain.filter(exchange);
}
String token = getToken(request);
if (StringUtils.isEmpty(token))
@ -121,14 +123,11 @@ public class AuthFilter implements GlobalFilter, Ordered
private String getToken(ServerHttpRequest request)
{
String token = request.getHeaders().getFirst(TokenConstants.AUTHENTICATION);
if (StringUtils.isNotEmpty(token))
if (StringUtils.isEmpty(token))
{
token = request.getQueryParams().getFirst(TokenConstants.SESSIONID);
token = request.getHeaders().getFirst(TokenConstants.SESSIONID);
}
if(StringUtils.isNotEmpty(token)){
request.getHeaders().set(TokenConstants.SESSIONID,token);
}
// 如果前端设置了令牌前缀,则裁剪掉前缀
// 如果前端设置了令牌前缀,则裁剪掉前缀``
if (StringUtils.isNotEmpty(token) && token.startsWith(TokenConstants.PREFIX))
{
token = token.replaceFirst(TokenConstants.PREFIX, StringUtils.EMPTY);

View File

@ -0,0 +1,26 @@
package doctor.controller;
import doctor.common.core.domain.HealthR;
import doctor.domain.vo.InquiryRecordVo;
import doctor.service.InquiryVerifyService;
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("/inquiry/verify/v1")
public class HealthInquiryVerifyController {
@Autowired
private InquiryVerifyService inquiryVerifyService;
@GetMapping("/findInquiryRecordList")
public HealthR<List<InquiryRecordVo>> findInquiryRecordList() {
List<InquiryRecordVo> inquiryRecordList = inquiryVerifyService.findInquiryRecordList();
return HealthR.ok(inquiryRecordList);
}
}

View File

@ -57,11 +57,4 @@ public class HealthJobTitleController {
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));
}
}

View File

@ -0,0 +1,58 @@
package doctor.controller;
import doctor.common.core.domain.HealthR;
import doctor.domain.vo.DoctorIncomeRecordVo;
import doctor.domain.vo.DoctorVo;
import doctor.domain.vo.NoticeReadNumVo;
import doctor.domain.vo.WalletVo;
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;
@RestController
@RequestMapping("/verify/v1")
public class HealthRVerifyController {
@Autowired
private HealthJobTitleService healthJobTitleService;
@GetMapping("/findDoctorWallet")
public HealthR<WalletVo> findDoctorWallet(@RequestHeader Integer doctorId,
@RequestHeader String sessionId) {
WalletVo healthR = healthJobTitleService.findDoctorWallet(doctorId);
return HealthR.ok(healthR);
}
@PostMapping("/uploadImagePic")
public HealthR uploadImagePic(@RequestParam("imagePic") MultipartFile imagePic,
@RequestHeader String sessionId,
@RequestHeader Integer doctorId) {
return HealthR.ok(healthJobTitleService.uploadImagePic(imagePic, doctorId, sessionId));
}
@GetMapping("/findDoctorIncomeRecordList")
public HealthR<List<DoctorIncomeRecordVo>> findDoctorIncomeRecordList(@RequestHeader Integer doctorId,
@RequestHeader String sessionId,
@RequestParam Integer page,
@RequestParam Integer count) {
List<DoctorIncomeRecordVo> doctorIncomeRecordEntities = healthJobTitleService.findDoctorIncomeRecordList(doctorId, page, count);
return HealthR.ok(doctorIncomeRecordEntities);
}
@GetMapping("/findDoctorById")
public HealthR<DoctorVo> findDoctorById(@RequestHeader Integer doctorId,
@RequestHeader String sessionId) {
return HealthR.ok(healthJobTitleService.findDoctorById(doctorId));
}
@GetMapping("/findDoctorNoticeReadNum")
public HealthR<List<NoticeReadNumVo>> findDoctorNoticeReadNum(@RequestHeader Integer doctorId,
@RequestHeader String sessionId) {
List<NoticeReadNumVo> healthR = healthJobTitleService.findDoctorNoticeReadNum(doctorId);
return HealthR.ok(healthR);
}
}

View File

@ -0,0 +1,28 @@
package doctor.controller;
import doctor.common.core.domain.HealthR;
import doctor.domain.vo.SickCircleVo;
import doctor.service.SickCircleService;
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;
@RestController
@RequestMapping("/sickCircle/v1")
public class HealthSickController {
@Autowired
private SickCircleService sickCircleService;
@GetMapping("/findSickCircleList")
public HealthR<List<SickCircleVo>> sickCircleList(@RequestParam Integer page,
@RequestParam Integer count,
@RequestParam Integer departmentId) {
List<SickCircleVo> sickCircleList = sickCircleService.findSickCircleList(page, count, departmentId);
return HealthR.ok(sickCircleList);
}
}

View File

@ -106,5 +106,52 @@ public class UserVideoController {
}
//用户关注医生列表
@GetMapping("/findUserDoctorFollowList")
public HealthR<List<UserDoctorFollowVo>> findUserDoctorFollowList(@RequestParam Integer page,@RequestParam Integer count){
startPage(page,count);
List<UserDoctorFollowVo> userDoctorFollowVos = userVideoService.findUserDoctorFollowList();
return HealthR.ok(userDoctorFollowVos);
}
//用户任务列表
@GetMapping("/findUserTaskList")
public HealthR<List<UserTaskRecordVo>> findUserTaskList(){
List<UserTaskRecordVo> userTaskRecordVos = userVideoService.findUserTaskList();
return HealthR.ok(userTaskRecordVos);
}
//用户连续签到天数
@GetMapping("/findUserSign")
public HealthR<List<SignEntity>> findUserSign(@RequestHeader Integer userId){
List<SignEntity> signEntities = userVideoService.findUserSign(userId);
return HealthR.ok(signEntities);
}
//根据用户ID查询用户信息
@GetMapping("/getUserInfoById")
public HealthR<List<UserVo>> getUserInfoById(@RequestHeader Integer userId){
List<UserVo> userVos = userVideoService.getUserInfoById(userId);
return HealthR.ok(userVos);
}
//用户签到
@PostMapping("/addSign")
public HealthR addSign(){
userVideoService.addSign();
return HealthR.ok("签到成功");
}
//完善用户信息
@PutMapping("/perfectUserInfo")
public HealthR perfectUserInfo(@RequestParam Integer age,@RequestParam Integer height,@RequestParam Integer weight,@RequestHeader Integer userId ){
userVideoService.perfectUserInfo(age,height,weight,userId);
return HealthR.ok("完善成功");
}
//修改用户性别
@PutMapping("/updateUserSex")
public HealthR updateUserSex(@RequestParam Integer sex,@RequestHeader Integer userId){
userVideoService.updateUserSex(sex,userId);
return HealthR.ok("修改成功");
}
//修改用户昵称
@PutMapping("/modifyNickName")
public HealthR modifyNickName(@RequestParam String nickName,@RequestHeader Integer userId){
userVideoService.modifyNickName(nickName,userId);
return HealthR.ok("修改成功");
}
}

View File

@ -0,0 +1,9 @@
package doctor.domain.dto;
import lombok.Data;
@Data
public class CheckCodeDto {
private String email;
private String code;
}

View File

@ -0,0 +1,25 @@
package doctor.domain.dto;
import lombok.Data;
import java.util.Date;
/**
* @ClassName : UserTaskRecordDto
* @Description :
* @Author : FJJ
* @Date: 2024-01-17 10:54
*/
@Data
public class UserTaskRecordDto {
private Integer id;
private Integer userId;
private Integer taskId;
private String taskName;
private String taskType;
private String reward;
private Date taskTime;
private Integer status;
private Date createTime;
}

View File

@ -0,0 +1,86 @@
package doctor.domain.entity;
import javax.persistence.*;
import java.util.Date;
@Entity
@Table(name = "doctor_income_record")
public class DoctorIncomeRecordEntity {
@Id
@Column(name = "id")
private Integer id;
@Column(name = "doctor_id")
private Integer doctorId;
@Column(name = "money")
private Integer money;
@Column(name = "direction")
private Integer direction;
@Column(name = "income_type")
private Integer incomeType;
@Column(name = "record_time")
private Date recordTime;
@Column(name = "create_time")
private Date createTime;
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getDoctorId() {
return this.doctorId;
}
public void setDoctorId(Integer doctorId) {
this.doctorId = doctorId;
}
public Integer getMoney() {
return this.money;
}
public void setMoney(Integer money) {
this.money = money;
}
public Integer getDirection() {
return this.direction;
}
public void setDirection(Integer direction) {
this.direction = direction;
}
public Integer getIncomeType() {
return this.incomeType;
}
public void setIncomeType(Integer incomeType) {
this.incomeType = incomeType;
}
public Date getRecordTime() {
return this.recordTime;
}
public void setRecordTime(Date recordTime) {
this.recordTime = recordTime;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,21 @@
package doctor.domain.entity;
import lombok.Data;
import java.util.Date;
@Data
public class DoctorWalletEntity {
private Integer id;
private Integer doctorId;
private Integer balance;
private Integer version;
private Date updateTime;
private Date createTime;
}

View File

@ -0,0 +1,49 @@
package doctor.domain.entity;
import lombok.Data;
import javax.persistence.*;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
@Data
public class SickCircleEntity {
private Integer id;
private Integer userId;
private String title;
private Integer departmentId;
private Integer adoptCommentId;
private String disease;
private String detail;
private String treatmentHospital;
private Date treatmentStartTime;
private Date treatmentEndTime;
private String treatmentProcess;
private String picture;
private Date releaseTime;
private Date adoptTime;
private Integer amount;
private LocalDateTime createTime;
private Integer collectionNum;
private Integer commentNum;
}

View File

@ -0,0 +1,21 @@
package doctor.domain.entity;
import lombok.Data;
import java.util.Date;
/**
* @ClassName : SignEntity
* @Description :
* @Author : FJJ
* @Date: 2024-01-17 16:18
*/
@Data
public class SignEntity {
private Integer id;
private Integer userId;
private Date signTime;
private Integer signNum;
private Integer signReward;
private Date createTime;
}

View File

@ -0,0 +1,20 @@
package doctor.domain.entity;
import lombok.Data;
import java.util.Date;
/**
* @ClassName : TaskEntity
* @Description :
* @Author : FJJ
* @Date: 2024-01-17 10:59
*/
@Data
public class TaskEntity {
private Integer id;
private String taskName;
private String taskType;
private String reward;
private Date createTime;
}

View File

@ -42,9 +42,14 @@ public class UserEntity implements Serializable {
@NotBlank(message = "用户名不能为空")
private String userName;
private String headPic;
private Integer sex;
private Integer age;
private Integer height;
private Integer weight;
private String invitationCode;
private Date updateTime;
private Long createTime;
private Date createTime;
}

View File

@ -0,0 +1,21 @@
package doctor.domain.entity;
import lombok.Data;
import java.util.Date;
/**
* @ClassName : UserTaskRecord
* @Description :
* @Author : FJJ
* @Date: 2024-01-17 10:47
*/
@Data
public class UserTaskRecordEntity {
private Integer id;
private Integer userId;
private Integer taskId;
private Date taskTime;
private Integer status;
private long createTime;
}

View File

@ -0,0 +1,17 @@
package doctor.domain.entity;
import lombok.Data;
import java.util.Date;
@Data
public class doctorSystemNoticeEntity {
private Integer id;
private Integer num;
private String content;
private Integer noticeType;
private Integer pushType;
private Integer status;
private Date createTime;
}

View File

@ -0,0 +1,4 @@
package doctor.domain.vo;
public class DoctorHistoryInquiryVo {
}

View File

@ -0,0 +1,13 @@
package doctor.domain.vo;
import lombok.Data;
import java.util.Date;
@Data
public class DoctorIncomeRecordVo {
private Integer money;
private Integer direction;
private Integer incomeType;
private Date recordTime;
}

View File

@ -0,0 +1,15 @@
package doctor.domain.vo;
import lombok.Data;
@Data
public class InquiryRecordVo {
private Integer recordId;
private Integer userId;
private String uerHeadPic;
private String doctorHeadPic;
private String listContent;
private String nickName;
private long inquiryTime;
private Integer status;
}

View File

@ -0,0 +1,9 @@
package doctor.domain.vo;
import lombok.Data;
@Data
public class NoticeReadNumVo {
private int notReadNum;
private int noticeType;
}

View File

@ -0,0 +1,12 @@
package doctor.domain.vo;
import lombok.Data;
@Data
public class SickCircleVo {
private Integer sickCircleId;
private String title;
private String detail;
private long releaseTime;
private Integer amount;
}

View File

@ -0,0 +1,19 @@
package doctor.domain.vo;
import lombok.Data;
/**
* @ClassName : UserTaskRecordVo
* @Description :
* @Author : FJJ
* @Date: 2024-01-17 10:50
*/
@Data
public class UserTaskRecordVo {
private Integer id;
private String taskName;
private Integer taskType;
private Integer reward;
private Integer whetherFinish;
private Integer whetherReceive;
}

View File

@ -16,6 +16,20 @@ import javax.validation.constraints.Size;
*/
@Data
public class UserVo {
private Integer id;
private String userName;
private String jiGuangPwd;
private String headPic;
private Integer sex;
private Integer age;
private Integer height;
private Integer weight;
private Integer whetherBingWeChat;
private String invitationCode;
private Integer idCardFlag;
private Integer bankFlag;
private Integer faceFlag;
@NotBlank(message = "密码不能为空")
@Size(min = 4, message = "密码长度不能小于4")
private String pwd;

View File

@ -0,0 +1,14 @@
package doctor.domain.vo;
import io.swagger.models.auth.In;
import lombok.Data;
@Data
public class WalletVo {
private Integer id;
private Integer doctorId;
private Integer balance;
private Integer version;
private Integer whetherBindIdCard;
private Integer whetherBindBankCard;
}

View File

@ -1,6 +1,9 @@
package doctor.mapper;
import doctor.domain.entity.DoctorIncomeRecordEntity;
import doctor.domain.entity.DoctorJobTitleEntity;
import doctor.domain.entity.DoctorWalletEntity;
import doctor.domain.entity.doctorSystemNoticeEntity;
import doctor.system.api.domain.Department;
import doctor.system.api.domain.Doctor;
import org.apache.ibatis.annotations.Mapper;
@ -23,4 +26,10 @@ public interface HealthJobTitleMapper {
List<String> findDoctorImgPic();
void updDoctorImgPicBuyId(@Param("doctorId") Integer doctorId, @Param("s") String s);
DoctorWalletEntity findDoctorWalletById(Integer doctorId);
List<DoctorIncomeRecordEntity> findDoctorIncomeRecordList(Integer doctorId);
List<doctorSystemNoticeEntity> findDoctorNoticeReadNum(Integer doctorId);
}

View File

@ -0,0 +1,4 @@
package doctor.mapper;
public interface InquiryVerifyServiceMapper {
}

View File

@ -0,0 +1,12 @@
package doctor.mapper;
import doctor.domain.entity.SickCircleEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface SickCircleMapper {
List<SickCircleEntity> findSickCircleList(Integer departmentId);
}

View File

@ -1,6 +1,7 @@
package doctor.mapper;
import doctor.domain.dto.UserArchivesDto;
import doctor.domain.dto.UserTaskRecordDto;
import doctor.domain.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -40,4 +41,20 @@ public interface UserVideoMapper {
void uploadUserArchivesImg(@Param("id") Integer id);
List<UserDoctorFollowEntity> findUserDoctorFollowList();
List<UserTaskRecordDto> findUserTaskList();
List<SignEntity> findUserSign(@Param("userId") Integer userId);
List<UserEntity> getUserInfoById(@Param("userId") Integer userId);
void perfectUserInfo(@Param("age") Integer age, @Param("height") Integer height, @Param("weight") Integer weight, @Param("userId") Integer userId);
void updateUserSex(@Param("sex") Integer sex, @Param("userId") Integer userId);
void modifyNickName(@Param("nickName") String nickName, @Param("userId") Integer userId);
// void addSign(SignEntity signEntity);
}

View File

@ -3,9 +3,7 @@ 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 doctor.domain.vo.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
@ -22,4 +20,16 @@ public interface HealthJobTitleService {
List<FindImagePicVo> findSystemImagePic();
HealthR uploadImagePic(MultipartFile imagePic, Integer doctorId, String sessionId);
HealthR checkCode(String email, String code);
WalletVo findDoctorWallet(Integer doctorId);
List<DoctorIncomeRecordVo> findDoctorIncomeRecordList(Integer doctorId,Integer page, Integer count);
HealthR drawCash(Integer doctorId, Integer money);
HealthR<List<DoctorHistoryInquiryVo>> findHistoryInquiryRecord(Integer page, Integer size);
List<NoticeReadNumVo> findDoctorNoticeReadNum(Integer doctorId);
}

View File

@ -0,0 +1,11 @@
package doctor.service;
import doctor.common.core.domain.HealthR;
import doctor.domain.vo.InquiryRecordVo;
import java.util.List;
public interface InquiryVerifyService {
List<InquiryRecordVo> findInquiryRecordList();
}

View File

@ -0,0 +1,11 @@
package doctor.service;
import doctor.common.core.domain.HealthR;
import doctor.domain.vo.SickCircleVo;
import java.util.List;
public interface SickCircleService {
List<SickCircleVo> findSickCircleList(Integer page, Integer size, Integer departmentId);
}

View File

@ -1,10 +1,7 @@
package doctor.service;
import doctor.domain.dto.UserArchivesDto;
import doctor.domain.entity.UserAdoptCommentEntity;
import doctor.domain.entity.UserArchivesEntity;
import doctor.domain.entity.UserEntity;
import doctor.domain.entity.UserWalletEntity;
import doctor.domain.entity.*;
import doctor.domain.vo.*;
import java.util.List;
@ -44,4 +41,19 @@ public interface UserVideoService {
void uploadUserArchivesImg(Integer id);
List<UserDoctorFollowVo> findUserDoctorFollowList();
List<UserTaskRecordVo> findUserTaskList();
List<SignEntity> findUserSign(Integer userId);
List<UserVo> getUserInfoById(Integer userId);
void addSign();
void perfectUserInfo(Integer age, Integer height, Integer weight, Integer userId);
void updateUserSex(Integer sex, Integer userId);
void modifyNickName(String nickName, Integer userId);
}

View File

@ -1,11 +1,14 @@
package doctor.service.impl;
import doctor.common.core.domain.HealthR;
import doctor.common.core.web.controller.BaseController;
import doctor.common.security.service.TokenService;
import doctor.domain.dto.ApplyJoinDto;
import doctor.domain.entity.DoctorIncomeRecordEntity;
import doctor.domain.entity.DoctorJobTitleEntity;
import doctor.domain.vo.DoctorVo;
import doctor.domain.vo.FindImagePicVo;
import doctor.domain.entity.DoctorWalletEntity;
import doctor.domain.entity.doctorSystemNoticeEntity;
import doctor.domain.vo.*;
import doctor.mapper.HealthJobTitleMapper;
import doctor.service.HealthJobTitleService;
import doctor.system.api.domain.Department;
@ -15,7 +18,7 @@ import doctor.util.OssUtil;
import doctor.util.RSAUtils;
import doctor.util.RsaKey;
import doctor.util.SendEmail;
import org.bouncycastle.jcajce.provider.asymmetric.rsa.RSAUtil;
import lombok.extern.log4j.Log4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
@ -30,7 +33,7 @@ import java.util.Random;
import java.util.concurrent.TimeUnit;
@Service
public class HealthJobTitleServiceImpl implements HealthJobTitleService {
public class HealthJobTitleServiceImpl extends BaseController implements HealthJobTitleService {
@Autowired
private HealthJobTitleMapper healthJobTitleMapper;
@Autowired
@ -130,4 +133,70 @@ public class HealthJobTitleServiceImpl implements HealthJobTitleService {
tokenService.createToken(loginUser);
return HealthR.ok(s);
}
@Override
public HealthR checkCode(String email, String code) {
if (email==null||email.equals("")){
return HealthR.fail();
}
if (code==null||code.equals("")){
return HealthR.fail();
}
if (!redisTemplate.hasKey(email)){
return HealthR.fail();
}
Integer integer = redisTemplate.opsForValue().get(email);
if (!String.valueOf(integer).equals(code)){
return HealthR.fail();
}
return HealthR.ok();
}
@Override
public WalletVo findDoctorWallet(Integer doctorId) {
WalletVo walletVo=new WalletVo();
DoctorWalletEntity doctorWalletEntity = healthJobTitleMapper.findDoctorWalletById(doctorId);
BeanUtils.copyProperties(doctorWalletEntity,walletVo);
walletVo.setWhetherBindIdCard(1);
walletVo.setWhetherBindBankCard(1);
return walletVo;
}
@Override
public List<DoctorIncomeRecordVo> findDoctorIncomeRecordList(Integer doctorId, Integer page, Integer count) {
List<DoctorIncomeRecordEntity> doctorIncomeRecordList = healthJobTitleMapper.findDoctorIncomeRecordList(doctorId);
ArrayList<DoctorIncomeRecordVo> doctorIncomeRecordVos = new ArrayList<>();
for (DoctorIncomeRecordEntity doctorIncomeRecordEntity : doctorIncomeRecordList) {
DoctorIncomeRecordVo doctorIncomeRecordVo = new DoctorIncomeRecordVo();
BeanUtils.copyProperties(doctorIncomeRecordEntity,doctorIncomeRecordVo);
doctorIncomeRecordVos.add(doctorIncomeRecordVo);
}
return doctorIncomeRecordVos;
}
@Override
public HealthR drawCash(Integer doctorId, Integer money) {
return null;
}
@Override
public HealthR<List<DoctorHistoryInquiryVo>> findHistoryInquiryRecord(Integer page, Integer size) {
startPage(page,size);
return null;
}
@Override
public List<NoticeReadNumVo> findDoctorNoticeReadNum(Integer doctorId) {
List<doctorSystemNoticeEntity> doctorSystemNoticeEntities = healthJobTitleMapper.findDoctorNoticeReadNum(doctorId);
ArrayList<NoticeReadNumVo> noticeReadNumVos = new ArrayList<>();
for (doctorSystemNoticeEntity doctorSystemNoticeEntity : doctorSystemNoticeEntities) {
NoticeReadNumVo noticeReadNumVo = new NoticeReadNumVo();
noticeReadNumVo.setNotReadNum(doctorSystemNoticeEntity.getNum());
noticeReadNumVo.setNoticeType(doctorSystemNoticeEntity.getNoticeType());
noticeReadNumVos.add(noticeReadNumVo);
}
return noticeReadNumVos;
}
}

View File

@ -0,0 +1,22 @@
package doctor.service.impl;
import doctor.common.core.web.controller.BaseController;
import doctor.domain.vo.InquiryRecordVo;
import doctor.mapper.InquiryVerifyServiceMapper;
import doctor.service.InquiryVerifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class InquiryVerifyServiceImpl extends BaseController implements InquiryVerifyService {
@Autowired
private InquiryVerifyServiceMapper inquiryVerifyServiceMapper;
@Override
public List<InquiryRecordVo> findInquiryRecordList() {
return null;
}
}

View File

@ -0,0 +1,33 @@
package doctor.service.impl;
import doctor.common.core.domain.HealthR;
import doctor.common.core.web.controller.BaseController;
import doctor.domain.entity.SickCircleEntity;
import doctor.domain.vo.SickCircleVo;
import doctor.mapper.SickCircleMapper;
import doctor.service.SickCircleService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service
public class SickCircleServiceImpl extends BaseController implements SickCircleService {
@Autowired
private SickCircleMapper sickCircleMapper;
@Override
public List<SickCircleVo> findSickCircleList(Integer page, Integer size, Integer departmentId) {
List<SickCircleEntity> list = sickCircleMapper.findSickCircleList(departmentId);
ArrayList<SickCircleVo> sickCircleVos = new ArrayList<>();
for (SickCircleEntity sickCircleEntity : list) {
SickCircleVo sickCircleVo = new SickCircleVo();
sickCircleVo.setSickCircleId(sickCircleEntity.getId());
BeanUtils.copyProperties(sickCircleEntity,sickCircleVo);
sickCircleVos.add(sickCircleVo);
}
return sickCircleVos;
}
}

View File

@ -1,6 +1,7 @@
package doctor.service.impl;
import doctor.domain.dto.UserArchivesDto;
import doctor.domain.dto.UserTaskRecordDto;
import doctor.domain.entity.*;
import doctor.domain.vo.*;
import doctor.mapper.UserVideoMapper;
@ -79,7 +80,52 @@ public class UserVideoServiceImpl implements UserVideoService {
userVideoMapper.uploadUserArchivesImg(id);
}
@Override
public List<UserDoctorFollowVo> findUserDoctorFollowList() {
List<UserDoctorFollowEntity> userDoctorFollowEntityList=userVideoMapper.findUserDoctorFollowList();
List<UserDoctorFollowVo> userDoctorFollowVoList = ConvertUtil.entityToVoList(userDoctorFollowEntityList, UserDoctorFollowVo.class);
return userDoctorFollowVoList;
}
@Override
public List<UserTaskRecordVo> findUserTaskList() {
List<UserTaskRecordDto> userTaskRecordDtos=userVideoMapper.findUserTaskList();
List<UserTaskRecordVo> userTaskRecordVoList = ConvertUtil.entityToVoList(userTaskRecordDtos, UserTaskRecordVo.class);
return userTaskRecordVoList;
}
@Override
public List<SignEntity> findUserSign(Integer userId) {
List<SignEntity> userEntityList=userVideoMapper.findUserSign(userId);
return userEntityList;
}
@Override
public List<UserVo> getUserInfoById(Integer userId) {
List<UserEntity> userEntities=userVideoMapper.getUserInfoById(userId);
List<UserVo> userVos = ConvertUtil.entityToVoList(userEntities, UserVo.class);
return userVos;
}
@Override
public void addSign() {
// userVideoMapper.addSign(signEntity);
}
@Override
public void perfectUserInfo(Integer age, Integer height, Integer weight, Integer userId) {
userVideoMapper.perfectUserInfo(age,height,weight,userId);
}
@Override
public void updateUserSex(Integer sex, Integer userId) {
userVideoMapper.updateUserSex(sex,userId);
}
@Override
public void modifyNickName(String nickName, Integer userId) {
userVideoMapper.modifyNickName(nickName,userId);
}
@Override

View File

@ -28,4 +28,13 @@
<select id="findDoctorImgPic" resultType="java.lang.String">
select image_pic from doctor
</select>
<select id="findDoctorWalletById" resultType="doctor.domain.entity.DoctorWalletEntity">
select * from doctor_wallet where doctor_id=#{doctorId}
</select>
<select id="findDoctorIncomeRecordList" resultType="doctor.domain.entity.DoctorIncomeRecordEntity">
select * from doctor_income_record where doctor_id=#{doctorId}
</select>
<select id="findDoctorNoticeReadNum" resultType="doctor.domain.entity.doctorSystemNoticeEntity">
SELECT COUNT(id) num,notice_type FROM doctor_system_notice where receive_doctor_id=#{doctorId} and status=2 GROUP BY notice_type
</select>
</mapper>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="doctor.mapper.InquiryVerifyServiceMapper">
</mapper>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="doctor.mapper.SickCircleMapper">
<select id="findSickCircleList" resultType="doctor.domain.entity.SickCircleEntity">
SELECT * FROM sick_circle WHERE department_id = #{departmentId}
</select>
</mapper>

View File

@ -30,11 +30,45 @@ create_time
now()
);
</insert>
<!-- <insert id="addSign">-->
<!-- insert into sign (-->
<!-- user_id,-->
<!--sign_time,-->
<!--sign_num,-->
<!--sign_reward,-->
<!--create_time-->
<!-- )-->
<!-- values (-->
<!-- #{userId},-->
<!-- now(),-->
<!-- sign_num+1,-->
<!-- #{signReward},-->
<!-- now()-->
<!-- );-->
<!-- </insert>-->
<update id="uploadUserArchivesImg">
update user_archives
set picture = #{picture}
where id=#{id}
</update>
<update id="perfectUserInfo">
update user
set age = #{age},
height = #{height},
weight = #{weight}
where id = #{userId}
</update>
<update id="updateUserSex">
update user
set sex = #{sex}
where id = #{userId}
</update>
<update id="modifyNickName">
update user
set nick_name = #{nickName}
where id = #{userId}
</update>
<delete id="cancelVideoCollection">
delete
from user_video_collection
@ -75,5 +109,20 @@ create_time
select *
from user_archives where user_id=#{userId}
</select>
<select id="findUserDoctorFollowList" resultType="doctor.domain.entity.UserDoctorFollowEntity">
select *
from user_doctor_follow
</select>
<select id="findUserTaskList" resultType="doctor.domain.dto.UserTaskRecordDto">
SELECT user_task_record.*,task.task_name,task.task_type,task.reward FROM user_task_record LEFT JOIN task ON user_task_record.task_id=task.id
</select>
<select id="findUserSign" resultType="doctor.domain.entity.SignEntity">
select *
from sign where user_id=#{userId}
</select>
<select id="getUserInfoById" resultType="doctor.domain.entity.UserEntity">
select *
from user where id=#{userId}
</select>
</mapper>

View File

@ -20,7 +20,7 @@ import doctor.system.service.ISysDictTypeService;
/**
*
*
*
* @author ruoyi
*/
@Service
@ -43,7 +43,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
/**
*
*
*
* @param dictType
* @return
*/
@ -55,7 +55,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
/**
*
*
*
* @return
*/
@Override
@ -66,7 +66,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
/**
*
*
*
* @param dictType
* @return
*/
@ -89,7 +89,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
/**
* ID
*
*
* @param dictId ID
* @return
*/
@ -101,7 +101,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
/**
*
*
*
* @param dictType
* @return
*/
@ -113,7 +113,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
/**
*
*
*
* @param dictIds ID
*/
@Override
@ -167,7 +167,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
/**
*
*
*
* @param dict
* @return
*/
@ -184,7 +184,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
/**
*
*
*
* @param dict
* @return
*/
@ -205,13 +205,12 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
/**
*
*
*
* @param dict
* @return
*/
@Override
public boolean checkDictTypeUnique(SysDictType dict)
{
public boolean checkDictTypeUnique(SysDictType dict) {
Long dictId = StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId();
SysDictType dictType = dictTypeMapper.checkDictTypeUnique(dict.getDictType());
if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue())

View File

@ -14,7 +14,7 @@ import doctor.system.service.ISysRoleService;
/**
*
*
*
* @author ruoyi
*/
@Service
@ -28,7 +28,7 @@ public class SysPermissionServiceImpl implements ISysPermissionService
/**
*
*
*
* @param userId Id
* @return
*/
@ -50,8 +50,8 @@ public class SysPermissionServiceImpl implements ISysPermissionService
/**
*
*
* @param userId Id
*
* @param user Id
* @return
*/
@Override