Browse Source

Merge branch 'master' of http://git.dayaedu.com/yonge/edu-saas

zouxuan 5 năm trước cách đây
mục cha
commit
f2dfe5371e

+ 1 - 2
edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/ExamSongController.java

@@ -3,7 +3,6 @@ package com.keao.edu.user.controller;
 import com.keao.edu.common.controller.BaseController;
 import com.keao.edu.common.entity.HttpResponseResult;
 import com.keao.edu.common.page.PageInfo;
-import com.keao.edu.common.page.QueryInfo;
 import com.keao.edu.common.tenant.TenantContextHolder;
 import com.keao.edu.user.entity.ExamSong;
 import com.keao.edu.user.page.ExamSongQueryInfo;
@@ -31,7 +30,7 @@ public class ExamSongController extends BaseController {
 
     @ApiOperation("分页查询")
     @GetMapping(value = "/list")
-    public HttpResponseResult<PageInfo<ExamSong>> getList(QueryInfo queryInfo) {
+    public HttpResponseResult<PageInfo<ExamSong>> getList(ExamSongQueryInfo queryInfo) {
         return succeed(examSongService.queryPage(queryInfo));
     }
 

+ 34 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/page/ExamSongQueryInfo.java

@@ -1,6 +1,7 @@
 package com.keao.edu.user.page;
 
 import com.keao.edu.common.page.QueryInfo;
+import com.keao.edu.user.enums.SongTypeEnum;
 import io.swagger.annotations.ApiModelProperty;
 
 public class ExamSongQueryInfo extends QueryInfo {
@@ -11,6 +12,15 @@ public class ExamSongQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "级别")
     private Integer level;
 
+    @ApiModelProperty(value = "曲目名")
+    private String songName;
+
+    @ApiModelProperty(value = "作者名")
+    private String songAuthor;
+
+    @ApiModelProperty(value = "曲目类别")
+    private SongTypeEnum type;
+
     public Integer getLevel() {
         return level;
     }
@@ -26,4 +36,28 @@ public class ExamSongQueryInfo extends QueryInfo {
     public void setSubjectList(Integer subjectList) {
         this.subjectList = subjectList;
     }
+
+    public String getSongName() {
+        return songName;
+    }
+
+    public void setSongName(String songName) {
+        this.songName = songName;
+    }
+
+    public String getSongAuthor() {
+        return songAuthor;
+    }
+
+    public void setSongAuthor(String songAuthor) {
+        this.songAuthor = songAuthor;
+    }
+
+    public SongTypeEnum getType() {
+        return type;
+    }
+
+    public void setType(SongTypeEnum type) {
+        this.type = type;
+    }
 }

+ 1 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExaminationBasicServiceImpl.java

@@ -162,7 +162,7 @@ public class ExaminationBasicServiceImpl extends BaseServiceImpl<Long, Examinati
             List<Long> examIds = dataList.stream().map(ExaminationBasicDto::getId).collect(Collectors.toList());
             List<ExamOrganizationRelation> examOrgans = new ArrayList<>();
             if (!CollectionUtils.isEmpty(examIds)) {
-                examOrganizationRelationDao.getWithExams(examIds);
+                examOrgans = examOrganizationRelationDao.getWithExams(examIds);
             }
             Map<Integer, List<ExamOrganizationRelation>> examOrgansMap = new HashMap<>();
             if (!CollectionUtils.isEmpty(examOrgans)) {

+ 12 - 0
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamSongMapper.xml

@@ -82,6 +82,18 @@
 			<if test="subjectList!=null">
 				AND FIND_IN_SET(#{subjectList}, es.subject_list_)
 			</if>
+			<if test="songAuthor!=null">
+				AND es.song_author_ LIKE CONCAT(#{songAuthor}, '%')
+			</if>
+			<if test="level!=null">
+				AND FIND_IN_SET(#{level},level_list_)
+			</if>
+			<if test="type!=null">
+				AND type_=#{type, typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler}
+			</if>
+			<if test="songName!=null">
+				AND es.song_name_ LIKE CONCAT(#{songName}, '%')
+			</if>
 			<if test="search!=null">
 				AND (es.id_=#{search} OR es.song_name_ LIKE CONCAT('%', #{search}, '%'))
 			</if>