功能添加
parent
d1d8096ba4
commit
a72c066263
|
@ -99,6 +99,11 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-amqp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
|
||||
<version>1.1.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -137,11 +137,32 @@ public class ConsultationController {
|
|||
request.getMethod(),consultationStatus);
|
||||
ConsultationResponse consultation = consultationService.findConsulationFindById(consultationStatus);
|
||||
Result result = Result.success(consultation);
|
||||
log.info("功能名称:查询正在问诊中的数据,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),JSONObject.toJSONString(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 结束问诊
|
||||
No such property: code for class: Script1
|
||||
* @return: com.grail.common.core.domain.Result
|
||||
* @Author: YHY
|
||||
* @Updator: YHY
|
||||
* @Date 2023/10/29 18:54
|
||||
*/
|
||||
@PostMapping("/EndConsultation/{consultationStatus}")
|
||||
public Result EndConsultation(@PathVariable Integer consultationStatus){
|
||||
log.info("功能名称:结束问诊,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),consultationStatus);
|
||||
consultationService.EndConsultation(consultationStatus);
|
||||
Result result = Result.success();
|
||||
log.info("功能名称:结束问诊,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),JSONObject.toJSONString(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -28,4 +28,7 @@ public interface ConsultationMapper {
|
|||
List<MiddleDiagnosisResponse> middleDiagnosisList();
|
||||
|
||||
ConsultationResponse findConsulationFindById(@Param("consultationStatus") Integer consultationStatus);
|
||||
|
||||
void EndConsultation(@Param("consultationStatus") Integer consultationStatus);
|
||||
|
||||
}
|
||||
|
|
|
@ -27,5 +27,5 @@ public interface DoctorMapper {
|
|||
|
||||
List<DisgnosisResponse> disgnosisList();
|
||||
|
||||
Result addDisgnosis(Disgnosis disgnosis);
|
||||
int addDisgnosis(Disgnosis disgnosis);
|
||||
}
|
||||
|
|
|
@ -25,4 +25,6 @@ public interface ConsultationService {
|
|||
Result<List<MiddleDiagnosisResponse>> middleDiagnosisList();
|
||||
|
||||
ConsultationResponse findConsulationFindById(Integer consultationStatus);
|
||||
|
||||
void EndConsultation(Integer consultationStatus);
|
||||
}
|
||||
|
|
|
@ -61,4 +61,9 @@ public class ConsultationServiceimpl implements ConsultationService {
|
|||
public ConsultationResponse findConsulationFindById(Integer consultationStatus) {
|
||||
return consultationMapper.findConsulationFindById(consultationStatus);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void EndConsultation(Integer consultationStatus) {
|
||||
consultationMapper.EndConsultation(consultationStatus);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,12 +8,16 @@ import com.grail.publice.domain.Doctor;
|
|||
import com.grail.publice.domain.request.RequestDoctor;
|
||||
import com.grail.publice.domain.response.DisgnosisResponse;
|
||||
import com.grail.publice.domain.response.ResponseDoctor;
|
||||
import org.springframework.amqp.AmqpException;
|
||||
import org.springframework.amqp.core.Message;
|
||||
import org.springframework.amqp.core.MessagePostProcessor;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @ClassName : DoctorServiceimpl
|
||||
|
@ -25,8 +29,6 @@ import java.util.List;
|
|||
public class DoctorServiceimpl implements DoctorService {
|
||||
@Autowired
|
||||
private DoctorMapper doctorMapper;
|
||||
@Autowired
|
||||
private RabbitTemplate rabbitTemplate;
|
||||
|
||||
@Override
|
||||
public Result<List<ResponseDoctor>> doctorList(RequestDoctor requestDoctor) {
|
||||
|
@ -53,9 +55,8 @@ public class DoctorServiceimpl implements DoctorService {
|
|||
|
||||
@Override
|
||||
public Result addDisgnosis(Disgnosis disgnosis) {
|
||||
|
||||
//添加诊断信息后 MQ发送消息到患者用户
|
||||
|
||||
return doctorMapper.addDisgnosis(disgnosis);
|
||||
//添加诊断信息
|
||||
int i = doctorMapper.addDisgnosis(disgnosis);
|
||||
return i>0?Result.success(200,"诊断证明"):Result.error(500,"系统异常");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
</insert>
|
||||
<insert id="addGift">
|
||||
insert into t_gift (
|
||||
"gift_id",
|
||||
"gift_name",
|
||||
"gift_price",
|
||||
"gift_picture") values(
|
||||
gift_id,
|
||||
gift_name,
|
||||
gift_price,
|
||||
gift_picture) values(
|
||||
#{giftId},
|
||||
#{giftName},
|
||||
#{giftPrice},
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
#{doctorId},
|
||||
#{consultationStatus});
|
||||
</insert>
|
||||
<update id="EndConsultation">
|
||||
update t_consultation set consultationStatus = 1 where consultation_status = #{consultationStatus}
|
||||
</update>
|
||||
<delete id="deleteConsultationById">
|
||||
delete from t_consultation where consultation_id=#{consultationId}
|
||||
</delete>
|
||||
|
|
Loading…
Reference in New Issue