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
6ef8c136
Commit
6ef8c136
authored
Dec 17, 2024
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
投稿管理
parent
7f013b60
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
810 additions
and
1 deletions
+810
-1
cloud-site-api/src/main/java/com/yizhi/site/application/feign/PublicationManageFeignClients.java
+84
-0
cloud-site-api/src/main/java/com/yizhi/site/application/vo/domain/InformationVo.java
+2
-0
cloud-site-api/src/main/java/com/yizhi/site/application/vo/domain/PublicationVo.java
+112
-0
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/InformationStudentVO.java
+2
-0
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/PublicationParamReleaseVO.java
+56
-0
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/PublicationParamVO.java
+43
-0
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/PublicationStudentVO.java
+58
-0
cloud-site-service/src/main/java/com/yizhi/site/application/controller/PublicationManageController.java
+132
-0
cloud-site-service/src/main/java/com/yizhi/site/application/domain/Information.java
+3
-0
cloud-site-service/src/main/java/com/yizhi/site/application/domain/Publication.java
+115
-0
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/PublicationMapper.java
+94
-0
cloud-site-service/src/main/java/com/yizhi/site/application/service/PublicationService.java
+98
-0
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/InformationServiceImpl.java
+9
-0
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/PublicationServiceImpl.java
+0
-0
cloud-site-service/src/main/resources/mapper/InformationMapper.xml
+2
-1
cloud-site-service/src/main/resources/mapper/PublicationMapper.xml
+0
-0
No files found.
cloud-site-api/src/main/java/com/yizhi/site/application/feign/PublicationManageFeignClients.java
0 → 100644
View file @
6ef8c136
package
com
.
yizhi
.
site
.
application
.
feign
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.yizhi.site.application.vo.domain.PublicationVo
;
import
com.yizhi.site.application.vo.domain.PublicationVo
;
import
com.yizhi.site.application.vo.site.*
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
@FeignClient
(
name
=
"portal"
,
contextId
=
"PublicationManageFeignClients"
)
public
interface
PublicationManageFeignClients
{
/**
* 查看资讯
*/
@PostMapping
(
"/manage/site/classify/publication/list"
)
public
Page
<
PublicationVo
>
list
(
@RequestBody
PublicationParamVO
vo
);
@ApiOperation
(
value
=
"查询发布的新闻列表"
)
@PostMapping
(
"/manage/site/classify/publication/release/list"
)
public
Page
<
PublicationVo
>
releaseList
(
@RequestBody
PublicationParamReleaseVO
vo
);
/**
* 保存资料分类
*/
@PostMapping
(
"/manage/site/classify/publication/insert"
)
public
Long
insert
(
@RequestBody
PublicationVo
publicationVo
);
/**
* 修改资料分类
*/
@PostMapping
(
"/manage/site/classify/publication/update"
)
public
Boolean
update
(
@RequestBody
PublicationVo
publicationVo
);
/**
* 删除资讯
*/
@PostMapping
(
"/manage/site/classify/publication/delete"
)
Boolean
deleteById
(
@RequestBody
IdOneVO
vo
);
/**
* 资讯发布
*/
@PostMapping
(
"/manage/site/classify/publication/releases"
)
boolean
releases
(
@RequestBody
ParamVO
vo
);
/**
* 资讯取消发布
*/
@PostMapping
(
"/manage/site/classify/publication/unreleases"
)
boolean
unreleases
(
@RequestBody
ParamVO
vo
);
/**
* 资讯预览
*/
@GetMapping
(
value
=
"/manage/site/classify/publication/view/{id}"
)
PublicationVo
publicationView
(
@RequestParam
(
name
=
"id"
)
Long
id
);
/**
* 搜索资讯
*/
@GetMapping
(
value
=
"/manage/site/classify/publication/listbyName"
)
List
<
PublicationVo
>
listbyName
(
@RequestParam
(
name
=
"name"
)
String
name
,
@RequestParam
(
name
=
"siteId"
)
Long
siteId
);
/**
* 新闻资讯公告上架
* @param id 新闻公告id
* @return
*/
@GetMapping
(
"/manage/site/classify/publication/upPublication"
)
public
boolean
upPublication
(
@RequestParam
(
value
=
"id"
)
Long
id
);
/**
* 新闻资讯pdf转图片需要
* @return
*/
@PostMapping
(
value
=
"/manage/site/classify/publication/updateContent"
)
public
boolean
updateContent
(
@RequestBody
PublicationVo
publicationVo
);
}
cloud-site-api/src/main/java/com/yizhi/site/application/vo/domain/InformationVo.java
View file @
6ef8c136
...
...
@@ -97,6 +97,8 @@ public class InformationVo{
@ApiModelProperty
(
value
=
"文章第三层类型"
)
private
Long
typeThree
;
private
String
typeThreeName
;
@ApiModelProperty
(
value
=
"资讯分类"
)
private
List
<
InformationClassify
>
informationClassify
;
...
...
cloud-site-api/src/main/java/com/yizhi/site/application/vo/domain/PublicationVo.java
0 → 100644
View file @
6ef8c136
package
com
.
yizhi
.
site
.
application
.
vo
.
domain
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* <p>
*
* </p>
*
* @author yanglang
* @since 2024-12-17
*/
@ApiModel
(
value
=
"PublicationVo"
,
description
=
"投稿"
)
@Data
public
class
PublicationVo
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"主鍵"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"封面logo"
)
private
String
logoPath
;
@ApiModelProperty
(
value
=
"编号"
)
private
String
number
;
@ApiModelProperty
(
value
=
"投稿标题"
)
private
String
fileName
;
@ApiModelProperty
(
value
=
"投稿父类型 1: 新闻 2: 公告"
)
private
Long
typeOne
;
private
String
typeOneName
;
@ApiModelProperty
(
value
=
"投稿子类型"
)
private
Long
typeTwo
;
private
String
typeTwoName
;
@ApiModelProperty
(
value
=
"作者"
)
private
String
author
;
@ApiModelProperty
(
value
=
"发布时间"
)
private
Date
releaseTime
;
@ApiModelProperty
(
value
=
"内容"
)
private
String
content
;
@ApiModelProperty
(
value
=
"原文链接"
)
private
String
linkUrl
;
@ApiModelProperty
(
value
=
"审核时间"
)
private
Date
approveTime
;
@ApiModelProperty
(
value
=
"审批人"
)
private
Long
approveById
;
@ApiModelProperty
(
value
=
"状态 0 删除 1 草稿 2 待审核 3 待发布 4 已发布 5 不通过"
)
private
Integer
state
;
@ApiModelProperty
(
value
=
"站点ID"
)
private
Long
siteId
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"创建人"
)
private
Long
createById
;
@ApiModelProperty
(
value
=
"创建人姓名"
)
private
String
createByName
;
@ApiModelProperty
(
value
=
"修改时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"修改人"
)
private
Long
updateById
;
@ApiModelProperty
(
value
=
"修改人姓名"
)
private
String
updateByName
;
@ApiModelProperty
(
value
=
"图片或视频链接地址"
)
private
String
ossUrl
;
@ApiModelProperty
(
value
=
"支部或部室"
)
private
String
deptName
;
@ApiModelProperty
(
value
=
"投稿第三层类型"
)
private
Long
typeThree
;
private
String
typeThreeName
;
@ApiModelProperty
(
value
=
"投稿时间"
)
private
Date
submitTime
;
@ApiModelProperty
(
value
=
"资讯分类"
)
private
List
<
InformationClassify
>
informationClassify
;
protected
Serializable
pkVal
()
{
return
this
.
id
;
}
}
\ No newline at end of file
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/InformationStudentVO.java
View file @
6ef8c136
...
...
@@ -30,6 +30,8 @@ public class InformationStudentVO {
@ApiModelProperty
(
value
=
"子章父类型"
)
private
Long
typeTwo
;
private
Long
typeThree
;
@ApiModelProperty
(
value
=
"发布时间"
)
private
Date
releaseTime
;
...
...
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/PublicationParamReleaseVO.java
0 → 100644
View file @
6ef8c136
package
com
.
yizhi
.
site
.
application
.
vo
.
site
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
@Data
@ApiModel
(
value
=
"PublicationParamReleaseVO"
,
description
=
"查看投稿参数VO"
)
public
class
PublicationParamReleaseVO
extends
ContextVO
{
@ApiModelProperty
(
value
=
"标题"
)
private
String
fileName
;
@ApiModelProperty
(
value
=
"当前页"
)
private
Integer
pageNo
;
@ApiModelProperty
(
value
=
"每页的个数"
)
private
Integer
pageSize
;
@ApiModelProperty
(
value
=
"类型"
)
private
Long
typeId
;
@ApiModelProperty
(
value
=
"发布时间的起点"
)
private
Date
start
;
@ApiModelProperty
(
value
=
"发布时间的终点"
)
private
Date
end
;
private
Long
siteId
;
@ApiModelProperty
(
value
=
"状态 0 删除 1 草稿 2 待审核 3 待发布 4 已发布 5 不通过"
)
private
Integer
state
;
private
Long
companyId
;
private
String
companyCode
;
private
String
companyName
;
private
String
siteCode
;
private
String
siteName
;
private
Integer
siteType
;
private
Long
siteMember
;
private
Long
orgId
;
private
String
orgName
;
private
Long
accountId
;
private
String
accountName
;
private
String
accountFullName
;
private
String
headPortrait
;
private
String
requestId
;
private
boolean
admin
;
private
List
<
Long
>
orgIds
;
private
String
authCode
;
private
List
<
Long
>
relationIds
;
private
List
<
Long
>
managerIds
;
}
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/PublicationParamVO.java
0 → 100644
View file @
6ef8c136
package
com
.
yizhi
.
site
.
application
.
vo
.
site
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
/**
* com.yizhi.site.application.vo.site
*
* @author yanglang
* @create 2024-12-17 14:53:19
*/
@Data
@ApiModel
(
value
=
"InfomationParamVO"
,
description
=
"查看投稿参数VO"
)
public
class
PublicationParamVO
extends
ContextVO
{
@ApiModelProperty
(
value
=
"标题"
)
private
String
fileName
;
@ApiModelProperty
(
value
=
"当前页"
)
private
Integer
pageNo
;
@ApiModelProperty
(
value
=
"每页的个数"
)
private
Integer
pageSize
;
@ApiModelProperty
(
value
=
"类型"
)
private
Long
typeId
;
@ApiModelProperty
(
value
=
"发布时间的起点"
)
private
Date
start
;
@ApiModelProperty
(
value
=
"发布时间的终点"
)
private
Date
end
;
private
Long
siteId
;
@ApiModelProperty
(
value
=
"状态 0 删除 1 草稿 2 待审核 3 待发布 4 已发布 5 不通过"
)
private
Integer
state
;
}
cloud-site-api/src/main/java/com/yizhi/site/application/vo/site/PublicationStudentVO.java
0 → 100644
View file @
6ef8c136
package
com
.
yizhi
.
site
.
application
.
vo
.
site
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@ApiModel
(
value
=
"PublicationStudentVO"
,
description
=
"学员端资讯详情"
)
@Data
public
class
PublicationStudentVO
{
@ApiModelProperty
(
value
=
"主鍵"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"封面logo"
)
private
String
logoPath
;
@ApiModelProperty
(
value
=
"文章名称"
)
private
String
fileName
;
@ApiModelProperty
(
value
=
"文章概要"
)
private
String
content
;
@ApiModelProperty
(
value
=
"文章父类型"
)
private
Long
typeOne
;
@ApiModelProperty
(
value
=
"子章父类型"
)
private
Long
typeTwo
;
private
Long
typeThree
;
@ApiModelProperty
(
value
=
"发布时间"
)
private
Date
releaseTime
;
@ApiModelProperty
(
value
=
"投稿时间"
)
private
Date
submitTime
;
@ApiModelProperty
(
value
=
"原文链接"
)
private
String
linkUrl
;
@ApiModelProperty
(
value
=
"阅读次数"
)
private
String
number
;
@ApiModelProperty
(
value
=
"类型名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"作者"
)
private
String
author
;
@ApiModelProperty
(
value
=
"状态 0 删除 1 草稿 2 待审核 3 待发布 4 已发布 5 不通过"
)
private
Integer
state
;
@ApiModelProperty
(
value
=
"当前信息在当前列表的索引"
)
private
Integer
listNo
;
}
cloud-site-service/src/main/java/com/yizhi/site/application/controller/PublicationManageController.java
0 → 100644
View file @
6ef8c136
package
com
.
yizhi
.
site
.
application
.
controller
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.yizhi.comment.application.feign.PdfPagesClient
;
import
com.yizhi.comment.application.vo.PdfVO
;
import
com.yizhi.core.application.event.EventWrapper
;
import
com.yizhi.core.application.publish.CloudEventPublisher
;
import
com.yizhi.site.application.constant.SiteConstant
;
import
com.yizhi.site.application.domain.Information
;
import
com.yizhi.site.application.domain.Publication
;
import
com.yizhi.site.application.service.InformationService
;
import
com.yizhi.site.application.service.PortalBannerService
;
import
com.yizhi.site.application.service.PublicationService
;
import
com.yizhi.site.application.vo.site.*
;
import
com.yizhi.util.application.constant.TpActivityType
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
/**
* <p>
* 投稿管理,前端控制器
* </p>
*
* @author yanglang
* @since 2024-12-17
*/
@Api
(
tags
=
"管理端-投稿管理"
,
description
=
"投稿管理"
)
@RestController
@RequestMapping
(
"/manage/site/classify/publication"
)
public
class
PublicationManageController
{
@Autowired
private
PublicationService
publicationService
;
@Autowired
PortalBannerService
portalBannerService
;
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
PublicationManageController
.
class
);
@PostMapping
(
"/list"
)
public
Page
<
Publication
>
list
(
@RequestBody
PublicationParamVO
vo
)
{
return
publicationService
.
publicationList
(
vo
);
}
@ApiOperation
(
value
=
"查询发布的新闻列表"
)
@PostMapping
(
"/release/list"
)
public
Page
<
Publication
>
releaseList
(
@RequestBody
PublicationParamReleaseVO
vo
)
{
return
publicationService
.
publicationReleaseList
(
vo
);
}
@PostMapping
(
"/insert"
)
public
Long
insert
(
@RequestBody
Publication
publication
)
{
return
publicationService
.
insertPublication
(
publication
);
}
@PostMapping
(
"/update"
)
public
Boolean
update
(
@RequestBody
Publication
publication
)
{
publication
.
setState
(
SiteConstant
.
THREE
);
publicationService
.
updateById
(
publication
);
return
true
;
}
@PostMapping
(
"/delete"
)
public
boolean
deleteById
(
@RequestBody
IdOneVO
vo
)
{
return
publicationService
.
deleteById
(
vo
.
getId
());
}
@PostMapping
(
"/releases"
)
public
boolean
releases
(
@RequestBody
ParamVO
vo
)
{
return
publicationService
.
releases
(
vo
);
}
@PostMapping
(
"/unreleases"
)
public
boolean
unreleases
(
@RequestBody
ParamVO
vo
)
{
return
publicationService
.
unreleases
(
vo
);
}
@GetMapping
(
"/view/{id}"
)
public
Publication
publicationView
(
@RequestParam
(
name
=
"id"
)
Long
id
)
{
return
publicationService
.
publicationView
(
id
);
}
@GetMapping
(
value
=
"/listbyName"
)
public
List
<
Publication
>
listbyName
(
@RequestParam
(
name
=
"name"
)
String
name
,
@RequestParam
(
name
=
"siteId"
)
Long
siteId
){
return
publicationService
.
listbyName
(
name
,
siteId
);
}
/**
* 新闻资讯公告上架
* @param id 新闻公告id
* @return
*/
@GetMapping
(
value
=
"/upPublication"
)
public
boolean
upPublication
(
@RequestParam
(
value
=
"id"
)
Long
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转图片需要
* @return
*/
@PostMapping
(
value
=
"/updateContent"
)
public
boolean
updateContent
(
@RequestBody
Publication
publication
)
{
if
(
publication
.
getId
()
==
null
)
{
LOGGER
.
error
(
"异常处理新闻pdf转图片,id为空!"
);
return
false
;
}
return
this
.
publicationService
.
updateById
(
publication
);
}
}
cloud-site-service/src/main/java/com/yizhi/site/application/domain/Information.java
View file @
6ef8c136
...
...
@@ -121,6 +121,9 @@ public class Information extends Model<Information> {
@TableField
(
"type_three"
)
private
Long
typeThree
;
@TableField
(
exist
=
false
)
private
String
typeThreeName
;
@ApiModelProperty
(
value
=
"资讯分类"
)
@TableField
(
exist
=
false
)
private
List
<
InformationClassify
>
informationClassify
;
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/domain/Publication.java
0 → 100644
View file @
6ef8c136
package
com
.
yizhi
.
site
.
application
.
domain
;
import
com.baomidou.mybatisplus.annotations.TableField
;
import
com.baomidou.mybatisplus.annotations.TableName
;
import
com.yizhi.site.application.vo.domain.InformationClassify
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* com.yizhi.site.application.domain
*
* @author yanglang
* @create 2024-12-17 13:14:46
*/
@ApiModel
(
value
=
"PublicationEntityVo"
,
description
=
"投稿"
)
@Data
@TableName
(
"publication"
)
public
class
Publication
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"主鍵"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"封面logo"
)
private
String
logoPath
;
@ApiModelProperty
(
value
=
"编号"
)
private
String
number
;
@ApiModelProperty
(
value
=
"投稿标题"
)
private
String
fileName
;
@ApiModelProperty
(
value
=
"投稿父类型 1: 新闻 2: 公告"
)
private
Long
typeOne
;
@TableField
(
exist
=
false
)
private
String
typeOneName
;
@ApiModelProperty
(
value
=
"投稿子类型"
)
private
Long
typeTwo
;
@TableField
(
exist
=
false
)
private
String
typeTwoName
;
@ApiModelProperty
(
value
=
"作者"
)
private
String
author
;
@ApiModelProperty
(
value
=
"发布时间"
)
private
Date
releaseTime
;
@ApiModelProperty
(
value
=
"投稿时间"
)
private
Date
submitTime
;
@ApiModelProperty
(
value
=
"内容"
)
private
String
content
;
@ApiModelProperty
(
value
=
"原文链接"
)
private
String
linkUrl
;
@ApiModelProperty
(
value
=
"审核时间"
)
private
Date
approveTime
;
@ApiModelProperty
(
value
=
"审批人"
)
private
Long
approveById
;
@ApiModelProperty
(
value
=
"状态 0 删除 1 草稿 2 待审核 3 待发布 4 已发布 5 不通过"
)
private
Integer
state
;
@ApiModelProperty
(
value
=
"站点ID"
)
private
Long
siteId
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"创建人"
)
private
Long
createById
;
@ApiModelProperty
(
value
=
"创建人姓名"
)
private
String
createByName
;
@ApiModelProperty
(
value
=
"修改时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"修改人"
)
private
Long
updateById
;
@ApiModelProperty
(
value
=
"修改人姓名"
)
private
String
updateByName
;
@ApiModelProperty
(
value
=
"图片或视频链接地址"
)
private
String
ossUrl
;
@ApiModelProperty
(
value
=
"支部或部室"
)
private
String
deptName
;
@ApiModelProperty
(
value
=
"投稿第三层类型"
)
private
Long
typeThree
;
@TableField
(
exist
=
false
)
private
String
typeThreeName
;
@ApiModelProperty
(
value
=
"资讯分类"
)
@TableField
(
exist
=
false
)
private
List
<
InformationClassify
>
informationClassify
;
protected
Serializable
pkVal
()
{
return
this
.
id
;
}
}
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/PublicationMapper.java
0 → 100644
View file @
6ef8c136
package
com
.
yizhi
.
site
.
application
.
mapper
;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.yizhi.site.application.domain.Publication
;
import
com.yizhi.site.application.vo.site.AnnouncementVO
;
import
com.yizhi.site.application.vo.site.InfomationParamVO
;
import
com.yizhi.site.application.vo.site.PublicationParamVO
;
import
com.yizhi.site.application.vo.site.PublicationStudentVO
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author yanglang
* @since 2024-12-17
*/
public
interface
PublicationMapper
extends
BaseMapper
<
Publication
>
{
List
<
Publication
>
publicationTwoList
(
InfomationParamVO
vo
,
Page
<
Publication
>
page
);
List
<
AnnouncementVO
>
selectAnnouncement
(
Page
<
AnnouncementVO
>
page
,
Map
<
String
,
Object
>
map
);
List
<
PublicationStudentVO
>
publicationPageList
(
@Param
(
"typeName"
)
String
typeName
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"typeOne"
)
Long
typeOne
,
Page
<
PublicationStudentVO
>
page
);
/**
* 版本2 修改 :去掉置顶排序
*/
List
<
PublicationStudentVO
>
publicationPageListV2
(
@Param
(
"typeName"
)
String
typeName
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"typeOne"
)
Long
typeOne
,
Page
<
PublicationStudentVO
>
page
);
List
<
PublicationStudentVO
>
publicationPageOtherList
(
@Param
(
"typeOne"
)
Long
typeOne
,
@Param
(
"typeTwo"
)
Long
typeTwo
,
@Param
(
"siteId"
)
Long
siteId
,
Page
<
PublicationStudentVO
>
page
);
List
<
PublicationStudentVO
>
selectpublicationVO
(
@Param
(
"typeOne"
)
Long
typeOne
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"state"
)
Integer
state
,
Page
<
PublicationStudentVO
>
page
);
List
<
Publication
>
searchpublication
(
Page
<
Publication
>
page
,
Publication
info
);
List
<
Publication
>
searchpublication
(
Publication
info
);
/**
* 查询新闻数量
*
* @param id
* @return
*/
Integer
querypublicationByTypeTwo
(
@Param
(
"id"
)
Long
id
);
/**
* ---------------------分割线---------------
*/
List
<
Publication
>
getRelationAnnouncementPC
(
@Param
(
"terminalId"
)
Long
terminalId
);
List
<
PublicationStudentVO
>
publicationPcPageList
(
@Param
(
"typeName"
)
String
typeName
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"typeOne"
)
Long
typeOne
,
Page
<
PublicationStudentVO
>
page
);
List
<
PublicationStudentVO
>
publicationClassifyPcPageList
(
@Param
(
"typeName"
)
String
typeName
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"typeTwo"
)
Long
typeTwo
,
@Param
(
"level"
)
Integer
level
,
Page
<
PublicationStudentVO
>
page
);
Long
publicationRelationGetpublicationIds
(
@Param
(
"terminalId"
)
Long
terminalId
);
List
<
Long
>
getRelationpublicationIds
(
@Param
(
"templateId"
)
Long
templateId
);
String
getType
(
@Param
(
"id"
)
Long
id
,
@Param
(
"siteId"
)
Long
siteId
);
/**
* 获取相关的新闻id
*
* @param terminalId
* @return
*/
List
<
Long
>
selectRelationIds
(
@Param
(
"terminalId"
)
Long
terminalId
);
/**
* 获取置顶的公告
*/
List
<
PublicationStudentVO
>
publicationTopList
(
@Param
(
"typeName"
)
String
typeName
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"typeOne"
)
Long
typeOne
);
/**
* 获取首页置顶新闻
*/
List
<
PublicationStudentVO
>
publicationIndexTopList
(
@Param
(
"siteId"
)
Long
siteId
);
List
<
Publication
>
publicationFirstList
(
PublicationParamVO
publicationParamVO
,
Page
<
Publication
>
page
);
}
\ No newline at end of file
cloud-site-service/src/main/java/com/yizhi/site/application/service/PublicationService.java
0 → 100644
View file @
6ef8c136
package
com
.
yizhi
.
site
.
application
.
service
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.service.IService
;
import
com.yizhi.site.application.domain.Publication
;
import
com.yizhi.site.application.vo.site.*
;
import
java.util.List
;
/**
* com.yizhi.site.application.service
*
* @author yanglang
* @create 2024-12-17 14:34:33
*/
public
interface
PublicationService
extends
IService
<
Publication
>
{
/**
* 根据分类id查询资讯
*/
List
<
Publication
>
selectPublication
(
Long
typeTwo
);
Page
<
Publication
>
publicationList
(
PublicationParamVO
vo
);
Long
insertPublication
(
Publication
publication
);
/**
* 资讯发布(批量)
*/
boolean
releases
(
ParamVO
vo
);
/**
* 新闻资讯上架
*
* @param id 新闻公告id
* @return
*/
boolean
releasePublication
(
Long
id
);
/**
* 资讯取消发布(批量)
*/
boolean
unreleases
(
ParamVO
vo
);
/**
* 根据新闻,公告查询资讯
*/
Page
<
PublicationStudentVO
>
publicationList
(
Long
typeOne
,
Integer
pageNo
,
Integer
pageSize
,
Long
siteId
);
/**
* 根据id查询资讯
*/
Publication
getPublication
(
Long
id
,
Long
siteId
);
/**
* 首页 搜索新闻公告
*/
List
<
Publication
>
searchPublication
(
Page
<
Publication
>
page
,
Publication
info
);
/**
* 轮播图 类型 新闻模糊搜索
*/
List
<
Publication
>
listbyName
(
String
name
,
Long
siteId
);
Publication
publicationView
(
Long
id
);
public
boolean
timeUpInfomation
(
Long
id
);
/**
* ----------------------华丽的分割线---------------------------------
*/
List
<
Publication
>
getRelationAnnouncementPC
(
Long
terminalId
);
Page
<
Publication
>
getPublicationByTypeOne
(
Long
typeOne
,
Integer
pageNo
,
Integer
pageSize
,
Long
siteId
,
List
<
Long
>
listIds
);
Page
<
Publication
>
getAllAnnouncementPC
(
Long
terminalId
,
Integer
pageNo
,
Integer
pageSize
);
Page
<
Publication
>
getAllNewsPC
(
Long
terminalId
,
Integer
pageNo
,
Integer
pageSize
);
List
<
Publication
>
getRelationPublication
(
Long
id
);
List
<
Publication
>
listSupplyPublication
(
Long
siteId
,
List
<
Long
>
ids
);
Page
<
Publication
>
publicationReleaseList
(
PublicationParamReleaseVO
vo
);
}
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/InformationServiceImpl.java
View file @
6ef8c136
...
...
@@ -929,6 +929,9 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
if
(
info
.
getTypeTwo
()
!=
null
||
info
.
getTypeTwo
()
!=
0
)
{
info
.
setTypeTwoName
(
findNameById
(
info
.
getTypeTwo
()));
}
if
(
info
.
getTypeThree
()
!=
null
||
info
.
getTypeThree
()
!=
0
)
{
info
.
setTypeThreeName
(
findNameById
(
info
.
getTypeThree
()));
}
}
}
page
.
setRecords
(
list
);
...
...
@@ -986,6 +989,9 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
if
(
info
.
getTypeTwo
()
!=
null
||
info
.
getTypeTwo
()
!=
0
)
{
info
.
setTypeTwoName
(
findNameById
(
info
.
getTypeTwo
()));
}
if
(
info
.
getTypeThree
()
!=
null
||
info
.
getTypeThree
()
!=
0
)
{
info
.
setTypeThreeName
(
findNameById
(
info
.
getTypeThree
()));
}
}
}
page
.
setRecords
(
list
);
...
...
@@ -1004,6 +1010,9 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
if
(
info
.
getTypeTwo
()
!=
null
||
info
.
getTypeTwo
()
!=
0
)
{
info
.
setTypeTwoName
(
findNameById
(
info
.
getTypeTwo
()));
}
if
(
info
.
getTypeThree
()
!=
null
||
info
.
getTypeThree
()
!=
0
)
{
info
.
setTypeThreeName
(
findNameById
(
info
.
getTypeThree
()));
}
//设置资讯分类
InformationClassify
classify
=
new
InformationClassify
();
...
...
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/PublicationServiceImpl.java
0 → 100644
View file @
6ef8c136
This diff is collapsed.
Click to expand it.
cloud-site-service/src/main/resources/mapper/InformationMapper.xml
View file @
6ef8c136
...
...
@@ -10,6 +10,7 @@
<result
column=
"file_name"
property=
"fileName"
/>
<result
column=
"type_one"
property=
"typeOne"
/>
<result
column=
"type_two"
property=
"typeTwo"
/>
<result
column=
"type_three"
property=
"typeThree"
/>
<result
column=
"author"
property=
"author"
/>
<result
column=
"release_time"
property=
"releaseTime"
/>
<result
column=
"content"
property=
"content"
/>
...
...
@@ -28,7 +29,7 @@
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id, logo_path, number, file_name, type_one, type_two, author, release_time,
id, logo_path, number, file_name, type_one, type_two,
type_three,
author, release_time,
content, link_url, key_words, is_top, state, create_time, create_by_id,
create_by_name, update_time, update_by_id, update_by_name, site_id
</sql>
...
...
cloud-site-service/src/main/resources/mapper/PublicationMapper.xml
0 → 100644
View file @
6ef8c136
This diff is collapsed.
Click to expand it.
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