Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hxwza
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
hxwza
Commits
825e7ef7
提交
825e7ef7
authored
9月 10, 2020
作者:
liupengfei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
6d1434ec
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
39 行增加
和
0 行删除
+39
-0
FgBulletinForm.java
...zrqx/sysuser/commons/form/fg/bulletin/FgBulletinForm.java
+5
-0
FgBulletinController.java
.../sysuser/fg/controller/bulletin/FgBulletinController.java
+6
-0
FgBulletinContentMapper.java
...x/sysuser/fg/mapper/bulletin/FgBulletinContentMapper.java
+1
-0
FgBulletinContentService.java
...sysuser/fg/service/bulletin/FgBulletinContentService.java
+7
-0
FgFgBulletinContentServiceImpl.java
...r/fg/service/bulletin/FgFgBulletinContentServiceImpl.java
+20
-0
没有找到文件。
app/sysuser/src/main/java/com/zrqx/sysuser/commons/form/fg/bulletin/FgBulletinForm.java
浏览文件 @
825e7ef7
...
...
@@ -9,4 +9,9 @@ public class FgBulletinForm {
private
String
name
;
@ApiModelProperty
(
value
=
"栏目id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"数量"
,
required
=
true
)
private
Integer
num
;
@ApiModelProperty
(
value
=
"栏目名称"
)
private
String
bulletinColumnName
;
}
app/sysuser/src/main/java/com/zrqx/sysuser/fg/controller/bulletin/FgBulletinController.java
浏览文件 @
825e7ef7
...
...
@@ -75,6 +75,12 @@ public class FgBulletinController {
return
CallBack
.
success
(
service
.
page
(
form
,
pageParam
));
}
@ApiOperation
(
value
=
"查询内容分页列表"
,
notes
=
"根据栏目名查询公告"
)
@GetMapping
(
value
=
"/bulletin-content/list"
)
public
CallBack
<
List
<
FgBulletinContentVo
>>
getList
(
FgBulletinForm
form
)
{
return
CallBack
.
success
(
service
.
getList
(
form
));
}
@ApiOperation
(
value
=
"热门资讯"
,
notes
=
"热门资讯"
)
@GetMapping
(
value
=
"/hot/list"
)
public
CallBack
<
List
<
FgBulletinContentVo
>>
hotBulletinContentList
()
{
...
...
app/sysuser/src/main/java/com/zrqx/sysuser/fg/mapper/bulletin/FgBulletinContentMapper.java
浏览文件 @
825e7ef7
...
...
@@ -32,6 +32,7 @@ public interface FgBulletinContentMapper extends BaseMapper<BulletinContent> {
+
"left join sys_bulletin_Column m on t.columnId = m.id "
+
" where 1 = 1 and t.status = 1 and DATE(t.releaserTime) <= DATE(NOW()) "
+
" eq(t.columnId,form.id)"
+
" eq(m.name,form.bulletinColumnName)"
+
" like(t.name,form.name) "
+
" order by t.topStatus desc, t.releaserTime desc, t.id desc "
...
...
app/sysuser/src/main/java/com/zrqx/sysuser/fg/service/bulletin/FgBulletinContentService.java
浏览文件 @
825e7ef7
...
...
@@ -31,4 +31,11 @@ public interface FgBulletinContentService extends
* @return
*/
List
<
FgBulletinContentVo
>
hotBulletinContentList
();
/**
* 查询公告列表
* @param form
* @return
*/
List
<
FgBulletinContentVo
>
getList
(
FgBulletinForm
form
);
}
app/sysuser/src/main/java/com/zrqx/sysuser/fg/service/bulletin/FgFgBulletinContentServiceImpl.java
浏览文件 @
825e7ef7
...
...
@@ -12,6 +12,7 @@ import org.jsoup.select.Elements;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.github.pagehelper.PageHelper
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.page.PageInfo
;
...
...
@@ -117,5 +118,24 @@ public class FgFgBulletinContentServiceImpl extends
}
return
null
;
}
@Override
public
List
<
FgBulletinContentVo
>
getList
(
FgBulletinForm
form
)
{
PageHelper
.
startPage
(
1
,
form
.
getNum
());
List
<
FgBulletinContentVo
>
list
=
mapper
.
page
(
form
);
list
.
forEach
(
f
->
{
Date
date
=
f
.
getReleaserTime
();
SimpleDateFormat
monthFormat
=
new
SimpleDateFormat
(
"M"
);
f
.
setMonth
(
monthFormat
.
format
(
date
));
SimpleDateFormat
dayFormat
=
new
SimpleDateFormat
(
"dd"
);
f
.
setDay
(
dayFormat
.
format
(
date
));
String
content
=
f
.
getContent
();
String
img
=
getFirstImgOfText
(
content
);
f
.
setCover
(
img
);
content
=
removeLabel
(
f
.
getContent
());
f
.
setContent
(
content
);
});
return
list
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论