Authored by tanling

query trade 第三方

1 package com.yohoufo.order.service.impl; 1 package com.yohoufo.order.service.impl;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
  4 +import com.yohobuy.ufo.model.order.common.ButtonShow;
4 import com.yohobuy.ufo.model.order.common.OrderStatus; 5 import com.yohobuy.ufo.model.order.common.OrderStatus;
5 import com.yohobuy.ufo.model.order.common.TabType; 6 import com.yohobuy.ufo.model.order.common.TabType;
6 import com.yohobuy.ufo.model.order.resp.ExpressInfoDetail; 7 import com.yohobuy.ufo.model.order.resp.ExpressInfoDetail;
@@ -125,6 +126,10 @@ public class BuyerOrderDetailService extends AbsOrderDetailService implements IO @@ -125,6 +126,10 @@ public class BuyerOrderDetailService extends AbsOrderDetailService implements IO
125 Integer leftTime = getLeftTime(TabType.BUY, orderDetailInfo.getUid(), orderDetailInfo.getOrderCode(), 126 Integer leftTime = getLeftTime(TabType.BUY, orderDetailInfo.getUid(), orderDetailInfo.getOrderCode(),
126 orderDetailInfo.getStatusDetail().getStatus(), orderDetailInfo.getSecendLevelCreateTime()); 127 orderDetailInfo.getStatusDetail().getStatus(), orderDetailInfo.getSecendLevelCreateTime());
127 128
  129 + if (leftTime!=null && leftTime<=0){
  130 + orderDetailInfo.getButtons().removeIf(x -> x!=null && ButtonShow.NOW_BUY.getCode().equals(x.getCode()));
  131 + }
  132 +
128 orderDetailInfo.getStatusDetail().setLeftTime(leftTime); 133 orderDetailInfo.getStatusDetail().setLeftTime(leftTime);
129 } 134 }
130 135
@@ -83,6 +83,7 @@ public abstract class AlipayServiceAbstract extends AbstractPayService { @@ -83,6 +83,7 @@ public abstract class AlipayServiceAbstract extends AbstractPayService {
83 // 查询结果转换成 共通的对象 83 // 查询结果转换成 共通的对象
84 PayQueryBo payQueryBo = new PayQueryBo(); 84 PayQueryBo payQueryBo = new PayQueryBo();
85 85
  86 + if ("10000".equals(queryBo.getCode())){
86 payQueryBo.setOrderCode(queryBo.getOut_trade_no()); 87 payQueryBo.setOrderCode(queryBo.getOut_trade_no());
87 payQueryBo.setTradeNo(queryBo.getTrade_no()); 88 payQueryBo.setTradeNo(queryBo.getTrade_no());
88 89
@@ -95,6 +96,7 @@ public abstract class AlipayServiceAbstract extends AbstractPayService { @@ -95,6 +96,7 @@ public abstract class AlipayServiceAbstract extends AbstractPayService {
95 96
96 payQueryBo.setAmount(Double.parseDouble(queryBo.getTotal_amount())); 97 payQueryBo.setAmount(Double.parseDouble(queryBo.getTotal_amount()));
97 payQueryBo.setBuyerId(queryBo.getBuyer_user_id()); 98 payQueryBo.setBuyerId(queryBo.getBuyer_user_id());
  99 + }
98 100
99 return payQueryBo; 101 return payQueryBo;
100 } 102 }