forked from free-lancers/electricity_bill_calc_service
fix(#13):修复历史电费核算时未选择园区时显示园区中的数据,选中某一园区时显示不同园区的数据
This commit is contained in:
@@ -630,7 +630,7 @@ func (rr _ReportRepository) ComprehensiveReportSearch(uid, pid *string, page uin
|
||||
countQuery = countQuery.Where(goqu.I("ud.id").Eq(*uid))
|
||||
}
|
||||
|
||||
if pid != nil && len(*pid) > 0 {
|
||||
if pid != nil && *pid != "" {
|
||||
reportQuery = reportQuery.Where(goqu.I("p.id").Eq(*pid))
|
||||
countQuery = countQuery.Where(goqu.I("p.id").Eq(*pid))
|
||||
}
|
||||
@@ -681,8 +681,6 @@ func (rr _ReportRepository) ComprehensiveReportSearch(uid, pid *string, page uin
|
||||
rr.log.Error("对指定核算报表进行综合检索总数量时出现错误", zap.Error(err))
|
||||
return reports, 0, err
|
||||
}
|
||||
log.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>", querySql, "1111111111111111111111", countSql, "????????????", count)
|
||||
|
||||
return reports, count, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user