fix:修复修改rss时无bgmid的问题
This commit is contained in:
parent
fefcfe6c35
commit
96b2ba371f
@ -71,6 +71,7 @@ public class AnimationController {
|
||||
json.put("data", JSON.toJSON(bangumiService.getAllBangumiList()));
|
||||
return json.toJSONString();
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/anim/type/del.do", method = RequestMethod.POST)
|
||||
public String delType(int id) {
|
||||
@ -88,7 +89,8 @@ public class AnimationController {
|
||||
if (!StringUtils.isEmpty(bgmId)) {
|
||||
try {
|
||||
id = Integer.parseInt(bgmId.trim());
|
||||
}catch (Exception ignored){}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
BangumiItem item = new BangumiItem();
|
||||
item.setBgmid(id);
|
||||
@ -114,6 +116,7 @@ public class AnimationController {
|
||||
json.put("data", JSON.toJSON(bangumiService.getBangumiItemList(type)));
|
||||
return json.toJSONString();
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/anim/rss/del.do", method = RequestMethod.POST)
|
||||
public String delAnimation(int id) {
|
||||
@ -123,13 +126,18 @@ public class AnimationController {
|
||||
json.put("msg", i == 0 ? "删除失败" : "删除成功");
|
||||
return json.toJSONString();
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/anim/rss/edit.do", method = RequestMethod.POST)
|
||||
public JSONObject editAnimation(int id,int bgmId,String title, String author, String categories, String titleKey,String enable){
|
||||
public JSONObject editAnimation(int id, String bgmId, String title, String author, String categories, String titleKey, String enable) {
|
||||
JSONObject json = new JSONObject();
|
||||
BangumiItem item = bangumiService.getBangumiItem(id);
|
||||
if(bgmId!=0){
|
||||
item.setBgmid(bgmId);
|
||||
if (!StringUtils.isEmpty(bgmId)) {
|
||||
try {
|
||||
item.setBgmid(Integer.parseInt(bgmId));
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
}
|
||||
if (!StringUtils.isEmpty(title)) {
|
||||
item.setTitle(title);
|
||||
@ -155,6 +163,7 @@ public class AnimationController {
|
||||
json.put("code", 1);
|
||||
return json;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/anim/client/get.do", method = RequestMethod.GET)
|
||||
public String clientApi() {
|
||||
@ -167,6 +176,7 @@ public class AnimationController {
|
||||
JSONArray array = (JSONArray) JSON.toJSON(list);
|
||||
return array.toJSONString();
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/anim/getToDay.do", method = RequestMethod.GET)
|
||||
public JSONObject getToDayAnim() {
|
||||
|
Loading…
Reference in New Issue
Block a user