Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
holmes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QA
holmes
Commits
a5240a4f
Commit
a5240a4f
authored
Mar 03, 2022
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update /api/order/selectJdOrder
parent
9cc7e51d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
OrderController.java
...olmes/controller/mock/keystone/jdbuy/OrderController.java
+20
-6
No files found.
src/main/java/cn/qg/holmes/controller/mock/keystone/jdbuy/OrderController.java
View file @
a5240a4f
...
@@ -11,6 +11,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -11,6 +11,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.alibaba.fastjson.TypeReference
;
import
com.alibaba.fastjson.TypeReference
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.RandomStringUtils
;
import
org.apache.commons.lang.RandomStringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -134,7 +135,11 @@ public class OrderController {
...
@@ -134,7 +135,11 @@ public class OrderController {
public
JSONObject
qygOrderDetail
(
JdOrderDetailRequest
request
)
{
public
JSONObject
qygOrderDetail
(
JdOrderDetailRequest
request
)
{
String
jdOrderId
=
request
.
getJdOrderId
();
String
jdOrderId
=
request
.
getJdOrderId
();
String
queryExts
=
request
.
getQueryExts
();
String
queryExts
=
request
.
getQueryExts
();
JSONObject
orderInfo
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
QYG_ORDER_PREFIX
+
jdOrderId
).
toString
());
String
jdOrderInfoRedisValue
=
(
String
)
redisUtils
.
get
(
QYG_ORDER_PREFIX
+
jdOrderId
);
JSONObject
orderInfo
=
new
JSONObject
();
if
(!
StringUtils
.
isEmpty
(
jdOrderInfoRedisValue
))
{
orderInfo
=
JSONObject
.
parseObject
(
jdOrderInfoRedisValue
);
}
JSONObject
response
=
new
JSONObject
();
JSONObject
response
=
new
JSONObject
();
response
.
put
(
"success"
,
true
);
response
.
put
(
"success"
,
true
);
response
.
put
(
"resultMessage"
,
""
);
response
.
put
(
"resultMessage"
,
""
);
...
@@ -147,10 +152,20 @@ public class OrderController {
...
@@ -147,10 +152,20 @@ public class OrderController {
result
.
put
(
"state"
,
1
);
result
.
put
(
"state"
,
1
);
result
.
put
(
"submitState"
,
1
);
result
.
put
(
"submitState"
,
1
);
result
.
put
(
"type"
,
1
);
result
.
put
(
"type"
,
1
);
result
.
put
(
"freight"
,
orderInfo
.
get
(
"freight"
));
if
(!
orderInfo
.
isEmpty
())
{
result
.
put
(
"orderPrice"
,
orderInfo
.
get
(
"orderPrice"
));
result
.
put
(
"freight"
,
orderInfo
.
get
(
"freight"
));
result
.
put
(
"orderNakedPrice"
,
orderInfo
.
get
(
"orderNakedPrice"
));
result
.
put
(
"orderPrice"
,
orderInfo
.
get
(
"orderPrice"
));
result
.
put
(
"orderTaxPrice"
,
orderInfo
.
get
(
"orderTaxPrice"
));
result
.
put
(
"orderNakedPrice"
,
orderInfo
.
get
(
"orderNakedPrice"
));
result
.
put
(
"orderTaxPrice"
,
orderInfo
.
get
(
"orderTaxPrice"
));
result
.
put
(
"sku"
,
orderInfo
.
get
(
"sku"
));
}
else
{
// 如果缓存里取不到值,就随便给个值
result
.
put
(
"freight"
,
0
);
result
.
put
(
"orderPrice"
,
10
);
result
.
put
(
"orderNakedPrice"
,
8
);
result
.
put
(
"orderTaxPrice"
,
2
);
result
.
put
(
"sku"
,
new
JSONObject
());
}
if
(
queryExts
!=
null
&&
queryExts
.
contains
(
"orderType"
))
{
if
(
queryExts
!=
null
&&
queryExts
.
contains
(
"orderType"
))
{
result
.
put
(
"orderType"
,
1
);
result
.
put
(
"orderType"
,
1
);
}
}
...
@@ -165,7 +180,6 @@ public class OrderController {
...
@@ -165,7 +180,6 @@ public class OrderController {
result
.
put
(
"jdOrderState"
,
16
);
result
.
put
(
"jdOrderState"
,
16
);
}
}
result
.
put
(
"paymentType"
,
4
);
result
.
put
(
"paymentType"
,
4
);
result
.
put
(
"sku"
,
orderInfo
.
get
(
"sku"
));
response
.
put
(
"result"
,
result
);
response
.
put
(
"result"
,
result
);
return
response
;
return
response
;
...
...
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