新增撞车订单人工退款
This commit is contained in:
@@ -147,6 +147,24 @@ func (h *Handler) QueryMohong(c *gin.Context) {
|
||||
response.OK(c, item)
|
||||
}
|
||||
|
||||
func (h *Handler) AdminRefundMohong(c *gin.Context) {
|
||||
orderID, ok := parseID(c)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
var req StartMohongRefundRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil && !errors.Is(err, io.EOF) {
|
||||
response.BadRequest(c, "请求参数不正确")
|
||||
return
|
||||
}
|
||||
item, err := h.service.StartMohongRefund(c.Request.Context(), orderID, req.AmountCent, req.Remark)
|
||||
if err != nil {
|
||||
writePaymentError(c, err)
|
||||
return
|
||||
}
|
||||
response.OK(c, item)
|
||||
}
|
||||
|
||||
func (h *Handler) QueryRefundStatus(c *gin.Context) {
|
||||
orderID, ok := parseID(c)
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user