aa
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
@@ -451,14 +450,18 @@ func GetManageStatistics(db *DaoDB, cityCodes []int, jobTime time.Time, jobIDs [
|
||||
WHERE a.id = t5.id
|
||||
)t6
|
||||
`
|
||||
err = GetRow(db, &getManageStatisticsResult, sql, sqlParams)
|
||||
GetRow(db, &getManageStatisticsResult, sql, sqlParams)
|
||||
if getManageStatisticsResult == nil {
|
||||
return &GetManageStatisticsResult{
|
||||
Date: jobTime,
|
||||
}, err
|
||||
} else {
|
||||
getManageStatisticsResult.Date = jobTime
|
||||
getManageStatisticsResult.InversionRate = math.Round(float64(getManageStatisticsResult.FinishCount) / float64(getManageStatisticsResult.BrowseCount))
|
||||
if getManageStatisticsResult.BrowseCount == 0 {
|
||||
getManageStatisticsResult.InversionRate = 0
|
||||
} else {
|
||||
getManageStatisticsResult.InversionRate = float64(getManageStatisticsResult.FinishCount) / float64(getManageStatisticsResult.BrowseCount)
|
||||
}
|
||||
return getManageStatisticsResult, err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user