aa
This commit is contained in:
@@ -7,14 +7,20 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type FlowSum struct {
|
||||
Flow float64 `json:"flow" db:"flow"`
|
||||
IccID string `json:"icc_id" db:"icc_id"`
|
||||
FlowUnit string `json:"flow_unit" db:"flow_unit"`
|
||||
}
|
||||
|
||||
func GetSimFlowExpend(db *sqlx.DB, iccid string, createdAtBegin, createdAtEnd time.Time) (simFlowExpnd []*model.SimFlowExpend, err error) {
|
||||
|
||||
return simFlowExpnd, err
|
||||
}
|
||||
|
||||
func GetSimFlowExpendSum(db *sqlx.DB, iccid string, createdAtBegin, createdAtEnd time.Time) (simFlowExpnd *model.SimFlowExpend, err error) {
|
||||
func GetSimFlowExpendSum(db *sqlx.DB, iccid string, createdAtBegin, createdAtEnd time.Time) (simFlowExpnd *FlowSum, err error) {
|
||||
var (
|
||||
simFlowExpnds []*model.SimFlowExpend
|
||||
simFlowExpnds []*FlowSum
|
||||
)
|
||||
sql := `
|
||||
SELECT SUM(
|
||||
@@ -47,9 +53,9 @@ func GetSimFlowExpendSum(db *sqlx.DB, iccid string, createdAtBegin, createdAtEnd
|
||||
return simFlowExpnd, err
|
||||
}
|
||||
|
||||
func GetSimFlowIncomeSum(db *sqlx.DB, iccid string, createdAtBegin, createdAtEnd time.Time) (simFlowIncome *model.SimFlowIncome, err error) {
|
||||
func GetSimFlowIncomeSum(db *sqlx.DB, iccid string, createdAtBegin, createdAtEnd time.Time) (simFlowIncome *FlowSum, err error) {
|
||||
var (
|
||||
simFlowIncomes []*model.SimFlowIncome
|
||||
simFlowIncomes []*FlowSum
|
||||
)
|
||||
sql := `
|
||||
SELECT SUM(
|
||||
|
||||
Reference in New Issue
Block a user