def enter_list(request, data): pageno = data.get('pageno', 1) params = { 'pageno': pageno, 'count': data.get('count', 100), 'activity_id': data.get('activity_id'), } total, data_list = activity_manager.list_enter_with_pagination(**params) return defs.response_list(Resp.RESP_OK, lists=data_list, extra=data, total=total, pageno=pageno)
def channel_list(request, data): pageno = data.get('pageno', 1) count = data.get('count', 100) params = {'pageno': pageno, 'count': count} total, data_list = activity_channel_manager.list_with_pagination(**params) return defs.response_list(Resp.RESP_OK, lists=data_list, extra=data, total=total, pageno=pageno)
def get_list(request, data): pageno = data.get('pageno', 1) count = data.get('count', 100) min_datetime = data.get('min_datetime', int(time.time())) params = { 'pageno': pageno, 'count': count, 'end_time__gte': min_datetime, } channel = data.get('channel') if channel: params['channel'] = channel max_datetime = data.get('max_datetime') if max_datetime: params['begin_time__lte'] = max_datetime total, data_list = activity_manager.list_activity_with_pagination(**params) return defs.response_list(Resp.RESP_OK, lists=data_list, extra=data, total=total, pageno=pageno)