医生查看患者送给自己的礼物
parent
48a65f04f2
commit
8f8dff4e52
|
@ -0,0 +1,38 @@
|
|||
package com.four.doctor.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.four.common.duck.Result;
|
||||
import com.four.common.duck.domain.GiftRecord;
|
||||
import com.four.doctor.service.GiftRecordDoctorService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.apache.catalina.LifecycleState;
|
||||
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.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/giftRecordDoctor")
|
||||
@Log4j2
|
||||
public class GiftRecordDoctorController {
|
||||
|
||||
@Autowired
|
||||
private GiftRecordDoctorService giftRecordDoctorService;
|
||||
@Autowired
|
||||
private HttpServletRequest request;
|
||||
|
||||
@PostMapping("/ShowGiftRecordDoctor")
|
||||
public Result<List<GiftRecord>> ShowGiftRecordDoctor(@RequestParam Long registrationInformationId){
|
||||
log.info("功能名称:查看患者送给自己的礼物,请求URI:{},请求方法:{},请求参数:{}",request.getRequestURI(),
|
||||
request.getMethod(), JSONObject.toJSONString(registrationInformationId));
|
||||
List<GiftRecord> list=giftRecordDoctorService.ShowGiftRecordDoctor(registrationInformationId);
|
||||
log.info("功能名称:查看患者送给自己的礼物,请求URI:{},请求方法:{},返回结果:{}",request.getRequestURI(),
|
||||
request.getMethod(),JSONObject.toJSONString(list));
|
||||
return Result.success(list);
|
||||
|
||||
}
|
||||
}
|
|
@ -8,6 +8,7 @@ import lombok.extern.log4j.Log4j2;
|
|||
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.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
@ -29,7 +30,7 @@ public class HistoricalDoctorController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/ShowHistoricalDoctor")
|
||||
public Result<List<HistoricalConsultation>> ShowHistoricalDoctor(Long registrationInformationId){
|
||||
public Result<List<HistoricalConsultation>> ShowHistoricalDoctor(@RequestParam Long registrationInformationId){
|
||||
log.info("功能名称:医生查询历史问诊,请求URI:{},请求方法:{},请求参数:{}",request.getRequestURI(),
|
||||
request.getMethod(), JSONObject.toJSONString(registrationInformationId));
|
||||
List<HistoricalConsultation> list= historicalDoctorService.ShowHistoricalDoctor(registrationInformationId);
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package com.four.doctor.mapper;
|
||||
|
||||
import com.four.common.duck.domain.GiftRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface GiftRecordDoctorMapper {
|
||||
List<GiftRecord> ShowGiftRecordDoctor(@Param("registrationInformationId") Long registrationInformationId);
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package com.four.doctor.service;
|
||||
|
||||
import com.four.common.duck.domain.GiftRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface GiftRecordDoctorService {
|
||||
List<GiftRecord> ShowGiftRecordDoctor(Long registrationInformationId);
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.four.doctor.service.Impl;
|
||||
|
||||
import com.four.common.duck.domain.GiftRecord;
|
||||
import com.four.doctor.mapper.GiftRecordDoctorMapper;
|
||||
import com.four.doctor.service.GiftRecordDoctorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class GiftRecordDoctorServiceImpl implements GiftRecordDoctorService {
|
||||
|
||||
@Autowired
|
||||
private GiftRecordDoctorMapper giftDoctorMapper;
|
||||
|
||||
@Override
|
||||
public List<GiftRecord> ShowGiftRecordDoctor(Long registrationInformationId) {
|
||||
List<GiftRecord> giftRecordList=giftDoctorMapper.ShowGiftRecordDoctor(registrationInformationId);
|
||||
return giftRecordList;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
<?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="com.four.doctor.mapper.GiftRecordDoctorMapper">
|
||||
|
||||
<resultMap id="GiftRecordDoctor" type="com.four.common.duck.domain.GiftRecord">
|
||||
<id property="giftRecordId" column="gift_record_id"/>
|
||||
<result property="giverId" column="gift_id"/>
|
||||
<result property="registrationInformationId" column="registration_information_id"/>
|
||||
<result property="giftId" column="gift_if"/>
|
||||
<result property="giftGivingTime" column="gift_giving_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectGiftRecord">
|
||||
select gift_record_id,
|
||||
giver_id,
|
||||
registration_information_id,
|
||||
gift_id,
|
||||
gift_giving_time
|
||||
from gift_record
|
||||
</sql>
|
||||
|
||||
<select id="ShowGiftRecordDoctor" resultType="com.four.common.duck.domain.GiftRecord">
|
||||
<include refid="selectGiftRecord"></include>
|
||||
<where>
|
||||
<if test="null!=registrationInformationId and ''!=registrationInformationId">
|
||||
registration_information_id=#{registrationInformationId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
|
@ -22,7 +22,7 @@
|
|||
<select id="ShowHistoricalDoctor" resultMap="HistoricalConsultationDoctor">
|
||||
<include refid="SelectHistoricalDoctor"></include>
|
||||
<where>
|
||||
<if test="null!=registrationInformationId and ''!registrationInformationId">
|
||||
<if test="null!=registrationInformationId and ''!=registrationInformationId">
|
||||
registartion_information_id=#{registrationInformationId}
|
||||
</if>
|
||||
</where>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<select id="ShowPatientEvaluatorDoctor" resultMap="patientEvaluatorDoctor">
|
||||
<include refid="selectPatientDoctor"></include>
|
||||
<where>
|
||||
<if test="null!=registration_information_id and ''!=registration_information_id">
|
||||
<if test="null!=registrationInformationId and ''!=registrationInformationId">
|
||||
registration_information_id=#{registrationInformationId}
|
||||
</if>
|
||||
</where>
|
||||
|
|
Loading…
Reference in New Issue