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
02c3708b
Commit
02c3708b
authored
Feb 12, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
39074881
d4317004
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
13 deletions
+65
-13
ChannelResourceDTO.java
...pi/src/main/java/com/gic/auth/dto/ChannelResourceDTO.java
+9
-0
ResourceApiService.java
...rc/main/java/com/gic/auth/service/ResourceApiService.java
+20
-9
pom.xml
gic-platform-auth-service/pom.xml
+6
-0
ResourceApiServiceImpl.java
...m/gic/auth/service/outer/impl/ResourceApiServiceImpl.java
+29
-4
dubbo-gic-platform-auth-service.xml
...ce/src/main/resources/dubbo-gic-platform-auth-service.xml
+1
-0
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/dto/ChannelResourceDTO.java
View file @
02c3708b
...
...
@@ -11,8 +11,17 @@ import java.util.List;
public
class
ChannelResourceDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
7372101518056686792L
;
/**
* 会员卡id
*/
private
List
<
Long
>
cardConfigIdList
;
/**
* 小程序id
*/
private
List
<
Long
>
appletConfigIdList
;
/**
* 服务号id
*/
private
List
<
Long
>
serviceConfigIdList
;
public
List
<
Long
>
getCardConfigIdList
()
{
...
...
gic-platform-auth-api/src/main/java/com/gic/auth/service/ResourceApiService.java
View file @
02c3708b
...
...
@@ -2,13 +2,14 @@ package com.gic.auth.service;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.dto.ChannelResourceDTO
;
import
com.gic.auth.dto.ResourceDTO
;
import
com.gic.auth.dto.SmsSignResourceDTO
;
/**
*
*
* @ClassName: ResourceApiService
* @Description:
* @Description:
* @author zhiwj
* @date 2019/8/28 18:14
*/
...
...
@@ -18,10 +19,10 @@ public interface ResourceApiService {
* 保存或更新资源
* @Title: saveOrUpdateResource
* @Description: 保存或更新资源
* @author zhiwj
* @author zhiwj
* @param resourceDTO
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>
* @throws
* @throws
*/
ServiceResponse
<
Integer
>
saveOrUpdateResource
(
ResourceDTO
resourceDTO
);
...
...
@@ -29,10 +30,10 @@ public interface ResourceApiService {
* 删除资源
* @Title: delResource
* @Description: 删除资源
* @author zhiwj
* @author zhiwj
* @param resourceId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>
* @throws
* @throws
*/
ServiceResponse
<
Integer
>
delResource
(
Integer
resourceId
);
...
...
@@ -52,11 +53,11 @@ public interface ResourceApiService {
/**
* 查询资源详情
* @Title: getResource
* @Description:
* @author zhiwj
* @Description:
* @author zhiwj
* @param resourceId
* @return com.gic.api.base.commons.ServiceResponse<com.gic.api.base.commons.Page<com.gic.auth.dto.ResourceDTO>>
* @throws
* @throws
*/
ServiceResponse
<
ResourceDTO
>
getResource
(
Integer
resourceId
);
...
...
@@ -70,4 +71,14 @@ public interface ResourceApiService {
* @throws
*/
ServiceResponse
<
SmsSignResourceDTO
>
getSmsResourceByUserId
(
Integer
userId
);
/**
* 查询用户的渠道资源
* @Title: getChannelResourceByUserId
* @Description:
* @author zhiwj
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse
<
ChannelResourceDTO
>
getChannelResourceByUserId
(
Integer
userId
);
}
gic-platform-auth-service/pom.xml
View file @
02c3708b
...
...
@@ -27,6 +27,7 @@
<gic-wechat-business-api>
4.0-SNAPSHOT
</gic-wechat-business-api>
<gic-member-api>
4.0-SNAPSHOT
</gic-member-api>
<gic-open-platform-api>
4.0-SNAPSHOT
</gic-open-platform-api>
<application-center-api>
4.0-SNAPSHOT
</application-center-api>
</properties>
<dependencies>
...
...
@@ -136,6 +137,11 @@
<artifactId>
gic-member-api
</artifactId>
<version>
${gic-member-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
application-center-api
</artifactId>
<version>
${application-center-api}
</version>
</dependency>
</dependencies>
<build>
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/ResourceApiServiceImpl.java
View file @
02c3708b
...
...
@@ -4,11 +4,9 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.application.center.api.service.AuthorizeService
;
import
com.gic.auth.constant.OrderOrAppEnum
;
import
com.gic.auth.dto.OrderAppResourceDTO
;
import
com.gic.auth.dto.ResourceDTO
;
import
com.gic.auth.dto.SmsSignResourceDTO
;
import
com.gic.auth.dto.UserResourceDTO
;
import
com.gic.auth.dto.*
;
import
com.gic.auth.entity.TabSysOrderAppResource
;
import
com.gic.auth.entity.TabSysResource
;
import
com.gic.auth.entity.TabSysUser
;
...
...
@@ -48,6 +46,9 @@ public class ResourceApiServiceImpl implements ResourceApiService {
private
OrderAppResourceService
orderAppResourceService
;
@Autowired
private
UserService
userService
;
@Autowired
private
AuthorizeService
authorizeService
;
@Override
@Transactional
...
...
@@ -110,6 +111,11 @@ public class ResourceApiServiceImpl implements ResourceApiService {
return
ServiceResponse
.
failure
(
ErrorCode
.
OPERATION_FAILED
.
getCode
(),
"该资源组正在使用中,不能删除"
);
}
Integer
line
=
resourceService
.
delResource
(
resourceId
);
if
(
line
>
0
)
{
// 同步好办
authorizeService
.
delResource
(
resourceId
.
longValue
());
}
return
ServiceResponse
.
success
(
line
);
}
...
...
@@ -201,4 +207,23 @@ public class ResourceApiServiceImpl implements ResourceApiService {
result
.
setType
(
2
);
return
EnterpriseServiceResponse
.
success
(
result
);
}
@Override
public
ServiceResponse
<
ChannelResourceDTO
>
getChannelResourceByUserId
(
Integer
userId
)
{
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
);
}
}
gic-platform-auth-service/src/main/resources/dubbo-gic-platform-auth-service.xml
View file @
02c3708b
...
...
@@ -55,4 +55,5 @@
<dubbo:reference
interface=
"com.gic.enterprise.service.EnterpriseApiService"
id=
"enterpriseApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.auth.service.UserResourceApiService"
ref=
"userResourceApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.auth.service.BusinessFrontResApiService"
ref=
"businessFrontResApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.application.center.api.service.AuthorizeService"
id=
"authorizeService"
timeout=
"6000"
/>
</beans>
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