Authored by LUOXC

refactor

... ... @@ -14,6 +14,7 @@ import com.yohoufo.order.service.impl.TransferService;
import com.yohoufo.order.service.pay.alipay.AlipayOuyinService;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
... ... @@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.util.List;
import java.util.stream.Collectors;
@Slf4j
@RestController
... ... @@ -81,19 +83,21 @@ public class OrderHelpController {
@RequestMapping(value = "/transferQueryAsOriginalResult")
public ApiResponse transferQuery(String buyerOrderCode) {
public ApiResponse transferQuery(@RequestBody List<String> orderCodes) {
val result = orderCodes.stream().map(alipayService::transferQueryAsOriginalResult).collect(Collectors.toList());
return new ApiResponse.ApiResponseBuilder()
.code(200)
.data(alipayService.transferQueryAsOriginalResult(buyerOrderCode))
.data(result)
.message("处理成功")
.build();
}
@RequestMapping(value = "/transferTtnStatusQuery")
public ApiResponse transferTtnStatusQuery(String buyerOrderCode) {
public ApiResponse transferTtnStatusQuery(@RequestBody List<String> orderCodes) {
val result = orderCodes.stream().map(alipayService::transferTtnStatusQuery).collect(Collectors.toList());
return new ApiResponse.ApiResponseBuilder()
.code(200)
.data(alipayService.transferTtnStatusQuery(buyerOrderCode))
.data(result)
.message("处理成功")
.build();
}
... ...