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
4da1009b
Commit
4da1009b
authored
Mar 03, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对外api资源授权清单:补齐商品资源
parent
90019666
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
217 additions
and
2 deletions
+217
-2
GoodsResourceDTO.java
...src/main/java/com/gic/auth/dto/open/GoodsResourceDTO.java
+29
-0
GoodsRightsAuthDTO.java
...c/main/java/com/gic/auth/dto/open/GoodsRightsAuthDTO.java
+18
-0
GoodsRightsBrandDTO.java
.../main/java/com/gic/auth/dto/open/GoodsRightsBrandDTO.java
+37
-0
GoodsRightsChannelDTO.java
...ain/java/com/gic/auth/dto/open/GoodsRightsChannelDTO.java
+38
-0
GoodsRightsDomainDTO.java
...main/java/com/gic/auth/dto/open/GoodsRightsDomainDTO.java
+49
-0
ResourceOpenDTO.java
.../src/main/java/com/gic/auth/dto/open/ResourceOpenDTO.java
+12
-1
pom.xml
gic-platform-auth-service/pom.xml
+5
-0
ResourceOpenApiServiceImpl.java
...c/auth/service/outer/impl/ResourceOpenApiServiceImpl.java
+27
-1
dubbo-gic-platform-auth-service.xml
...ce/src/main/resources/dubbo-gic-platform-auth-service.xml
+2
-0
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/dto/open/GoodsResourceDTO.java
0 → 100644
View file @
4da1009b
package
com
.
gic
.
auth
.
dto
.
open
;
import
java.io.Serializable
;
public
class
GoodsResourceDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
368101547153742819L
;
/**
* 商品选择器ID
*/
private
Long
goodsResource
;
private
GoodsRightsAuthDTO
goodsRightsAuth
;
public
Long
getGoodsResource
()
{
return
goodsResource
;
}
public
void
setGoodsResource
(
Long
goodsResource
)
{
this
.
goodsResource
=
goodsResource
;
}
public
GoodsRightsAuthDTO
getGoodsRightsAuth
()
{
return
goodsRightsAuth
;
}
public
void
setGoodsRightsAuth
(
GoodsRightsAuthDTO
goodsRightsAuth
)
{
this
.
goodsRightsAuth
=
goodsRightsAuth
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/dto/open/GoodsRightsAuthDTO.java
0 → 100644
View file @
4da1009b
package
com
.
gic
.
auth
.
dto
.
open
;
import
java.io.Serializable
;
import
java.util.List
;
public
class
GoodsRightsAuthDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3365902031841545564L
;
private
List
<
GoodsRightsChannelDTO
>
goodsRightsChannelList
;
public
List
<
GoodsRightsChannelDTO
>
getGoodsRightsChannelList
()
{
return
goodsRightsChannelList
;
}
public
void
setGoodsRightsChannelList
(
List
<
GoodsRightsChannelDTO
>
goodsRightsChannelList
)
{
this
.
goodsRightsChannelList
=
goodsRightsChannelList
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/dto/open/GoodsRightsBrandDTO.java
0 → 100644
View file @
4da1009b
package
com
.
gic
.
auth
.
dto
.
open
;
import
java.io.Serializable
;
public
class
GoodsRightsBrandDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
2236740261653028520L
;
private
Long
brandId
;
private
String
brandCode
;
private
String
brandName
;
public
Long
getBrandId
()
{
return
brandId
;
}
public
void
setBrandId
(
Long
brandId
)
{
this
.
brandId
=
brandId
;
}
public
String
getBrandCode
()
{
return
brandCode
;
}
public
void
setBrandCode
(
String
brandCode
)
{
this
.
brandCode
=
brandCode
;
}
public
String
getBrandName
()
{
return
brandName
;
}
public
void
setBrandName
(
String
brandName
)
{
this
.
brandName
=
brandName
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/dto/open/GoodsRightsChannelDTO.java
0 → 100644
View file @
4da1009b
package
com
.
gic
.
auth
.
dto
.
open
;
import
java.io.Serializable
;
import
java.util.List
;
public
class
GoodsRightsChannelDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1343276116860387848L
;
private
String
channelCode
;
private
String
channelName
;
private
List
<
GoodsRightsDomainDTO
>
goodsRightsDomainList
;
public
String
getChannelCode
()
{
return
channelCode
;
}
public
void
setChannelCode
(
String
channelCode
)
{
this
.
channelCode
=
channelCode
;
}
public
String
getChannelName
()
{
return
channelName
;
}
public
void
setChannelName
(
String
channelName
)
{
this
.
channelName
=
channelName
;
}
public
List
<
GoodsRightsDomainDTO
>
getGoodsRightsDomainList
()
{
return
goodsRightsDomainList
;
}
public
void
setGoodsRightsDomainList
(
List
<
GoodsRightsDomainDTO
>
goodsRightsDomainList
)
{
this
.
goodsRightsDomainList
=
goodsRightsDomainList
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/dto/open/GoodsRightsDomainDTO.java
0 → 100644
View file @
4da1009b
package
com
.
gic
.
auth
.
dto
.
open
;
import
java.io.Serializable
;
import
java.util.List
;
public
class
GoodsRightsDomainDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
6324205784953715323L
;
private
Long
goodsDomainId
;
private
String
goodsDomainCode
;
private
String
goodsDomainName
;
private
List
<
GoodsRightsBrandDTO
>
goodsRightsBrandList
;
public
Long
getGoodsDomainId
()
{
return
goodsDomainId
;
}
public
void
setGoodsDomainId
(
Long
goodsDomainId
)
{
this
.
goodsDomainId
=
goodsDomainId
;
}
public
String
getGoodsDomainCode
()
{
return
goodsDomainCode
;
}
public
void
setGoodsDomainCode
(
String
goodsDomainCode
)
{
this
.
goodsDomainCode
=
goodsDomainCode
;
}
public
String
getGoodsDomainName
()
{
return
goodsDomainName
;
}
public
void
setGoodsDomainName
(
String
goodsDomainName
)
{
this
.
goodsDomainName
=
goodsDomainName
;
}
public
List
<
GoodsRightsBrandDTO
>
getGoodsRightsBrandList
()
{
return
goodsRightsBrandList
;
}
public
void
setGoodsRightsBrandList
(
List
<
GoodsRightsBrandDTO
>
goodsRightsBrandList
)
{
this
.
goodsRightsBrandList
=
goodsRightsBrandList
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/dto/open/ResourceOpenDTO.java
View file @
4da1009b
package
com
.
gic
.
auth
.
dto
.
open
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 对第三方开发者资源授权清单
...
...
@@ -29,6 +28,10 @@ public class ResourceOpenDTO implements Serializable{
* 订单资源
*/
private
OrderResourceDTO
orderResource
;
/**
* 商品资源
*/
private
GoodsResourceDTO
goodsResource
;
public
StoreResourceDTO
getStore
()
{
...
...
@@ -62,4 +65,12 @@ public class ResourceOpenDTO implements Serializable{
public
void
setOrderResource
(
OrderResourceDTO
orderResource
)
{
this
.
orderResource
=
orderResource
;
}
public
GoodsResourceDTO
getGoodsResource
()
{
return
goodsResource
;
}
public
void
setGoodsResource
(
GoodsResourceDTO
goodsResource
)
{
this
.
goodsResource
=
goodsResource
;
}
}
gic-platform-auth-service/pom.xml
View file @
4da1009b
...
...
@@ -157,6 +157,11 @@
<artifactId>
gic-member-filter-api
</artifactId>
<version>
${gic-member-filter-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-goods-api
</artifactId>
<version>
${gic-goods-api}
</version>
</dependency>
</dependencies>
<build>
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/ResourceOpenApiServiceImpl.java
View file @
4da1009b
...
...
@@ -7,6 +7,9 @@ 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
;
...
...
@@ -63,6 +66,8 @@ public class ResourceOpenApiServiceImpl implements ResourceOpenApiService{
private
ServiceConfigApiService
serviceConfigApiService
;
@Autowired
private
AuthorizationEnterConfApiService
authorizationEnterConfApiService
;
@Autowired
private
GoodsRightsSelectorApiService
goodsRightsSelectorApiService
;
@Override
@GatewayParams
(
query
=
{
"appId"
,
"enterpriseId"
})
...
...
@@ -77,10 +82,31 @@ public class ResourceOpenApiServiceImpl implements ResourceOpenApiService{
result
.
setChannelResource
(
getChannelResource
(
enterpriseId
,
resourceDTO
));
//订单资源
result
.
setOrderResource
(
getOrderResource
(
enterpriseId
,
resourceDTO
));
//todo 商品资源
//商品资源
result
.
setGoodsResource
(
getGoodsResource
(
enterpriseId
,
resourceDTO
));
return
ServiceResponse
.
success
(
result
);
}
private
GoodsResourceDTO
getGoodsResource
(
Integer
enterpriseId
,
ResourceDTO
resourceDTO
)
{
if
(
resourceDTO
!=
null
)
{
Long
goodsResource
=
resourceDTO
.
getGoodsResourceId
();
GoodsResourceDTO
dto
=
new
GoodsResourceDTO
();
dto
.
setGoodsResource
(
goodsResource
);
if
(
goodsResource
!=
null
)
{
ServiceResponse
<
GoodsRightsSelectorWithRightsDTO
>
result
=
goodsRightsSelectorApiService
.
getGoodsRightsSelectorWithRights
(
goodsResource
,
enterpriseId
);
LOGGER
.
info
(
"对外商品资源查询接口:{}"
,
JSON
.
toJSONString
(
result
));
if
(
result
.
isSuccess
())
{
GoodsRightsSelectorWithRightsDTO
goodsRightsSelectorWithRightsDTO
=
result
.
getResult
();
GoodsRightsAuthDTO
goodsRightsAuth
=
EntityUtil
.
changeEntityNew
(
GoodsRightsAuthDTO
.
class
,
goodsRightsSelectorWithRightsDTO
);
dto
.
setGoodsRightsAuth
(
goodsRightsAuth
);
return
dto
;
}
}
}
return
null
;
}
private
OrderResourceDTO
getOrderResource
(
Integer
enterpriseId
,
ResourceDTO
resourceDTO
)
{
if
(
resourceDTO
!=
null
)
{
Integer
orderResourceId
=
resourceDTO
.
getOrderResource
();
...
...
gic-platform-auth-service/src/main/resources/dubbo-gic-platform-auth-service.xml
View file @
4da1009b
...
...
@@ -69,4 +69,6 @@
<dubbo:reference
interface=
"com.gic.member.filter.api.service.CuIndexOperaApiService"
id=
"cuIndexOperaApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.member.config.api.service.AuthorizationEnterConfApiService"
id=
"authorizationEnterConfApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.goods.api.service.GoodsRightsSelectorApiService"
id=
"goodsRightsSelectorApiService"
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