|
|
@@ -44,3 +44,13 @@ func (f FinWithdrawApplyDb) FinWithdrawApplyGetBySession(session *xorm.Session, |
|
|
|
|
|
|
|
return m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (f FinWithdrawApplyDb) FinWithdrawApplyAmountGetByParams(params map[string]interface{}) (float64, error) { |
|
|
|
var m model.FinWithdrawApply |
|
|
|
var query = fmt.Sprintf("%s =?", params["key"]) |
|
|
|
total, err := f.Db.Where(query, params["value"]).Sum(m, "amount") |
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
} |
|
|
|
return total, nil |
|
|
|
} |