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

Commit c477238e authored by zhoujianping's avatar zhoujianping

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

parent fe3b4bc5
......@@ -276,7 +276,7 @@ public class KylinOrderTicketsRefundServiceImpl {
if (orderTicketVo.getGetTicketType().equals("electronic")){
try {
MultiValueMap<String, String> params = new LinkedMultiValueMap();
params.add("orderRefundBatchesId", orderRefundId);
params.add("orderRefundsId", orderRefundId);
MultiValueMap<String, String> headers = new LinkedMultiValueMap();
headers.add("Accept", "application/json;charset=UTF-8");
log.info("触发自动退款参数" + JsonUtils.toJson(params));
......
......@@ -6,10 +6,14 @@ import com.liquidnet.service.kylin.dto.param.RefundCallbackParam;
import com.liquidnet.service.kylin.dto.param.RefundSearchParam;
import com.liquidnet.service.platform.service.refund.OrderRefundsCallbackServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotBlank;
/**
* <p>
* 退款回掉
......@@ -35,8 +39,11 @@ public class OrderRefundCallbackController {
@PostMapping("automaticRefund")
@ApiOperation("用户自动退款")
public void automaticRefund(@RequestBody RefundApplyParam param) {
orderRefundsCallbackServiceImpl.automaticRefund(param);
@ApiImplicitParams({
@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")
......
......@@ -141,10 +141,10 @@ public class OrderRefundsCallbackServiceImpl extends ServiceImpl<KylinOrderRefun
return "success";
}
public void automaticRefund(RefundApplyParam param) {
public ResponseDto<String> automaticRefund(String orderRefundsId) {
KylinOrderRefunds refund = kylinOrderRefundsMapper.selectOne(
Wrappers.lambdaQuery(KylinOrderRefunds.class)
.eq(KylinOrderRefunds::getOrderRefundsId, param.getOrderRefundBatchesId())
.eq(KylinOrderRefunds::getOrderRefundsId, orderRefundsId)
);
KylinOrderTickets oderInfo = kylinOrderTicketsMapper.selectOne(
new QueryWrapper<KylinOrderTickets>()
......@@ -188,10 +188,12 @@ public class OrderRefundsCallbackServiceImpl extends ServiceImpl<KylinOrderRefun
Query.query(Criteria.where("orderRefundsId").is(refund.getOrderRefundsId())).getQueryObject(),
objectFail
);
ResponseDto.failure("fail");
}
}catch (Exception e){
log.info("自动退款请求pay失败e" + e.getMessage());
}
return ResponseDto.success("success");
}
@Override
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