小程序点歌 点歌记录增加shopId

This commit is contained in:
2024-07-16 11:35:33 +08:00
parent e785ee6467
commit 50ec8c7cd7
4 changed files with 10 additions and 9 deletions

View File

@@ -34,9 +34,9 @@ public interface TbShopSongOrderMapper {
" tb_shop_song_order AS a\n" +
" LEFT JOIN tb_shop_song AS b ON a.song_id = b.id\n" +
" WHERE\n" +
" a.open_id = #{openId} " +
" a.open_id = #{openId} and a.shop_id=#{shopId} " +
" <if test=\"state!=null\">AND a.state = #{state}</if></script>")
List<Map<String, Object>> selectByUserId(@Param("openId") String openId, @Param("state") Integer state);
List<Map<String, Object>> selectByUserId(@Param("openId") String openId, @Param("state") Integer state, Integer shopId);
@Select(" SELECT\n" +
" *\n" +
@@ -61,8 +61,8 @@ public interface TbShopSongOrderMapper {
" tb_shop_song_order AS a\n" +
" LEFT JOIN tb_shop_song AS b ON a.song_id = b.id\n" +
" WHERE\n" +
" a.open_id = #{openId} and a.state in (1, 2, 3)")
List<Map<String, Object>> selectActiveOrderByUserId(@Param("openId") String openId);
" a.open_id = #{openId} and a.state in (1, 2, 3) and a.shop_id=#{shopId}")
List<Map<String, Object>> selectActiveOrderByUserId(@Param("openId") String openId, Integer shopId);
@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();