1.点歌记录店铺区分
This commit is contained in:
@@ -67,6 +67,6 @@ public interface TbShopSongOrderMapper {
|
||||
@Select("SELECT a.song_name songName, a.id, b.img FROM `tb_shop_song_order` as a left join tb_shop_song as b on a.song_id=b.id where state=2 limit 1")
|
||||
Map<String, Object> selectSinging();
|
||||
|
||||
@Select("select id from tb_shop_song_order where state=1 or state=2 order by create_time asc")
|
||||
List<TbShopSongOrder> selectWaitAll();
|
||||
@Select("select id from tb_shop_song_order where (state=1 or state=2) and shop_id=#{id} order by create_time asc")
|
||||
List<TbShopSongOrder> selectWaitAll(@Param("id") Integer shopId);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class TbShopSongServiceImpl implements TbShopSongService{
|
||||
}
|
||||
|
||||
LinkedHashMap<String, Integer> rank = new LinkedHashMap<>();
|
||||
List<TbShopSongOrder> tbShopSongOrders = shopSongOrderMapper.selectWaitAll();
|
||||
List<TbShopSongOrder> tbShopSongOrders = shopSongOrderMapper.selectWaitAll(shopId);
|
||||
for (int i = 0; i < tbShopSongOrders.size(); i++) {
|
||||
rank.put(tbShopSongOrders.get(i).getId().toString(), i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user