Browse Source

曲目排序规则调整

zouxuan 4 months ago
parent
commit
384a6243ce

+ 1 - 3
cooleshow-user/user-biz/src/main/resources/config/mybatis/ActivityEvaluationMapper.xml

@@ -137,9 +137,7 @@
             )
             <include refid="com.yonge.cooleshow.biz.dal.dao.MusicSheetDao.QueryInfo"/>
         </where>
-        ORDER BY CONVERT(t.music_sheet_name_ USING gbk) COLLATE gbk_chinese_ci,
-        t.music_sheet_name_ COLLATE utf8mb4_bin,
-        t.music_sheet_name_ REGEXP '^[0-9]' DESC, t.create_time_ DESC
+        ORDER BY t.sort_group_, t.sort_num_, t.sort_num2_, t.alias_
     </select>
 
     <!--活动老师信息-->

+ 13 - 15
cooleshow-user/user-biz/src/main/resources/config/mybatis/MusicSheetMapper.xml

@@ -202,9 +202,7 @@
         <if test="param.myself != null and param.myself == true ">
             t.cbs_music_sheet_id_ desc,
         </if>
-        CONVERT(t.music_sheet_name_ USING gbk) COLLATE gbk_chinese_ci,
-        t.music_sheet_name_ COLLATE utf8mb4_bin,
-        t.music_sheet_name_ REGEXP '^[0-9]' DESC, t.create_time_ DESC
+        ORDER BY t.sort_group_, t.sort_num_, t.sort_num2_, t.alias_
     </select>
 
     <sql id="QueryInfo">
@@ -391,22 +389,16 @@
                 <if test="param.type == 2">
                     and amr.album_id_ = #{param.id}
                     order by amr.sort_number_ desc,
-                    CONVERT(t.music_sheet_name_ USING gbk) COLLATE gbk_chinese_ci,
-                    t.music_sheet_name_ COLLATE utf8mb4_bin,
-                    t.music_sheet_name_ REGEXP '^[0-9]' DESC, t.create_time_ DESC
+                    t.sort_group_, t.sort_num_, t.sort_num2_, t.alias_
                 </if>
                 <if test="param.type == 1">
                     and t.id_ not in(select amr2.music_sheet_id_  from album_music_relate amr2
                         where amr2.album_id_ = #{param.id})
-                    ORDER BY CONVERT(t.music_sheet_name_ USING gbk) COLLATE gbk_chinese_ci,
-                    t.music_sheet_name_ COLLATE utf8mb4_bin,
-                    t.music_sheet_name_ REGEXP '^[0-9]' DESC, t.create_time_ DESC
+                    ORDER BY t.sort_group_, t.sort_num_, t.sort_num2_, t.alias_
                 </if>
             </if>
             <if test="param.id == null">
-                ORDER BY CONVERT(t.music_sheet_name_ USING gbk) COLLATE gbk_chinese_ci,
-                t.music_sheet_name_ COLLATE utf8mb4_bin,
-                t.music_sheet_name_ REGEXP '^[0-9]' DESC, t.create_time_ DESC
+                ORDER BY t.sort_group_, t.sort_num_, t.sort_num2_, t.alias_
             </if>
         </where>
     </select>
@@ -556,9 +548,7 @@
                 </if>
             </otherwise>
         </choose>
-        CONVERT(t.music_sheet_name_ USING gbk) COLLATE gbk_chinese_ci,
-        t.music_sheet_name_ COLLATE utf8mb4_bin,
-        t.music_sheet_name_ REGEXP '^[0-9]' DESC, t.create_time_ DESC
+        ORDER BY t.sort_group_, t.sort_num_, t.sort_num2_, t.alias_
     </select>
 
     <select id="selectMyMusicPage" resultType="com.yonge.cooleshow.biz.dal.vo.MusicSheetVo">
@@ -1222,6 +1212,10 @@
             ms.tenant_category_id_ = #{item.musicSheetUpdate.musicCategoryId},
             ms.show_fingering_ = #{item.musicSheetUpdate.showFingering},
             ms.can_evaluate_ = #{item.musicSheetUpdate.canEvaluate},
+            ms.alias_ = #{item.musicSheetUpdate.alias},
+            ms.sort_num_ = #{item.musicSheetUpdate.sortNum},
+            ms.sort_group_ = #{item.musicSheetUpdate.sortGroup},
+            ms.sort_num2_ = #{item.musicSheetUpdate.sortNum2},
             ms.upload_time_ = #{item.musicSheetUpdate.createTime},
             ms.source_type_ = CASE WHEN #{item.musicSheetUpdate.sourceType} = 'PLATFORM' THEN 'PLATFORM'
             WHEN #{item.musicSheetUpdate.sourceType} = 'PERSON' THEN 'TEACHER' ELSE 'TENANT' END
@@ -1259,6 +1253,10 @@
             ms.audio_type_ = #{item.musicSheetUpdate.playMode},
             ms.show_fingering_ = #{item.musicSheetUpdate.showFingering},
             ms.can_evaluate_ = #{item.musicSheetUpdate.canEvaluate},
+            ms.alias_ = #{item.musicSheetUpdate.alias},
+            ms.sort_num_ = #{item.musicSheetUpdate.sortNum},
+            ms.sort_group_ = #{item.musicSheetUpdate.sortGroup},
+            ms.sort_num2_ = #{item.musicSheetUpdate.sortNum2},
             ms.source_type_ = CASE WHEN #{item.musicSheetUpdate.sourceType} = 'PLATFORM' THEN 'PLATFORM'
             WHEN #{item.musicSheetUpdate.sourceType} = 'PERSON' THEN 'TEACHER' ELSE 'TENANT' END
         </if>