liukuo362573 / YiShaAdmin

基于 .NET Core MVC 的权限管理系统,代码易读易懂、界面简洁美观
MIT License
2.42k stars 872 forks source link

表达式查询增加字段自动过滤后导致部门管理报Instance property 'UserIds' is not defined #170

Open allan98 opened 4 months ago

allan98 commented 4 months ago

System.ArgumentException: Instance property 'UserIds' is not defined for type 'YiSha.Entity.OrganizationManage.UserEntity' (Parameter 'propertyName') at System.Linq.Expressions.Expression.Property(Expression expression, String propertyName) at YiSha.Util.Extension.LinqExtensions.GetExpressionItems[T,TT](TT input)

allan98 commented 4 months ago

.Net8分支

jimmy201516 commented 3 months ago

请问这个问题何解,我也遇到了

smartdust007 commented 3 months ago

I have got your e-mail,This is an automatic reply to let you know that your mail has been received.Thank you.---Wang Shupeng

hong3731 commented 2 months ago

不知道为什么,把DepartmentBLL里面的GetList的修改成

            List<UserEntity> userList = new List<UserEntity>();//await userService.GetList(new UserListParam { UserIds = string.Join(",", obj.Data.Select(p => p.PrincipalId).ToArray()) });
            var userids = obj.Data.Select(p => p.PrincipalId).ToArray();
            for (int i = 0; i < userids.Length; i++)
            {
                UserEntity user = await userService.GetEntity((long)userids[i]);
                userList.Add(user);
            }