a
This commit is contained in:
@@ -158,3 +158,24 @@ func GetPayStatistics(ctx *jxcontext.Context, userID string, pop int, cityCodes
|
||||
)
|
||||
return dao.GetPayStatistics(db, userID, pop, cityCodes, mobile, utils.Str2Time(fromTime), utils.Str2Time(toTime), consumeTypes)
|
||||
}
|
||||
|
||||
func GetManageStatisticsImg(ctx *jxcontext.Context, cityCodes []int, fromTime, toTime string, jobIDs []int) (getManageStatistics []*dao.GetManageStatisticsResult, err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
fromTimeT = utils.Str2Time(fromTime)
|
||||
toTimeT = utils.Str2Time(toTime)
|
||||
)
|
||||
for i := 1; i < utils.Float64TwoInt(toTimeT.Sub(fromTimeT).Hours()/24); i++ {
|
||||
if getManageStatisticsResult, err := dao.GetManageStatistics(db, cityCodes, fromTimeT.AddDate(0, 0, i), jobIDs); err == nil {
|
||||
getManageStatistics = append(getManageStatistics, getManageStatisticsResult)
|
||||
}
|
||||
}
|
||||
return getManageStatistics, err
|
||||
}
|
||||
|
||||
func GetManageStatisticsJob(ctx *jxcontext.Context, cityCodes []int, fromTime, toTime string, jobIDs []int, offset, pageSize int) (paged *model.PagedInfo, err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
return dao.GetManageStatisticsJob(db, cityCodes, utils.Str2Time(fromTime), utils.Str2Time(toTime), jobIDs, offset, pageSize)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user