Jelajahi Sumber

患者评价添加一个筛选条件

lighter 2 tahun lalu
induk
melakukan
bef799406a

+ 5 - 0
src/main/java/thyyxxk/webserver/entity/outpatient/interactive/comments/request/CommentInquiry.java

@@ -11,6 +11,7 @@ public class CommentInquiry {
     private Integer pageNum;
     private Integer pageSize;
     private Integer deleted;
+    private Boolean onlyValidComments;
 
     public Integer getPageNum() {
         return null == pageNum ? 1 : pageNum;
@@ -19,4 +20,8 @@ public class CommentInquiry {
     public Integer getPageSize() {
         return null == pageSize ? 20 : pageSize;
     }
+
+    public Boolean getOnlyValidComments() {
+        return null != onlyValidComments && onlyValidComments;
+    }
 }

+ 3 - 0
src/main/java/thyyxxk/webserver/service/outpatient/interactive/comments/CommentsService.java

@@ -43,6 +43,9 @@ public class CommentsService {
             wrapper.ge("comment_time", inquiry.getStartTime())
                     .le("comment_time", inquiry.getEndTime());
         }
+        if (inquiry.getOnlyValidComments()) {
+            wrapper.apply("comment_content!='未填写评价内容。' and isnull(comment_content,'')!=''");
+        }
         List<WechatPatientComment> list = dao.selectComments(wrapper, inquiry.getPageNum(), inquiry.getPageSize());
         if (list.isEmpty()) {
             return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);