|
|
@@ -15,7 +15,11 @@ import com.cyksj.service.order.VipOrderDonService;
|
|
|
import com.cyksj.service.paypal.PayPalService;
|
|
|
import com.cyksj.service.paypal.PaypalPayConfigService;
|
|
|
import com.cyksj.service.paypal.PaypalV2Service;
|
|
|
+import com.cyksj.service.user.UserBindRelationService;
|
|
|
import com.cyksj.web.util.StpUserUtil;
|
|
|
+import com.ejlchina.searcher.BeanSearcher;
|
|
|
+import com.ejlchina.searcher.param.Operator;
|
|
|
+import com.ejlchina.searcher.util.MapUtils;
|
|
|
import com.paypal.api.payments.Links;
|
|
|
import com.paypal.api.payments.Payment;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
@@ -26,6 +30,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Set;
|
|
|
|
|
|
@@ -53,6 +58,10 @@ public class VipUserOrderController {
|
|
|
|
|
|
private final HttpServletResponse response;
|
|
|
|
|
|
+ private final UserBindRelationService userBindRelationService;
|
|
|
+
|
|
|
+ private final BeanSearcher beanSearcher;
|
|
|
+
|
|
|
/**
|
|
|
* 会员预下单
|
|
|
*/
|
|
|
@@ -86,6 +95,21 @@ public class VipUserOrderController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(orderDon);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询订单状态
|
|
|
+ */
|
|
|
+ @GetMapping("/get/order/status/{orderId}")
|
|
|
+ public Result<VipOrderDon> getOrderStatus(@PathVariable Long orderId) {
|
|
|
+ long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
+ List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
|
|
|
+ VipOrderDon order = beanSearcher.searchFirst(VipOrderDon.class, MapUtils.builder()
|
|
|
+ .field(VipOrderDon::getId, orderId)
|
|
|
+ .field(VipOrderDon::getUserId, userIdList).op(Operator.InList)
|
|
|
+ .build());
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(order);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 支付宝支付
|