|
@@ -36,12 +36,14 @@ public class RoomDanmakuServiceImpl extends ServiceImpl<IRoomDanmakuMapper, Room
|
|
|
|
|
|
@Autowired
|
|
|
RestTemplateLive restTemplateLive;
|
|
|
+ @Autowired
|
|
|
+ LiveClient liveClient;
|
|
|
|
|
|
@Override
|
|
|
public void saveDanMaku(String roomId,Integer roomUserId) {
|
|
|
String wxRoomId = RoomUtil.getLiveRoomId( roomId , roomUserId);
|
|
|
List<RoomDanmaku> saveList = new ArrayList<>();
|
|
|
- JSONObject jsonObject = restTemplateLive.getDanmaku(wxRoomId);
|
|
|
+ JSONObject jsonObject = liveClient.getDanmaku(wxRoomId);
|
|
|
if(jsonObject != null && jsonObject.getInteger("code") ==0){
|
|
|
JSONArray data = jsonObject.getJSONArray("data");
|
|
|
if(data.size() >0){
|
|
@@ -63,7 +65,7 @@ public class RoomDanmakuServiceImpl extends ServiceImpl<IRoomDanmakuMapper, Room
|
|
|
}
|
|
|
}
|
|
|
if(saveList.size() >0){
|
|
|
- restTemplateLive.deleteDanmaku(wxRoomId);
|
|
|
+ liveClient.deleteDanmaku(wxRoomId);
|
|
|
this.saveBatch(saveList);
|
|
|
}
|
|
|
}
|