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
ca9a5c3a
Commit
ca9a5c3a
authored
Apr 09, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
2d79930c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
30 deletions
+59
-30
OrderResourceContentDTO.java
...c/main/java/com/gic/auth/dto/OrderResourceContentDTO.java
+15
-10
OrderResourceDTO.java
...-api/src/main/java/com/gic/auth/dto/OrderResourceDTO.java
+22
-0
ResourceApiServiceImpl.java
...m/gic/auth/service/outer/impl/ResourceApiServiceImpl.java
+5
-2
ResourceOpenApiServiceImpl.java
...c/auth/service/outer/impl/ResourceOpenApiServiceImpl.java
+17
-18
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/dto/OrderResourceContentDTO.java
View file @
ca9a5c3a
package
com
.
gic
.
auth
.
dto
;
import
java.io.Serializable
;
import
java.util.List
;
/**
*
...
...
@@ -11,16 +12,12 @@ import java.io.Serializable;
public
class
OrderResourceContentDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1609787491094703550L
;
/**
* 订单资源
[
{
"channel":1, // 渠道 1:线下门店, 2:达摩微商城, 3:微盟微商城
"storeContent":1 // 门店id或门店选择器id, 多个逗号隔开
}
]
"[{\"channel\":1,\"storeContent\":[],\"storeWidgetId\":1656}]"
*/
private
Integer
channel
;
private
String
storeContent
;
private
List
<
Long
>
storeContent
;
private
Integer
storeWidgetId
;
public
Integer
getChannel
()
{
return
channel
;
...
...
@@ -30,11 +27,19 @@ public class OrderResourceContentDTO implements Serializable {
this
.
channel
=
channel
;
}
public
String
getStoreContent
()
{
public
List
<
Long
>
getStoreContent
()
{
return
storeContent
;
}
public
void
setStoreContent
(
String
storeContent
)
{
public
void
setStoreContent
(
List
<
Long
>
storeContent
)
{
this
.
storeContent
=
storeContent
;
}
public
Integer
getStoreWidgetId
()
{
return
storeWidgetId
;
}
public
void
setStoreWidgetId
(
Integer
storeWidgetId
)
{
this
.
storeWidgetId
=
storeWidgetId
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/dto/OrderResourceDTO.java
View file @
ca9a5c3a
...
...
@@ -16,6 +16,12 @@ public class OrderResourceDTO implements Serializable {
//
private
List
<
Integer
>
storeIdList
;
// 达摩微商城
private
List
<
Long
>
shopIdList
;
// 微盟微商城
private
List
<
Long
>
wmStoreList
;
public
List
<
Integer
>
getStoreIdList
()
{
return
storeIdList
;
}
...
...
@@ -31,4 +37,20 @@ public class OrderResourceDTO implements Serializable {
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
List
<
Long
>
getShopIdList
()
{
return
shopIdList
;
}
public
void
setShopIdList
(
List
<
Long
>
shopIdList
)
{
this
.
shopIdList
=
shopIdList
;
}
public
List
<
Long
>
getWmStoreList
()
{
return
wmStoreList
;
}
public
void
setWmStoreList
(
List
<
Long
>
wmStoreList
)
{
this
.
wmStoreList
=
wmStoreList
;
}
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/ResourceApiServiceImpl.java
View file @
ca9a5c3a
...
...
@@ -6,6 +6,7 @@ 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.constant.OrderResourceChannelEnum
;
import
com.gic.auth.constant.ResourceHoldEnum
;
import
com.gic.auth.dto.*
;
import
com.gic.auth.entity.TabSysOrderAppResource
;
...
...
@@ -328,11 +329,13 @@ public class ResourceApiServiceImpl implements ResourceApiService {
List
<
OrderResourceContentDTO
>
contentDTOList
=
JSON
.
parseArray
(
sysOrderAppResource
.
getContent
(),
OrderResourceContentDTO
.
class
);
if
(
CollectionUtils
.
isNotEmpty
(
contentDTOList
))
{
for
(
OrderResourceContentDTO
orderResourceContentDTO
:
contentDTOList
)
{
if
(
Order
OrAppEnum
.
ORDER
.
getCode
().
equals
(
orderResourceContentDTO
.
getChannel
()))
{
List
<
Integer
>
result
=
storeWidgetApiService
.
listStoreIdByStoreWidgetId
(
user
.
getEnterpriseId
(),
Integer
.
valueOf
(
orderResourceContentDTO
.
getStoreContent
()
)).
getResult
();
if
(
Order
ResourceChannelEnum
.
OFFLINE
.
getCode
().
equals
(
orderResourceContentDTO
.
getChannel
()))
{
List
<
Integer
>
result
=
storeWidgetApiService
.
listStoreIdByStoreWidgetId
(
user
.
getEnterpriseId
(),
orderResourceContentDTO
.
getStoreWidgetId
(
)).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result
))
{
defaultResource
.
setStoreIdList
(
result
);
}
}
else
if
(
OrderResourceChannelEnum
.
DAMO_MALL
.
getCode
().
equals
(
orderResourceContentDTO
.
getChannel
()))
{
defaultResource
.
setShopIdList
(
orderResourceContentDTO
.
getStoreContent
());
}
}
}
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/ResourceOpenApiServiceImpl.java
View file @
ca9a5c3a
package
com
.
gic
.
auth
.
service
.
outer
.
impl
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.gic.auth.constant.OrderOrAppEnum
;
import
com.gic.auth.dto.OrderResourceContentDTO
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.goods.api.dto.selector.GoodsRightsSelectorWithRightsDTO
;
import
com.gic.goods.api.service.GoodsRightsSelectorApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
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.dto.ApplicationResourceDTO
;
import
com.gic.application.center.api.service.AuthorizeService
;
import
com.gic.auth.constant.OrderOrAppEnum
;
import
com.gic.auth.dto.OrderResourceContentDTO
;
import
com.gic.auth.dto.ResourceDTO
;
import
com.gic.auth.dto.open.*
;
import
com.gic.auth.entity.TabSysOrderAppResource
;
import
com.gic.auth.service.OrderAppResourceService
;
import
com.gic.auth.service.ResourceApiService
;
import
com.gic.auth.service.ResourceOpenApiService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.gateway.sdk.anno.GatewayExporter
;
import
com.gic.gateway.sdk.anno.GatewayParams
;
import
com.gic.goods.api.dto.selector.GoodsRightsSelectorWithRightsDTO
;
import
com.gic.goods.api.service.GoodsRightsSelectorApiService
;
import
com.gic.member.config.api.dto.AppletsConfigSimpleOutputDTO
;
import
com.gic.member.config.api.dto.ChannelAreaInfoDTO
;
import
com.gic.member.config.api.dto.OwnerMemberCardDTO
;
...
...
@@ -42,6 +30,17 @@ import com.gic.member.config.api.service.ServiceConfigApiService;
import
com.gic.member.filter.api.service.CuIndexOperaApiService
;
import
com.gic.store.dto.StoreDTO
;
import
com.gic.store.service.StoreWidgetApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
(
"resourceOpenApiService"
)
@GatewayExporter
...
...
@@ -121,7 +120,7 @@ public class ResourceOpenApiServiceImpl implements ResourceOpenApiService{
if
(
OrderOrAppEnum
.
ORDER
.
getCode
().
equals
(
orderResourceContentDTO
.
getChannel
()))
{
//查询门店资源组所有的门店权限
ServiceResponse
<
Page
<
StoreDTO
>>
storeResult
=
storeWidgetApiService
.
listStoreByStoreWidgetId
(
enterpriseId
,
Integer
.
valueOf
(
orderResourceContentDTO
.
getStoreContent
()
),
1
,
10000
);
.
listStoreByStoreWidgetId
(
enterpriseId
,
orderResourceContentDTO
.
getStoreWidgetId
(
),
1
,
10000
);
if
(
storeResult
.
isSuccess
())
{
Page
<
StoreDTO
>
page
=
storeResult
.
getResult
();
if
(
page
==
null
)
{
...
...
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