小程序点歌 新增获取正在演唱歌曲接口
This commit is contained in:
@@ -60,6 +60,13 @@ public class ShopSongController {
|
|||||||
return Result.successWithData(shopSongService.getRecord(openId, page, size, state, isDesc));
|
return Result.successWithData(shopSongService.getRecord(openId, page, size, state, isDesc));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/singing")
|
||||||
|
public Result getSinging(
|
||||||
|
@RequestHeader("openId") String openId
|
||||||
|
) {
|
||||||
|
return Result.successWithData(shopSongService.getSinging(openId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public Result createOrder(
|
public Result createOrder(
|
||||||
|
|||||||
@@ -63,4 +63,7 @@ public interface TbShopSongOrderMapper {
|
|||||||
" WHERE\n" +
|
" WHERE\n" +
|
||||||
" a.open_id = #{openId} and a.state in (1, 2, 3)")
|
" a.open_id = #{openId} and a.state in (1, 2, 3)")
|
||||||
List<Map<String, Object>> selectActiveOrderByUserId(@Param("openId") String openId);
|
List<Map<String, Object>> selectActiveOrderByUserId(@Param("openId") String openId);
|
||||||
|
|
||||||
|
@Select("SELECT song_name, id FROM `tb_shop_song_order` where open_id=#{openId} and state=2 limit 1")
|
||||||
|
Map<String, Object> selectSinging(@Param("openId") String openId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,4 +44,11 @@ public interface TbShopSongService {
|
|||||||
* @return 订单信息
|
* @return 订单信息
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getDetail(String openId, Integer id);
|
Map<String, Object> getDetail(String openId, Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正在演唱的歌曲
|
||||||
|
* @param openId 用户id
|
||||||
|
* @return 歌曲信息
|
||||||
|
*/
|
||||||
|
Object getSinging(String openId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,6 +133,11 @@ public class TbShopSongServiceImpl implements TbShopSongService{
|
|||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getSinging(String openId) {
|
||||||
|
return shopSongOrderMapper.selectSinging(openId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user