Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-data-cloud
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
base_platform_enterprise
gic-data-cloud
Commits
ca8a5cb3
Commit
ca8a5cb3
authored
Jul 16, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
1dbbf374
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
6 deletions
+51
-6
IndexQO.java
...ata-cloud-api/src/main/java/com/gic/cloud/qo/IndexQO.java
+10
-0
TabIndexModuleRelMapper.java
...ava/com/gic/cloud/dao/mapper/TabIndexModuleRelMapper.java
+4
-1
IndexModuleRelService.java
...ain/java/com/gic/cloud/service/IndexModuleRelService.java
+3
-1
IndexModuleRelServiceImpl.java
...com/gic/cloud/service/impl/IndexModuleRelServiceImpl.java
+6
-1
IndexServiceImpl.java
...ain/java/com/gic/cloud/service/impl/IndexServiceImpl.java
+9
-0
TabIndexMapper.xml
...loud-service/src/main/resources/mapper/TabIndexMapper.xml
+7
-3
TabIndexModuleRelMapper.xml
...ice/src/main/resources/mapper/TabIndexModuleRelMapper.xml
+12
-0
No files found.
gic-data-cloud-api/src/main/java/com/gic/cloud/qo/IndexQO.java
View file @
ca8a5cb3
package
com
.
gic
.
cloud
.
qo
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author zhiwj
...
...
@@ -14,6 +15,7 @@ public class IndexQO extends PageQO implements Serializable {
private
String
moduleId
;
private
Integer
isAppIndex
;
private
String
search
;
private
List
<
Integer
>
indexIdList
;
public
Integer
getClassifyType
()
{
return
classifyType
;
...
...
@@ -46,4 +48,12 @@ public class IndexQO extends PageQO implements Serializable {
public
void
setSearch
(
String
search
)
{
this
.
search
=
search
;
}
public
void
setIndexIdList
(
List
<
Integer
>
indexIdList
)
{
this
.
indexIdList
=
indexIdList
;
}
public
List
<
Integer
>
getIndexIdList
()
{
return
indexIdList
;
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/dao/mapper/TabIndexModuleRelMapper.java
View file @
ca8a5cb3
...
...
@@ -62,7 +62,9 @@ public interface TabIndexModuleRelMapper {
List
<
String
>
listModuleIdByBusinessId
(
@Param
(
"businessId"
)
Integer
businessId
,
@Param
(
"type"
)
Integer
type
);
List
<
Integer
>
listBusinessIdByModuleId
(
@Param
(
"moduleId"
)
Integer
moduleId
);
List
<
Integer
>
listBusinessIdByModuleId
(
@Param
(
"moduleId"
)
String
moduleId
);
List
<
Integer
>
listBusinessIdByModuleIds
(
@Param
(
"moduleIdList"
)
List
<
String
>
moduleIdList
);
List
<
TabIndexModuleRel
>
listModuleIdByBusinessIds
(
@Param
(
"ids"
)
List
<
Integer
>
businessIdList
,
@Param
(
"type"
)
Integer
type
);
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/service/IndexModuleRelService.java
View file @
ca8a5cb3
...
...
@@ -13,7 +13,9 @@ public interface IndexModuleRelService {
List
<
String
>
listModuleIdByBusinessId
(
Integer
indexId
,
Integer
type
);
List
<
Integer
>
listBusinessIdByModuleId
(
Integer
moduleId
);
List
<
Integer
>
listBusinessIdByModuleId
(
String
moduleId
);
List
<
Integer
>
listBusinessIdByModuleIds
(
List
<
String
>
moduleIdList
);
void
deleteByBusinessId
(
Integer
businessId
,
Integer
type
);
...
...
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/IndexModuleRelServiceImpl.java
View file @
ca8a5cb3
...
...
@@ -48,11 +48,16 @@ public class IndexModuleRelServiceImpl implements IndexModuleRelService {
}
@Override
public
List
<
Integer
>
listBusinessIdByModuleId
(
Integer
moduleId
)
{
public
List
<
Integer
>
listBusinessIdByModuleId
(
String
moduleId
)
{
return
tabIndexModuleRelMapper
.
listBusinessIdByModuleId
(
moduleId
);
}
@Override
public
List
<
Integer
>
listBusinessIdByModuleIds
(
List
<
String
>
moduleIdList
)
{
return
tabIndexModuleRelMapper
.
listBusinessIdByModuleIds
(
moduleIdList
);
}
@Override
public
void
deleteByBusinessId
(
Integer
businessId
,
Integer
type
)
{
tabIndexModuleRelMapper
.
delByBusinessId
(
businessId
,
type
);
}
...
...
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/IndexServiceImpl.java
View file @
ca8a5cb3
...
...
@@ -4,13 +4,16 @@ import com.gic.cloud.dao.mapper.TabIndexMapper;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.entity.TabIndex
;
import
com.gic.cloud.qo.IndexQO
;
import
com.gic.cloud.service.IndexModuleRelService
;
import
com.gic.cloud.service.IndexService
;
import
com.gic.commons.util.EntityUtil
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -24,6 +27,8 @@ public class IndexServiceImpl implements IndexService {
@Autowired
private
TabIndexMapper
tabIndexMapper
;
@Autowired
private
IndexModuleRelService
indexModuleRelService
;
@Override
public
boolean
isNameRepeat
(
String
name
,
Integer
indexId
)
{
...
...
@@ -65,6 +70,10 @@ public class IndexServiceImpl implements IndexService {
@Override
public
Page
<
TabIndex
>
listIndex
(
IndexQO
indexQO
)
{
PageHelper
.
startPage
(
indexQO
.
getCurrentPage
(),
indexQO
.
getPageSize
());
if
(
StringUtils
.
isNotBlank
(
indexQO
.
getModuleId
()))
{
List
<
Integer
>
indexIdList
=
indexModuleRelService
.
listBusinessIdByModuleIds
(
Arrays
.
asList
(
indexQO
.
getModuleId
().
split
(
","
)));
indexQO
.
setIndexIdList
(
indexIdList
);
}
return
tabIndexMapper
.
listIndex
(
indexQO
);
}
...
...
gic-data-cloud-service/src/main/resources/mapper/TabIndexMapper.xml
View file @
ca8a5cb3
...
...
@@ -369,15 +369,18 @@
<if
test=
"classifyType != null "
>
and classify_type = #{classifyType}
</if>
<if
test=
"moduleId != null "
>
and module_id = #{moduleId}
</if>
<if
test=
"isAppIndex != null "
>
and is_app_index = #{isAppIndex}
</if>
<if
test=
"search != null and search != '' "
>
and name like concat('%', #{search}, '%')
</if>
<if
test=
"null != indexIdList and indexIdList.size > 0"
>
and index_id in
<foreach
collection=
"indexIdList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
order by create_time desc
</select>
</mapper>
\ No newline at end of file
gic-data-cloud-service/src/main/resources/mapper/TabIndexModuleRelMapper.xml
View file @
ca8a5cb3
...
...
@@ -168,6 +168,18 @@
from tab_index_module_rel
where status = 1 and module_id = #{moduleId}
</select>
<select
id=
"listBusinessIdByModuleIds"
resultMap=
"BaseResultMap"
>
select
module_id
from tab_index_module_rel
where status = 1
<if
test=
"null != ids and ids.size > 0"
>
and module_id in
<foreach
collection=
"ids"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
<select
id=
"listModuleIdByBusinessIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_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