diff --git a/business/model/dao/dao_bill.go b/business/model/dao/dao_bill.go index 3857b23d0..50078be6e 100644 --- a/business/model/dao/dao_bill.go +++ b/business/model/dao/dao_bill.go @@ -155,15 +155,17 @@ func GetMixPayDetail(orderID string) (details *model.MixPay, err error) { sql += "SELECT order_id,balance_price,total_price,wx_price,status FROM mix_pay WHERE order_id = ?" sqlParams = append(sqlParams, orderID) } - if err = GetRow(GetDB(), &info, sql, sqlParams); err == nil { - details = &model.MixPay{ - OrderID: info[0].OrderID, - BalancePrice: info[0].BalancePrice, - TotalPrice: info[0].TotalPrice, - WxPrice: info[0].WxPrice, - Status: info[0].Status, - } + err = GetRow(GetDB(), &info, sql, sqlParams) + if err != nil { + return nil, err + //details = info{ + // OrderID: info[0].OrderID, + // BalancePrice: info[0].BalancePrice, + // TotalPrice: info[0].TotalPrice, + // WxPrice: info[0].WxPrice, + // Status: info[0].Status, + //} } //globals.SugarLogger.Debug("输出mix pay信息", info.OrderID) - return details, err + return info[0], err }