a
This commit is contained in:
@@ -22,6 +22,7 @@ type GetSelfInfoResult struct {
|
||||
model.User
|
||||
model.UserBill
|
||||
WaitCashPrice int `json:"waitCashPrice"`
|
||||
WaitRealCashPrice int `json:"waitRealCashPrice"`
|
||||
UserMembers []*model.UserMember `json:"userMembers"`
|
||||
PopedUserName string `json:"popedUserName"`
|
||||
UnReadMessageCount int `json:"unReadMessageCount"`
|
||||
@@ -272,3 +273,17 @@ func GetUserAllWaitCashPrice(db *DaoDB, userID string) (price int, err error) {
|
||||
err = GetRow(db, &result, sql, sqlParams)
|
||||
return result.Price, err
|
||||
}
|
||||
|
||||
func GetUserAllWaitRealCashPrice(db *DaoDB, userID string) (price int, err error) {
|
||||
var result = &GetUserAllWaitCashPriceResult{}
|
||||
sql := `
|
||||
SELECT SUM(pay_price) price FROM order WHERE user_id = ? AND status = ? AND type = ?
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
userID,
|
||||
model.OrderStatusWait4Pay,
|
||||
model.OrderTypeCash,
|
||||
}
|
||||
err = GetRow(db, &result, sql, sqlParams)
|
||||
return result.Price, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user