Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
288b8d24
Commit
288b8d24
authored
Jun 03, 2020
by
dingkai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微商城对接生态
parent
084291d1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
order-application-service/src/main/java/cn/freemud/entities/dto/wechat/GetTokenResponseDto.java
+5
-4
order-application-service/src/main/java/cn/freemud/service/impl/MallOrderServiceImpl.java
+3
-5
order-application-service/src/main/java/cn/freemud/service/thirdparty/EcologyAdminApplicationClient.java
+6
-0
No files found.
order-application-service/src/main/java/cn/freemud/entities/dto/wechat/GetTokenResponseDto.java
View file @
288b8d24
...
...
@@ -18,14 +18,15 @@ import lombok.Data;
@Data
public
class
GetTokenResponseDto
{
private
String
statusCode
;
private
String
msg
;
private
String
code
;
private
String
message
;
private
String
subMsg
;
private
String
ver
;
private
ResultBean
data
;
private
ResultBean
result
;
@Data
public
static
class
ResultBean
{
private
String
appi
d
;
private
String
miniAppI
d
;
private
String
accessToken
;
}
...
...
order-application-service/src/main/java/cn/freemud/service/impl/MallOrderServiceImpl.java
View file @
288b8d24
...
...
@@ -123,8 +123,6 @@ public class MallOrderServiceImpl implements MallOrderService {
@Autowired
private
OrderSdkService
orderSdkService
;
@Autowired
private
WechatApplicationServiceClient
wechatApplicationServiceClient
;
@Autowired
private
EcologyAdminApplicationClient
ecologyAdminApplicationClient
;
/**
...
...
@@ -655,12 +653,12 @@ public class MallOrderServiceImpl implements MallOrderService {
GetAuthorizerRequestDto
getAuthorizerRequestDto
=
new
GetAuthorizerRequestDto
();
getAuthorizerRequestDto
.
setPartnerId
(
orderBean
.
getCompanyId
());
getAuthorizerRequestDto
.
setAuthorizerAppid
(
orderExtInfoDto
.
getAppid
());
GetTokenResponseDto
getTokenResponseDto
=
wechatApplicationServiceClient
.
get
Token
(
getAuthorizerRequestDto
);
if
(
getTokenResponseDto
==
null
||
getTokenResponseDto
.
get
Data
()
==
null
)
{
GetTokenResponseDto
getTokenResponseDto
=
ecologyAdminApplicationClient
.
getAuthorizerAccess
Token
(
getAuthorizerRequestDto
);
if
(
getTokenResponseDto
==
null
||
getTokenResponseDto
.
get
Result
()
==
null
||
StringUtils
.
isBlank
(
getTokenResponseDto
.
getResult
().
getAccessToken
())
)
{
LogUtil
.
info
(
trackingNo
,
"createDelivery getToken fail"
,
gson
.
toJson
(
getAuthorizerRequestDto
),
gson
.
toJson
(
getTokenResponseDto
));
return
false
;
}
String
accessToken
=
getTokenResponseDto
.
get
Data
().
getAccessToken
();
String
accessToken
=
getTokenResponseDto
.
get
Result
().
getAccessToken
();
CreateDeliveryOrderRequestDto
createDeliveryOrderRequestDto
=
deliveryAdapter
.
convertToWeixinDeliveryOrderRequestDto
(
orderBean
,
storeResponse
,
accessToken
,
deliveryNotifyUrl
);
CreateDeliveryOrderResponseDto
createDeliveryOrderResponseDto
=
deliveryService
.
deliveryOrderAdd
(
createDeliveryOrderRequestDto
,
trackingNo
);
/**
...
...
order-application-service/src/main/java/cn/freemud/service/thirdparty/EcologyAdminApplicationClient.java
View file @
288b8d24
...
...
@@ -3,6 +3,8 @@ package cn.freemud.service.thirdparty;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.entities.dto.ecology.VirtualBindStoreResponse
;
import
cn.freemud.entities.dto.ecology.VirtualStoreRequest
;
import
cn.freemud.entities.dto.wechat.GetAuthorizerRequestDto
;
import
cn.freemud.entities.dto.wechat.GetTokenResponseDto
;
import
org.springframework.cloud.netflix.feign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -22,4 +24,8 @@ public interface EcologyAdminApplicationClient {
*/
@PostMapping
(
value
=
"ecology/api/app/info/getBuyBindVirtualStore"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
BaseResponse
<
VirtualBindStoreResponse
>
getBuyBindVirtualStore
(
@RequestBody
VirtualStoreRequest
virtualStoreRequest
);
@PostMapping
(
value
=
"/ecology/api/getAuthorizerAccessToken"
)
GetTokenResponseDto
getAuthorizerAccessToken
(
@RequestBody
GetAuthorizerRequestDto
request
);
}
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