Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
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-platform-auth
Commits
f0416b4d
Commit
f0416b4d
authored
Sep 03, 2019
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加资源查询
parent
0dbc7b0b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
1 deletions
+33
-1
TabSysResourceMapper.java
...in/java/com/gic/auth/dao/mapper/TabSysResourceMapper.java
+5
-0
ResourceService.java
...e/src/main/java/com/gic/auth/service/ResourceService.java
+4
-0
ResourceServiceImpl.java
...n/java/com/gic/auth/service/impl/ResourceServiceImpl.java
+12
-0
TabSysResourceMapper.xml
...ervice/src/main/resources/mapper/TabSysResourceMapper.xml
+12
-1
No files found.
gic-platform-auth-service/src/main/java/com/gic/auth/dao/mapper/TabSysResourceMapper.java
View file @
f0416b4d
...
...
@@ -5,6 +5,8 @@ import com.gic.auth.entity.TabSysResource;
import
com.github.pagehelper.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
TabSysResourceMapper
{
/**
* 根据主键删除
...
...
@@ -57,4 +59,6 @@ public interface TabSysResourceMapper {
Page
<
TabSysResource
>
listResource
(
ResourceDTO
resourceDTO
);
TabSysResource
getBySelective
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"resourceName"
)
String
resourceName
,
@Param
(
"resourceId"
)
Integer
resourceId
);
List
<
TabSysResource
>
listByIds
(
@Param
(
"ids"
)
List
<
Integer
>
ids
);
}
\ No newline at end of file
gic-platform-auth-service/src/main/java/com/gic/auth/service/ResourceService.java
View file @
f0416b4d
...
...
@@ -4,6 +4,8 @@ import com.gic.auth.dto.ResourceDTO;
import
com.gic.auth.entity.TabSysResource
;
import
com.github.pagehelper.Page
;
import
java.util.List
;
/**
*
* @Description:
...
...
@@ -22,4 +24,6 @@ public interface ResourceService {
TabSysResource
getResource
(
Integer
resourceId
);
boolean
isRepeatByResourceName
(
Integer
enterpriseId
,
String
resourceName
,
Integer
resourceId
);
List
<
TabSysResource
>
listByIds
(
List
<
Integer
>
ids
);
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/ResourceServiceImpl.java
View file @
f0416b4d
...
...
@@ -8,10 +8,13 @@ import com.gic.commons.util.EntityUtil;
import
com.gic.commons.util.GlobalInfo
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.List
;
/**
*
...
...
@@ -63,4 +66,13 @@ public class ResourceServiceImpl implements ResourceService {
TabSysResource
resource
=
tabSysResourceMapper
.
getBySelective
(
enterpriseId
,
resourceName
,
resourceId
);
return
resource
!=
null
;
}
@Override
public
List
<
TabSysResource
>
listByIds
(
List
<
Integer
>
ids
)
{
if
(
CollectionUtils
.
isNotEmpty
(
ids
))
{
return
tabSysResourceMapper
.
listByIds
(
ids
);
}
else
{
return
Collections
.
emptyList
();
}
}
}
gic-platform-auth-service/src/main/resources/mapper/TabSysResourceMapper.xml
View file @
f0416b4d
...
...
@@ -199,5 +199,15 @@
</if>
limit 1
</select>
<select
id=
"listByIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_sys_resource
<if
test=
"null != ids"
>
and resource_id in
<foreach
collection=
"ids"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
</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