Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
syyl
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
syyl
Commits
4af4e7c3
提交
4af4e7c3
authored
4月 07, 2020
作者:
renjiancai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
09b90035
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
263 行增加
和
0 行删除
+263
-0
InformationController.java
...stem/bg/controller/information/InformationController.java
+2
-0
FgInformationColumnController.java
...controller/information/FgInformationColumnController.java
+33
-0
FgInformationController.java
...em/fg/controller/information/FgInformationController.java
+70
-0
FgInformationColumnMapper.java
...stem/fg/mapper/information/FgInformationColumnMapper.java
+7
-0
FgInformationMapper.java
...rqx/system/fg/mapper/information/FgInformationMapper.java
+24
-0
FgInformationRelationMapper.java
...em/fg/mapper/information/FgInformationRelationMapper.java
+9
-0
FgInformationColumnService.java
...em/fg/service/information/FgInformationColumnService.java
+8
-0
FgInformationColumnServiceImpl.java
...g/service/information/FgInformationColumnServiceImpl.java
+24
-0
FgInformationRelationService.java
.../fg/service/information/FgInformationRelationService.java
+8
-0
FgInformationRelationServiceImpl.java
...service/information/FgInformationRelationServiceImpl.java
+22
-0
FgInformationService.java
...x/system/fg/service/information/FgInformationService.java
+13
-0
FgInformationServiceImpl.java
...stem/fg/service/information/FgInformationServiceImpl.java
+43
-0
没有找到文件。
com.zrqx.system/src/main/java/com/zrqx/system/bg/controller/information/InformationController.java
浏览文件 @
4af4e7c3
...
...
@@ -60,6 +60,8 @@ public class InformationController {
BeanUtils
.
copyProperties
(
form
,
entity
);
entity
.
setTop
(
0
);
entity
.
setColumnId
(
form
.
getColumnId
());
InformationColumn
column
=
informationColumnService
.
selectByPrimaryKey
(
form
.
getColumnId
());
entity
.
setColumn
(
column
.
getTitle
());
entity
.
setPublishTime
(
new
Date
());
service
.
insertSelective
(
entity
);
InformationRelation
relation
=
new
InformationRelation
();
...
...
com.zrqx.system/src/main/java/com/zrqx/system/fg/controller/information/FgInformationColumnController.java
0 → 100644
浏览文件 @
4af4e7c3
package
com
.
zrqx
.
system
.
fg
.
controller
.
information
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zrqx.core.constant.system.SystemRequestPath
;
import
com.zrqx.core.model.system.InformationColumn
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.system.fg.service.information.FgInformationColumnService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@RestController
@RequestMapping
(
SystemRequestPath
.
FG
+
SystemRequestPath
.
INFORMATIONCOLUMN
)
@Api
(
description
=
"前台-语料库-资讯栏目"
)
public
class
FgInformationColumnController
{
@Autowired
private
FgInformationColumnService
service
;
@ApiOperation
(
value
=
"栏目列表"
,
notes
=
"栏目列表"
)
@GetMapping
(
value
=
SystemRequestPath
.
LIST
)
public
CallBack
<
List
<
InformationColumn
>>
getList
(){
List
<
InformationColumn
>
list
=
service
.
selectAll
();
return
CallBack
.
success
(
list
);
}
}
com.zrqx.system/src/main/java/com/zrqx/system/fg/controller/information/FgInformationController.java
0 → 100644
浏览文件 @
4af4e7c3
package
com
.
zrqx
.
system
.
fg
.
controller
.
information
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zrqx.core.constant.system.SystemRequestPath
;
import
com.zrqx.core.form.system.fg.information.FgInformationForm
;
import
com.zrqx.core.model.system.Information
;
import
com.zrqx.core.model.system.InformationColumn
;
import
com.zrqx.core.model.system.InformationRelation
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.core.vo.system.bg.information.InformationVo
;
import
com.zrqx.core.vo.system.fg.information.FgInformationVo
;
import
com.zrqx.system.commons.redis.Redis
;
import
com.zrqx.system.fg.service.information.FgInformationColumnService
;
import
com.zrqx.system.fg.service.information.FgInformationRelationService
;
import
com.zrqx.system.fg.service.information.FgInformationService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
tk.mybatis.mapper.entity.Example
;
@RestController
@RequestMapping
(
SystemRequestPath
.
FG
+
SystemRequestPath
.
INFORMATION
)
@Api
(
description
=
"前台-语料库"
)
public
class
FgInformationController
{
@Autowired
private
FgInformationService
service
;
@Autowired
private
FgInformationColumnService
informationColumnService
;
@Autowired
private
FgInformationRelationService
informationRelationService
;
@Autowired
private
Redis
redis
;
@ApiOperation
(
value
=
"查询资讯"
,
notes
=
"分页查询资讯"
)
@GetMapping
(
value
=
SystemRequestPath
.
PAGE
)
public
CallBack
<
PageInfo
<
FgInformationVo
>>
list
(
FgInformationForm
form
,
PageParam
pageParam
){
return
CallBack
.
success
(
service
.
queryByCriteria
(
form
,
pageParam
));
}
@ApiOperation
(
value
=
"查询资讯详情"
,
notes
=
"查询资讯详情"
)
@GetMapping
(
value
=
SystemRequestPath
.
OID
)
public
CallBack
<
InformationVo
>
selectById
(
@PathVariable
String
oid
){
InformationVo
vo
=
new
InformationVo
();
Information
information
=
service
.
selectByPrimaryKey
(
oid
);
BeanUtils
.
copyProperties
(
information
,
vo
);
if
(
information
.
getColumnId
()!=
null
)
{
InformationColumn
column
=
informationColumnService
.
selectByPrimaryKey
(
information
.
getColumnId
());
if
(
column
!=
null
)
{
vo
.
setColumn
(
column
.
getTitle
());
}
Example
example
=
informationRelationService
.
createExample
();
example
.
createCriteria
().
andEqualTo
(
"infoId"
,
oid
);
InformationRelation
relation
=
informationRelationService
.
selectOneByExample
(
example
);
if
(
relation
!=
null
)
{
vo
.
setTopicId
(
relation
.
getSingId
());
vo
.
setTopic
(
relation
.
getSingName
());
}
}
return
CallBack
.
success
(
vo
);
}
}
com.zrqx.system/src/main/java/com/zrqx/system/fg/mapper/information/FgInformationColumnMapper.java
0 → 100644
浏览文件 @
4af4e7c3
package
com
.
zrqx
.
system
.
fg
.
mapper
.
information
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.system.InformationColumn
;
public
interface
FgInformationColumnMapper
extends
BaseMapper
<
InformationColumn
>
{
}
com.zrqx.system/src/main/java/com/zrqx/system/fg/mapper/information/FgInformationMapper.java
0 → 100644
浏览文件 @
4af4e7c3
package
com
.
zrqx
.
system
.
fg
.
mapper
.
information
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
com.zrqx.core.form.system.fg.information.FgInformationForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.system.Information
;
import
com.zrqx.core.vo.system.fg.information.FgInformationVo
;
public
interface
FgInformationMapper
extends
BaseMapper
<
Information
>
{
@Select
(
"<script>"
+
"SELECT cc.id,cc.title,DATE_FORMAT(cc.publishTime,'%Y-%m-%d %H:%i:%s') publishTime,cc.lookNum,"
+
"cc.text FROM sys_information cc where 1=1 "
+
"<if test='"
+
NOTBLANK
+
"(form.title)'>"
+
" and cc.column like concat('%',#{form.title},'%') "
+
"</if>"
+
"</script>"
)
List
<
FgInformationVo
>
queryByCriteria
(
@Param
(
"form"
)
FgInformationForm
form
);
}
com.zrqx.system/src/main/java/com/zrqx/system/fg/mapper/information/FgInformationRelationMapper.java
0 → 100644
浏览文件 @
4af4e7c3
package
com
.
zrqx
.
system
.
fg
.
mapper
.
information
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.system.InformationRelation
;
public
interface
FgInformationRelationMapper
extends
BaseMapper
<
InformationRelation
>
{
}
com.zrqx.system/src/main/java/com/zrqx/system/fg/service/information/FgInformationColumnService.java
0 → 100644
浏览文件 @
4af4e7c3
package
com
.
zrqx
.
system
.
fg
.
service
.
information
;
import
com.zrqx.core.model.system.InformationColumn
;
import
com.zrqx.core.service.BaseService
;
public
interface
FgInformationColumnService
extends
BaseService
<
InformationColumn
,
String
>{
}
com.zrqx.system/src/main/java/com/zrqx/system/fg/service/information/FgInformationColumnServiceImpl.java
0 → 100644
浏览文件 @
4af4e7c3
package
com
.
zrqx
.
system
.
fg
.
service
.
information
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.system.InformationColumn
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.system.fg.mapper.information.FgInformationColumnMapper
;
@Service
public
class
FgInformationColumnServiceImpl
extends
BaseServiceImpl
<
InformationColumn
,
String
>
implements
FgInformationColumnService
{
@Autowired
private
FgInformationColumnMapper
mapper
;
@Override
public
BaseMapper
<
InformationColumn
>
getMapper
()
{
return
mapper
;
}
}
com.zrqx.system/src/main/java/com/zrqx/system/fg/service/information/FgInformationRelationService.java
0 → 100644
浏览文件 @
4af4e7c3
package
com
.
zrqx
.
system
.
fg
.
service
.
information
;
import
com.zrqx.core.model.system.InformationRelation
;
import
com.zrqx.core.service.BaseService
;
public
interface
FgInformationRelationService
extends
BaseService
<
InformationRelation
,
String
>{
}
com.zrqx.system/src/main/java/com/zrqx/system/fg/service/information/FgInformationRelationServiceImpl.java
0 → 100644
浏览文件 @
4af4e7c3
package
com
.
zrqx
.
system
.
fg
.
service
.
information
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.system.InformationRelation
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.system.fg.mapper.information.FgInformationRelationMapper
;
@Service
public
class
FgInformationRelationServiceImpl
extends
BaseServiceImpl
<
InformationRelation
,
String
>
implements
FgInformationRelationService
{
@Autowired
private
FgInformationRelationMapper
mapper
;
@Override
public
BaseMapper
<
InformationRelation
>
getMapper
()
{
return
mapper
;
}
}
com.zrqx.system/src/main/java/com/zrqx/system/fg/service/information/FgInformationService.java
0 → 100644
浏览文件 @
4af4e7c3
package
com
.
zrqx
.
system
.
fg
.
service
.
information
;
import
com.zrqx.core.form.system.fg.information.FgInformationForm
;
import
com.zrqx.core.model.system.Information
;
import
com.zrqx.core.service.BaseService
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.system.fg.information.FgInformationVo
;
public
interface
FgInformationService
extends
BaseService
<
Information
,
String
>{
PageInfo
<
FgInformationVo
>
queryByCriteria
(
FgInformationForm
form
,
PageParam
pageParam
);
}
com.zrqx.system/src/main/java/com/zrqx/system/fg/service/information/FgInformationServiceImpl.java
0 → 100644
浏览文件 @
4af4e7c3
package
com
.
zrqx
.
system
.
fg
.
service
.
information
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zrqx.core.form.system.fg.information.FgInformationForm
;
import
com.zrqx.core.mapper.BaseMapper
;
import
com.zrqx.core.model.system.Information
;
import
com.zrqx.core.service.BaseServiceImpl
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.vo.system.fg.information.FgInformationVo
;
import
com.zrqx.system.fg.mapper.information.FgInformationColumnMapper
;
import
com.zrqx.system.fg.mapper.information.FgInformationMapper
;
/**
* 自定义分类
*/
@Service
public
class
FgInformationServiceImpl
extends
BaseServiceImpl
<
Information
,
String
>
implements
FgInformationService
{
@Autowired
private
FgInformationMapper
mapper
;
@Autowired
private
FgInformationColumnMapper
columnMapper
;
@Override
public
BaseMapper
<
Information
>
getMapper
()
{
return
mapper
;
}
@Override
public
PageInfo
<
FgInformationVo
>
queryByCriteria
(
FgInformationForm
form
,
PageParam
pageParam
)
{
if
(
null
!=
pageParam
&&
StringUtils
.
isBlank
(
pageParam
.
getOrderBy
()))
{
pageParam
.
setOrderBy
(
"publishTime desc"
);
}
List
<
FgInformationVo
>
list
=
mapper
.
queryByCriteria
(
form
);
return
new
PageInfo
<
FgInformationVo
>(
list
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论