|
@@ -116,8 +116,8 @@ func (l *GetWxsLogic) GetWxs(req *types.WxReq) (resp *types.WxResp, err error) {
|
|
|
var predicatesHour []predicate.UsageStatisticHour
|
|
|
if organizationId != 0 {
|
|
|
predicatesHour = append(predicatesHour, usagestatistichour.OrganizationID(organizationId))
|
|
|
- predicatesHour = append(predicatesHour, usagestatistichour.BotIDIn(wxIds...))
|
|
|
}
|
|
|
+ predicatesHour = append(predicatesHour, usagestatistichour.BotIDIn(wxIds...))
|
|
|
predicatesHour = append(predicatesHour, usagestatistichour.Addtime(lastHourData.Addtime))
|
|
|
usageStatisticHour, err := l.svcCtx.DB.UsageStatisticHour.Query().Where(predicatesHour...).Page(l.ctx, req.Page, req.PageSize)
|
|
|
if err != nil {
|
|
@@ -150,8 +150,8 @@ func (l *GetWxsLogic) GetWxs(req *types.WxReq) (resp *types.WxResp, err error) {
|
|
|
var predicatesDay []predicate.UsageStatisticDay
|
|
|
if organizationId != 0 {
|
|
|
predicatesDay = append(predicatesDay, usagestatisticday.OrganizationID(organizationId))
|
|
|
- predicatesDay = append(predicatesDay, usagestatisticday.BotIDIn(wxIds...))
|
|
|
}
|
|
|
+ predicatesDay = append(predicatesDay, usagestatisticday.BotIDIn(wxIds...))
|
|
|
predicatesDay = append(predicatesDay, usagestatisticday.Addtime(endAddTime))
|
|
|
usageStatisticDay, err := l.svcCtx.DB.UsageStatisticDay.Query().
|
|
|
Where(predicatesDay...).Page(l.ctx, req.Page, req.PageSize)
|