newMaster
chenbingxuan 2024-01-20 08:31:20 +08:00
parent 7d6f974bd4
commit 3a62f92629
21 changed files with 189 additions and 35 deletions

View File

@ -23,7 +23,7 @@ public class HealthDoctorController {
@PostMapping("/login")
@ApiOperation("邮箱密码登录")
public HealthR<?> login(@RequestParam @ApiParam("email") String email, @RequestParam @ApiParam("pwd") String pwd) {
public HealthR<?> login(@RequestParam String email, @RequestParam String pwd) {
DoctorVo userInfo = healthDoctorService.login(email,pwd);
if (userInfo!=null){
return HealthR.ok(userInfo,"登录成功");

View File

@ -1,12 +1,11 @@
package doctor.controller;
import doctor.common.core.domain.HealthR;
import doctor.domain.vo.HistoryInquiryRecordVo;
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 org.springframework.web.bind.annotation.*;
import java.util.List;
@ -23,4 +22,12 @@ public class HealthInquiryVerifyController {
return HealthR.ok(inquiryRecordList);
}
@GetMapping("/findHistoryInquiryRecord")
public HealthR<List<HistoryInquiryRecordVo>> findHistoryInquiryRecord(@RequestParam Integer page,
@RequestParam Integer count,
@RequestHeader Integer doctorId) {
List<HistoryInquiryRecordVo> inquiryRecordList = inquiryVerifyService.findHistoryInquiryRecord(page,count,doctorId);
return HealthR.ok(inquiryRecordList);
}
}

View File

@ -28,7 +28,7 @@ public class HealthJobTitleController {
return HealthR.ok(doctorJobTitleEntities);
}
@PostMapping("/sendEmailCode")
@RequestMapping("/sendEmailCode")
public HealthR sendEmailCode(@RequestParam("email") String email) {
HealthR healthR= healthJobTitleService.sendEmailCode(email);
return HealthR.ok(healthR);
@ -50,4 +50,10 @@ public class HealthJobTitleController {
return HealthR.ok(healthJobTitleService.findSystemImagePic());
}
@PutMapping("/checkCode")
public HealthR checkCode(@RequestParam("email") String email,
@RequestParam("code") String code) {
return HealthR.ok(healthJobTitleService.checkCode(email, code));
}
}

View File

@ -1,10 +1,7 @@
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.domain.vo.*;
import doctor.service.HealthJobTitleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -18,6 +15,34 @@ public class HealthRVerifyController {
@Autowired
private HealthJobTitleService healthJobTitleService;
@PostMapping("/chooseImagePic")
public HealthR chooseImagePic(@RequestParam String imagePic,
@RequestHeader Integer doctorId) {
healthJobTitleService.upImagePicByDoctorId(imagePic,doctorId);
return HealthR.ok();
}
@GetMapping("/findDoctorSystemNoticeList")
public HealthR<List<DoctorSystemNoticeListVo>> findDoctorSystemNoticeList(
@RequestParam Integer page,@RequestParam Integer count) {
List<DoctorSystemNoticeListVo> list = healthJobTitleService.findDoctorSystemNoticeList(page,count);
return HealthR.ok(list);
}
@GetMapping("/findDoctorInquiryNoticeList")
public HealthR<List<DoctorSystemNoticeListVo>> findDoctorInquiryNoticeList(
@RequestParam Integer page,@RequestParam Integer count) {
List<DoctorSystemNoticeListVo> list = healthJobTitleService.findDoctorSystemNoticeList(page,count);
return HealthR.ok(list);
}
@GetMapping("/findDoctorHealthyCurrencyNoticeList")
public HealthR<List<DoctorSystemNoticeListVo>> findDoctorHealthyCurrencyNoticeList(
@RequestParam Integer page,@RequestParam Integer count) {
List<DoctorSystemNoticeListVo> list = healthJobTitleService.findDoctorSystemNoticeList(page,count);
return HealthR.ok(list);
}
@GetMapping("/findDoctorWallet")
public HealthR<WalletVo> findDoctorWallet(@RequestHeader Integer doctorId,
@RequestHeader String sessionId) {
@ -55,4 +80,13 @@ public class HealthRVerifyController {
return HealthR.ok(healthR);
}
@GetMapping("/findMyAdoptedCommentList")
public HealthR<List<MyAdoptedCommentListVo>> findMyAdoptedCommentList(@RequestHeader Integer doctorId,
@RequestHeader String sessionId,
@RequestParam Integer page,
@RequestParam Integer count) {
List<MyAdoptedCommentListVo> healthR = healthJobTitleService.findMyAdoptedCommentList(doctorId,page,count);
return HealthR.ok(healthR);
}
}

View File

@ -19,7 +19,6 @@ import static com.github.pagehelper.page.PageMethod.startPage;
*/
@RestController
@RequestMapping("/share/information/v1")
public class InformationController {
@Autowired
private InformationService informationService;

View File

@ -67,8 +67,6 @@ public class PatientController {
return sickCircleService.publishSickCircle(sickCircleEntity);
}
/**
*
*
@ -77,9 +75,9 @@ public class PatientController {
*/
@GetMapping("/findSickCircleList")
public HealthR<List<SickCircleEntity>> sickCircleList(@RequestParam(value = "departmentId",required = false) Integer departmentId,
@RequestParam(value = "page",defaultValue = "1") Integer page,
@RequestParam(value = "count",defaultValue = "10") Integer count) {
return patientService.sickCircleList(departmentId);
@RequestParam(value = "page") Integer page,
@RequestParam(value = "count") Integer count) {
return patientService.sickCircleList(departmentId,page,count);
}
private PageInfo<SickCircleEntity> startPage(Integer page, Integer count) {

View File

@ -0,0 +1,13 @@
package doctor.domain.entity;
import lombok.Data;
import java.util.Date;
@Data
public class DoctorSystemReplyEntity {
private Integer id;
private String content;
private Date createTime;
}

View File

@ -0,0 +1,12 @@
package doctor.domain.vo;
import lombok.Data;
import java.util.Date;
@Data
public class DoctorSystemNoticeListVo {
private Integer id;
private String content;
private Date createTime;
}

View File

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

View File

@ -0,0 +1,13 @@
package doctor.domain.vo;
import lombok.Data;
@Data
public class MyAdoptedCommentListVo {
private Integer releaseUserId;
private String releaseUserNickName;
private String title;
private String disease;
private String content;
private String adoptTime;
}

View File

@ -1,9 +1,7 @@
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.controller.HealthRVerifyController;
import doctor.domain.entity.*;
import doctor.system.api.domain.Department;
import doctor.system.api.domain.Doctor;
import org.apache.ibatis.annotations.Mapper;
@ -32,4 +30,8 @@ public interface HealthJobTitleMapper {
List<DoctorIncomeRecordEntity> findDoctorIncomeRecordList(Integer doctorId);
List<doctorSystemNoticeEntity> findDoctorNoticeReadNum(Integer doctorId);
List<DoctorSystemReplyEntity> findDoctorSystemNoticeList();
void upImagePicByDoctorId(@Param("doctorId") Integer doctorId, @Param("imagePic") String imagePic);
}

View File

@ -6,7 +6,6 @@ import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface InquiryVerifyServiceMapper {
List<InquiryRecordVo> findInquiryRecordList();
}

View File

@ -1,6 +1,7 @@
package doctor.service;
import doctor.common.core.domain.HealthR;
import doctor.controller.HealthRVerifyController;
import doctor.domain.dto.ApplyJoinDto;
import doctor.domain.entity.DoctorJobTitleEntity;
import doctor.domain.vo.*;
@ -32,4 +33,10 @@ public interface HealthJobTitleService {
HealthR<List<DoctorHistoryInquiryVo>> findHistoryInquiryRecord(Integer page, Integer size);
List<NoticeReadNumVo> findDoctorNoticeReadNum(Integer doctorId);
List<MyAdoptedCommentListVo> findMyAdoptedCommentList(Integer doctorId, Integer page, Integer count);
List<DoctorSystemNoticeListVo> findDoctorSystemNoticeList(Integer page, Integer count);
void upImagePicByDoctorId(String imagePic, Integer doctorId);
}

View File

@ -1,6 +1,7 @@
package doctor.service;
import doctor.common.core.domain.HealthR;
import doctor.domain.vo.HistoryInquiryRecordVo;
import doctor.domain.vo.InquiryRecordVo;
import java.util.List;
@ -8,4 +9,5 @@ import java.util.List;
public interface InquiryVerifyService {
List<InquiryRecordVo> findInquiryRecordList();
List<HistoryInquiryRecordVo> findHistoryInquiryRecord(Integer page, Integer count, Integer doctorId);
}

View File

@ -29,7 +29,7 @@ public interface PatientService {
HealthR<List<SickCircleEntity>> sickCircleList(Integer departmentId);
HealthR<List<SickCircleEntity>> sickCircleList(Integer departmentId, Integer page, Integer count);
HealthR<List<SickCommentEntity>> findSickCircleCommentList(Integer sickCircleId);

View File

@ -3,11 +3,9 @@ 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.controller.HealthRVerifyController;
import doctor.domain.dto.ApplyJoinDto;
import doctor.domain.entity.DoctorIncomeRecordEntity;
import doctor.domain.entity.DoctorJobTitleEntity;
import doctor.domain.entity.DoctorWalletEntity;
import doctor.domain.entity.doctorSystemNoticeEntity;
import doctor.domain.entity.*;
import doctor.domain.vo.*;
import doctor.mapper.HealthJobTitleMapper;
import doctor.service.HealthJobTitleService;
@ -88,7 +86,7 @@ public class HealthJobTitleServiceImpl extends BaseController implements HealthJ
}
Integer integer = redisTemplate.opsForValue().get(applyJoinDto.getEmail());
if (!String.valueOf(integer).equals(applyJoinDto.getCode())){
return HealthR.fail("验码错误");
return HealthR.fail("验证码码错误");
}
Doctor doctor = new Doctor();
BeanUtils.copyProperties(applyJoinDto,doctor);
@ -199,4 +197,28 @@ public class HealthJobTitleServiceImpl extends BaseController implements HealthJ
}
return noticeReadNumVos;
}
@Override
public List<MyAdoptedCommentListVo> findMyAdoptedCommentList(Integer doctorId, Integer page, Integer count) {
startPage(page,count);
return null;
}
@Override
public List<DoctorSystemNoticeListVo> findDoctorSystemNoticeList(Integer page, Integer count) {
startPage(page,count);
List<DoctorSystemReplyEntity> doctorSystemNoticeList = healthJobTitleMapper.findDoctorSystemNoticeList();
ArrayList<DoctorSystemNoticeListVo> doctorSystemNoticeListVos = new ArrayList<>();
for (DoctorSystemReplyEntity doctorSystemReplyEntity : doctorSystemNoticeList) {
DoctorSystemNoticeListVo doctorSystemNoticeListVo = new DoctorSystemNoticeListVo();
BeanUtils.copyProperties(doctorSystemReplyEntity,doctorSystemNoticeListVo);
doctorSystemNoticeListVos.add(doctorSystemNoticeListVo);
}
return doctorSystemNoticeListVos;
}
@Override
public void upImagePicByDoctorId(String imagePic, Integer doctorId) {
healthJobTitleMapper.upImagePicByDoctorId(doctorId,imagePic);
}
}

View File

@ -1,6 +1,7 @@
package doctor.service.impl;
import doctor.common.core.web.controller.BaseController;
import doctor.domain.vo.HistoryInquiryRecordVo;
import doctor.domain.vo.InquiryRecordVo;
import doctor.mapper.InquiryVerifyServiceMapper;
import doctor.service.InquiryVerifyService;
@ -16,6 +17,15 @@ public class InquiryVerifyServiceImpl extends BaseController implements InquiryV
@Override
public List<InquiryRecordVo> findInquiryRecordList() {
return inquiryVerifyServiceMapper.findInquiryRecordList();
//TODO 待做
//inquiryVerifyServiceMapper.findInquiryRecordList();
return null;
}
@Override
public List<HistoryInquiryRecordVo> findHistoryInquiryRecord(Integer page, Integer count, Integer doctorId) {
startPage(page,count);
//TODO 待做
return null;
}
}

View File

@ -3,6 +3,7 @@ package doctor.service.impl;
import com.alibaba.nacos.api.model.v2.Result;
import doctor.common.core.constant.TokenConstants;
import doctor.common.core.domain.HealthR;
import doctor.common.core.web.controller.BaseController;
import doctor.common.security.service.TokenService;
import doctor.domain.entity.SickCircleEntity;
import doctor.domain.entity.SickCommentEntity;
@ -24,7 +25,7 @@ import java.util.List;
*/
@Service
@Log4j2
public class PatientServiceImpl implements PatientService {
public class PatientServiceImpl extends BaseController implements PatientService {
@Autowired
private PatientMapper patientMapper;
@ -35,12 +36,13 @@ public class PatientServiceImpl implements PatientService {
@Override
public HealthR<List<SickCircleEntity>> sickCircleList(Integer departmentId) {
public HealthR<List<SickCircleEntity>> sickCircleList(Integer departmentId, Integer page, Integer count) {
/**
* id
* @param departmentId id
* @return
*/
startPage(page,count);
List<SickCircleEntity> sickCircleEntity = patientMapper.sickCircleList(departmentId);
return HealthR.ok(sickCircleEntity);
}

View File

@ -29,7 +29,7 @@ spring:
host: smtp.qq.com
port: 587
username: 3581044601@qq.com
password: bwscqgqpkagjciih
password: jwxhwyxfaznhdaae
default-encoding: UTF8
properties:
mail:

View File

@ -11,6 +11,9 @@
<update id="updDoctorImgPicBuyId">
update doctor set image_pic=#{s} where id=#{doctorId}
</update>
<update id="upImagePicByDoctorId">
update doctor set image_pic=#{imagePic} where id=#{doctorId}
</update>
<select id="findJobTitleList" resultType="doctor.domain.entity.DoctorJobTitleEntity">
@ -35,6 +38,20 @@
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
m.notice_type,
COALESCE(COUNT(n.notice_type), 0) AS num
FROM
(
SELECT DISTINCT notice_type
FROM doctor_system_notice
) m
LEFT JOIN
doctor_system_notice n ON m.notice_type = n.notice_type AND n.status = 2
GROUP BY
m.notice_type;
</select>
<select id="findDoctorSystemNoticeList" resultType="doctor.domain.entity.DoctorSystemReplyEntity">
select * from doctor_system_reply
</select>
</mapper>

View File

@ -5,7 +5,4 @@
<mapper namespace="doctor.mapper.InquiryVerifyServiceMapper">
<select id="findInquiryRecordList" resultType="doctor.domain.vo.InquiryRecordVo">
</select>
</mapper>