aa
This commit is contained in:
@@ -453,7 +453,11 @@ func GetManageStatistics(db *DaoDB, cityCodes []int, jobTime time.Time, jobIDs [
|
|||||||
`
|
`
|
||||||
err = GetRow(db, &getManageStatisticsResult, sql, sqlParams)
|
err = GetRow(db, &getManageStatisticsResult, sql, sqlParams)
|
||||||
getManageStatisticsResult.Date = jobTime
|
getManageStatisticsResult.Date = jobTime
|
||||||
getManageStatisticsResult.InversionRate = 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
|
return getManageStatisticsResult, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user