@@ -45,6 +45,27 @@ func (self *EventServiceImpl) GetEventInfo(payload *EventInfoPayload) (result *E
|
||||
return
|
||||
}
|
||||
|
||||
joinCount, err := new(data.Attendance).CountUsersByEventID(payload.Context, payload.Data.EventId)
|
||||
if err != nil {
|
||||
exception := new(exception.Builder).
|
||||
SetStatus(exception.StatusUser).
|
||||
SetService(exception.ServiceEvent).
|
||||
SetEndpoint(exception.EndpointEventServiceInfo).
|
||||
SetType(exception.TypeCommon).
|
||||
SetOriginal(exception.CommonErrorDatabase).
|
||||
SetError(err).
|
||||
Throw(payload.Context)
|
||||
|
||||
result = &EventInfoResult{
|
||||
Common: shared.CommonResult{
|
||||
HttpCode: 500,
|
||||
Exception: exception,
|
||||
},
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
checkinCount, err := new(data.Attendance).CountCheckedInUsersByEventID(payload.Context, payload.Data.EventId)
|
||||
if err != nil {
|
||||
exception := new(exception.Builder).
|
||||
@@ -85,6 +106,7 @@ func (self *EventServiceImpl) GetEventInfo(payload *EventInfoPayload) (result *E
|
||||
StartTime: event.StartTime,
|
||||
EndTime: event.EndTime,
|
||||
Thumbnail: event.Thumbnail,
|
||||
JoinCount: joinCount,
|
||||
CheckinCount: checkinCount,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user