Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
fanxing3
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a1779dca
authored
Dec 02, 2021
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
<feat> 添加获取定时任务配置接口
1 parent
95cf11a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletions
fanxing-ops/src/main/java/com/viontech/fanxing/ops/controller/web/ContentController.java
fanxing-ops/src/main/java/com/viontech/fanxing/ops/service/adapter/ContentService.java
fanxing-ops/src/main/java/com/viontech/fanxing/ops/service/impl/ContentServiceImpl.java
fanxing-ops/src/main/java/com/viontech/fanxing/ops/controller/web/ContentController.java
View file @
a1779dc
...
...
@@ -54,6 +54,13 @@ public class ContentController extends ContentBaseController {
@ResponseBody
public
JsonMessageUtil
.
JsonMessage
<
Object
>
timing
(
@RequestBody
JSONObject
jsonObject
)
{
contentService
.
addOrUpdateTimingConfig
(
jsonObject
);
return
JsonMessageUtil
.
getSuccessJsonMsg
(
"success"
,
null
);
return
JsonMessageUtil
.
getSuccessJsonMsg
(
MESSAGE_SELECT_SUCCESS
,
null
);
}
@GetMapping
(
"/timing"
)
@ResponseBody
public
JsonMessageUtil
.
JsonMessage
<
JSONObject
>
getTiming
()
{
JSONObject
timingConfig
=
contentService
.
getTimingConfig
();
return
JsonMessageUtil
.
getSuccessJsonMsg
(
MESSAGE_SELECT_SUCCESS
,
timingConfig
);
}
}
\ No newline at end of file
fanxing-ops/src/main/java/com/viontech/fanxing/ops/service/adapter/ContentService.java
View file @
a1779dc
...
...
@@ -15,4 +15,6 @@ public interface ContentService extends BaseService<Content> {
ImageKeepConfig
selectImageKeepConfig
();
void
addOrUpdateTimingConfig
(
JSONObject
jsonObject
);
JSONObject
getTimingConfig
();
}
\ No newline at end of file
fanxing-ops/src/main/java/com/viontech/fanxing/ops/service/impl/ContentServiceImpl.java
View file @
a1779dc
...
...
@@ -64,4 +64,16 @@ public class ContentServiceImpl extends BaseServiceImpl<Content> implements Cont
}
@Override
public
JSONObject
getTimingConfig
()
{
ContentExample
contentExample
=
new
ContentExample
();
contentExample
.
createCriteria
().
andTypeEqualTo
(
PLATFORM_CONFIG
).
andNameEqualTo
(
TIMING_CONFIG
);
List
<
Content
>
contents
=
contentMapper
.
selectByExampleWithBLOBs
(
contentExample
);
if
(
contents
.
size
()
>
0
)
{
return
JSONObject
.
parseObject
(
contents
.
get
(
0
).
getContent
());
}
else
{
return
null
;
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment