diff --git a/business/model/dao/dao_order.go b/business/model/dao/dao_order.go index a7ab7e920..f45b62125 100644 --- a/business/model/dao/dao_order.go +++ b/business/model/dao/dao_order.go @@ -453,7 +453,11 @@ func GetManageStatistics(db *DaoDB, cityCodes []int, jobTime time.Time, jobIDs [ ` err = GetRow(db, &getManageStatisticsResult, sql, sqlParams) 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 }