Commit 0b56b661 authored by yaobaizheng's avatar yaobaizheng

替换雪花id

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