diff --git a/app/services/OrderService.go b/app/services/OrderService.go index db4b600..17b7bff 100644 --- a/app/services/OrderService.go +++ b/app/services/OrderService.go @@ -174,11 +174,11 @@ func OrderRefundService(userId int, orderId int) (code int) { if response.RefundOrderSta != "03" { return errorcode.OrderRefundFail } else { - order.State = common.ORDER_STATUS_ReFUNDING + order.State = common.ORDER_STATUS_ReFUNDEND order.RefundOrderNo = response.RefundOrderNo order.RefundOrderSta = response.RefundOrderSta order.RefundTime = time.Now() - _, err := ordersmodel.GetInstance().GetDb().Update(order) + _, err := ordersmodel.GetInstance().GetDb().Where("id = ?", order.Id).Update(order) if err != nil { return errorcode.OrderRefundUpdateFail }