Beispiel #1
0
        public async Task  Run()
        {
            await Console.Out.WriteLineAsync("我是有Redis的注入测试任务");

            var list = await _menuServer.GetMenuList();

            await Console.Out.WriteLineAsync("菜单表里总数量" + list.Count.ToString());
        }
Beispiel #2
0
        public async Task <MessageModel <List <SysMenu> > > GetAllMenuList()
        {
            var data = new MessageModel <List <SysMenu> >();

            data.success  = true;
            data.msg      = "数据获取成功";
            data.response = await _menuServer.GetMenuList();

            return(data);
        }
Beispiel #3
0
        public async Task  Run()
        {
            try
            {
                //await Console.Out.WriteLineAsync("我是有Redis的注入测试任务");
                var list = await _menuServer.GetMenuList();

                this._rabbitMQ.SendData("Job1", "菜单表里总数量" + list.Count.ToString());
                await Console.Out.WriteLineAsync("菜单表里总数量" + list.Count.ToString());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #4
0
        public async Task  Run()
        {
            try
            {
                var list = await _menuServer.GetMenuList();

                //this._rabbitMQ.SendData("Job1", "菜单表里总数量" + list.Count.ToString());
                await this._redisSubscription.PublishAsyncRedis("redis", "我是redis的消息队列");

                await Console.Out.WriteLineAsync("菜单表里总数量" + list.Count.ToString());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public async Task <MessageModel <List <SysMenu> > > GetAllMenuList()
        {
            var data = new MessageModel <List <SysMenu> >();

            try
            {
                data.success  = true;
                data.msg      = "数据获取成功";
                data.response = await _menuServer.GetMenuList();

                return(data);
            }
            catch (Exception ex)
            {
                data.msg      = "数据获取失败" + ex.Message;
                data.response = new List <SysMenu>();
                return(data);
            }
        }