|
@@ -3,11 +3,9 @@ package com.fire.getorder.service.impl;
|
|
|
|
|
|
|
|
|
import com.alibaba.nacos.api.utils.StringUtils;
|
|
|
-import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.fire.dto.FlowAppInfo;
|
|
|
import com.fire.dto.FlowOrderInfo;
|
|
|
-import com.fire.es.OrderEsDto;
|
|
|
import com.fire.getorder.data.DataPool;
|
|
|
import com.fire.getorder.request.GetOrderContent;
|
|
|
import com.fire.getorder.request.GetOrderMsgBody;
|
|
@@ -49,6 +47,7 @@ public class GetOrderServiceImpl implements GetOrderService {
|
|
|
@Resource
|
|
|
private JedisCluster jedisCluster;
|
|
|
|
|
|
+
|
|
|
public String timeSwap(Date time,String format) {
|
|
|
//"yyyy-MM-dd hh:mm:ss"
|
|
|
DateFormat df = new SimpleDateFormat(format);
|
|
@@ -162,7 +161,7 @@ public class GetOrderServiceImpl implements GetOrderService {
|
|
|
//CP订单号
|
|
|
String extensionId = content.getExtensionId();
|
|
|
//sign校验
|
|
|
- String signStr = header.getSecretKey() + orderId + extensionId;
|
|
|
+ String signStr = flowAppInfo.getAppKey() + orderId + extensionId;
|
|
|
String sign = DigestUtils.md5DigestAsHex(signStr.getBytes(StandardCharsets.UTF_8));
|
|
|
//sign校验
|
|
|
if (!sign.equals(content.getSign())) {
|
|
@@ -171,7 +170,7 @@ public class GetOrderServiceImpl implements GetOrderService {
|
|
|
return responseDto;
|
|
|
}
|
|
|
|
|
|
- if (StringUtils.isEmpty(orderId) && StringUtils.isEmpty(extensionId)) {
|
|
|
+ if (StringUtils.isBlank(orderId) && StringUtils.isBlank(extensionId)) {
|
|
|
orderResp.setRCode(ORDER_NOT_EXISTS.status());
|
|
|
orderResp.setRMsg(ORDER_NOT_EXISTS.message());
|
|
|
return responseDto;
|
|
@@ -185,6 +184,11 @@ public class GetOrderServiceImpl implements GetOrderService {
|
|
|
String redisIndex = "{down.order." + num + "}";
|
|
|
//redis查询orderId
|
|
|
String resOrderId = jedisCluster.hget(redisIndex, redisIndex + searchString);
|
|
|
+ if (resOrderId==null){
|
|
|
+ orderResp.setRCode(ORDER_NOT_EXISTS.status());
|
|
|
+ orderResp.setRMsg(ORDER_NOT_EXISTS.message());
|
|
|
+ return responseDto;
|
|
|
+ }
|
|
|
if (!StringUtils.isBlank(orderId)) {
|
|
|
if (!resOrderId.equals(orderId)) {
|
|
|
orderResp.setRCode(ORDER_NOT_EXISTS.status());
|