Example #1
0
        public async Task <object> GetUser(string ids = "", string key = "")
        {
            var data = await _userSvc.GetDataByids(ids);

            if (!string.IsNullOrEmpty(key))
            {
                data = data.Where(a => a.LoginName.Contains(key) || a.RealName.Contains(key)).ToList();
            }

            return(new MessageModel <List <User> >()
            {
                Message = "获取成功",
                Success = true,
                Response = data
            });
        }