小程序点歌 新增获取正在演唱歌曲接口

This commit is contained in:
2024-07-12 15:46:47 +08:00
parent 41c264d325
commit a25e86fcc0
4 changed files with 26 additions and 3 deletions

View File

@@ -28,6 +28,7 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -136,7 +137,16 @@ public class TbShopSongServiceImpl implements TbShopSongService{
@Override
public Object getSinging(String openId) {
return shopSongOrderMapper.selectSinging(openId);
Map<String, Object> map = shopSongOrderMapper.selectSinging(openId);
if (map == null) {
return new HashMap<String, Object>(){{
put("songName", "");
put("id", "");
put("img", "");
}};
}else {
return map;
}
}
}