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
7cec384c
Commit
7cec384c
authored
May 06, 2020
by
胡超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除多余代码
parent
73cf2012
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
49 deletions
+0
-49
order-application-service/src/main/java/cn/freemud/controller/test/TestController.java
+0
-49
No files found.
order-application-service/src/main/java/cn/freemud/controller/test/TestController.java
View file @
7cec384c
package
cn
.
freemud
.
controller
.
test
;
package
cn
.
freemud
.
controller
.
test
;
import
cn.freemud.amp.service.ProduceMQService
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.entities.dto.delivery.CallbackUrlRequestDto
;
import
cn.freemud.entities.vo.CheckBeforeCreateOrderRequestVo
;
import
cn.freemud.monitorcenter.tools.HealthUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.freemud.application.sdk.api.log.ApiAnnotation
;
import
com.freemud.application.sdk.api.log.ApiAnnotation
;
import
com.freemud.application.sdk.api.log.LogParams
;
import
com.freemud.application.sdk.api.log.LogParams
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.rocketmq.client.producer.SendResult
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
/**
* All rights Reserved, Designed By www.freemud.com
* All rights Reserved, Designed By www.freemud.com
*
*
...
@@ -64,42 +53,4 @@ public class TestController {
...
@@ -64,42 +53,4 @@ public class TestController {
return
platformBaseResponse
;
return
platformBaseResponse
;
}
}
@Resource
ProduceMQService
produceMQService
;
@ApiAnnotation
(
logMessage
=
"test"
)
@PostMapping
(
"/test"
)
public
PlatformBaseResponse
test
(
String
order
,
String
partnerId
,
String
channel
)
{
CallbackUrlRequestDto
deliveryRequest
=
buildCallbackUrlRequestDto
();
deliveryRequest
.
setOrderId
(
order
);
deliveryRequest
.
setPartnerId
(
partnerId
);
deliveryRequest
.
setChannelCode
(
channel
);
produceMQService
.
sendRocketMqOfDeliveryInfo
(
deliveryRequest
);
PlatformBaseResponse
platformBaseResponse
=
new
PlatformBaseResponse
();
platformBaseResponse
.
setResponseBody
(
JSON
.
toJSONString
(
sendResult
));
platformBaseResponse
.
setStatusCode
(
"100"
);
return
platformBaseResponse
;
}
public
CallbackUrlRequestDto
buildCallbackUrlRequestDto
()
{
String
json
=
"{\n"
+
" \"channelCode\":\"MeiTuan\",\n"
+
" \"channelDeliveryId\":\"1584868781086019780\",\n"
+
" \"channelName\":\"美团\",\n"
+
" \"deliveryId\":\"6913353047542579209b\",\n"
+
" \"deliveryStatus\":2,\n"
+
" \"orderId\":\"17283381807564801000006\",\n"
+
" \"partnerId\":\"1864\",\n"
+
" \"riderName\":\"宋**\",\n"
+
" \"riderPhone\":\"1782****316\",\n"
+
" \"storeId\":\"a785e270-0f67-4805-b3db-6e2604b87909\",\n"
+
" \"updateTime\":\"2020-03-22 17:20:45\"\n"
+
"}"
;
CallbackUrlRequestDto
callbackUrlRequestDto
=
JSON
.
parseObject
(
json
,
CallbackUrlRequestDto
.
class
);
return
callbackUrlRequestDto
;
}
}
}
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