修改了搜索
This commit is contained in:
parent
f186b98dbe
commit
4d95f22d0f
@ -90,9 +90,7 @@ public class ClinicalController extends BaseController {
|
||||
// 获取文章数据
|
||||
IPage<CaseClinicalArticleDto> resultPage = caseClinicalArticleDao.getCaseClinicalArticleSearchPage(
|
||||
page,
|
||||
request.getTitle(),
|
||||
request.getDoctorName(),
|
||||
request.getLabelName(),
|
||||
request.getKeyword(),
|
||||
request.getHospitalId(),
|
||||
request.getDoctorId(),
|
||||
request.handleOrder()
|
||||
@ -132,9 +130,9 @@ public class ClinicalController extends BaseController {
|
||||
// 获取视频数据
|
||||
IPage<CaseClinicalVideoDto> resultPage = caseClinicalVideoDao.getCaseClinicalVideoSearchPage(
|
||||
page,
|
||||
request.getTitle(),
|
||||
request.getDoctorName(),
|
||||
request.getLabelName(),
|
||||
request.getKeyword(),
|
||||
request.getHospitalId(),
|
||||
request.getDoctorId(),
|
||||
request.handleOrder()
|
||||
);
|
||||
|
||||
|
||||
@ -16,18 +16,14 @@ public interface CaseClinicalArticleDao extends BaseMapper<CaseClinicalArticleMo
|
||||
/**
|
||||
* 临床病例库-搜索
|
||||
* @param page 分页数据
|
||||
* @param title 标题
|
||||
* @param doctorName 医生名称
|
||||
* @param labelName 标签名称
|
||||
* @param keyword 搜索关键词-标题/医生名称/标签名称
|
||||
* @param order 排序
|
||||
*/
|
||||
IPage<CaseClinicalArticleDto> getCaseClinicalArticleSearchPage(
|
||||
Page<?> page,
|
||||
@Param("title") String title,
|
||||
@Param("doctorName") String doctorName,
|
||||
@Param("labelName") String labelName,
|
||||
@Param("hospital_id") String hospitalId,
|
||||
@Param("doctor_id") String doctorId,
|
||||
@Param("keyword") String keyword,
|
||||
@Param("hospitalId") String hospitalId,
|
||||
@Param("doctorId") String doctorId,
|
||||
@Param("order") Map<String, String> order
|
||||
);
|
||||
|
||||
|
||||
@ -17,16 +17,14 @@ public interface CaseClinicalVideoDao extends BaseMapper<CaseClinicalVideoModel>
|
||||
/**
|
||||
* 临床病例库-搜索
|
||||
* @param page 分页数据
|
||||
* @param title 标题
|
||||
* @param doctorName 医生名称
|
||||
* @param labelName 标签名称
|
||||
* @param keyword 搜索关键词-标题/医生名称/标签名称
|
||||
* @param order 排序
|
||||
*/
|
||||
IPage<CaseClinicalVideoDto> getCaseClinicalVideoSearchPage(
|
||||
Page<?> page,
|
||||
@Param("title") String title,
|
||||
@Param("doctorName") String doctorName,
|
||||
@Param("labelName") String labelName,
|
||||
@Param("keyword") String keyword,
|
||||
@Param("hospitalId") String hospitalId,
|
||||
@Param("doctorId") String doctorId,
|
||||
@Param("order") Map<String, String> order
|
||||
);
|
||||
|
||||
|
||||
@ -21,21 +21,9 @@ public class getClinicalSearchPage {
|
||||
@Min(value = 1, message = "每页个数最小为 1")
|
||||
private Integer pageSize = 20;
|
||||
|
||||
// // 标题/作者名称/疾病名称
|
||||
// @JsonProperty("keyword")
|
||||
// private String doctorName;
|
||||
|
||||
// 标题
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
|
||||
// 标题/作者名称/疾病名称
|
||||
@JsonProperty("doctor_name")
|
||||
private String doctorName;
|
||||
|
||||
// 标签名称
|
||||
@JsonProperty("label_name")
|
||||
private String labelName;
|
||||
@JsonProperty("keyword")
|
||||
private String keyword;
|
||||
|
||||
// 医院id
|
||||
@JsonProperty("hospital_id")
|
||||
@ -60,7 +48,7 @@ public class getClinicalSearchPage {
|
||||
@Data
|
||||
public static class OrderRequest {
|
||||
private String createdAt; // 创建时间
|
||||
private String readNum; // 阅读量-文章
|
||||
private String readNum; // 阅读量
|
||||
private String pushDate; // 发表时间
|
||||
|
||||
public Map<String, String> toMap() {
|
||||
|
||||
@ -21,20 +21,18 @@
|
||||
LEFT JOIN case_clinical_doctor d ON caa.doctor_id = d.doctor_id
|
||||
LEFT JOIN case_clinical_article_label l ON a.article_id = l.article_id
|
||||
WHERE a.article_status = 1
|
||||
<if test="title != null and title != ''">
|
||||
AND a.article_title LIKE CONCAT('%', #{title}, '%')
|
||||
</if>
|
||||
<if test="doctorName != null and doctorName != ''">
|
||||
AND d.doctor_name LIKE CONCAT('%', #{doctorName}, '%')
|
||||
</if>
|
||||
<if test="labelName != null and labelName != ''">
|
||||
AND l.label_name LIKE CONCAT('%', #{labelName}, '%')
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (
|
||||
a.article_title LIKE CONCAT('%', #{keyword}, '%')
|
||||
OR d.doctor_name LIKE CONCAT('%', #{keyword}, '%')
|
||||
OR l.label_name LIKE CONCAT('%', #{keyword}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="hospitalId != null and hospitalId != ''">
|
||||
AND d.hospital_id LIKE CONCAT('%', #{hospitalId}, '%')
|
||||
AND d.hospital_id = ${hospitalId}
|
||||
</if>
|
||||
<if test="doctorId != null and doctorId != ''">
|
||||
AND d.doctor_id LIKE CONCAT('%', #{doctorId}, '%')
|
||||
AND d.doctor_id = ${doctorId}
|
||||
</if>
|
||||
<if test="order != null and !order.isEmpty()">
|
||||
ORDER BY
|
||||
|
||||
@ -23,14 +23,18 @@
|
||||
LEFT JOIN case_clinical_doctor d ON caa.doctor_id = d.doctor_id
|
||||
LEFT JOIN case_clinical_video_label l ON a.video_id = l.video_id
|
||||
WHERE a.video_status = 1
|
||||
<if test="title != null and title != ''">
|
||||
AND a.video_title LIKE CONCAT('%', #{title}, '%')
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (
|
||||
a.article_title LIKE CONCAT('%', #{keyword}, '%')
|
||||
OR d.doctor_name LIKE CONCAT('%', #{keyword}, '%')
|
||||
OR l.label_name LIKE CONCAT('%', #{keyword}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="doctorName != null and doctorName != ''">
|
||||
AND d.doctor_name LIKE CONCAT('%', #{doctorName}, '%')
|
||||
<if test="hospitalId != null and hospitalId != ''">
|
||||
AND d.hospital_id = ${hospitalId}
|
||||
</if>
|
||||
<if test="labelName != null and labelName != ''">
|
||||
AND l.label_name LIKE CONCAT('%', #{labelName}, '%')
|
||||
<if test="doctorId != null and doctorId != ''">
|
||||
AND d.doctor_id = ${doctorId}
|
||||
</if>
|
||||
<if test="order != null and !order.isEmpty()">
|
||||
ORDER BY
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user