Commit 423e2af0 authored by zhouxudong's avatar zhouxudong

更新代码

parent 7776b9ed
...@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.json.JSONArray; import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.postcard.service.enums.CarouselTypeEnum; import com.postcard.service.enums.CarouselTypeEnum;
...@@ -22,16 +23,20 @@ import com.postcard.service.moudle.park.service.ParkInfoService; ...@@ -22,16 +23,20 @@ import com.postcard.service.moudle.park.service.ParkInfoService;
import com.postcard.service.moudle.startObjectExtensionInfo.VO.StarObjectExtensionInfoVO; import com.postcard.service.moudle.startObjectExtensionInfo.VO.StarObjectExtensionInfoVO;
import com.postcard.service.moudle.startObjectExtensionInfo.domain.StarObjectExtensionInfo; import com.postcard.service.moudle.startObjectExtensionInfo.domain.StarObjectExtensionInfo;
import com.postcard.service.moudle.startObjectExtensionInfo.service.StarObjectExtensionInfoService; import com.postcard.service.moudle.startObjectExtensionInfo.service.StarObjectExtensionInfoService;
import com.postcard.service.moudle.system.entity.ScSourceInfoEntity;
import com.postcard.service.moudle.system.service.ScSourceInfoService;
import com.postcard.service.moudle.system.service.SysCarouselInfoService; import com.postcard.service.moudle.system.service.SysCarouselInfoService;
import com.postcard.service.moudle.system.service.SysDictDataService; import com.postcard.service.moudle.system.service.SysDictDataService;
import com.postcard.service.moudle.system.vo.ResourceVo; import com.postcard.service.moudle.system.vo.ResourceVo;
import com.postcard.service.moudle.system.vo.VideoVo; import com.postcard.service.moudle.system.vo.VideoVo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -63,6 +68,7 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe ...@@ -63,6 +68,7 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
@Autowired SysDictDataService sysDictDataService; @Autowired SysDictDataService sysDictDataService;
@Autowired StarObjectExtensionInfoService starObjectExtensionInfoService; @Autowired StarObjectExtensionInfoService starObjectExtensionInfoService;
@Autowired ScSourceInfoService scSourceInfoService;
@Value("${development.id}") @Value("${development.id}")
private Integer developMentId; private Integer developMentId;
...@@ -107,22 +113,40 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe ...@@ -107,22 +113,40 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
List<VideoVo> videoVoList = allResource.getVideoVoList(); List<VideoVo> videoVoList = allResource.getVideoVoList();
developmentSourceVo.setImgUrlList(imgUrlList); developmentSourceVo.setImgUrlList(imgUrlList);
developmentSourceVo.setVideoVoList(videoVoList); developmentSourceVo.setVideoVoList(videoVoList);
LambdaQueryWrapper<ScSourceInfoEntity> scSourceQuery = new LambdaQueryWrapper<>();
scSourceQuery.eq(ScSourceInfoEntity::getDevelopmentId, developMentId);
ScSourceInfoEntity scSourceInfoEntity = scSourceInfoService.getOne(scSourceQuery, false);
if (!ObjectUtils.isEmpty(scSourceInfoEntity)) {
String honorUrl = scSourceInfoEntity.getHonorUrl();
String details = scSourceInfoEntity.getDetails();
if (StringUtils.isNotBlank(honorUrl)) {
List<Map> maps = JSONUtil.toList(honorUrl, Map.class);
developmentSourceVo.setHonorUrls(maps);
}
if (StringUtils.isNotBlank(details)) {
List<String> maps = JSONUtil.toList(details, String.class);
developmentSourceVo.setDetails(maps);
}
}
return developmentSourceVo; return developmentSourceVo;
} }
@Override @Override
public DevelopmentDetailVo detail(Integer id){ public DevelopmentDetailVo detail(Integer id) {
DevelopmentDetailVo developmentDetailVo = new DevelopmentDetailVo(); DevelopmentDetailVo developmentDetailVo = new DevelopmentDetailVo();
// 产业政策 // 产业政策
LambdaQueryWrapper<DevelopmentIndustryPolicyInfo> DIPIQueryWrqpper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<DevelopmentIndustryPolicyInfo> DIPIQueryWrqpper = new LambdaQueryWrapper<>();
DIPIQueryWrqpper.eq(DevelopmentIndustryPolicyInfo::getDevelopmentId, id); DIPIQueryWrqpper.eq(DevelopmentIndustryPolicyInfo::getDevelopmentId, id);
List<DevelopmentIndustryPolicyInfo> list1 = List<DevelopmentIndustryPolicyInfo> list1 =
developmentIndustryPolicyInfoService.list(DIPIQueryWrqpper); developmentIndustryPolicyInfoService.list(DIPIQueryWrqpper);
List<DevelopmentPolicyVo> developmentPolicyVos = List<DevelopmentPolicyVo> developmentPolicyVos =
Convert.toList(DevelopmentPolicyVo.class, list1); Convert.toList(DevelopmentPolicyVo.class, list1);
LinkedHashMap<String, List<DevelopmentPolicyVo>> collect3 = LinkedHashMap<String, List<DevelopmentPolicyVo>> collect3 =
developmentPolicyVos.stream().collect(Collectors.groupingBy(DevelopmentPolicyVo::getType,LinkedHashMap::new,Collectors.toList())); developmentPolicyVos.stream()
.collect(
Collectors.groupingBy(
DevelopmentPolicyVo::getType, LinkedHashMap::new, Collectors.toList()));
JSONArray policyJsonArray = new JSONArray(); JSONArray policyJsonArray = new JSONArray();
for (Map.Entry<String, List<DevelopmentPolicyVo>> entry : collect3.entrySet()) { for (Map.Entry<String, List<DevelopmentPolicyVo>> entry : collect3.entrySet()) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
...@@ -136,9 +160,6 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe ...@@ -136,9 +160,6 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
return null; return null;
} }
@Override @Override
public List<CarrierInvestmentVo> getInvestment(Integer developmentId) { public List<CarrierInvestmentVo> getInvestment(Integer developmentId) {
LambdaQueryWrapper<DevelopmentInvestmentDirectionInfo> investQuery = new LambdaQueryWrapper<>(); LambdaQueryWrapper<DevelopmentInvestmentDirectionInfo> investQuery = new LambdaQueryWrapper<>();
......
package com.postcard.service.moudle.development.vo; package com.postcard.service.moudle.development.vo;
import com.postcard.service.moudle.system.vo.VideoVo; import com.postcard.service.moudle.system.vo.VideoVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.*; import lombok.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @Author:zhouxudong * @Author:zhouxudong
...@@ -18,7 +20,12 @@ import java.util.List; ...@@ -18,7 +20,12 @@ import java.util.List;
@NoArgsConstructor @NoArgsConstructor
@ToString @ToString
public class DevelopmentSourceVo { public class DevelopmentSourceVo {
@ApiModelProperty(value = "首页轮播图")
private List<String> imgUrlList = new ArrayList<>(); private List<String> imgUrlList = new ArrayList<>();
@ApiModelProperty(value = "首页视频")
private List<VideoVo> videoVoList = new ArrayList<>(); private List<VideoVo> videoVoList = new ArrayList<>();
@ApiModelProperty(value = "首页 舒城荣誉")
private List<Map> honorUrls=new ArrayList<>();
@ApiModelProperty(value = "首页 话说舒城")
private List<String> details=new ArrayList<>();
} }
package com.postcard.service.moudle.system.controller;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.postcard.service.moudle.system.service.ScSourceInfoService;
/**
* @author: zhouxudong
* @version: 1.0
* @createTime: 2023/12/16 17:07
* @description: 舒城静态资源数据
*/
@Api(tags = "舒城静态资源数据对象功能接口")
@RestController
@RequestMapping("/api/scSourceInfo")
public class ScSourceInfoController{
@Autowired
private ScSourceInfoService scSourceInfoService;
}
package com.postcard.service.moudle.system.entity;
import com.postcard.service.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.*;
import java.io.Serializable;
import java.util.Date;
/**
* @author: zhouxudong
* @version: 1.0
* @createTime: 2023/12/16 17:06
* @description: 舒城静态资源数据
*/
@ApiModel(value = "舒城静态资源数据",description = "")
@TableName("sc_source_info")
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class ScSourceInfoEntity extends BaseEntity implements Serializable{
/** 舒城荣誉图片 */
@ApiModelProperty(name = "舒城荣誉图片",notes = "")
private String honorUrl ;
/** 舒城荣誉信息 */
@ApiModelProperty(name = "舒城荣誉信息 话说舒城",notes = "")
private String details ;
/** 联系信息 */
@ApiModelProperty(name = "联系信息",notes = "")
private String contactInformation ;
/** 备注字段1 */
@ApiModelProperty(name = "备注字段1",notes = "")
private String r1 ;
/** 备注字段2 */
@ApiModelProperty(name = "备注字段2",notes = "")
private String r2 ;
/** 备注字段3 */
@ApiModelProperty(name = "备注字段3",notes = "")
private String r3 ;
/** 备注字段4 */
@ApiModelProperty(name = "备注字段4",notes = "")
private String r4 ;
/** 备注字段5 */
@ApiModelProperty(name = "备注字段5",notes = "")
private String r5 ;
/** 产业园id */
@ApiModelProperty(name = "产业园id",notes = "")
private Integer developmentId ;
}
package com.postcard.service.moudle.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.postcard.service.moudle.system.entity.ScSourceInfoEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* @author: zhouxudong
* @version: 1.0
* @createTime: 2023/12/16 17:08
* @description: 舒城静态资源数据
*/
@Mapper
public interface ScSourceInfoMapper extends BaseMapper<ScSourceInfoEntity>{
}
package com.postcard.service.moudle.system.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.postcard.service.moudle.system.entity.ScSourceInfoEntity;
/**
* @author: zhouxudong
* @version: 1.0
* @createTime: 2023/12/16 17:07
* @description: 舒城静态资源数据
*/
public interface ScSourceInfoService extends IService<ScSourceInfoEntity> {
}
package com.postcard.service.moudle.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.postcard.service.moudle.system.entity.ScSourceInfoEntity;
import org.springframework.stereotype.Service;
import com.postcard.service.moudle.system.mapper.ScSourceInfoMapper;
import com.postcard.service.moudle.system.service.ScSourceInfoService;
/**
* @author: zhouxudong
* @version: 1.0
* @createTime: 2023/12/16 17:09
* @description: 舒城静态资源数据
*/
@Service
public class ScSourceInfoServiceImpl extends ServiceImpl<ScSourceInfoMapper, ScSourceInfoEntity> implements ScSourceInfoService{
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.postcard.service.moudle.system.mapper.ScSourceInfoMapper">
</mapper>
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