diff --git a/Web/html/ui/createConfig.html b/Web/html/ui/createConfig.html
index adacb38..deb3d1b 100644
--- a/Web/html/ui/createConfig.html
+++ b/Web/html/ui/createConfig.html
@@ -32,13 +32,13 @@
diff --git a/Web/html/ui/userFollow.html b/Web/html/ui/userFollow.html
index c5f4730..7f086e8 100644
--- a/Web/html/ui/userFollow.html
+++ b/Web/html/ui/userFollow.html
@@ -46,7 +46,7 @@
elem: '#followList',
url: '/live/config/follow?userId=' + userId,
toolbar: '#toolbarDemo',
- height: '350px',
+ height: 'full',
totalRow: true, // 开启合计行
page: true,
response: {
diff --git a/Web/html/ui/userFollowLive.html b/Web/html/ui/userFollowLive.html
index 56e4f57..6e8277f 100644
--- a/Web/html/ui/userFollowLive.html
+++ b/Web/html/ui/userFollowLive.html
@@ -38,7 +38,7 @@
elem: '#followList',
url: '/live/config/followLive?userId=' + userId,
toolbar: '#toolbarDemo',
- height: '350px',
+ height: 'full',
totalRow: false, // 开启合计行
page: false,
response: {
diff --git a/src/main/java/com/yutou/biliapi/bean/live/FollowLive.java b/src/main/java/com/yutou/biliapi/bean/live/FollowLive.java
index 96711b6..b6d34dd 100644
--- a/src/main/java/com/yutou/biliapi/bean/live/FollowLive.java
+++ b/src/main/java/com/yutou/biliapi/bean/live/FollowLive.java
@@ -25,7 +25,7 @@ public class FollowLive extends BaseBean {
private String roomId;
@JSONField(name = "uid")
- private int uid;
+ private String uid;
@JSONField(name = "online")
private int online;
diff --git a/src/main/java/com/yutou/bilibili/Controllers/LiveConfigController.java b/src/main/java/com/yutou/bilibili/Controllers/LiveConfigController.java
index 6413236..8b33ffa 100644
--- a/src/main/java/com/yutou/bilibili/Controllers/LiveConfigController.java
+++ b/src/main/java/com/yutou/bilibili/Controllers/LiveConfigController.java
@@ -140,13 +140,20 @@ public class LiveConfigController {
@RequestMapping(value = "set/array", method = RequestMethod.POST)
@ResponseBody
public JSONObject addArrayConfig(@RequestBody JSONObject jsonObject) {
- LiveConfigDatabaseBean bean = jsonObject.getJSONObject("config").to(LiveConfigDatabaseBean.class);
+ JSONObject config=jsonObject.getJSONObject("config");
+ LiveConfigDatabaseBean bean = config.to(LiveConfigDatabaseBean.class);
if (!bean.verifyLiveTimer()) {
return ResultData.fail(ReturnCode.RC999.getCode(), "视频录制时间格式错误");
}
if (!bean.verifyDanmuTimer()) {
return ResultData.fail(ReturnCode.RC999.getCode(), "弹幕录制时间格式错误");
}
+ if("on".equals(config.getString("recordDanmu"))){
+ bean.setRecordDanmu(true);
+ }
+ if("on".equals(config.getString("recordLive"))){
+ bean.setRecordLive(true);
+ }
JSONArray jsonArray = jsonObject.getJSONArray("array");
List list = jsonArray.stream().map(roomId -> configService.addConfig(roomId.toString(), bean)).toList();
int countNull = list.stream().filter(Objects::isNull).toList().size();
@@ -160,16 +167,17 @@ public class LiveConfigController {
int countNull = list.stream().filter(it -> !it).toList().size();
return ResultData.success("成功删除" + (list.size() - countNull) + "个直播间");
}
+
@RequestMapping(value = "delete/all", method = RequestMethod.GET)
@ResponseBody
public JSONObject deleteAllConfig() {
for (LiveConfigDatabaseBean bean : configService.getAllConfig()) {
configService.deleteConfig(bean.getRoomId());
}
- if(configService.getAllConfig().isEmpty()) {
+ if (configService.getAllConfig().isEmpty()) {
return ResultData.success("成功删除");
- }else{
- return ResultData.fail(-1,"删除失败,剩余:"+configService.getAllConfig().size()+"个直播间");
+ } else {
+ return ResultData.fail(-1, "删除失败,剩余:" + configService.getAllConfig().size() + "个直播间");
}
}