记得上下班打卡 | git大法好,push需谨慎

Commit c477238e authored by zhoujianping's avatar zhoujianping

1.用户申请退款,自动触发退票

parent fe3b4bc5
...@@ -276,7 +276,7 @@ public class KylinOrderTicketsRefundServiceImpl { ...@@ -276,7 +276,7 @@ public class KylinOrderTicketsRefundServiceImpl {
if (orderTicketVo.getGetTicketType().equals("electronic")){ if (orderTicketVo.getGetTicketType().equals("electronic")){
try { try {
MultiValueMap<String, String> params = new LinkedMultiValueMap(); MultiValueMap<String, String> params = new LinkedMultiValueMap();
params.add("orderRefundBatchesId", orderRefundId); params.add("orderRefundsId", orderRefundId);
MultiValueMap<String, String> headers = new LinkedMultiValueMap(); MultiValueMap<String, String> headers = new LinkedMultiValueMap();
headers.add("Accept", "application/json;charset=UTF-8"); headers.add("Accept", "application/json;charset=UTF-8");
log.info("触发自动退款参数" + JsonUtils.toJson(params)); log.info("触发自动退款参数" + JsonUtils.toJson(params));
......
...@@ -6,10 +6,14 @@ import com.liquidnet.service.kylin.dto.param.RefundCallbackParam; ...@@ -6,10 +6,14 @@ import com.liquidnet.service.kylin.dto.param.RefundCallbackParam;
import com.liquidnet.service.kylin.dto.param.RefundSearchParam; import com.liquidnet.service.kylin.dto.param.RefundSearchParam;
import com.liquidnet.service.platform.service.refund.OrderRefundsCallbackServiceImpl; import com.liquidnet.service.platform.service.refund.OrderRefundsCallbackServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotBlank;
/** /**
* <p> * <p>
* 退款回掉 * 退款回掉
...@@ -35,8 +39,11 @@ public class OrderRefundCallbackController { ...@@ -35,8 +39,11 @@ public class OrderRefundCallbackController {
@PostMapping("automaticRefund") @PostMapping("automaticRefund")
@ApiOperation("用户自动退款") @ApiOperation("用户自动退款")
public void automaticRefund(@RequestBody RefundApplyParam param) { @ApiImplicitParams({
orderRefundsCallbackServiceImpl.automaticRefund(param); @ApiImplicitParam(type = "from", required = true, dataType = "String", name = "orderRefundsId", value = "orderRefundsId", example = "0")
})
public ResponseDto<String> automaticRefund(@RequestParam("orderRefundsId") @NotBlank(message = "退款id不能为空") String orderRefundsId) {
return orderRefundsCallbackServiceImpl.automaticRefund(orderRefundsId);
} }
@GetMapping("alipayActiveCallback") @GetMapping("alipayActiveCallback")
......
...@@ -141,10 +141,10 @@ public class OrderRefundsCallbackServiceImpl extends ServiceImpl<KylinOrderRefun ...@@ -141,10 +141,10 @@ public class OrderRefundsCallbackServiceImpl extends ServiceImpl<KylinOrderRefun
return "success"; return "success";
} }
public void automaticRefund(RefundApplyParam param) { public ResponseDto<String> automaticRefund(String orderRefundsId) {
KylinOrderRefunds refund = kylinOrderRefundsMapper.selectOne( KylinOrderRefunds refund = kylinOrderRefundsMapper.selectOne(
Wrappers.lambdaQuery(KylinOrderRefunds.class) Wrappers.lambdaQuery(KylinOrderRefunds.class)
.eq(KylinOrderRefunds::getOrderRefundsId, param.getOrderRefundBatchesId()) .eq(KylinOrderRefunds::getOrderRefundsId, orderRefundsId)
); );
KylinOrderTickets oderInfo = kylinOrderTicketsMapper.selectOne( KylinOrderTickets oderInfo = kylinOrderTicketsMapper.selectOne(
new QueryWrapper<KylinOrderTickets>() new QueryWrapper<KylinOrderTickets>()
...@@ -188,10 +188,12 @@ public class OrderRefundsCallbackServiceImpl extends ServiceImpl<KylinOrderRefun ...@@ -188,10 +188,12 @@ public class OrderRefundsCallbackServiceImpl extends ServiceImpl<KylinOrderRefun
Query.query(Criteria.where("orderRefundsId").is(refund.getOrderRefundsId())).getQueryObject(), Query.query(Criteria.where("orderRefundsId").is(refund.getOrderRefundsId())).getQueryObject(),
objectFail objectFail
); );
ResponseDto.failure("fail");
} }
}catch (Exception e){ }catch (Exception e){
log.info("自动退款请求pay失败e" + e.getMessage()); log.info("自动退款请求pay失败e" + e.getMessage());
} }
return ResponseDto.success("success");
} }
@Override @Override
public String getOrderRefundCode(String orderRefundCode, int type) { public String getOrderRefundCode(String orderRefundCode, int type) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment