|
|
@@ -1,7 +1,9 @@
|
|
|
package com.poteviohealth.ym.ipos.controller.feign;
|
|
|
|
|
|
|
|
|
+import com.google.common.collect.Lists;
|
|
|
import com.poteviohealth.cgp.common.controller.BaseFeignController;
|
|
|
+import com.poteviohealth.cgp.common.integrated.ipos.model.RefundQuery;
|
|
|
import com.poteviohealth.cgp.common.integrated.order.model.PayBefor;
|
|
|
import com.poteviohealth.cgp.common.integrated.order.model.PayInfoAppOutDTO;
|
|
|
import com.poteviohealth.cgp.common.integrated.order.model.RefundReceive;
|
|
|
@@ -11,6 +13,7 @@ import com.poteviohealth.cgp.common.utils.DateUtils;
|
|
|
import com.poteviohealth.ym.ipos.model.payment.PaymentRecords;
|
|
|
import com.poteviohealth.ym.ipos.service.IPaymentRecordsService;
|
|
|
import com.poteviohealth.ym.ipos.service.IPaymentService;
|
|
|
+import com.poteviohealth.ym.ipos.utils.YmUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
@@ -22,6 +25,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 第三方支付
|
|
|
@@ -60,4 +64,20 @@ public class IposFeignController extends BaseFeignController {
|
|
|
public VaultsResponse barcodeReverse(@RequestBody RefundReceive refundReceive){
|
|
|
return paymentService.barcodeReverse(refundReceive);
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "退款信息查询")
|
|
|
+ @RequestMapping(value = "/refundQuery", method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public VaultsResponse<List<String>> refundQuery(@RequestBody List<RefundQuery> list){
|
|
|
+ List<String> returnList = Lists.newArrayList();
|
|
|
+ for (RefundQuery refundQuery : list) {
|
|
|
+ VaultsResponse vaultsResponse = paymentService.barcodeRefundQuery(refundQuery.getTransactionId(),refundQuery.getOperatorId().toString());
|
|
|
+ if(vaultsResponse.validate()){
|
|
|
+ if(YmUtil.SUCCESS.equals(vaultsResponse.getData().toString())){
|
|
|
+ returnList.add(refundQuery.getSn());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return VaultsResponse.success(returnList);
|
|
|
+ }
|
|
|
}
|