Commit eb1200fe authored by yaobaizheng's avatar yaobaizheng

bug统一修改

parent fa9dd027
...@@ -18,6 +18,8 @@ public class HomePageVO { ...@@ -18,6 +18,8 @@ public class HomePageVO {
private Long megalopolisInfoCount = 0l; private Long megalopolisInfoCount = 0l;
@ApiModelProperty(value = "都市圈名称") @ApiModelProperty(value = "都市圈名称")
private String megalopolisInfoName = ""; private String megalopolisInfoName = "";
@ApiModelProperty(value = "都市圈id")
private Integer megalopolisInfoId = null;
// @ApiModelProperty(value = "城市覆盖总数") // @ApiModelProperty(value = "城市覆盖总数")
// private Long coverCityCount; // private Long coverCityCount;
@ApiModelProperty(value = "轮播图列表") @ApiModelProperty(value = "轮播图列表")
......
package com.lyy.admin.controller; package com.lyy.admin.controller;
import com.lyy.admin.common.anno.Cache;
import com.lyy.admin.service.TreeInfoService; import com.lyy.admin.service.TreeInfoService;
import com.lyy.admin.service.impl.TreeInfoServiceImpl; import com.lyy.admin.service.impl.TreeInfoServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -20,6 +21,7 @@ public class TreeInfoController { ...@@ -20,6 +21,7 @@ public class TreeInfoController {
@Autowired @Autowired
TreeInfoService treeInfoService; TreeInfoService treeInfoService;
@Cache(cacheByUser = false)
@GetMapping("/list/{ownership}") @GetMapping("/list/{ownership}")
@ResponseBody @ResponseBody
@ApiOperation(value = "查询条件信息",notes = "") @ApiOperation(value = "查询条件信息",notes = "")
......
package com.lyy.admin.controller.developmentinfo; package com.lyy.admin.controller.developmentinfo;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.lyy.admin.common.anno.Cache;
import com.lyy.admin.common.exception.APIException; import com.lyy.admin.common.exception.APIException;
import com.lyy.admin.common.page.TableDataInfo; import com.lyy.admin.common.page.TableDataInfo;
import com.lyy.admin.common.utils.PageUtils; import com.lyy.admin.common.utils.PageUtils;
...@@ -9,6 +10,7 @@ import com.lyy.admin.VO.DevelopmentInfoAllVO; ...@@ -9,6 +10,7 @@ import com.lyy.admin.VO.DevelopmentInfoAllVO;
import com.lyy.admin.VO.DevelopmentInfoListVO; import com.lyy.admin.VO.DevelopmentInfoListVO;
import com.lyy.admin.domain.developmentinfo.DevelopmentInfo; import com.lyy.admin.domain.developmentinfo.DevelopmentInfo;
import com.lyy.admin.domain.developmentinfo.DevelopmentInfoParam; import com.lyy.admin.domain.developmentinfo.DevelopmentInfoParam;
import com.lyy.admin.enumerate.CacheType;
import com.lyy.admin.service.developmentinfo.DevelopmentInfoService; import com.lyy.admin.service.developmentinfo.DevelopmentInfoService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
...@@ -58,6 +60,7 @@ public class DevelopmentInfoController extends BaseController { ...@@ -58,6 +60,7 @@ public class DevelopmentInfoController extends BaseController {
}).collect(Collectors.toList()); }).collect(Collectors.toList());
return getDataTable(developmentInfoVOs,new PageInfo(developmentInfos).getTotal()); return getDataTable(developmentInfoVOs,new PageInfo(developmentInfos).getTotal());
} }
@Cache(cacheByUser = false,type = CacheType.LOCAL)
@GetMapping("/get/{id}") @GetMapping("/get/{id}")
@ResponseBody @ResponseBody
@ApiOperation(value = "某个开发区信息",notes = "rest风格传参,将参数拼接在url上") @ApiOperation(value = "某个开发区信息",notes = "rest风格传参,将参数拼接在url上")
......
...@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lyy.admin.VO.HomePageVO; import com.lyy.admin.VO.HomePageVO;
import com.lyy.admin.VO.ParkInfoListVO; import com.lyy.admin.VO.ParkInfoListVO;
import com.lyy.admin.common.anno.Cache;
import com.lyy.admin.common.page.TableDataInfo; import com.lyy.admin.common.page.TableDataInfo;
import com.lyy.admin.controller.BaseController; import com.lyy.admin.controller.BaseController;
import com.lyy.admin.domain.MegalopolisCoreCityInfo; import com.lyy.admin.domain.MegalopolisCoreCityInfo;
...@@ -78,6 +79,7 @@ public class HomePageController extends BaseController { ...@@ -78,6 +79,7 @@ public class HomePageController extends BaseController {
@Autowired @Autowired
MegalopolisCityInfoService megalopolisCityInfoService; MegalopolisCityInfoService megalopolisCityInfoService;
@Cache(cacheByUser = false)
@GetMapping("/getHomePage") @GetMapping("/getHomePage")
@ResponseBody @ResponseBody
@ApiOperation(value = "园区总数、开发区总数、都市圈总数、城市覆盖总数、轮播图列表、热点园区", notes = "") @ApiOperation(value = "园区总数、开发区总数、都市圈总数、城市覆盖总数、轮播图列表、热点园区", notes = "")
...@@ -109,6 +111,7 @@ public class HomePageController extends BaseController { ...@@ -109,6 +111,7 @@ public class HomePageController extends BaseController {
long megalopolisInfoCount = 30l; long megalopolisInfoCount = 30l;
String megalopolisInfoName = ""; String megalopolisInfoName = "";
Integer megalopoisId = null;
if (StringUtils.isNotBlank(area)) { if (StringUtils.isNotBlank(area)) {
// QueryWrapper<MegalopolisInfo> miQW = new QueryWrapper<>(); // QueryWrapper<MegalopolisInfo> miQW = new QueryWrapper<>();
// miQW.and( // miQW.and(
...@@ -121,7 +124,7 @@ public class HomePageController extends BaseController { ...@@ -121,7 +124,7 @@ public class HomePageController extends BaseController {
QueryWrapper<MegalopolisCoreCityInfo> mcciQW = new QueryWrapper<>(); QueryWrapper<MegalopolisCoreCityInfo> mcciQW = new QueryWrapper<>();
mcciQW.eq("city_name",area); mcciQW.eq("city_name",area);
MegalopolisCoreCityInfo megalopolisCoreCityInfo = megalopolisCoreCityInfoService.getOne(mcciQW); MegalopolisCoreCityInfo megalopolisCoreCityInfo = megalopolisCoreCityInfoService.getOne(mcciQW);
Integer megalopoisId = null;
if(ObjectUtils.isNotEmpty(megalopolisCoreCityInfo)){ if(ObjectUtils.isNotEmpty(megalopolisCoreCityInfo)){
megalopoisId = megalopolisCoreCityInfo.getMegalopolisId(); megalopoisId = megalopolisCoreCityInfo.getMegalopolisId();
} }
...@@ -162,6 +165,7 @@ public class HomePageController extends BaseController { ...@@ -162,6 +165,7 @@ public class HomePageController extends BaseController {
homePageVO.setParkInfoCount(parkInfoCount); homePageVO.setParkInfoCount(parkInfoCount);
homePageVO.setDevelopmentInfoCount(developmentInfoCount); homePageVO.setDevelopmentInfoCount(developmentInfoCount);
homePageVO.setMegalopolisInfoCount(megalopolisInfoCount); homePageVO.setMegalopolisInfoCount(megalopolisInfoCount);
homePageVO.setMegalopolisInfoId(megalopoisId);
homePageVO.setMegalopolisInfoName(megalopolisInfoName); homePageVO.setMegalopolisInfoName(megalopolisInfoName);
// homePageVO.setCoverCityCount(coverCityCount); // homePageVO.setCoverCityCount(coverCityCount);
homePageVO.setSysCarouselInfolist(list); homePageVO.setSysCarouselInfolist(list);
...@@ -175,6 +179,7 @@ public class HomePageController extends BaseController { ...@@ -175,6 +179,7 @@ public class HomePageController extends BaseController {
return homePageVO; return homePageVO;
} }
@Cache(cacheByUser = false)
@GetMapping("/getRegionTargetList") @GetMapping("/getRegionTargetList")
@ResponseBody @ResponseBody
@ApiOperation(value = "获取区域经济数据", notes = "无参数,直接点击测试") @ApiOperation(value = "获取区域经济数据", notes = "无参数,直接点击测试")
......
package com.lyy.admin.controller.megalopolisinfo; package com.lyy.admin.controller.megalopolisinfo;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.lyy.admin.common.anno.Cache;
import com.lyy.admin.common.page.TableDataInfo; import com.lyy.admin.common.page.TableDataInfo;
import com.lyy.admin.common.utils.PageUtils; import com.lyy.admin.common.utils.PageUtils;
import com.lyy.admin.controller.BaseController; import com.lyy.admin.controller.BaseController;
...@@ -8,6 +9,7 @@ import com.lyy.admin.VO.MegalopolisInfoAllVO; ...@@ -8,6 +9,7 @@ import com.lyy.admin.VO.MegalopolisInfoAllVO;
import com.lyy.admin.VO.MegalopolisInfoListVO; import com.lyy.admin.VO.MegalopolisInfoListVO;
import com.lyy.admin.domain.megalopolisinfo.MegalopolisInfo; import com.lyy.admin.domain.megalopolisinfo.MegalopolisInfo;
import com.lyy.admin.domain.megalopolisinfo.MegalopolisInfoParam; import com.lyy.admin.domain.megalopolisinfo.MegalopolisInfoParam;
import com.lyy.admin.enumerate.CacheType;
import com.lyy.admin.service.megalopolisinfo.MegalopolisInfoService; import com.lyy.admin.service.megalopolisinfo.MegalopolisInfoService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
...@@ -57,6 +59,7 @@ public class MegalopolisInfoController extends BaseController { ...@@ -57,6 +59,7 @@ public class MegalopolisInfoController extends BaseController {
}).collect(Collectors.toList()); }).collect(Collectors.toList());
return getDataTable(parkInfoListVOs,new PageInfo(megalopolisInfos).getTotal()); return getDataTable(parkInfoListVOs,new PageInfo(megalopolisInfos).getTotal());
} }
// @Cache(cacheByUser = false,type = CacheType.LOCAL)
@GetMapping("/get/{id}") @GetMapping("/get/{id}")
@ResponseBody @ResponseBody
@ApiOperation(value = "某个都市圈信息",notes = "rest风格传参,将参数拼接在url上") @ApiOperation(value = "某个都市圈信息",notes = "rest风格传参,将参数拼接在url上")
......
...@@ -393,6 +393,8 @@ public class DevelopmentInfo implements Serializable { ...@@ -393,6 +393,8 @@ public class DevelopmentInfo implements Serializable {
private String type; private String type;
private Integer megalopolisId;
@TableField(exist = false) @TableField(exist = false)
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -110,6 +110,8 @@ public class DevelopmentInfoParam implements Serializable { ...@@ -110,6 +110,8 @@ public class DevelopmentInfoParam implements Serializable {
@ApiModelProperty(value = "开发区类型") @ApiModelProperty(value = "开发区类型")
private String type; private String type;
private Integer megalopolisId;
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -141,6 +141,9 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe ...@@ -141,6 +141,9 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
if(StringUtils.isNotBlank(developmentInfoParam.getType())){ if(StringUtils.isNotBlank(developmentInfoParam.getType())){
developmentInfoQW.eq("type", developmentInfoParam.getType()); developmentInfoQW.eq("type", developmentInfoParam.getType());
} }
if(ObjectUtils.isNotEmpty(developmentInfoParam.getMegalopolisId())){
developmentInfoQW.eq("megalopolis_id", developmentInfoParam.getMegalopolisId());
}
List<DevelopmentInfo> developmentInfos = developmentInfoMapper.selectList(developmentInfoQW); List<DevelopmentInfo> developmentInfos = developmentInfoMapper.selectList(developmentInfoQW);
return developmentInfos; return developmentInfos;
...@@ -248,6 +251,7 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe ...@@ -248,6 +251,7 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
developmentInfoVO.setImgUrl(developmentInfo.getImgUrl()); developmentInfoVO.setImgUrl(developmentInfo.getImgUrl());
developmentInfoVO.setPlanArea(developmentInfo.getPlanArea()); developmentInfoVO.setPlanArea(developmentInfo.getPlanArea());
developmentInfoVO.setType(developmentInfo.getType()); developmentInfoVO.setType(developmentInfo.getType());
developmentInfoVO.setAddress(developmentInfo.getAddress());
developmentInfoAllVO.setDevelopmentInfoVO(developmentInfoVO); developmentInfoAllVO.setDevelopmentInfoVO(developmentInfoVO);
} }
if(ObjectUtils.isNotEmpty(userId)) { if(ObjectUtils.isNotEmpty(userId)) {
......
...@@ -133,7 +133,7 @@ public class MegalopolisInfoServiceImpl extends ServiceImpl<MegalopolisInfoMappe ...@@ -133,7 +133,7 @@ public class MegalopolisInfoServiceImpl extends ServiceImpl<MegalopolisInfoMappe
//开发区信息 //开发区信息
DevelopmentInfoParam developmentInfoParam = new DevelopmentInfoParam(); DevelopmentInfoParam developmentInfoParam = new DevelopmentInfoParam();
developmentInfoParam.setId(String.valueOf(id)); developmentInfoParam.setMegalopolisId(id);
List<DevelopmentInfo> developmentInfos = developmentInfoService.selectDevelopmentInfoVOList(developmentInfoParam); List<DevelopmentInfo> developmentInfos = developmentInfoService.selectDevelopmentInfoVOList(developmentInfoParam);
List<DevelopmentInfoListVO> developmentInfoVOs = developmentInfos.stream().map(developmentInfo -> { List<DevelopmentInfoListVO> developmentInfoVOs = developmentInfos.stream().map(developmentInfo -> {
DevelopmentInfoListVO developmentInfoVO = new DevelopmentInfoListVO(); DevelopmentInfoListVO developmentInfoVO = new DevelopmentInfoListVO();
......
...@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lyy.admin.VO.*; import com.lyy.admin.VO.*;
import com.lyy.admin.common.anno.Cache;
import com.lyy.admin.enumerate.CarouselTypeEnum; import com.lyy.admin.enumerate.CarouselTypeEnum;
import com.lyy.admin.enumerate.StatusEnum; import com.lyy.admin.enumerate.StatusEnum;
import com.lyy.admin.common.exception.APIException; import com.lyy.admin.common.exception.APIException;
...@@ -106,6 +107,7 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo> i ...@@ -106,6 +107,7 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo> i
@Autowired @Autowired
SysCarouselInfoMapper sysCarouselInfoMapper; SysCarouselInfoMapper sysCarouselInfoMapper;
@Cache(cacheByUser = false)
public List<ParkInfo> selectParkInfoListVO(ParkInfoParam parkInfoParam) { public List<ParkInfo> selectParkInfoListVO(ParkInfoParam parkInfoParam) {
String coverArea = parkInfoParam.getCoverArea(); String coverArea = parkInfoParam.getCoverArea();
if (ObjectUtils.isNotEmpty(coverArea)) { if (ObjectUtils.isNotEmpty(coverArea)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment