Skip to content

Commit 48234c1

Browse files
committed
bug
1 parent 70ff167 commit 48234c1

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
+ Spring Boot
2929
+ Mybits
30-
+ Redies
30+
+ Redis
3131
+ MongoDB
3232
+ Docker
3333

src/main/java/com/danbai/ys/controller/MainController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ String regApi(User user, Model model, String yzm) {
109109

110110
@RequestMapping(value = "/regapp", produces = "text/plain;charset=UTF-8", method = RequestMethod.POST)
111111
@ResponseBody
112-
String regAppApi(User user, Model model, String yzm) {
112+
String regAppApi(User user, String yzm) {
113113
return userService.regapp(user, yzm);
114114
}
115115

src/main/java/com/danbai/ys/controller/restful/v1/Ys.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public BaseResult ys() {
3434

3535
/**
3636
* 根据id获取影视
37+
*
3738
* @param id 影视id
3839
* @return BaseResult
3940
*/
@@ -50,18 +51,22 @@ public BaseResult ysOne(@PathVariable int id) {
5051
*/
5152
@GetMapping("/ys/search/{gjc}")
5253
public BaseResult search(@PathVariable String gjc) {
53-
if(gjc.length()>1){
54+
if (gjc.length() > 1) {
5455
return ResultUtil.success(ysService.qcsy(ysService.selectYsByGjc(gjc)));
5556
}
5657
return ResultUtil.success(ysService.qcsy(ysService.selectYsByPm(gjc)));
5758
}
59+
5860
@GetMapping("/ys/tv")
59-
public BaseResult tv(){
61+
public BaseResult tv() {
6062
return ResultUtil.success(ysService.getAllTv());
6163
}
62-
@GetMapping("ys/type")
63-
public BaseResult type(String type1, String type2, String region,String year,String sort,@NotNull int page){
6464

65-
return ResultUtil.success(ysService.getByType(type1,type2,region,year,sort,page));
65+
@GetMapping("ys/type")
66+
public BaseResult type(String type1, String type2, String region, String year, String sort, @NotNull int page) {
67+
if (type2.indexOf("'") > -1 | region.indexOf("'") > -1 | year.indexOf("'") > -1) {
68+
return ResultUtil.error("非法字符");
69+
}
70+
return ResultUtil.success(ysService.getByType(type1, type2, region, year, sort, page));
6671
}
6772
}

src/main/resources/mapper/YsbMapper.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
(`zt` LIKE '%H%' OR '%B%')
3131
</when>
3232
<when test="param1 == '电视剧'">
33-
(`zt` LIKE '%完结%' OR '%集%')
33+
(`zt` LIKE '%完结%' OR '%集%') AND (`lx` NOT LIKE '%动漫%')
3434
</when>
3535
<when test="param1 == '综艺'">
3636
(`lx` LIKE '%综艺%')

0 commit comments

Comments
 (0)