Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-api
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李伟
cust-api
Commits
12a2fbef
Commit
12a2fbef
authored
Jan 07, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了查询话题sql
parent
2b4b49b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
33 deletions
+47
-33
OpmTopicController.java
...soft/business/opmTopic/controller/OpmTopicController.java
+5
-6
OpmTopicMapper.xml
...ources/mapper/business/opmTopic.mapper/OpmTopicMapper.xml
+42
-27
No files found.
src/main/java/org/rcisoft/business/opmTopic/controller/OpmTopicController.java
View file @
12a2fbef
...
...
@@ -78,8 +78,8 @@ public class OpmTopicController extends CyPaginationController<OpmTopic> {
}
// @PreAuthorize("@cyPerm.hasPerm('opm:notice:singleSearch')")
@CyOpeLogAnno
(
title
=
"system-
公告管理-查询公告
"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@Operation
(
summary
=
"查询单一
公告"
,
description
=
"查询单一公告
"
)
@CyOpeLogAnno
(
title
=
"system-
话题管理-查询话题
"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@Operation
(
summary
=
"查询单一
话题"
,
description
=
"查询单一话题
"
)
@Parameters
({
@Parameter
(
name
=
"businessId"
,
description
=
"businessId"
,
required
=
true
)})
@GetMapping
(
"/detail/{businessId:\\w+}"
)
public
CyResult
detail
(
@PathVariable
Integer
businessId
)
{
...
...
@@ -92,9 +92,8 @@ public class OpmTopicController extends CyPaginationController<OpmTopic> {
//@PreAuthorize("@cyPerm.hasPerm('sys:contentNewsInformation:list')")
@CyOpeLogAnno
(
title
=
"system-话题管理-查询话题"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@Operation
(
summary
=
"查询话题集合"
,
description
=
"查询话题集合"
)
@GetMapping
(
value
=
"/queryOpmTopic"
)
public
CyResult
querySysContentNewsInformations
(
OpmTopic
opmTopic
)
{
@GetMapping
(
value
=
"/queryAllOpmTopic"
)
public
CyResult
queryAllTopicList
(
OpmTopic
opmTopic
)
{
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
...
...
@@ -153,7 +152,7 @@ public class OpmTopicController extends CyPaginationController<OpmTopic> {
@CyOpeLogAnno
(
title
=
"system-话题管理-查询话题"
,
businessType
=
CyLogTypeEnum
.
EXPORT
)
@Operation
(
summary
=
"导出话题信息"
,
description
=
"导出话题信息"
)
@GetMapping
(
value
=
"/export"
)
public
void
out
SysContentNews
Information
(
HttpServletResponse
response
,
OpmTopic
opmTopic
,
@PathVariable
@RequestParam
(
defaultValue
=
"0"
)
String
excelId
)
{
public
void
out
Topic
Information
(
HttpServletResponse
response
,
OpmTopic
opmTopic
,
@PathVariable
@RequestParam
(
defaultValue
=
"0"
)
String
excelId
)
{
String
excelName
=
""
;
switch
(
excelId
)
{
case
"0"
:
...
...
src/main/resources/mapper/business/opmTopic.mapper/OpmTopicMapper.xml
View file @
12a2fbef
...
...
@@ -17,34 +17,49 @@
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select
id=
"queryOpmTopic"
resultMap=
"BaseResultMap"
>
select * from opm_topic
where 1=1
<if
test=
"entity.createBy !=null and entity.createBy != '' "
>
and create_by like concat('%',#{entity.createBy},'%')
</if>
<if
test=
"entity.beginTime !=null and entity.beginTime != '' "
>
and create_date
>
= #{entity.beginTime}
</if>
<if
test=
"entity.endTime !=null and entity.endTime != '' "
>
and create_date
<
= #{entity.endTime}
</if>
<if
test=
"entity.updateBy !=null and entity.updateBy != '' "
>
and update_by like concat('%',#{entity.updateBy},'%')
</if>
<if
test=
"entity.beginTime !=null and entity.beginTime != '' "
>
and update_date
>
= #{entity.beginTime}
</if>
<if
test=
"entity.endTime !=null and entity.endTime != '' "
>
and update_date
<
= #{entity.endTime}
</if>
<if
test=
"entity.topicName !=null and entity.topicName != '' "
>
and topic_name like concat('%',#{entity.topicName},'%')
</if>
SELECT cn.business_id,
cn.create_by,
cn.create_date,
cn.update_by,
cn.del_flag,
cn.flag,
cn.topic_name,
cn.exam_status,
cn.weight,
cn.article_count,
su.nick_name as nickName
FROM opm_topic cn
LEFT JOIN sys_user su on su.business_id = cn.create_by
where cn.del_flag='0'
<if
test=
"entity.flag!=null and entity.flag != '' "
>
and cn.flag = #{entity.flag}
</if>
<if
test=
"entity.examStatus!=null and entity.examStatus != '' "
>
and cn.exam_status = #{entity.examStatus}
</if>
<if
test=
"entity.createBy !=null and entity.createBy != '' "
>
and create_by like concat('%',#{entity.createBy},'%')
</if>
<if
test=
"entity.beginTime !=null "
>
and cn.create_Date
>
= #{entity.beginTime}
</if>
<if
test=
"entity.endTime !=null "
>
and cn.create_Date
<
= #{entity.endTime}
</if>
<if
test=
"entity.updateBy !=null and entity.updateBy != '' "
>
and update_by like concat('%',#{entity.updateBy},'%')
</if>
<if
test=
"entity.weight !=null and entity.weight != '' "
>
and weight like concat('%',#{entity.weight},'%')
</if>
<if
test=
"entity.weight !=null and entity.weight != '' "
>
and weight like concat('%',#{entity.weight},'%')
</if>
ORDER BY business_id DESC
<if
test=
"entity.articleCount !=null and entity.articleCount != '' "
>
and article_count like concat('%',#{entity.articleCount},'%')
</if>
<if
test=
"entity.topicName !=null and entity.topicName != '' "
>
and topic_name like concat('%',#{entity.topicName},'%')
</if>
ORDER BY cn.exam_status,cn.weight,cn.business_id DESC
</select>
<select
id=
"queryOpmTopicPaged"
resultMap=
"BaseResultMap"
>
...
...
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