Selaa lähdekoodia

接受下单消息

lyhzzz 2 vuotta sitten
vanhempi
commit
8a1baf8d51

+ 4 - 2
src/main/java/com/fdkankan/ucenter/httpClient/service/PayService.java

@@ -24,7 +24,8 @@ public class PayService {
         PayOrderParam param = new PayOrderParam(money,type);
         ResultData resultData = payClient.downOrder(param);
         if(resultData.getCode() == 200 ){
-            return (PayOrderVo ) resultData.getData();
+            String orderStr = JSONObject.toJSONString(resultData.getData());
+            return JSONObject.parseObject(orderStr,PayOrderVo.class);
         }
         return null;
     }
@@ -36,7 +37,8 @@ public class PayService {
     public PayOrderVo queryOrder(String orderSn){
         ResultData resultData = payClient.queryOrder(orderSn);
         if(resultData.getCode() == 200 ){
-            return (PayOrderVo ) resultData.getData();
+            String orderStr = JSONObject.toJSONString(resultData.getData());
+            return JSONObject.parseObject(orderStr,PayOrderVo.class);
         }
         return null;
     }