|
@@ -13,9 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
-import java.util.Arrays;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Objects;
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* HagOrderServiceImpl
|
|
* HagOrderServiceImpl
|
|
@@ -95,7 +93,7 @@ public class HagOrderServiceImpl implements HagOrderService {
|
|
private HagSkillResp fillSuccessResp(String orderId) {
|
|
private HagSkillResp fillSuccessResp(String orderId) {
|
|
HagSkillResp hagSkillResp = new HagSkillResp();
|
|
HagSkillResp hagSkillResp = new HagSkillResp();
|
|
hagSkillResp.setVersion("1.0.0");
|
|
hagSkillResp.setVersion("1.0.0");
|
|
- HagSkillResp.Reply<OrderSyncResult> reply = new HagSkillResp.Reply();
|
|
|
|
|
|
+ HagSkillResp.Reply<Map> reply = new HagSkillResp.Reply();
|
|
reply.setIsEndSession(Boolean.TRUE);
|
|
reply.setIsEndSession(Boolean.TRUE);
|
|
HagSkillResp.Reply.Command command = new HagSkillResp.Reply.Command();
|
|
HagSkillResp.Reply.Command command = new HagSkillResp.Reply.Command();
|
|
command.setNamespace("Charge");
|
|
command.setNamespace("Charge");
|
|
@@ -103,7 +101,9 @@ public class HagOrderServiceImpl implements HagOrderService {
|
|
OrderSyncResult orderSyncResult = new OrderSyncResult();
|
|
OrderSyncResult orderSyncResult = new OrderSyncResult();
|
|
orderSyncResult.setResultCode("SUCCESS");
|
|
orderSyncResult.setResultCode("SUCCESS");
|
|
orderSyncResult.setCpOrderId(orderId);
|
|
orderSyncResult.setCpOrderId(orderId);
|
|
- command.setBody(orderSyncResult);
|
|
|
|
|
|
+ Map<String,OrderSyncResult> syncResultMap = new HashMap<>();
|
|
|
|
+ syncResultMap.put("syncResult",orderSyncResult);
|
|
|
|
+ command.setBody(syncResultMap);
|
|
reply.setCommands(Arrays.asList(command));
|
|
reply.setCommands(Arrays.asList(command));
|
|
hagSkillResp.setReply(reply);
|
|
hagSkillResp.setReply(reply);
|
|
return hagSkillResp;
|
|
return hagSkillResp;
|
|
@@ -122,7 +122,9 @@ public class HagOrderServiceImpl implements HagOrderService {
|
|
OrderSyncResult orderSyncResult = new OrderSyncResult();
|
|
OrderSyncResult orderSyncResult = new OrderSyncResult();
|
|
orderSyncResult.setResultCode("FAIL");
|
|
orderSyncResult.setResultCode("FAIL");
|
|
orderSyncResult.setCpOrderId("");
|
|
orderSyncResult.setCpOrderId("");
|
|
- command.setBody(orderSyncResult);
|
|
|
|
|
|
+ Map<String,OrderSyncResult> syncResultMap = new HashMap<>();
|
|
|
|
+ syncResultMap.put("syncResult",orderSyncResult);
|
|
|
|
+ command.setBody(syncResultMap);
|
|
reply.setCommands(Arrays.asList(command));
|
|
reply.setCommands(Arrays.asList(command));
|
|
hagSkillResp.setReply(reply);
|
|
hagSkillResp.setReply(reply);
|
|
return hagSkillResp;
|
|
return hagSkillResp;
|