add pay
This commit is contained in:
@@ -135,3 +135,27 @@ func UpdateUserBill(userId string, money int) error {
|
||||
_, err := ExecuteSQL(GetDB(), `UPDATE user_bill SET account_balance = ? WHERE user_id = ? `, []interface{}{money, userId}...)
|
||||
return err
|
||||
}
|
||||
|
||||
type MixPayDetail struct {
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
LastOperator string `json:"lastOperator"`
|
||||
OrderID string `json:"order_id"`
|
||||
BalancePrice int `json:"balance_price"`
|
||||
TotalPrice int `json:"total_price"`
|
||||
WxPrice int `json:"wx_price"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
//获取混合支付 余额部分信息
|
||||
func GetMixPayDetail(orderID string) (mixPayDetail []*MixPayDetail, err error) {
|
||||
sql := `SELECT * FROM mix_pay WHERE deleted_at = ? `
|
||||
sqlParams := []interface{}{
|
||||
utils.DefaultTimeValue,
|
||||
}
|
||||
if orderID != "" {
|
||||
sql += "AND order_id = ?"
|
||||
sqlParams = append(sqlParams, orderID)
|
||||
}
|
||||
err = GetRow(GetDB(), &mixPayDetail, sql, sqlParams)
|
||||
return mixPayDetail, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user