Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cfld-postcard-service
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cfld-backend
cfld-postcard-service
Commits
423e2af0
Commit
423e2af0
authored
Dec 16, 2023
by
zhouxudong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新代码
parent
7776b9ed
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
166 additions
and
8 deletions
+166
-8
DevelopmentInfoServiceImpl.java
.../development/service/impl/DevelopmentInfoServiceImpl.java
+28
-7
DevelopmentSourceVo.java
...rd/service/moudle/development/vo/DevelopmentSourceVo.java
+8
-1
ScSourceInfoController.java
...vice/moudle/system/controller/ScSourceInfoController.java
+21
-0
ScSourceInfoEntity.java
...card/service/moudle/system/entity/ScSourceInfoEntity.java
+55
-0
ScSourceInfoMapper.java
...card/service/moudle/system/mapper/ScSourceInfoMapper.java
+16
-0
ScSourceInfoService.java
...rd/service/moudle/system/service/ScSourceInfoService.java
+15
-0
ScSourceInfoServiceImpl.java
...e/moudle/system/service/impl/ScSourceInfoServiceImpl.java
+17
-0
ScSourceInfoMapper.xml
src/main/resources/mapper/system/ScSourceInfoMapper.xml
+6
-0
No files found.
src/main/java/com/postcard/service/moudle/development/service/impl/DevelopmentInfoServiceImpl.java
View file @
423e2af0
...
...
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.json.JSONArray
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.postcard.service.enums.CarouselTypeEnum
;
...
...
@@ -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.domain.StarObjectExtensionInfo
;
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.SysDictDataService
;
import
com.postcard.service.moudle.system.vo.ResourceVo
;
import
com.postcard.service.moudle.system.vo.VideoVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -63,6 +68,7 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
@Autowired
SysDictDataService
sysDictDataService
;
@Autowired
StarObjectExtensionInfoService
starObjectExtensionInfoService
;
@Autowired
ScSourceInfoService
scSourceInfoService
;
@Value
(
"${development.id}"
)
private
Integer
developMentId
;
...
...
@@ -107,22 +113,40 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
List
<
VideoVo
>
videoVoList
=
allResource
.
getVideoVoList
();
developmentSourceVo
.
setImgUrlList
(
imgUrlList
);
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
;
}
@Override
public
DevelopmentDetailVo
detail
(
Integer
id
){
public
DevelopmentDetailVo
detail
(
Integer
id
)
{
DevelopmentDetailVo
developmentDetailVo
=
new
DevelopmentDetailVo
();
// 产业政策
LambdaQueryWrapper
<
DevelopmentIndustryPolicyInfo
>
DIPIQueryWrqpper
=
new
LambdaQueryWrapper
<>();
DIPIQueryWrqpper
.
eq
(
DevelopmentIndustryPolicyInfo:
:
getDevelopmentId
,
id
);
List
<
DevelopmentIndustryPolicyInfo
>
list1
=
developmentIndustryPolicyInfoService
.
list
(
DIPIQueryWrqpper
);
developmentIndustryPolicyInfoService
.
list
(
DIPIQueryWrqpper
);
List
<
DevelopmentPolicyVo
>
developmentPolicyVos
=
Convert
.
toList
(
DevelopmentPolicyVo
.
class
,
list1
);
Convert
.
toList
(
DevelopmentPolicyVo
.
class
,
list1
);
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
();
for
(
Map
.
Entry
<
String
,
List
<
DevelopmentPolicyVo
>>
entry
:
collect3
.
entrySet
())
{
JSONObject
jsonObject
=
new
JSONObject
();
...
...
@@ -136,9 +160,6 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
return
null
;
}
@Override
public
List
<
CarrierInvestmentVo
>
getInvestment
(
Integer
developmentId
)
{
LambdaQueryWrapper
<
DevelopmentInvestmentDirectionInfo
>
investQuery
=
new
LambdaQueryWrapper
<>();
...
...
src/main/java/com/postcard/service/moudle/development/vo/DevelopmentSourceVo.java
View file @
423e2af0
package
com
.
postcard
.
service
.
moudle
.
development
.
vo
;
import
com.postcard.service.moudle.system.vo.VideoVo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Author:zhouxudong
...
...
@@ -18,7 +20,12 @@ import java.util.List;
@NoArgsConstructor
@ToString
public
class
DevelopmentSourceVo
{
@ApiModelProperty
(
value
=
"首页轮播图"
)
private
List
<
String
>
imgUrlList
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"首页视频"
)
private
List
<
VideoVo
>
videoVoList
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"首页 舒城荣誉"
)
private
List
<
Map
>
honorUrls
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"首页 话说舒城"
)
private
List
<
String
>
details
=
new
ArrayList
<>();
}
src/main/java/com/postcard/service/moudle/system/controller/ScSourceInfoController.java
0 → 100644
View file @
423e2af0
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
;
}
src/main/java/com/postcard/service/moudle/system/entity/ScSourceInfoEntity.java
0 → 100644
View file @
423e2af0
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
;
}
src/main/java/com/postcard/service/moudle/system/mapper/ScSourceInfoMapper.java
0 → 100644
View file @
423e2af0
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
>{
}
src/main/java/com/postcard/service/moudle/system/service/ScSourceInfoService.java
0 → 100644
View file @
423e2af0
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
>
{
}
src/main/java/com/postcard/service/moudle/system/service/impl/ScSourceInfoServiceImpl.java
0 → 100644
View file @
423e2af0
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
{
}
src/main/resources/mapper/system/ScSourceInfoMapper.xml
0 → 100644
View file @
423e2af0
<?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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment