diff --git a/src/main/java/com/gszc/conf/ShiroConfig.java b/src/main/java/com/gszc/conf/ShiroConfig.java index 7b8e8d9..d652876 100644 --- a/src/main/java/com/gszc/conf/ShiroConfig.java +++ b/src/main/java/com/gszc/conf/ShiroConfig.java @@ -47,6 +47,8 @@ public class ShiroConfig { filterChainDefinitionMap.put("/**/swagger**/**", "anon"); filterChainDefinitionMap.put("/webjars/**", "anon"); filterChainDefinitionMap.put("/getOpenid/**", "anon"); + filterChainDefinitionMap.put("/**/queryBanner", "anon"); + filterChainDefinitionMap.put("/**/queryQuestion", "anon"); filterChainDefinitionMap.put("/v2/**", "anon"); filterChainDefinitionMap.put("/doc.html", "anon"); // 添加自己的过滤器并且取名为jwt diff --git a/src/main/java/com/gszc/controller/BannerController.java b/src/main/java/com/gszc/controller/BannerController.java index 94dc451..c35bafc 100644 --- a/src/main/java/com/gszc/controller/BannerController.java +++ b/src/main/java/com/gszc/controller/BannerController.java @@ -62,9 +62,6 @@ public class BannerController { @PostMapping("/queryBanner") @ApiOperation(value = "查看banner", notes = "查看banner") - @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", required = true, dataType = "String", paramType = "header"), - }) @ResponseBody public Result queryBanner(Integer pageNum,Integer pageSize) { JSONObject result = bannerService.queryBanner(pageNum, pageSize); diff --git a/src/main/java/com/gszc/controller/QuestionController.java b/src/main/java/com/gszc/controller/QuestionController.java index 036b5f6..cd0e223 100644 --- a/src/main/java/com/gszc/controller/QuestionController.java +++ b/src/main/java/com/gszc/controller/QuestionController.java @@ -60,9 +60,6 @@ public class QuestionController { @PostMapping("/queryQuestion") @ApiOperation(value = "查看question", notes = "查看question") - @ApiImplicitParams({ - @ApiImplicitParam(name = "token", value = "token", required = true, dataType = "String", paramType = "header"), - }) @ResponseBody public Result queryQuestion(Integer pageNum,Integer pageSize) { JSONObject result = questionService.queryQuestion(pageNum, pageSize); diff --git a/src/main/java/com/gszc/service/impl/BannerServiceImpl.java b/src/main/java/com/gszc/service/impl/BannerServiceImpl.java index 40413d8..b5dac5e 100644 --- a/src/main/java/com/gszc/service/impl/BannerServiceImpl.java +++ b/src/main/java/com/gszc/service/impl/BannerServiceImpl.java @@ -9,6 +9,7 @@ import com.gszc.mapper.BannerMapper; import com.gszc.service.IBannerService; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.gszc.util.Uuid8Utils; +import org.apache.ibatis.session.RowBounds; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -51,7 +52,7 @@ public class BannerServiceImpl extends ServiceImpl impleme public JSONObject queryBanner(Integer pageNum, Integer pageSize){ Integer count = bannerMapper.selectCount(new EntityWrapper()); - List result = bannerMapper.selectPage(new Page<>((pageNum - 1) * pageSize, pageSize), new EntityWrapper().eq("1", "1").orderBy("ix", true)); + List result = bannerMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), new EntityWrapper().eq("1", "1").orderBy("ix", true)); JSONObject jsonObject = new JSONObject(); jsonObject.put("count",count); jsonObject.put("data",result); diff --git a/src/main/java/com/gszc/service/impl/IndustryServiceImpl.java b/src/main/java/com/gszc/service/impl/IndustryServiceImpl.java index 3066175..19a11e3 100644 --- a/src/main/java/com/gszc/service/impl/IndustryServiceImpl.java +++ b/src/main/java/com/gszc/service/impl/IndustryServiceImpl.java @@ -10,6 +10,7 @@ import com.gszc.mapper.IndustryMapper; import com.gszc.mapper.IndustryMapper; import com.gszc.service.IIndustryService; import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import org.apache.ibatis.session.RowBounds; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -49,7 +50,7 @@ public class IndustryServiceImpl extends ServiceImpl i public JSONObject queryIndustry(Integer pageNum, Integer pageSize){ Integer count = industryMapper.selectCount(new EntityWrapper()); - List result = industryMapper.selectPage(new Page<>((pageNum - 1) * pageSize, pageSize), new EntityWrapper().eq("1", "1").orderBy("create_date", false)); + List result = industryMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), new EntityWrapper().eq("1", "1").orderBy("create_date", false)); JSONObject jsonObject = new JSONObject(); jsonObject.put("count",count); jsonObject.put("data",result); diff --git a/src/main/java/com/gszc/service/impl/InvoiceCategoryServiceImpl.java b/src/main/java/com/gszc/service/impl/InvoiceCategoryServiceImpl.java index 0c79408..54acc59 100644 --- a/src/main/java/com/gszc/service/impl/InvoiceCategoryServiceImpl.java +++ b/src/main/java/com/gszc/service/impl/InvoiceCategoryServiceImpl.java @@ -49,7 +49,7 @@ public class InvoiceCategoryServiceImpl extends ServiceImpl()); - List result = invoiceCategoryMapper.selectPage(new Page<>((pageNum - 1) * pageSize, pageSize), new EntityWrapper().eq("1", "1").orderBy("id", true)); + List result = invoiceCategoryMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), new EntityWrapper().eq("1", "1").orderBy("id", true)); JSONObject jsonObject = new JSONObject(); jsonObject.put("count",count); jsonObject.put("data",result); diff --git a/src/main/java/com/gszc/service/impl/ParkServiceImpl.java b/src/main/java/com/gszc/service/impl/ParkServiceImpl.java index fb4fdd8..3335f62 100644 --- a/src/main/java/com/gszc/service/impl/ParkServiceImpl.java +++ b/src/main/java/com/gszc/service/impl/ParkServiceImpl.java @@ -3,15 +3,15 @@ package com.gszc.service.impl; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.mapper.EntityWrapper; -import com.baomidou.mybatisplus.plugins.Page; -import com.gszc.entity.*; +import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import com.gszc.entity.Industry; +import com.gszc.entity.InvoiceCategory; import com.gszc.entity.Park; import com.gszc.mapper.IndustryMapper; import com.gszc.mapper.InvoiceCategoryMapper; import com.gszc.mapper.ParkMapper; -import com.gszc.mapper.ParkMapper; import com.gszc.service.IParkService; -import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import org.apache.ibatis.session.RowBounds; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -99,7 +99,7 @@ public class ParkServiceImpl extends ServiceImpl implements IP public JSONObject queryPark(Integer pageNum, Integer pageSize){ Integer count = parkMapper.selectCount(new EntityWrapper()); - List result = parkMapper.selectPage(new Page<>((pageNum - 1) * pageSize, pageSize), new EntityWrapper().eq("1", "1").orderBy("create_date", false)); + List result = parkMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), new EntityWrapper().eq("1", "1").orderBy("create_date", false)); for(Park park:result){ String industryCategory = park.getIndustryCategory(); String[] split = industryCategory.split(","); diff --git a/src/main/java/com/gszc/service/impl/QuestionServiceImpl.java b/src/main/java/com/gszc/service/impl/QuestionServiceImpl.java index 8def06b..640829e 100644 --- a/src/main/java/com/gszc/service/impl/QuestionServiceImpl.java +++ b/src/main/java/com/gszc/service/impl/QuestionServiceImpl.java @@ -9,6 +9,7 @@ import com.gszc.entity.Question; import com.gszc.mapper.QuestionMapper; import com.gszc.service.IQuestionService; import com.baomidou.mybatisplus.service.impl.ServiceImpl; +import org.apache.ibatis.session.RowBounds; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -51,7 +52,7 @@ public class QuestionServiceImpl extends ServiceImpl i public JSONObject queryQuestion(Integer pageNum, Integer pageSize){ Integer count = questionMapper.selectCount(new EntityWrapper()); - List result = questionMapper.selectPage(new Page<>((pageNum - 1) * pageSize, pageSize), new EntityWrapper().eq("1", "1").orderBy("ix", true)); + List result = questionMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), new EntityWrapper().eq("1", "1").orderBy("ix", true)); JSONObject jsonObject = new JSONObject(); jsonObject.put("count",count); jsonObject.put("data",result);