Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
research-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
research-project
Commits
55691753
Commit
55691753
authored
Dec 19, 2024
by
梅存智
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调研优化
parent
e83988f2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
cloud-research-service/src/main/java/com/yizhi/research/application/mapper/ResearchMapper.java
+2
-2
cloud-research-service/src/main/java/com/yizhi/research/application/mapper/ResearchMapper.xml
+6
-2
cloud-research-service/src/main/java/com/yizhi/research/application/service/impl/ResearchServiceImpl.java
+7
-3
No files found.
cloud-research-service/src/main/java/com/yizhi/research/application/mapper/ResearchMapper.java
View file @
55691753
...
...
@@ -34,9 +34,9 @@ public interface ResearchMapper extends BaseMapper<Research> {
* @param rowBounds
* @return
*/
List
<
Research
>
listPage
(
@Param
(
"date"
)
String
date
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"name"
)
String
name
,
@Param
(
"range"
)
DataRangeModel
dataRangeModel
,
RowBounds
rowBounds
);
List
<
Research
>
listPage
(
@Param
(
"date"
)
String
date
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"name"
)
String
name
,
@Param
(
"
bizType"
)
Integer
bizType
,
@Param
(
"
range"
)
DataRangeModel
dataRangeModel
,
RowBounds
rowBounds
);
Integer
listPageCount
(
@Param
(
"date"
)
String
date
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"name"
)
String
name
,
@Param
(
"range"
)
DataRangeModel
dataRangeModel
);
Integer
listPageCount
(
@Param
(
"date"
)
String
date
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"name"
)
String
name
,
@Param
(
"
bizType"
)
Integer
bizType
,
@Param
(
"
range"
)
DataRangeModel
dataRangeModel
);
/**
* 查询所有
...
...
cloud-research-service/src/main/java/com/yizhi/research/application/mapper/ResearchMapper.xml
View file @
55691753
...
...
@@ -300,7 +300,9 @@
<if
test=
"name != null"
>
and (tb.name like concat('%', #{name}, '%') or tb.keywords like concat('%', #{name}, '%') )
</if>
<if
test=
"bizType != null"
>
and tb.biz_type = #{bizType}
</if>
<!--
<if test="range.admin == false and range.orgIds != null and range.orgIds.size > 0">
...
...
@@ -329,7 +331,9 @@
<if
test=
"name != null"
>
and (tb.name like concat('%', #{name}, '%') or tb.keywords like concat('%', #{name}, '%') )
</if>
<if
test=
"bizType != null"
>
and tb.biz_type = #{bizType}
</if>
<!--
<if test="range.admin == false and range.orgIds != null and range.orgIds.size > 0">
...
...
cloud-research-service/src/main/java/com/yizhi/research/application/service/impl/ResearchServiceImpl.java
View file @
55691753
...
...
@@ -126,6 +126,7 @@ public class ResearchServiceImpl extends ServiceImpl<ResearchMapper, Research> i
HQueryUtil
.
startHQ
(
Research
.
class
);
Integer
state
=
null
;
String
name
=
null
;
Integer
bizType
=
null
;
if
(!
StringUtils
.
isEmpty
(
map
.
get
(
"state"
)))
{
state
=
(
Integer
)
map
.
get
(
"state"
);
...
...
@@ -133,6 +134,9 @@ public class ResearchServiceImpl extends ServiceImpl<ResearchMapper, Research> i
if
(!
StringUtils
.
isEmpty
(
map
.
get
(
"name"
)))
{
name
=
(
String
)
map
.
get
(
"name"
);
}
if
(!
StringUtils
.
isEmpty
(
map
.
get
(
"bizType"
)))
{
bizType
=
(
Integer
)
map
.
get
(
"bizType"
);
}
//为过滤过期调研准备
String
date
=
null
;
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
...
...
@@ -155,8 +159,8 @@ public class ResearchServiceImpl extends ServiceImpl<ResearchMapper, Research> i
}
Page
<
Research
>
page
=
new
Page
<>(
pageNo
,
pageSize
);
page
.
setTotal
(
researchMapper
.
listPageCount
(
date
,
state
,
name
,
dataRangeModel
));
page
.
setRecords
(
researchMapper
.
listPage
(
date
,
state
,
name
,
dataRangeModel
,
new
RowBounds
(
page
.
getOffset
(),
page
.
getLimit
())));
page
.
setTotal
(
researchMapper
.
listPageCount
(
date
,
state
,
name
,
bizType
,
dataRangeModel
));
page
.
setRecords
(
researchMapper
.
listPage
(
date
,
state
,
name
,
bizType
,
dataRangeModel
,
new
RowBounds
(
page
.
getOffset
(),
page
.
getLimit
())));
return
page
;
}
...
...
@@ -870,7 +874,7 @@ public class ResearchServiceImpl extends ServiceImpl<ResearchMapper, Research> i
ResearchVo
research
=
researchMapper
.
selectResearchDetails
(
id
,
requestContext
.
getAccountId
(),
requestContext
.
getSiteId
());
//投票完成或过期选择次数0
if
(
research
.
getFinishState
()
==
1
||
research
.
getFinishState
()
==
2
){
if
(
research
.
getFinishState
()
==
1
||
research
.
getFinishState
()
==
3
){
research
.
setVoteNum
(
0
);
}
...
...
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