Merge branch '0.2' of https://git.archgrid.xyz/free-lancers/electricity_bill_calc_service into 0.2
This commit is contained in:
commit
a543b33276
|
@ -396,7 +396,7 @@ func reportComprehensiveSearch(c *fiber.Ctx) error {
|
||||||
reportLog.Error("无法获取当前用户的会话信息", zap.Error(err))
|
reportLog.Error("无法获取当前用户的会话信息", zap.Error(err))
|
||||||
return result.Unauthorized("无法获取当前用户的会话信息。")
|
return result.Unauthorized("无法获取当前用户的会话信息。")
|
||||||
}
|
}
|
||||||
park := tools.EmptyToNil(c.Query("park_id"))
|
park := tools.EmptyToNil(c.Query("park"))
|
||||||
if session.Type == model.USER_TYPE_ENT && park != nil && len(*park) > 0 {
|
if session.Type == model.USER_TYPE_ENT && park != nil && len(*park) > 0 {
|
||||||
if pass, err := checkParkBelongs(*park, reportLog, c, &result); !pass {
|
if pass, err := checkParkBelongs(*park, reportLog, c, &result); !pass {
|
||||||
return err
|
return err
|
||||||
|
@ -420,7 +420,6 @@ func reportComprehensiveSearch(c *fiber.Ctx) error {
|
||||||
reportLog.Error("无法解析核算报表查询的结束日期", zap.Error(err))
|
reportLog.Error("无法解析核算报表查询的结束日期", zap.Error(err))
|
||||||
return result.BadRequest("无法解析核算报表查询的结束日期。")
|
return result.BadRequest("无法解析核算报表查询的结束日期。")
|
||||||
}
|
}
|
||||||
|
|
||||||
reports, total, err := service.ReportService.QueryReports(requestUser, park, uint(page), keyword, startDate, endDate)
|
reports, total, err := service.ReportService.QueryReports(requestUser, park, uint(page), keyword, startDate, endDate)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
reportLog.Error("无法查询核算报表", zap.Error(err))
|
reportLog.Error("无法查询核算报表", zap.Error(err))
|
||||||
|
|
|
@ -630,7 +630,7 @@ func (rr _ReportRepository) ComprehensiveReportSearch(uid, pid *string, page uin
|
||||||
countQuery = countQuery.Where(goqu.I("ud.id").Eq(*uid))
|
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))
|
reportQuery = reportQuery.Where(goqu.I("p.id").Eq(*pid))
|
||||||
countQuery = countQuery.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))
|
rr.log.Error("对指定核算报表进行综合检索总数量时出现错误", zap.Error(err))
|
||||||
return reports, 0, err
|
return reports, 0, err
|
||||||
}
|
}
|
||||||
log.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>", querySql, "1111111111111111111111", countSql, "????????????", count)
|
|
||||||
|
|
||||||
return reports, count, nil
|
return reports, count, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,9 @@ Server:
|
||||||
ReadTimeout: 60
|
ReadTimeout: 60
|
||||||
WriteTimeout: 60
|
WriteTimeout: 60
|
||||||
Redis:
|
Redis:
|
||||||
Host: 127.0.0.1
|
Host: 192.168.88.129
|
||||||
Port: 6379
|
Port: 6379
|
||||||
Password:
|
Password: 123456
|
||||||
DB: 1
|
DB: 1
|
||||||
Service:
|
Service:
|
||||||
MaxSessionLife: 2h
|
MaxSessionLife: 2h
|
||||||
|
|
Loading…
Reference in New Issue
Block a user