Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangkb
indicators
Commits
26e3f637
Commit
26e3f637
authored
Jul 09, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改分页获取指标计分规则接口
parent
58bbef08
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
IndScorecardMapper.java
...indicators/model/mapper/indmapper/IndScorecardMapper.java
+1
-1
IndScorecardService.java
...ile/indicators/service/hytobacco/IndScorecardService.java
+4
-4
IndScorecardMapper.xml
src/main/resources/mybatis/mapping/IndScorecardMapper.xml
+3
-0
No files found.
src/main/java/com/keymobile/indicators/model/mapper/indmapper/IndScorecardMapper.java
View file @
26e3f637
...
@@ -15,7 +15,7 @@ public interface IndScorecardMapper extends BaseMapper<IndScorecard>{
...
@@ -15,7 +15,7 @@ public interface IndScorecardMapper extends BaseMapper<IndScorecard>{
public
List
<
IndScorecard
>
findByCatalogId
(
@Param
(
"catalogId"
)
Integer
catalogId
,
public
List
<
IndScorecard
>
findByCatalogId
(
@Param
(
"catalogId"
)
Integer
catalogId
,
@Param
(
"keyword"
)
String
keyword
,
@Param
(
"start"
)
int
start
,
@Param
(
"end"
)
int
end
);
@Param
(
"keyword"
)
String
keyword
,
@Param
(
"start"
)
int
start
,
@Param
(
"end"
)
int
end
);
public
int
countByCatalogId
(
@Param
(
"catalogId"
)
Integer
catalogId
);
public
int
countByCatalogId
(
@Param
(
"catalogId"
)
Integer
catalogId
,
@Param
(
"keyword"
)
String
keyword
);
public
List
<
IndScorecard
>
findByIdList
(
@Param
(
"ids"
)
List
<
Integer
>
ids
);
public
List
<
IndScorecard
>
findByIdList
(
@Param
(
"ids"
)
List
<
Integer
>
ids
);
}
}
src/main/java/com/keymobile/indicators/service/hytobacco/IndScorecardService.java
View file @
26e3f637
...
@@ -120,13 +120,13 @@ public class IndScorecardService {
...
@@ -120,13 +120,13 @@ public class IndScorecardService {
public
Map
<
String
,
Object
>
getByCatalogId
(
Integer
catalogId
,
String
keyword
,
int
page
,
int
rows
){
public
Map
<
String
,
Object
>
getByCatalogId
(
Integer
catalogId
,
String
keyword
,
int
page
,
int
rows
){
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
int
count
=
0
;
//计算start
int
start
=
page
*
rows
;
count
=
indScorecardMapper
.
countByCatalogId
(
catalogId
);
if
(
StringUtils
.
isNotBlank
(
keyword
))
{
if
(
StringUtils
.
isNotBlank
(
keyword
))
{
keyword
=
"%"
+
keyword
+
"%"
;
keyword
=
"%"
+
keyword
+
"%"
;
}
}
int
count
=
0
;
//计算start
int
start
=
page
*
rows
;
count
=
indScorecardMapper
.
countByCatalogId
(
catalogId
,
keyword
);
List
<
IndScorecard
>
datas
=
indScorecardMapper
.
findByCatalogId
(
catalogId
,
keyword
,
start
,
rows
);
List
<
IndScorecard
>
datas
=
indScorecardMapper
.
findByCatalogId
(
catalogId
,
keyword
,
start
,
rows
);
// List<IndScorecard> resultDatas = new ArrayList<>();
// List<IndScorecard> resultDatas = new ArrayList<>();
// for(IndScorecard data : datas) {
// for(IndScorecard data : datas) {
...
...
src/main/resources/mybatis/mapping/IndScorecardMapper.xml
View file @
26e3f637
...
@@ -15,6 +15,9 @@
...
@@ -15,6 +15,9 @@
select count(1)
select count(1)
from drive_ind_score_card
from drive_ind_score_card
where catalog_id = #{catalogId}
where catalog_id = #{catalogId}
<if
test=
"keyword!=null"
>
and card_name like #{keyword}
</if>
</select>
</select>
<delete
id=
"deleteByCatalogIdIn"
parameterType=
"java.util.List"
>
<delete
id=
"deleteByCatalogIdIn"
parameterType=
"java.util.List"
>
...
...
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