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
7dc39ee3
Commit
7dc39ee3
authored
Dec 16, 2023
by
zhouxudong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新代码
parent
423e2af0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
7 deletions
+49
-7
ScSourceInfoController.java
...vice/moudle/system/controller/ScSourceInfoController.java
+12
-4
ScSourceInfoService.java
...rd/service/moudle/system/service/ScSourceInfoService.java
+10
-1
ScSourceInfoServiceImpl.java
...e/moudle/system/service/impl/ScSourceInfoServiceImpl.java
+27
-2
No files found.
src/main/java/com/postcard/service/moudle/system/controller/ScSourceInfoController.java
View file @
7dc39ee3
package
com
.
postcard
.
service
.
moudle
.
system
.
controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
com.postcard.service.moudle.system.service.ScSourceInfoService
;
/**
import
java.util.List
;
import
java.util.Map
;
/**
* @author: zhouxudong
* @version: 1.0
* @createTime: 2023/12/16 17:07
...
...
@@ -14,8 +18,12 @@ import com.postcard.service.moudle.system.service.ScSourceInfoService;
@Api
(
tags
=
"舒城静态资源数据对象功能接口"
)
@RestController
@RequestMapping
(
"/api/scSourceInfo"
)
public
class
ScSourceInfoController
{
@Autowired
private
ScSourceInfoService
scSourceInfoService
;
public
class
ScSourceInfoController
{
@Autowired
private
ScSourceInfoService
scSourceInfoService
;
@ApiOperation
(
value
=
"联系我们 key-value"
)
@GetMapping
(
"/contact"
)
private
List
<
Map
>
contact
()
{
return
scSourceInfoService
.
contact
();
}
}
src/main/java/com/postcard/service/moudle/system/service/ScSourceInfoService.java
View file @
7dc39ee3
...
...
@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.postcard.service.moudle.system.entity.ScSourceInfoEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author: zhouxudong
* @version: 1.0
...
...
@@ -11,5 +14,11 @@ import com.postcard.service.moudle.system.entity.ScSourceInfoEntity;
* @description: 舒城静态资源数据
*/
public
interface
ScSourceInfoService
extends
IService
<
ScSourceInfoEntity
>
{
/**
* @description: 联系我们
* @date: 2023/12/16 17:39
* @param: []
* @return: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
**/
List
<
Map
>
contact
();
}
src/main/java/com/postcard/service/moudle/system/service/impl/ScSourceInfoServiceImpl.java
View file @
7dc39ee3
package
com
.
postcard
.
service
.
moudle
.
system
.
service
.
impl
;
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.moudle.system.entity.ScSourceInfoEntity
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
com.postcard.service.moudle.system.mapper.ScSourceInfoMapper
;
import
com.postcard.service.moudle.system.service.ScSourceInfoService
;
/**
import
org.springframework.util.ObjectUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author: zhouxudong
* @version: 1.0
* @createTime: 2023/12/16 17:09
* @description: 舒城静态资源数据
*/
@Service
public
class
ScSourceInfoServiceImpl
extends
ServiceImpl
<
ScSourceInfoMapper
,
ScSourceInfoEntity
>
implements
ScSourceInfoService
{
public
class
ScSourceInfoServiceImpl
extends
ServiceImpl
<
ScSourceInfoMapper
,
ScSourceInfoEntity
>
implements
ScSourceInfoService
{
@Value
(
"${development.id}"
)
private
String
developmentId
;
@Override
public
List
<
Map
>
contact
()
{
LambdaQueryWrapper
<
ScSourceInfoEntity
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
eq
(
ScSourceInfoEntity:
:
getDevelopmentId
,
developmentId
);
ScSourceInfoEntity
scSourceInfo
=
this
.
getOne
(
lambdaQueryWrapper
,
false
);
List
<
Map
>
result
=
new
ArrayList
<>();
if
(!
ObjectUtils
.
isEmpty
(
scSourceInfo
)&&
StringUtils
.
isNotBlank
(
scSourceInfo
.
getContactInformation
())){
String
contactInformation
=
scSourceInfo
.
getContactInformation
();
result
=
JSONUtil
.
toList
(
contactInformation
,
Map
.
class
);
}
return
result
;
}
}
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