新增了扫描url的工具方法

This commit is contained in:
yutou
2021-06-23 16:08:40 +08:00
parent 93eab6b8a8
commit 326bcfbf9e
7 changed files with 127 additions and 34 deletions

View File

@@ -18,7 +18,6 @@ import javax.annotation.Resource;
import java.util.List;
@Controller
@RequestMapping("anim/")
public class AnimationController {
@Resource
BangumiListDao listDao;
@@ -26,7 +25,7 @@ public class AnimationController {
BangumiItemDao itemDao;
@ResponseBody
@RequestMapping(value = "rss/data.do", method = RequestMethod.GET)
@RequestMapping(value = "/anim/rss/data.do", method = RequestMethod.GET)
public String getAnimList(String key,String type,String team, int page) {
boolean isNull = key.length() == 0;
if(!StringUtils.isEmpty(type)&&type.length()>2)
@@ -50,7 +49,7 @@ public class AnimationController {
}
@ResponseBody
@RequestMapping(value = "type/add.do", method = RequestMethod.POST)
@RequestMapping(value = "/anim/type/add.do", method = RequestMethod.POST)
public String addRssType(String title) {
BangumiList bangumiList = new BangumiList();
bangumiList.setTitle(title);
@@ -63,7 +62,7 @@ public class AnimationController {
}
@ResponseBody
@RequestMapping(value = "type/list.do", method = RequestMethod.GET)
@RequestMapping(value = "/anim/type/list.do", method = RequestMethod.GET)
public String getRssTypeList() {
JSONObject json = new JSONObject();
json.put("code", 0);
@@ -72,7 +71,7 @@ public class AnimationController {
return json.toJSONString();
}
@ResponseBody
@RequestMapping(value = "type/del.do", method = RequestMethod.POST)
@RequestMapping(value = "/anim/type/del.do", method = RequestMethod.POST)
public String delType(int id){
BangumiItemExample example=new BangumiItemExample();
example.createCriteria().andBidEqualTo(id+"");
@@ -85,7 +84,7 @@ public class AnimationController {
}
@ResponseBody
@RequestMapping(value = "rss/add.do", method = RequestMethod.POST)
@RequestMapping(value = "/anim/rss/add.do", method = RequestMethod.POST)
public String addAnimationRss(String title, String author, String categories, String titleKey, String bid) {
BangumiItem item = new BangumiItem();
item.setTitle(title);
@@ -101,7 +100,7 @@ public class AnimationController {
}
@ResponseBody
@RequestMapping(value = "rss/list.do", method = RequestMethod.GET)
@RequestMapping(value = "/anim/rss/list.do", method = RequestMethod.GET)
public String getAnimationRssList(String type) {
JSONObject json = new JSONObject();
BangumiItemExample example=new BangumiItemExample();
@@ -112,7 +111,7 @@ public class AnimationController {
return json.toJSONString();
}
@ResponseBody
@RequestMapping(value = "rss/del.do", method = RequestMethod.POST)
@RequestMapping(value = "/anim/rss/del.do", method = RequestMethod.POST)
public String delAnimation(int id){
int i=itemDao.deleteByPrimaryKey(id);
JSONObject json=new JSONObject();
@@ -121,7 +120,7 @@ public class AnimationController {
return json.toJSONString();
}
@ResponseBody
@RequestMapping(value = "client/get.do", method = RequestMethod.GET)
@RequestMapping(value = "/anim/client/get.do", method = RequestMethod.GET)
public String clientApi(){
AnimationData animationData=new AnimationData();
List<BangumiItem> list=itemDao.selectByExample(new BangumiItemExample());