Bläddra i källkod

Merge branch 'fix/0529-album_music' into develop-new

yuanliang 10 månader sedan
förälder
incheckning
3a6f0844c3

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

@@ -134,7 +134,7 @@
         from music_sheet t
         left join sys_user su on t.create_by_ = su.id_
         <if test="param.sortByAlbumIdDesc != null">
-            left join tenant_album_music tam on tam.music_sheet_id_ = t.id_
+            left join tenant_album_music tam on tam.music_sheet_id_ = t.id_ and tam.tenant_album_id_ = #{param.sortByAlbumIdDesc} and tam.del_flag_=0
         </if>
         <where>
             su.del_flag_ = 0
@@ -147,12 +147,12 @@
             </if>
         </where>
         order by
-        <if test="param.myself == null or param.myself == false ">
-            t.top_flag_ desc,t.sort_number_ desc,
-        </if>
         <if test="param.sortByAlbumIdDesc != null">
             if(isnull(tam.id_),0,1),
         </if>
+        <if test="param.myself == null or param.myself == false ">
+            t.top_flag_ desc,t.sort_number_ desc,
+        </if>
          t.id_ desc
     </select>