Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
site-project
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
site-project
Commits
5a6a911b
Commit
5a6a911b
authored
Dec 17, 2024
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
投稿审批通过和不通过接口
parent
f860d1ec
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
23 deletions
+50
-23
cloud-site-api/src/main/java/com/yizhi/site/application/feign/PublicationManageFeignClients.java
+20
-8
cloud-site-service/src/main/java/com/yizhi/site/application/controller/PublicationManageController.java
+10
-12
cloud-site-service/src/main/java/com/yizhi/site/application/service/PublicationService.java
+3
-1
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/PublicationServiceImpl.java
+17
-2
No files found.
cloud-site-api/src/main/java/com/yizhi/site/application/feign/PublicationManageFeignClients.java
View file @
5a6a911b
...
@@ -17,7 +17,7 @@ import java.util.List;
...
@@ -17,7 +17,7 @@ import java.util.List;
public
interface
PublicationManageFeignClients
{
public
interface
PublicationManageFeignClients
{
/**
/**
* 查看
资讯
* 查看
投稿
*/
*/
@PostMapping
(
"/manage/site/classify/publication/list"
)
@PostMapping
(
"/manage/site/classify/publication/list"
)
public
Page
<
PublicationVo
>
list
(
@RequestBody
PublicationParamVO
vo
);
public
Page
<
PublicationVo
>
list
(
@RequestBody
PublicationParamVO
vo
);
...
@@ -39,44 +39,56 @@ public interface PublicationManageFeignClients {
...
@@ -39,44 +39,56 @@ public interface PublicationManageFeignClients {
public
Boolean
update
(
@RequestBody
PublicationVo
publicationVo
);
public
Boolean
update
(
@RequestBody
PublicationVo
publicationVo
);
/**
/**
* 删除
资讯
* 删除
投稿
*/
*/
@PostMapping
(
"/manage/site/classify/publication/delete"
)
@PostMapping
(
"/manage/site/classify/publication/delete"
)
Boolean
deleteById
(
@RequestBody
IdOneVO
vo
);
Boolean
deleteById
(
@RequestBody
IdOneVO
vo
);
/**
/**
*
资讯
发布
*
投稿
发布
*/
*/
@PostMapping
(
"/manage/site/classify/publication/releases"
)
@PostMapping
(
"/manage/site/classify/publication/releases"
)
boolean
releases
(
@RequestBody
ParamVO
vo
);
boolean
releases
(
@RequestBody
ParamVO
vo
);
/**
/**
*
资讯
取消发布
*
投稿
取消发布
*/
*/
@PostMapping
(
"/manage/site/classify/publication/unreleases"
)
@PostMapping
(
"/manage/site/classify/publication/unreleases"
)
boolean
unreleases
(
@RequestBody
ParamVO
vo
);
boolean
unreleases
(
@RequestBody
ParamVO
vo
);
/**
/**
*
资讯
预览
*
投稿
预览
*/
*/
@GetMapping
(
value
=
"/manage/site/classify/publication/view/{id}"
)
@GetMapping
(
value
=
"/manage/site/classify/publication/view/{id}"
)
PublicationVo
publicationView
(
@RequestParam
(
name
=
"id"
)
Long
id
);
PublicationVo
publicationView
(
@RequestParam
(
name
=
"id"
)
Long
id
);
/**
/**
* 搜索资讯
* 投稿审批通过
*/
@GetMapping
(
value
=
"/manage/site/classify/publication/approve/{id}"
)
boolean
approve
(
@RequestParam
(
name
=
"id"
)
Long
id
);
/**
* 投稿审批不通过
*/
@GetMapping
(
value
=
"/manage/site/classify/publication/unApprove/{id}"
)
boolean
unApprove
(
@RequestParam
(
name
=
"id"
)
Long
id
);
/**
* 搜索投稿
*/
*/
@GetMapping
(
value
=
"/manage/site/classify/publication/listbyName"
)
@GetMapping
(
value
=
"/manage/site/classify/publication/listbyName"
)
List
<
PublicationVo
>
listbyName
(
@RequestParam
(
name
=
"name"
)
String
name
,
@RequestParam
(
name
=
"siteId"
)
Long
siteId
);
List
<
PublicationVo
>
listbyName
(
@RequestParam
(
name
=
"name"
)
String
name
,
@RequestParam
(
name
=
"siteId"
)
Long
siteId
);
/**
/**
* 新闻
资讯
公告上架
* 新闻
投稿
公告上架
* @param id 新闻公告id
* @param id 新闻公告id
* @return
* @return
*/
*/
@GetMapping
(
"/manage/site/classify/publication/upPublication"
)
@GetMapping
(
"/manage/site/classify/publication/upPublication"
)
public
boolean
upPublication
(
@RequestParam
(
value
=
"id"
)
Long
id
);
public
boolean
upPublication
(
@RequestParam
(
value
=
"id"
)
Long
id
);
/**
/**
* 新闻
资讯
pdf转图片需要
* 新闻
投稿
pdf转图片需要
* @return
* @return
*/
*/
@PostMapping
(
value
=
"/manage/site/classify/publication/updateContent"
)
@PostMapping
(
value
=
"/manage/site/classify/publication/updateContent"
)
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/controller/PublicationManageController.java
View file @
5a6a911b
...
@@ -89,6 +89,16 @@ public class PublicationManageController {
...
@@ -89,6 +89,16 @@ public class PublicationManageController {
public
Publication
publicationView
(
@RequestParam
(
name
=
"id"
)
Long
id
)
{
public
Publication
publicationView
(
@RequestParam
(
name
=
"id"
)
Long
id
)
{
return
publicationService
.
publicationView
(
id
);
return
publicationService
.
publicationView
(
id
);
}
}
@GetMapping
(
"/approve/{id}"
)
public
boolean
approve
(
@RequestParam
(
name
=
"id"
)
Long
id
)
{
return
publicationService
.
approve
(
id
);
}
@GetMapping
(
"/unApprove/{id}"
)
public
boolean
unApprove
(
@RequestParam
(
name
=
"id"
)
Long
id
)
{
return
publicationService
.
unApprove
(
id
);
}
@GetMapping
(
value
=
"/listbyName"
)
@GetMapping
(
value
=
"/listbyName"
)
public
List
<
Publication
>
listbyName
(
@RequestParam
(
name
=
"name"
)
String
name
,
@RequestParam
(
name
=
"siteId"
)
Long
siteId
){
public
List
<
Publication
>
listbyName
(
@RequestParam
(
name
=
"name"
)
String
name
,
@RequestParam
(
name
=
"siteId"
)
Long
siteId
){
...
@@ -105,18 +115,6 @@ public class PublicationManageController {
...
@@ -105,18 +115,6 @@ public class PublicationManageController {
return
publicationService
.
releasePublication
(
id
);
return
publicationService
.
releasePublication
(
id
);
}
}
@PostMapping
(
value
=
"/timeUp"
)
public
boolean
upState
(
@RequestParam
(
value
=
"id"
)
Long
id
){
try
{
// 添加定时上架
publicationService
.
timeUpInfomation
(
id
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
true
;
}
/**
/**
* 新闻资讯pdf转图片需要
* 新闻资讯pdf转图片需要
* @return
* @return
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/PublicationService.java
View file @
5a6a911b
...
@@ -66,7 +66,9 @@ public interface PublicationService extends IService<Publication> {
...
@@ -66,7 +66,9 @@ public interface PublicationService extends IService<Publication> {
Publication
publicationView
(
Long
id
);
Publication
publicationView
(
Long
id
);
public
boolean
timeUpInfomation
(
Long
id
);
boolean
approve
(
Long
id
);
boolean
unApprove
(
Long
id
);
/**
/**
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/PublicationServiceImpl.java
View file @
5a6a911b
...
@@ -244,7 +244,7 @@ public class PublicationServiceImpl extends ServiceImpl<PublicationMapper, Publi
...
@@ -244,7 +244,7 @@ public class PublicationServiceImpl extends ServiceImpl<PublicationMapper, Publi
@Override
@Override
public
boolean
timeUpInfomation
(
Long
id
)
{
public
boolean
approve
(
Long
id
)
{
Publication
publication
=
this
.
selectById
(
id
);
Publication
publication
=
this
.
selectById
(
id
);
try
{
try
{
...
@@ -253,7 +253,22 @@ public class PublicationServiceImpl extends ServiceImpl<PublicationMapper, Publi
...
@@ -253,7 +253,22 @@ public class PublicationServiceImpl extends ServiceImpl<PublicationMapper, Publi
publication
.
setApproveById
(
ContextHolder
.
get
().
getAccountId
());
publication
.
setApproveById
(
ContextHolder
.
get
().
getAccountId
());
return
this
.
updateById
(
publication
);
return
this
.
updateById
(
publication
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"审批失败,id="
+
id
+
"错误消息={}"
,
e
);
log
.
error
(
"审批通过失败,id="
+
id
+
"错误消息={}"
,
e
);
}
return
true
;
}
@Override
public
boolean
unApprove
(
Long
id
)
{
Publication
publication
=
this
.
selectById
(
id
);
try
{
publication
.
setState
(
SiteConstant
.
FIVE
);
publication
.
setUpdateById
(
ContextHolder
.
get
().
getAccountId
());
return
this
.
updateById
(
publication
);
}
catch
(
Exception
e
)
{
log
.
error
(
"审批不通过失败,id="
+
id
+
"错误消息={}"
,
e
);
}
}
return
true
;
return
true
;
...
...
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