コード例 #1
0
        public PageResult <CustomerInfoFullDto> SearchPage(CustomerSearchDto search)
        {
            search           = search ?? new CustomerSearchDto();
            search.PageSize  = search.PageSize < 1 ? 50 : search.PageSize;
            search.PageIndex = search.PageIndex < 1 ? 1 : search.PageIndex;
            var res = _customerInfoDal.SearchPage(search);

            if (res.Items.Count > 0)
            {
                var list      = _groupInfoDal.GetList(res.Items.Select(p => p.GroupId).ToArray());
                var userinfos = _userInfoDal.GetList(res.Items.Select(p => p.UserId).ToArray());
                foreach (var item in res.Items)
                {
                    item.GroupInfo = list.Find(p => p.Id == item.GroupId);
                    item.UserInfo  = userinfos.Find(p => p.Id == item.UserId);
                }
            }
            return(res);
        }
コード例 #2
0
 public List <UserInfoFullDto> GetList(params int[] ids)
 {
     AdminVerify(0, "GetList");
     return(_userInfoDal.GetList(ids));
 }