pay
This commit is contained in:
@@ -137,7 +137,9 @@ func UpdateUserBill(userId string, money int) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type MixPayDetail struct {
|
type MixPayDetail struct {
|
||||||
|
ID int `json:"id"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
|
UpdateAt time.Time `json:"update_at"`
|
||||||
LastOperator string `json:"lastOperator"`
|
LastOperator string `json:"lastOperator"`
|
||||||
OrderID string `json:"order_id"`
|
OrderID string `json:"order_id"`
|
||||||
BalancePrice int `json:"balance_price"`
|
BalancePrice int `json:"balance_price"`
|
||||||
@@ -147,25 +149,23 @@ type MixPayDetail struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//获取混合支付 余额部分信息
|
//获取混合支付 余额部分信息
|
||||||
func GetMixPayDetail(orderID string) (details *model.MixPay, err error) {
|
func GetMixPayDetail(orderID string) (details *MixPayDetail, err error) {
|
||||||
var info []*model.MixPay
|
var info []*MixPayDetail
|
||||||
sqlParams := []interface{}{}
|
sqlParams := []interface{}{}
|
||||||
sql := ""
|
sql := ""
|
||||||
if orderID != "" {
|
if orderID != "" {
|
||||||
sql += "SELECT order_id,balance_price,total_price,wx_price,status FROM mix_pay WHERE order_id = ?"
|
sql += "SELECT order_id,balance_price,total_price,wx_price,status FROM mix_pay WHERE order_id = ?"
|
||||||
sqlParams = append(sqlParams, orderID)
|
sqlParams = append(sqlParams, orderID)
|
||||||
}
|
}
|
||||||
err = GetRow(GetDB(), &info, sql, sqlParams)
|
if err = GetRow(GetDB(), &info, sql, sqlParams); err != nil {
|
||||||
if err != nil {
|
//return nil, err
|
||||||
return nil, err
|
details = &MixPayDetail{
|
||||||
//details = info{
|
OrderID: info[0].OrderID,
|
||||||
// OrderID: info[0].OrderID,
|
BalancePrice: info[0].BalancePrice,
|
||||||
// BalancePrice: info[0].BalancePrice,
|
TotalPrice: info[0].TotalPrice,
|
||||||
// TotalPrice: info[0].TotalPrice,
|
WxPrice: info[0].WxPrice,
|
||||||
// WxPrice: info[0].WxPrice,
|
Status: info[0].Status,
|
||||||
// Status: info[0].Status,
|
}
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
//globals.SugarLogger.Debug("输出mix pay信息", info.OrderID)
|
|
||||||
return info[0], err
|
return info[0], err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user