ManualHandlerApi.java
1.04 KB
package com.diligrp.cashier.mall.api;
import com.diligrp.cashier.shared.domain.Message;
import com.diligrp.cashier.shared.spi.IPaymentEventListener;
import com.diligrp.cashier.shared.spi.domain.PaymentResultBO;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @ClassName ManualHandlerApi.java
* @author dengwei
* @version 1.0.0
* @Description ManualHandlerApi
* @date 2026-01-06 14:00
*/
@RestController
@RequestMapping(path = "/mall/manual")
@Validated
public class ManualHandlerApi {
@Resource
private IPaymentEventListener paymentEventListener;
@PostMapping("/payment/event")
public Message<?> handlePaymentEvent(@RequestBody PaymentResultBO payment) {
paymentEventListener.onEvent(payment);
return Message.success();
}
}