This commit is contained in:
richboo111
2022-08-03 15:03:57 +08:00
parent 74c36d2691
commit 74212b0456

View File

@@ -1,6 +1,7 @@
package dao
import (
"git.rosy.net.cn/jx-callback/globals"
"time"
"git.rosy.net.cn/baseapi/utils"
@@ -149,24 +150,28 @@ type MixPayDetail struct {
}
//获取混合支付 余额部分信息
func GetMixPayDetail(orderID string) (details *MixPayDetail, err error) {
func GetMixPayDetail(orderID string) (details *model.MixPay, err error) {
//var info []*MixPayDetail
info := make([]*MixPayDetail, 0)
info := make([]*model.MixPay, 0)
var sqlParams []interface{}
sql := ""
if orderID != "" {
sql += "SELECT order_id,balance_price,total_price,wx_price,status FROM mix_pay WHERE order_id = ?"
sql += "SELECT * FROM mix_pay WHERE order_id = ?"
sqlParams = append(sqlParams, orderID)
}
err = GetRows(GetDB(), &info, sql, sqlParams)
if err == nil {
details = &MixPayDetail{
OrderID: info[0].OrderID,
BalancePrice: info[0].BalancePrice,
TotalPrice: info[0].TotalPrice,
WxPrice: info[0].WxPrice,
Status: info[0].Status,
}
if err != nil {
globals.SugarLogger.Debug("er===========", err)
return nil, err
}
return details, err
return info[0], err
//if err == nil {
// details = &MixPayDetail{
// OrderID: info[0].OrderID,
// BalancePrice: info[0].BalancePrice,
// TotalPrice: info[0].TotalPrice,
// WxPrice: info[0].WxPrice,
// Status: info[0].Status,
// }
//}
}