ky 5 years ago
parent c379ca2977
commit 144fa74148

@ -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

@ -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);

@ -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);

@ -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<BannerMapper, Banner> impleme
public JSONObject queryBanner(Integer pageNum, Integer pageSize){
Integer count = bannerMapper.selectCount(new EntityWrapper<Banner>());
List<Banner> result = bannerMapper.selectPage(new Page<>((pageNum - 1) * pageSize, pageSize), new EntityWrapper<Banner>().eq("1", "1").orderBy("ix", true));
List<Banner> result = bannerMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), new EntityWrapper<Banner>().eq("1", "1").orderBy("ix", true));
JSONObject jsonObject = new JSONObject();
jsonObject.put("count",count);
jsonObject.put("data",result);

@ -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<IndustryMapper, Industry> i
public JSONObject queryIndustry(Integer pageNum, Integer pageSize){
Integer count = industryMapper.selectCount(new EntityWrapper<Industry>());
List<Industry> result = industryMapper.selectPage(new Page<>((pageNum - 1) * pageSize, pageSize), new EntityWrapper<Industry>().eq("1", "1").orderBy("create_date", false));
List<Industry> result = industryMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), new EntityWrapper<Industry>().eq("1", "1").orderBy("create_date", false));
JSONObject jsonObject = new JSONObject();
jsonObject.put("count",count);
jsonObject.put("data",result);

@ -49,7 +49,7 @@ public class InvoiceCategoryServiceImpl extends ServiceImpl<InvoiceCategoryMappe
public JSONObject queryInvoiceCategory(Integer pageNum, Integer pageSize){
Integer count = invoiceCategoryMapper.selectCount(new EntityWrapper<InvoiceCategory>());
List<InvoiceCategory> result = invoiceCategoryMapper.selectPage(new Page<>((pageNum - 1) * pageSize, pageSize), new EntityWrapper<InvoiceCategory>().eq("1", "1").orderBy("id", true));
List<InvoiceCategory> result = invoiceCategoryMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), new EntityWrapper<InvoiceCategory>().eq("1", "1").orderBy("id", true));
JSONObject jsonObject = new JSONObject();
jsonObject.put("count",count);
jsonObject.put("data",result);

@ -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<ParkMapper, Park> implements IP
public JSONObject queryPark(Integer pageNum, Integer pageSize){
Integer count = parkMapper.selectCount(new EntityWrapper<Park>());
List<Park> result = parkMapper.selectPage(new Page<>((pageNum - 1) * pageSize, pageSize), new EntityWrapper<Park>().eq("1", "1").orderBy("create_date", false));
List<Park> result = parkMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), new EntityWrapper<Park>().eq("1", "1").orderBy("create_date", false));
for(Park park:result){
String industryCategory = park.getIndustryCategory();
String[] split = industryCategory.split(",");

@ -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<QuestionMapper, Question> i
public JSONObject queryQuestion(Integer pageNum, Integer pageSize){
Integer count = questionMapper.selectCount(new EntityWrapper<Question>());
List<Question> result = questionMapper.selectPage(new Page<>((pageNum - 1) * pageSize, pageSize), new EntityWrapper<Question>().eq("1", "1").orderBy("ix", true));
List<Question> result = questionMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize), new EntityWrapper<Question>().eq("1", "1").orderBy("ix", true));
JSONObject jsonObject = new JSONObject();
jsonObject.put("count",count);
jsonObject.put("data",result);

Loading…
Cancel
Save