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
184bd926
Commit
184bd926
authored
Jul 29, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改审批
parent
2dcd2993
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
1 deletions
+52
-1
ResourceApiService.java
...rc/main/java/com/gic/auth/service/ResourceApiService.java
+12
-1
ResourceApiServiceImpl.java
...m/gic/auth/service/outer/impl/ResourceApiServiceImpl.java
+40
-0
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/service/ResourceApiService.java
View file @
184bd926
...
@@ -71,7 +71,7 @@ public interface ResourceApiService {
...
@@ -71,7 +71,7 @@ public interface ResourceApiService {
ServiceResponse
<
SmsSignResourceDTO
>
getSmsResourceByUserId
(
Integer
userId
);
ServiceResponse
<
SmsSignResourceDTO
>
getSmsResourceByUserId
(
Integer
userId
);
/**
/**
* 查询用户的渠道资源
* 查询用户的渠道资源
(仅当前可用的数据)
* @Title: getChannelResourceByUserId
* @Title: getChannelResourceByUserId
* @Description:
* @Description:
* @author zhiwj
* @author zhiwj
...
@@ -81,6 +81,17 @@ public interface ResourceApiService {
...
@@ -81,6 +81,17 @@ public interface ResourceApiService {
ServiceResponse
<
ChannelResourceDTO
>
getChannelResourceByUserId
(
Integer
userId
);
ServiceResponse
<
ChannelResourceDTO
>
getChannelResourceByUserId
(
Integer
userId
);
/**
/**
* 查询用户的渠道资源(包含已经删除的数据)
* @Title: getChannelResourceByUserIdContainDel
* @Description:
* @author zhiwj
* @param userId
* @return com.gic.api.base.commons.ServiceResponse<com.gic.auth.dto.ChannelResourceDTO>
* @throws
*/
ServiceResponse
<
ChannelResourceDTO
>
getChannelResourceByUserIdContainDel
(
Integer
userId
);
/**
* 查询门店资源
* 查询门店资源
* @Title: getStoreResourceByUserId
* @Title: getStoreResourceByUserId
* @Description:
* @Description:
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/ResourceApiServiceImpl.java
View file @
184bd926
...
@@ -237,6 +237,46 @@ public class ResourceApiServiceImpl implements ResourceApiService {
...
@@ -237,6 +237,46 @@ public class ResourceApiServiceImpl implements ResourceApiService {
}
}
if
(
user
.
getSuperAdmin
()
==
1
)
{
if
(
user
.
getSuperAdmin
()
==
1
)
{
List
<
OwnerMemberCardDTO
>
memberCardList
=
memberCardApiService
.
getAll
(
user
.
getEnterpriseId
()).
getResult
();
List
<
AppletsConfigSimpleOutputDTO
>
appletList
=
appletsConfigApiService
.
listValidAppletConfigAppId
(
user
.
getEnterpriseId
()).
getResult
();
List
<
ServiceConfigSimpleOutputDTO
>
serviceList
=
serviceConfigApiService
.
listValidServiceConfigAppId
(
user
.
getEnterpriseId
()).
getResult
();
ChannelResourceDTO
channelResourceDTO
=
new
ChannelResourceDTO
();
channelResourceDTO
.
setAppletConfigIdList
(
Optional
.
ofNullable
(
appletList
).
orElse
(
Collections
.
emptyList
()).
stream
().
map
(
AppletsConfigSimpleOutputDTO:
:
getAppletConfigId
).
collect
(
Collectors
.
toList
()));
channelResourceDTO
.
setServiceConfigIdList
(
Optional
.
ofNullable
(
serviceList
).
orElse
(
Collections
.
emptyList
()).
stream
().
map
(
ServiceConfigSimpleOutputDTO:
:
getServiceConfigId
).
collect
(
Collectors
.
toList
()));
channelResourceDTO
.
setCardConfigIdList
(
Optional
.
ofNullable
(
memberCardList
).
orElse
(
Collections
.
emptyList
()).
stream
().
map
(
OwnerMemberCardDTO:
:
getCardConfigId
).
collect
(
Collectors
.
toList
()));
return
EnterpriseServiceResponse
.
success
(
channelResourceDTO
);
}
List
<
UserResourceDTO
>
resourceDTOList
=
this
.
userResourceService
.
listUserResourceByUserId
(
userId
);
if
(
CollectionUtils
.
isEmpty
(
resourceDTOList
))
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
NOTEXISTS
);
}
UserResourceDTO
userResourceDTO
=
resourceDTOList
.
get
(
0
);
TabSysResource
resource
=
this
.
resourceService
.
getResource
(
userResourceDTO
.
getResourceId
());
if
(
resource
.
getChannelResource
()
==
null
)
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
NOTEXISTS
);
}
TabSysOrderAppResource
channelResource
=
orderAppResourceService
.
getById
(
resource
.
getChannelResource
());
ChannelResourceDTO
channelResourceDTO
=
JSON
.
parseObject
(
channelResource
.
getContent
(),
ChannelResourceDTO
.
class
);
return
EnterpriseServiceResponse
.
success
(
channelResourceDTO
);
}
@Override
public
ServiceResponse
<
ChannelResourceDTO
>
getChannelResourceByUserIdContainDel
(
Integer
userId
)
{
TabSysUser
user
=
this
.
userService
.
getUserById
(
userId
);
if
(
user
==
null
)
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
NOTEXISTS
);
}
if
(
user
.
getSuperAdmin
()
==
1
)
{
List
<
OwnerMemberCardDTO
>
memberCardList
=
memberCardApiService
.
getAllContainDel
(
user
.
getEnterpriseId
()).
getResult
();
List
<
OwnerMemberCardDTO
>
memberCardList
=
memberCardApiService
.
getAllContainDel
(
user
.
getEnterpriseId
()).
getResult
();
List
<
AppletsConfigSimpleOutputDTO
>
appletList
=
appletsConfigApiService
.
listAppletConfigAppIdContainDel
(
user
.
getEnterpriseId
()).
getResult
();
List
<
AppletsConfigSimpleOutputDTO
>
appletList
=
appletsConfigApiService
.
listAppletConfigAppIdContainDel
(
user
.
getEnterpriseId
()).
getResult
();
List
<
ServiceConfigSimpleOutputDTO
>
serviceList
=
serviceConfigApiService
.
listServiceConfigAppIdContainDel
(
user
.
getEnterpriseId
()).
getResult
();
List
<
ServiceConfigSimpleOutputDTO
>
serviceList
=
serviceConfigApiService
.
listServiceConfigAppIdContainDel
(
user
.
getEnterpriseId
()).
getResult
();
...
...
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