功能添加
parent
e347bea3d7
commit
51993a6e59
|
@ -21,4 +21,6 @@ public class RequestDoctor {
|
|||
// 升序 和 降序
|
||||
private Integer key=1;
|
||||
|
||||
private Integer doctorId;
|
||||
|
||||
}
|
||||
|
|
|
@ -105,6 +105,7 @@
|
|||
<version>1.1.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@ import java.time.LocalDateTime;
|
|||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -142,4 +144,5 @@ public class CommentController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -6,11 +6,14 @@ import com.grail.doctor.publice.service.DoctorService;
|
|||
import com.grail.publice.domain.Consultation;
|
||||
import com.grail.publice.domain.Disgnosis;
|
||||
import com.grail.publice.domain.Doctor;
|
||||
import com.grail.publice.domain.Interest;
|
||||
import com.grail.publice.domain.request.RequestDoctor;
|
||||
import com.grail.publice.domain.response.DisgnosisResponse;
|
||||
import com.grail.publice.domain.response.InterestResponse;
|
||||
import com.grail.publice.domain.response.ResponseDoctor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
@ -30,6 +33,8 @@ public class DoctorController {
|
|||
private DoctorService doctorService;
|
||||
@Autowired
|
||||
private HttpServletRequest request;
|
||||
@Autowired
|
||||
private RedisTemplate<String,String> redisTemplate;
|
||||
|
||||
/**
|
||||
* @Description:查询医生信息,根据用户选择查科室及详细功能进行排序
|
||||
|
@ -43,6 +48,7 @@ public class DoctorController {
|
|||
public Result<List<ResponseDoctor>> doctorList(@RequestBody RequestDoctor requestDoctor){
|
||||
log.info("功能名称:查询医生信息,根据用户选择查科室及详细功能进行排序,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),requestDoctor);
|
||||
String doctorid = redisTemplate.opsForValue().get(requestDoctor.getDoctorId());
|
||||
Result<List<ResponseDoctor>> result = doctorService.doctorList(requestDoctor);
|
||||
log.info("功能名称:查询医生信息,根据用户选择查科室及详细功能进行排序,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||
request.getMethod(), JSONObject.toJSONString(result));
|
||||
|
@ -113,4 +119,41 @@ public class DoctorController {
|
|||
request.getMethod(),JSONObject.toJSONString(result));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description:查看关注详情
|
||||
No such property: code for class: Script1
|
||||
* @return: com.grail.common.core.domain.Result<java.util.List<com.grail.publice.domain.response.InterestResponse>>
|
||||
* @Author: YHY
|
||||
* @Updator: YHY
|
||||
* @Date 2023/10/31 22:03
|
||||
*/
|
||||
@GetMapping("/interestList")
|
||||
public Result<List<InterestResponse>> interestList(){
|
||||
log.info("功能名称:查看关注详情,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||
request.getMethod());
|
||||
Result<List<InterestResponse>> result = doctorService.interestList();
|
||||
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/31 22:28
|
||||
*/
|
||||
@PostMapping("/updateinterest/interestId")
|
||||
public Result updateinterest(@PathVariable Integer interestId){
|
||||
log.info("功能名称:取消关注,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),interestId);
|
||||
Result result = doctorService.updateinterest(interestId);
|
||||
log.info("功能名称:取消关注,请求URL:【{}】,请求方法:【{}】,响应结果:【{}】",request.getRequestURI(),
|
||||
request.getMethod(),JSONObject.toJSONString(result));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.grail.publice.domain.Disgnosis;
|
|||
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.InterestResponse;
|
||||
import com.grail.publice.domain.response.ResponseDoctor;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
@ -28,4 +29,8 @@ public interface DoctorMapper {
|
|||
List<DisgnosisResponse> disgnosisList();
|
||||
|
||||
int addDisgnosis(Disgnosis disgnosis);
|
||||
|
||||
List<InterestResponse> interestList();
|
||||
|
||||
int updateinterest(@Param("interestId") Integer interestId);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.grail.publice.domain.Disgnosis;
|
|||
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.InterestResponse;
|
||||
import com.grail.publice.domain.response.ResponseDoctor;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -25,4 +26,8 @@ public interface DoctorService {
|
|||
Result<List<DisgnosisResponse>> disgnosisList();
|
||||
|
||||
Result addDisgnosis(Disgnosis disgnosis);
|
||||
|
||||
Result<List<InterestResponse>> interestList();
|
||||
|
||||
Result updateinterest(Integer interestId);
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import com.grail.publice.domain.Disgnosis;
|
|||
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.InterestResponse;
|
||||
import com.grail.publice.domain.response.ResponseDoctor;
|
||||
import org.springframework.amqp.AmqpException;
|
||||
import org.springframework.amqp.core.Message;
|
||||
|
@ -59,4 +60,16 @@ public class DoctorServiceimpl implements DoctorService {
|
|||
int i = doctorMapper.addDisgnosis(disgnosis);
|
||||
return i>0?Result.success(200,"诊断证明"):Result.error(500,"系统异常");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<InterestResponse>> interestList() {
|
||||
List<InterestResponse> list = doctorMapper.interestList();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result updateinterest(Integer interestId) {
|
||||
int i = doctorMapper.updateinterest(interestId);
|
||||
return i>0?Result.success(200,"已取消关注"):Result.error(500,"系统异常,请稍后重试");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,9 @@
|
|||
user_id=#{userId},
|
||||
consultation_price=#{consultationPrice} where doctor_id=#{doctorId}
|
||||
</update>
|
||||
<update id="updateinterest">
|
||||
update t_interest set interest_status = 0 where interes_id=#{interestId}
|
||||
</update>
|
||||
|
||||
<select id="doctorList" resultType="com.grail.publice.domain.response.ResponseDoctor">
|
||||
select t_doctor.*,department_name from t_doctor left join
|
||||
|
@ -66,4 +69,8 @@
|
|||
left join t_user on t_disgnosis.user_id=t_user.user_id left join
|
||||
t_doctor on t_disgnosis.doctor_id=t_doctor.doctor_id
|
||||
</select>
|
||||
<select id="interestList" resultType="com.grail.publice.domain.response.InterestResponse">
|
||||
select t_interest.*,doctor_name,user_name from t_interest left join t_doctor on
|
||||
t_interest.doctor_id=t_doctor.doctor_id left join t_user on t_interest.user_id=t_user.user_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue