Commit eb1200fe authored by yaobaizheng's avatar yaobaizheng

bug统一修改

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