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()));
|
json.put("data", JSON.toJSON(bangumiService.getAllBangumiList()));
|
||||||
return json.toJSONString();
|
return json.toJSONString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping(value = "/anim/type/del.do", method = RequestMethod.POST)
|
@RequestMapping(value = "/anim/type/del.do", method = RequestMethod.POST)
|
||||||
public String delType(int id) {
|
public String delType(int id) {
|
||||||
@ -88,7 +89,8 @@ public class AnimationController {
|
|||||||
if (!StringUtils.isEmpty(bgmId)) {
|
if (!StringUtils.isEmpty(bgmId)) {
|
||||||
try {
|
try {
|
||||||
id = Integer.parseInt(bgmId.trim());
|
id = Integer.parseInt(bgmId.trim());
|
||||||
}catch (Exception ignored){}
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
BangumiItem item = new BangumiItem();
|
BangumiItem item = new BangumiItem();
|
||||||
item.setBgmid(id);
|
item.setBgmid(id);
|
||||||
@ -114,6 +116,7 @@ public class AnimationController {
|
|||||||
json.put("data", JSON.toJSON(bangumiService.getBangumiItemList(type)));
|
json.put("data", JSON.toJSON(bangumiService.getBangumiItemList(type)));
|
||||||
return json.toJSONString();
|
return json.toJSONString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping(value = "/anim/rss/del.do", method = RequestMethod.POST)
|
@RequestMapping(value = "/anim/rss/del.do", method = RequestMethod.POST)
|
||||||
public String delAnimation(int id) {
|
public String delAnimation(int id) {
|
||||||
@ -123,13 +126,18 @@ public class AnimationController {
|
|||||||
json.put("msg", i == 0 ? "删除失败" : "删除成功");
|
json.put("msg", i == 0 ? "删除失败" : "删除成功");
|
||||||
return json.toJSONString();
|
return json.toJSONString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping(value = "/anim/rss/edit.do", method = RequestMethod.POST)
|
@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();
|
JSONObject json = new JSONObject();
|
||||||
BangumiItem item = bangumiService.getBangumiItem(id);
|
BangumiItem item = bangumiService.getBangumiItem(id);
|
||||||
if(bgmId!=0){
|
if (!StringUtils.isEmpty(bgmId)) {
|
||||||
item.setBgmid(bgmId);
|
try {
|
||||||
|
item.setBgmid(Integer.parseInt(bgmId));
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!StringUtils.isEmpty(title)) {
|
if (!StringUtils.isEmpty(title)) {
|
||||||
item.setTitle(title);
|
item.setTitle(title);
|
||||||
@ -155,6 +163,7 @@ public class AnimationController {
|
|||||||
json.put("code", 1);
|
json.put("code", 1);
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping(value = "/anim/client/get.do", method = RequestMethod.GET)
|
@RequestMapping(value = "/anim/client/get.do", method = RequestMethod.GET)
|
||||||
public String clientApi() {
|
public String clientApi() {
|
||||||
@ -167,6 +176,7 @@ public class AnimationController {
|
|||||||
JSONArray array = (JSONArray) JSON.toJSON(list);
|
JSONArray array = (JSONArray) JSON.toJSON(list);
|
||||||
return array.toJSONString();
|
return array.toJSONString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping(value = "/anim/getToDay.do", method = RequestMethod.GET)
|
@RequestMapping(value = "/anim/getToDay.do", method = RequestMethod.GET)
|
||||||
public JSONObject getToDayAnim() {
|
public JSONObject getToDayAnim() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user