Showing
1 changed file
with
8 additions
and
4 deletions
@@ -14,6 +14,7 @@ import com.yohoufo.order.service.impl.TransferService; | @@ -14,6 +14,7 @@ import com.yohoufo.order.service.impl.TransferService; | ||
14 | import com.yohoufo.order.service.pay.alipay.AlipayOuyinService; | 14 | import com.yohoufo.order.service.pay.alipay.AlipayOuyinService; |
15 | import lombok.Data; | 15 | import lombok.Data; |
16 | import lombok.extern.slf4j.Slf4j; | 16 | import lombok.extern.slf4j.Slf4j; |
17 | +import lombok.val; | ||
17 | import org.springframework.beans.factory.annotation.Autowired; | 18 | import org.springframework.beans.factory.annotation.Autowired; |
18 | import org.springframework.web.bind.annotation.RequestBody; | 19 | import org.springframework.web.bind.annotation.RequestBody; |
19 | import org.springframework.web.bind.annotation.RequestMapping; | 20 | import org.springframework.web.bind.annotation.RequestMapping; |
@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController; | @@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController; | ||
21 | 22 | ||
22 | import java.math.BigDecimal; | 23 | import java.math.BigDecimal; |
23 | import java.util.List; | 24 | import java.util.List; |
25 | +import java.util.stream.Collectors; | ||
24 | 26 | ||
25 | @Slf4j | 27 | @Slf4j |
26 | @RestController | 28 | @RestController |
@@ -81,19 +83,21 @@ public class OrderHelpController { | @@ -81,19 +83,21 @@ public class OrderHelpController { | ||
81 | 83 | ||
82 | 84 | ||
83 | @RequestMapping(value = "/transferQueryAsOriginalResult") | 85 | @RequestMapping(value = "/transferQueryAsOriginalResult") |
84 | - public ApiResponse transferQuery(String buyerOrderCode) { | 86 | + public ApiResponse transferQuery(@RequestBody List<String> orderCodes) { |
87 | + val result = orderCodes.stream().map(alipayService::transferQueryAsOriginalResult).collect(Collectors.toList()); | ||
85 | return new ApiResponse.ApiResponseBuilder() | 88 | return new ApiResponse.ApiResponseBuilder() |
86 | .code(200) | 89 | .code(200) |
87 | - .data(alipayService.transferQueryAsOriginalResult(buyerOrderCode)) | 90 | + .data(result) |
88 | .message("处理成功") | 91 | .message("处理成功") |
89 | .build(); | 92 | .build(); |
90 | } | 93 | } |
91 | 94 | ||
92 | @RequestMapping(value = "/transferTtnStatusQuery") | 95 | @RequestMapping(value = "/transferTtnStatusQuery") |
93 | - public ApiResponse transferTtnStatusQuery(String buyerOrderCode) { | 96 | + public ApiResponse transferTtnStatusQuery(@RequestBody List<String> orderCodes) { |
97 | + val result = orderCodes.stream().map(alipayService::transferTtnStatusQuery).collect(Collectors.toList()); | ||
94 | return new ApiResponse.ApiResponseBuilder() | 98 | return new ApiResponse.ApiResponseBuilder() |
95 | .code(200) | 99 | .code(200) |
96 | - .data(alipayService.transferTtnStatusQuery(buyerOrderCode)) | 100 | + .data(result) |
97 | .message("处理成功") | 101 | .message("处理成功") |
98 | .build(); | 102 | .build(); |
99 | } | 103 | } |
-
Please register or login to post a comment