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
0e5af8c5
Commit
0e5af8c5
authored
Jun 29, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指标目录添加关键字搜索接口
parent
7d951dd7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
0 deletions
+51
-0
IndCatalogCtrl.java
...om/keymobile/indicators/api/hytobacco/IndCatalogCtrl.java
+12
-0
DriveIndCatalogMapper.java
...icators/model/mapper/indmapper/DriveIndCatalogMapper.java
+2
-0
IndCatalogMapper.java
...e/indicators/model/mapper/indmapper/IndCatalogMapper.java
+2
-0
DriveIndCatalogService.java
.../indicators/service/hytobacco/DriveIndCatalogService.java
+11
-0
IndCatalogService.java
...obile/indicators/service/hytobacco/IndCatalogService.java
+10
-0
DriveIndCatalogMapper.xml
src/main/resources/mybatis/mapping/DriveIndCatalogMapper.xml
+7
-0
IndCatalogMapper.xml
src/main/resources/mybatis/mapping/IndCatalogMapper.xml
+7
-0
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/IndCatalogCtrl.java
View file @
0e5af8c5
...
@@ -46,6 +46,12 @@ public class IndCatalogCtrl {
...
@@ -46,6 +46,12 @@ public class IndCatalogCtrl {
return
indCatalogService
.
getCatalog
(
parentId
,
codes
);
return
indCatalogService
.
getCatalog
(
parentId
,
codes
);
}
}
@ApiOperation
(
value
=
"根据关键字搜索获取基础指标目录"
,
notes
=
"根据关键字搜索获取基础指标目录"
)
@PostMapping
(
value
=
"/getBaseIndCatalogByKeyword"
)
public
List
<
IndCatalog
>
getBaseIndCatalogByKeyword
(
@RequestParam
(
required
=
false
)
String
keyword
){
return
indCatalogService
.
getCatalogByKeyword
(
keyword
);
}
//考核指标目录
//考核指标目录
@ApiOperation
(
value
=
"新建考核指标目录"
,
notes
=
"新建考核指标目录"
)
@ApiOperation
(
value
=
"新建考核指标目录"
,
notes
=
"新建考核指标目录"
)
@PostMapping
(
value
=
"/createDriveIndCatalog"
)
@PostMapping
(
value
=
"/createDriveIndCatalog"
)
...
@@ -66,4 +72,10 @@ public class IndCatalogCtrl {
...
@@ -66,4 +72,10 @@ public class IndCatalogCtrl {
@RequestParam
List
<
String
>
codes
){
@RequestParam
List
<
String
>
codes
){
return
driveIndCatalogService
.
getCatalog
(
parentId
,
codes
);
return
driveIndCatalogService
.
getCatalog
(
parentId
,
codes
);
}
}
@ApiOperation
(
value
=
"根据关键字搜索获取考核指标目录"
,
notes
=
"根据关键字搜索获取考核指标目录"
)
@PostMapping
(
value
=
"/getDriveIndCatalogByKeyword"
)
public
List
<
DriveIndCatalog
>
getDriveIndCatalogByKeyword
(
@RequestParam
(
required
=
false
)
String
keyword
){
return
driveIndCatalogService
.
getCatalogByKeyword
(
keyword
);
}
}
}
src/main/java/com/keymobile/indicators/model/mapper/indmapper/DriveIndCatalogMapper.java
View file @
0e5af8c5
...
@@ -16,4 +16,6 @@ public interface DriveIndCatalogMapper extends BaseMapper<DriveIndCatalog>{
...
@@ -16,4 +16,6 @@ public interface DriveIndCatalogMapper extends BaseMapper<DriveIndCatalog>{
public
List
<
DriveIndCatalog
>
findByParentIdAndCodeInOrderByLastUpdateTimeDesc
(
Map
<
String
,
Object
>
params
);
public
List
<
DriveIndCatalog
>
findByParentIdAndCodeInOrderByLastUpdateTimeDesc
(
Map
<
String
,
Object
>
params
);
public
List
<
DriveIndCatalog
>
findByParentId
(
@Param
(
"pid"
)
Integer
pid
);
public
List
<
DriveIndCatalog
>
findByParentId
(
@Param
(
"pid"
)
Integer
pid
);
public
List
<
DriveIndCatalog
>
findByKeyword
(
@Param
(
"keyword"
)
String
keyword
);
}
}
src/main/java/com/keymobile/indicators/model/mapper/indmapper/IndCatalogMapper.java
View file @
0e5af8c5
...
@@ -17,4 +17,6 @@ public interface IndCatalogMapper extends BaseMapper<IndCatalog>{
...
@@ -17,4 +17,6 @@ public interface IndCatalogMapper extends BaseMapper<IndCatalog>{
public
List
<
IndCatalog
>
findByParentIdAndCodeInOrderByLastUpdateTimeDesc
(
Map
<
String
,
Object
>
params
);
public
List
<
IndCatalog
>
findByParentIdAndCodeInOrderByLastUpdateTimeDesc
(
Map
<
String
,
Object
>
params
);
public
List
<
IndCatalog
>
findByParentId
(
@Param
(
"pid"
)
Integer
pid
);
public
List
<
IndCatalog
>
findByParentId
(
@Param
(
"pid"
)
Integer
pid
);
public
List
<
IndCatalog
>
findByKeyword
(
@Param
(
"keyword"
)
String
keyword
);
}
}
src/main/java/com/keymobile/indicators/service/hytobacco/DriveIndCatalogService.java
View file @
0e5af8c5
...
@@ -4,6 +4,8 @@ import java.util.ArrayList;
...
@@ -4,6 +4,8 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -80,4 +82,13 @@ public class DriveIndCatalogService {
...
@@ -80,4 +82,13 @@ public class DriveIndCatalogService {
paramMap
.
put
(
"codes"
,
codes
);
paramMap
.
put
(
"codes"
,
codes
);
return
driveIndCatalogMapper
.
findByParentIdAndCodeInOrderByLastUpdateTimeDesc
(
paramMap
);
return
driveIndCatalogMapper
.
findByParentIdAndCodeInOrderByLastUpdateTimeDesc
(
paramMap
);
}
}
//根据关键字获取目录树
public
List
<
DriveIndCatalog
>
getCatalogByKeyword
(
String
keyword
){
if
(
StringUtils
.
isBlank
(
keyword
))
{
return
new
ArrayList
<>();
}
else
{
return
driveIndCatalogMapper
.
findByKeyword
(
keyword
);
}
}
}
}
src/main/java/com/keymobile/indicators/service/hytobacco/IndCatalogService.java
View file @
0e5af8c5
...
@@ -4,6 +4,8 @@ import java.util.ArrayList;
...
@@ -4,6 +4,8 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -79,4 +81,12 @@ public class IndCatalogService {
...
@@ -79,4 +81,12 @@ public class IndCatalogService {
paramMap
.
put
(
"codes"
,
codes
);
paramMap
.
put
(
"codes"
,
codes
);
return
indCatalogMapper
.
findByParentIdAndCodeInOrderByLastUpdateTimeDesc
(
paramMap
);
return
indCatalogMapper
.
findByParentIdAndCodeInOrderByLastUpdateTimeDesc
(
paramMap
);
}
}
//根据目录树获取
public
List
<
IndCatalog
>
getCatalogByKeyword
(
String
keyword
){
if
(
StringUtils
.
isBlank
(
keyword
))
{
return
new
ArrayList
<>();
}
return
indCatalogMapper
.
findByKeyword
(
"%"
+
keyword
+
"%"
);
}
}
}
src/main/resources/mybatis/mapping/DriveIndCatalogMapper.xml
View file @
0e5af8c5
...
@@ -26,4 +26,10 @@
...
@@ -26,4 +26,10 @@
from drive_ind_catalog
from drive_ind_catalog
where parent_id = #{pid}
where parent_id = #{pid}
</select>
</select>
<select
id=
"findByKeyword"
resultType=
"com.keymobile.indicators.model.entity.indicators.DriveIndCatalog"
>
select *
from drive_ind_catalog
where catalog_name like #{keyword}
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapping/IndCatalogMapper.xml
View file @
0e5af8c5
...
@@ -26,4 +26,10 @@
...
@@ -26,4 +26,10 @@
from base_ind_catalog
from base_ind_catalog
where parent_id = #{pid}
where parent_id = #{pid}
</select>
</select>
<select
id=
"findByKeyword"
resultType=
"com.keymobile.indicators.model.entity.indicators.IndCatalog"
>
select *
from base_ind_catalog
where catalog_name like #{keyword}
</select>
</mapper>
</mapper>
\ No newline at end of file
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