Beispiel #1
0
 public AggregationQueryHandler(IAggregator <T> aggregator, IEventQueryHandler inner, QuerySession session = null, T state = null)
 {
     _aggregator = aggregator;
     _inner      = inner;
     _session    = session;
     _state      = state;
 }
Beispiel #2
0
 public BatchedQuery(IManagedConnection runner, IDocumentSchema schema, IIdentityMap identityMap,
                     QuerySession parent, ISerializer serializer)
 {
     _runner      = runner;
     _schema      = schema;
     _identityMap = identityMap;
     _parent      = parent;
     _serializer  = serializer;
 }
Beispiel #3
0
        public List <MenuResult> GetMenus()
        {
            var sql = CreateSqlBuilder(new StringBuilder(@"
                        select distinct sm.id,
                        menu_name name,
                        sm.parent_id parentid,
                        sm.menu_view menuview,
                        sm.menu_type menutype,
                        sm.state state,
                        sm.view_params viewparams,
                        sm.operation_type operationtype,
                        sm.handler,
                        sm.icon,
                        sm.sort,
                        sm.sys_app_key sysappkey,
                        sm.remark remark,
                        sm.validate_code validatecode
                      from fm_menu sm
/*                      left join fm_area_menu fam
                        on fam.menu_id = sm.id*/
                      left join fm_role_menu rm
                        on sm.id = rm.menu_id
                      left join (select ur.user_id, ur.role_id
                                   from fm_user_role ur
                                  inner join fm_role fr
                                     on ur.role_id = fr.id
                                    and fr.state = '1') ur
                        on rm.role_id = ur.role_id
                     where sm.state = '1'
                      -- and (ur.user_id = '2361' or operation_type = '1' or
                        --   (operation_type = '2' and menu_type = '3'))
                        and sys_app_key in ('3601DE249ADF63D4E0531D82750A85F3')
                       and Operation_type in ('1', '2')
                       and (operation_type <> '2' or menu_type in ('1', '2', '3'))
                     order by sort asc"));

            //sql.AppendInWhereHasValue(() => appkey, " and sys_app_key in ({0}) ");
            //sql.AppendInWhereHasValue(() => operationTypes, " and Operation_type in({0})");
            //sql.AppendInWhereHasValue(() => menuTypes, " and (operation_type<>'2' or menu_type in({0}))");
            //sql.Append(" order by sort asc");
            return(QuerySession.ExecuteSqlString <MenuResult>(sql.ToSql(), sql.DbParams).ToList());
        }
Beispiel #4
0
 public CoursesByTermQueryHandler(QuerySession session)
 {
     _session = session;
 }
Beispiel #5
0
 public SimilarDocumentsQueryHandler(QuerySession session, IUrlBuilder urlBuilder)
 {
     _urlBuilder = urlBuilder;
     _session    = session.StatelessSession;
 }
 public PendingQuestionsEmptyQueryHandler(QuerySession session)
 {
     _session = session.StatelessSession;
 }
 public UserProfileAboutQueryHandler(QuerySession querySession, IUrlBuilder urlBuilder)
 {
     _urlBuilder       = urlBuilder;
     _statelessSession = querySession.StatelessSession;
 }