Commit 0b56b661 authored by yaobaizheng's avatar yaobaizheng

替换雪花id

parent 0904787c
package com.lyy.admin.VO; package com.lyy.admin.VO;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.*; import lombok.*;
...@@ -20,6 +22,10 @@ public class CarrierPageVo { ...@@ -20,6 +22,10 @@ public class CarrierPageVo {
@ApiModelProperty(value = "主键id") @ApiModelProperty(value = "主键id")
private Integer id; private Integer id;
@ApiModelProperty(value = "业务id")
@JsonSerialize(using = ToStringSerializer.class)
private Long businessId;
@ApiModelProperty(value = "载体名称") @ApiModelProperty(value = "载体名称")
private String name; private String name;
//园区名称 //园区名称
......
package com.lyy.admin.VO; package com.lyy.admin.VO;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.*; import lombok.*;
...@@ -26,6 +28,10 @@ public class CarrierParkVo { ...@@ -26,6 +28,10 @@ public class CarrierParkVo {
@ApiModelProperty(value = "主键id") @ApiModelProperty(value = "主键id")
private Integer id; private Integer id;
@ApiModelProperty(value = "业务id")
@JsonSerialize(using = ToStringSerializer.class)
private Long businessId;
@ApiModelProperty(value = "产业园名称") @ApiModelProperty(value = "产业园名称")
private String name; private String name;
......
package com.lyy.admin.VO; package com.lyy.admin.VO;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -14,9 +16,10 @@ import java.util.Date; ...@@ -14,9 +16,10 @@ import java.util.Date;
public class DevelopmentInfoListVO implements Serializable { public class DevelopmentInfoListVO implements Serializable {
@ApiModelProperty(value = "主键id") @ApiModelProperty(value = "主键id")
private String id; private Integer id;
@ApiModelProperty(value = "业务id") @ApiModelProperty(value = "业务id")
@JsonSerialize(using = ToStringSerializer.class)
private Long businessId; private Long businessId;
/** /**
......
package com.lyy.admin.VO; package com.lyy.admin.VO;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.*; import lombok.*;
...@@ -25,6 +27,10 @@ public class LandDetailDevelopment { ...@@ -25,6 +27,10 @@ public class LandDetailDevelopment {
/** id */ /** id */
@ApiModelProperty(name = "id", notes = "") @ApiModelProperty(name = "id", notes = "")
private Integer id; private Integer id;
@ApiModelProperty(value = "业务id")
@JsonSerialize(using = ToStringSerializer.class)
private Long businessId;
/** 省份 */ /** 省份 */
@ApiModelProperty(name = "省份", notes = "") @ApiModelProperty(name = "省份", notes = "")
private String provinceName; private String provinceName;
......
package com.lyy.admin.VO; package com.lyy.admin.VO;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.*; import lombok.*;
...@@ -21,6 +23,9 @@ public class LandPageVo { ...@@ -21,6 +23,9 @@ public class LandPageVo {
/** 主键id */ /** 主键id */
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
private Integer id; private Integer id;
@ApiModelProperty(value = "业务id")
@JsonSerialize(using = ToStringSerializer.class)
private Long businessId;
/** 地块名称 */ /** 地块名称 */
@ApiModelProperty(value = "地块名称") @ApiModelProperty(value = "地块名称")
private String name; private String name;
......
package com.lyy.admin.VO; package com.lyy.admin.VO;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -15,9 +17,10 @@ public class ParkInfoListVO implements Serializable { ...@@ -15,9 +17,10 @@ public class ParkInfoListVO implements Serializable {
* 主键id * 主键id
*/ */
@ApiModelProperty(value = "主键id") @ApiModelProperty(value = "主键id")
private String id; private Integer id;
@ApiModelProperty(value = "业务id") @ApiModelProperty(value = "业务id")
@JsonSerialize(using = ToStringSerializer.class)
private Long businessId; private Long businessId;
/** /**
......
package com.lyy.admin.VO; package com.lyy.admin.VO;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
......
...@@ -104,11 +104,11 @@ public class ApiController extends BaseController { ...@@ -104,11 +104,11 @@ public class ApiController extends BaseController {
return getDataTable(parkInfoListVOs, new PageInfo(lists).getTotal()); return getDataTable(parkInfoListVOs, new PageInfo(lists).getTotal());
} }
@GetMapping("/park/detail/{id}") @GetMapping("/park/detail/{businessId}")
@ApiOperation(value = "园区详情信息", notes = "rest风格传参,将参数拼接在url上") @ApiOperation(value = "园区详情信息", notes = "rest风格传参,将参数拼接在url上")
@ApiImplicitParam(name = "id", value = "园区id", type = "Long") @ApiImplicitParam(name = "businessId", value = "园区id", type = "Long")
public ParkInfoAllVO parkDetail(@PathVariable Long id) { public ParkInfoAllVO parkDetail(@PathVariable Long businessId) {
return parkInfoService.getParkInfo(id, 0, true); return parkInfoService.getParkInfo(businessId, 0, true);
} }
@PostMapping("/development/pageList") @PostMapping("/development/pageList")
...@@ -136,11 +136,11 @@ public class ApiController extends BaseController { ...@@ -136,11 +136,11 @@ public class ApiController extends BaseController {
}).collect(Collectors.toList()); }).collect(Collectors.toList());
return getDataTable(developmentInfoVOs,new PageInfo(developmentInfos).getTotal()); return getDataTable(developmentInfoVOs,new PageInfo(developmentInfos).getTotal());
} }
@GetMapping("/development/detail/{id}") @GetMapping("/development/detail/{businessId}")
@ApiOperation(value = "开发区详情",notes = "rest风格传参,将参数拼接在url上") @ApiOperation(value = "开发区详情",notes = "rest风格传参,将参数拼接在url上")
@ApiImplicitParam(name = "id", value = "开发区id", type = "Long") @ApiImplicitParam(name = "businessId", value = "开发区id", type = "Long")
public DevelopmentInfoAllVO developmentDetail(@PathVariable Long id) { public DevelopmentInfoAllVO developmentDetail(@PathVariable Long businessId) {
return developmentInfoService.getDevelopmentInfo(id,0,true); return developmentInfoService.getDevelopmentInfo(businessId,0,true);
} }
...@@ -158,11 +158,11 @@ public class ApiController extends BaseController { ...@@ -158,11 +158,11 @@ public class ApiController extends BaseController {
return getDataTable(carrierPageVos); return getDataTable(carrierPageVos);
} }
@GetMapping("/carrier/detail/{id}") @GetMapping("/carrier/detail/{businessId}")
@ApiOperation(value = "载体详情",notes = "rest风格传参,将参数拼接在url上") @ApiOperation(value = "载体详情",notes = "rest风格传参,将参数拼接在url上")
@ApiImplicitParam(name = "id", value = "载体id", type = "Integer") @ApiImplicitParam(name = "businessId", value = "载体id", type = "Integer")
public CarrierDetailVo carrierDetail(@PathVariable Integer id) { public CarrierDetailVo carrierDetail(@PathVariable Long businessId) {
return carrierInfoService.detail(id); return carrierInfoService.detail(businessId);
} }
@PostMapping("/land/pageList") @PostMapping("/land/pageList")
...@@ -179,11 +179,11 @@ public class ApiController extends BaseController { ...@@ -179,11 +179,11 @@ public class ApiController extends BaseController {
return getDataTable(carrierPageVos); return getDataTable(carrierPageVos);
} }
@GetMapping("/land/detail/{id}") @GetMapping("/land/detail/{businessId}")
@ApiOperation(value = "土地详情信息", notes = "rest风格传参,将参数拼接在url上") @ApiOperation(value = "土地详情信息", notes = "rest风格传参,将参数拼接在url上")
@ApiImplicitParam(name = "id", value = "土地id", type = "Integer") @ApiImplicitParam(name = "businessId", value = "土地id", type = "Long")
public LandDetailVo landDetail(@PathVariable Integer id) { public LandDetailVo landDetail(@PathVariable Long businessId) {
return landInfoService.detail(id); return landInfoService.detail(businessId);
} }
@PostMapping("/getHomePage") @PostMapping("/getHomePage")
......
...@@ -55,7 +55,6 @@ public class DevelopmentInfoController extends BaseController { ...@@ -55,7 +55,6 @@ public class DevelopmentInfoController extends BaseController {
List<DevelopmentInfoListVO> developmentInfoVOs = developmentInfos.stream().map(developmentInfo -> { List<DevelopmentInfoListVO> developmentInfoVOs = developmentInfos.stream().map(developmentInfo -> {
DevelopmentInfoListVO developmentInfoVO = new DevelopmentInfoListVO(); DevelopmentInfoListVO developmentInfoVO = new DevelopmentInfoListVO();
BeanUtils.copyProperties(developmentInfo, developmentInfoVO); BeanUtils.copyProperties(developmentInfo, developmentInfoVO);
developmentInfoVO.setId(developmentInfo.getBusinessId().toString());
if(login){ if(login){
boolean existInfo = developmentInfoSerivce.isExistInfo(getUserInfo().getUserId(), developmentInfo.getId()); boolean existInfo = developmentInfoSerivce.isExistInfo(getUserInfo().getUserId(), developmentInfo.getId());
if (existInfo) { if (existInfo) {
......
...@@ -151,10 +151,6 @@ public class HomePageController extends BaseController { ...@@ -151,10 +151,6 @@ public class HomePageController extends BaseController {
} }
} }
// QueryWrapper<SysCarouselInfo> sysCarouselInfoQW = new QueryWrapper<>();
// sysCarouselInfoQW.eq("`status`", 1);
// sysCarouselInfoQW.eq("`type`", 3);
// List<SysCarouselInfo> collect = sysCarouselInfoService.list(sysCarouselInfoQW);
LambdaQueryWrapper<SysCommonFile> sysCommonFileLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SysCommonFile> sysCommonFileLambdaQueryWrapper = new LambdaQueryWrapper<>();
sysCommonFileLambdaQueryWrapper.eq(SysCommonFile::getStatus, StatusEnum.ENABLE.getCode()); sysCommonFileLambdaQueryWrapper.eq(SysCommonFile::getStatus, StatusEnum.ENABLE.getCode());
sysCommonFileLambdaQueryWrapper.eq(SysCommonFile::getType, CommonFileTypeEnum.YQZDSYLBT.getType()); sysCommonFileLambdaQueryWrapper.eq(SysCommonFile::getType, CommonFileTypeEnum.YQZDSYLBT.getType());
......
...@@ -65,7 +65,6 @@ public class ParkInfoController extends BaseController { ...@@ -65,7 +65,6 @@ public class ParkInfoController extends BaseController {
List<ParkInfoListVO> parkInfoListVOs = lists.stream().map(parkInfo -> { List<ParkInfoListVO> parkInfoListVOs = lists.stream().map(parkInfo -> {
ParkInfoListVO parkInfoListVO = new ParkInfoListVO(); ParkInfoListVO parkInfoListVO = new ParkInfoListVO();
BeanUtils.copyProperties(parkInfo, parkInfoListVO); BeanUtils.copyProperties(parkInfo, parkInfoListVO);
parkInfoListVO.setId(parkInfoListVO.getBusinessId().toString());
//是否收藏 //是否收藏
if (login) { if (login) {
boolean existInfo = parkInfoService.isExistInfo(getUserInfo().getUserId(), parkInfo.getId()); boolean existInfo = parkInfoService.isExistInfo(getUserInfo().getUserId(), parkInfo.getId());
......
package com.lyy.admin.domain.parkinfo; package com.lyy.admin.domain.parkinfo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -126,7 +128,11 @@ public class ParkInfoParam implements Serializable { ...@@ -126,7 +128,11 @@ public class ParkInfoParam implements Serializable {
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
private Integer userId; private Integer userId;
// @ApiModelProperty(value = "开发区id")
// private Integer zoneId;
@ApiModelProperty(value = "开发区id") @ApiModelProperty(value = "开发区id")
@JsonSerialize(using = ToStringSerializer.class)
private Integer zoneId; private Integer zoneId;
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
......
...@@ -21,7 +21,7 @@ public interface CarrierInfoService extends IService<CarrierInfo> { ...@@ -21,7 +21,7 @@ public interface CarrierInfoService extends IService<CarrierInfo> {
List<CarrierPageVo> pageList(CarrierPageDto carrierPageDto); List<CarrierPageVo> pageList(CarrierPageDto carrierPageDto);
CarrierDetailVo detail(Integer id); CarrierDetailVo detail(Long businessId);
Long count(LyrHomePageDto lyrHomePageDto); Long count(LyrHomePageDto lyrHomePageDto);
} }
...@@ -126,8 +126,13 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, Carri ...@@ -126,8 +126,13 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, Carri
} }
@Override @Override
public CarrierDetailVo detail(Integer id) { public CarrierDetailVo detail(Long businessId) {
CarrierInfo carrierInfo = this.getById(id); // CarrierInfo carrierInfo = this.getById(id);
LambdaQueryWrapper<CarrierInfo> CILambdaQueryWrapper = new LambdaQueryWrapper<>();
CILambdaQueryWrapper.eq(CarrierInfo::getBusinessId, businessId);
CarrierInfo carrierInfo = this.getOne(CILambdaQueryWrapper);
Integer id = carrierInfo.getId();
CarrierDetailVo carrierDetailVo = BeanUtil.copyProperties(carrierInfo, CarrierDetailVo.class); CarrierDetailVo carrierDetailVo = BeanUtil.copyProperties(carrierInfo, CarrierDetailVo.class);
// 招商方向 // 招商方向
List<CarrierInvestmentVo> investmentVos=new ArrayList<>(); List<CarrierInvestmentVo> investmentVos=new ArrayList<>();
......
...@@ -24,5 +24,5 @@ public interface DevelopmentIndustrialLandInfoService extends IService<LandInfoE ...@@ -24,5 +24,5 @@ public interface DevelopmentIndustrialLandInfoService extends IService<LandInfoE
public List<LandPageVo> pageList(LandPageDto landPageDto); public List<LandPageVo> pageList(LandPageDto landPageDto);
LandDetailVo detail(Integer id); LandDetailVo detail(Long id);
} }
...@@ -121,8 +121,13 @@ public class DevelopmentIndustrialLandInfoServiceImpl extends ServiceImpl<Develo ...@@ -121,8 +121,13 @@ public class DevelopmentIndustrialLandInfoServiceImpl extends ServiceImpl<Develo
} }
@Override @Override
public LandDetailVo detail(Integer id){ public LandDetailVo detail(Long businessId){
LandInfoEntity landInfoEntity = this.getById(id); // LandInfoEntity landInfoEntity = this.getById(id);
LambdaQueryWrapper<LandInfoEntity> LIELambdaQueryWrapper = new LambdaQueryWrapper<>();
LIELambdaQueryWrapper.eq(LandInfoEntity::getBusinessId,businessId);
LandInfoEntity landInfoEntity = this.getOne(LIELambdaQueryWrapper);
Integer id = landInfoEntity.getId();
LandDetailVo landDetailVo = BeanUtil.toBean(landInfoEntity, LandDetailVo.class); LandDetailVo landDetailVo = BeanUtil.toBean(landInfoEntity, LandDetailVo.class);
// 招商方向 // 招商方向
List<CarrierInvestmentVo> investment = new ArrayList<>(); List<CarrierInvestmentVo> investment = new ArrayList<>();
......
...@@ -14,6 +14,7 @@ import com.lyy.admin.VO.*; ...@@ -14,6 +14,7 @@ import com.lyy.admin.VO.*;
import com.lyy.admin.common.utils.BusinessService; import com.lyy.admin.common.utils.BusinessService;
import com.lyy.admin.domain.FileSource; import com.lyy.admin.domain.FileSource;
import com.lyy.admin.domain.carrierinfo.CarrierInfo; import com.lyy.admin.domain.carrierinfo.CarrierInfo;
import com.lyy.admin.domain.developmentinfo.DevelopmentInfo;
import com.lyy.admin.enumerate.*; import com.lyy.admin.enumerate.*;
import com.lyy.admin.common.exception.APIException; import com.lyy.admin.common.exception.APIException;
import com.lyy.admin.common.exception.APIExceptionEnum; import com.lyy.admin.common.exception.APIExceptionEnum;
...@@ -31,6 +32,7 @@ import com.lyy.admin.service.carrierinfo.CarrierElevatorInfoService; ...@@ -31,6 +32,7 @@ import com.lyy.admin.service.carrierinfo.CarrierElevatorInfoService;
import com.lyy.admin.service.carrierinfo.CarrierFloorInfoService; import com.lyy.admin.service.carrierinfo.CarrierFloorInfoService;
import com.lyy.admin.service.carrierinfo.CarrierInfoService; import com.lyy.admin.service.carrierinfo.CarrierInfoService;
import com.lyy.admin.service.carrierinfo.CarrierOperateInfoService; import com.lyy.admin.service.carrierinfo.CarrierOperateInfoService;
import com.lyy.admin.service.developmentinfo.DevelopmentInfoService;
import com.lyy.admin.service.parkinfo.*; import com.lyy.admin.service.parkinfo.*;
import com.lyy.admin.service.system.SysCarouselInfoService; import com.lyy.admin.service.system.SysCarouselInfoService;
import com.lyy.admin.service.system.SysMembershipInfoService; import com.lyy.admin.service.system.SysMembershipInfoService;
...@@ -114,8 +116,8 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo> i ...@@ -114,8 +116,8 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo> i
@Autowired @Autowired
SubmitExamineLogService submitExamineLogService; SubmitExamineLogService submitExamineLogService;
// @Autowired @Autowired
// SysCarouselInfoMapper sysCarouselInfoMapper; DevelopmentInfoService developmentInfoService;
@Autowired @Autowired
SysCarouselInfoService sysCarouselInfoService; SysCarouselInfoService sysCarouselInfoService;
...@@ -148,6 +150,7 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo> i ...@@ -148,6 +150,7 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo> i
if (ObjectUtils.isNotEmpty(parkInfoParam.getId())) { if (ObjectUtils.isNotEmpty(parkInfoParam.getId())) {
ParkInfoQW.in("id", com.lyy.admin.common.utils.StringUtils.typeList(parkInfoParam.getId())); ParkInfoQW.in("id", com.lyy.admin.common.utils.StringUtils.typeList(parkInfoParam.getId()));
} }
String name = parkInfoParam.getName(); String name = parkInfoParam.getName();
if (StringUtils.isNotBlank(name)) { if (StringUtils.isNotBlank(name)) {
ParkInfoQW.and(w -> w.like("name", name).or().like("description", name)); ParkInfoQW.and(w -> w.like("name", name).or().like("description", name));
...@@ -271,10 +274,10 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo> i ...@@ -271,10 +274,10 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo> i
public List<ParkInfo> selectHotParkInfoListVO() { public List<ParkInfo> selectHotParkInfoListVO() {
QueryWrapper<ParkInfo> ParkInfoQW = new QueryWrapper<>(); LambdaQueryWrapper<ParkInfo> PILambdaQueryWrapper = new LambdaQueryWrapper<>();
ParkInfoQW.ge("is_hot_park", ParkInfoEnum.HOT_PARK.getCode()); PILambdaQueryWrapper.ge(ParkInfo::getIsHotPark, ParkInfoEnum.HOT_PARK.getCode());
ParkInfoQW.orderByAsc("is_hot_park"); PILambdaQueryWrapper.orderByAsc(ParkInfo::getIsHotPark);
List<ParkInfo> parkInfos = parkInfoMapper.selectList(ParkInfoQW); List<ParkInfo> parkInfos = parkInfoMapper.selectList(PILambdaQueryWrapper);
return parkInfos; return parkInfos;
} }
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<select id="pageList" parameterType="com.lyy.admin.DTO.CarrierPageDto" resultType="com.lyy.admin.VO.CarrierPageVo"> <select id="pageList" parameterType="com.lyy.admin.DTO.CarrierPageDto" resultType="com.lyy.admin.VO.CarrierPageVo">
select select
a.id, a.id,
a.business_id,
b.province_code, b.province_code,
b.province_name, b.province_name,
b.city_code, b.city_code,
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
parameterType="com.lyy.admin.DTO.LandPageDto"> parameterType="com.lyy.admin.DTO.LandPageDto">
select select
dili.id, dili.id,
dili.business_id,
dili.name, dili.name,
dili.area, dili.area,
di.name as developmentName, di.name as developmentName,
......
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