Ejemplo n.º 1
0
        public async Task <PageResult <CQueryPageResultReplyDto> > QueryListByPageGroup(CQueryPageQueryParams cQueryParams)
        {
            //查出分页数据
            var menuList = await _menuClient.GetCQueryListByPage(cQueryParams);


            if (menuList.Data.Count <= 0)
            {
                return(menuList);
            }
            //获取父层菜单的值
            Task <List <NameByIdDto> > mainMenuDtoList = null;

            mainMenuDtoList = _extendSearchGroup.MenuNameByIdFind(mainMenuDtoList, () => menuList.Data.Select(u => u.MAIN_MENU_ID.ToIntByIntNull()).Distinct().ToList(), "MENU_NAME");


            //获取码表
            _extendSearchGroup.JoinSearchLookup(out var lookupList, "MENU_TYPE", "MENU_SORT", "TERMINAL_TYPE", "YES_NO");

            await mainMenuDtoList;
            await lookupList;


            //列表数据关联值
            menuList.Data.Join(
                lookupList.Result,
                mainMenuDtoList.Result,
                "lookup->MENU_TYPE_NAME->MENU_TYPE->MENU_TYPE",
                "lookup->MENU_SORT_NAME->MENU_SORT->MENU_SORT",
                "lookup->TERMINAL_TYPE_NAME->TERMINAL_TYPE->TERMINAL_TYPE",
                "lookup->IS_AVAILABLE_NAME->YES_NO->IS_AVAILABLE",

                "j1->MAIN_MENU_NAME->MAIN_MENU_ID->ID->NAME1"
                );
            return(menuList);
        }
Ejemplo n.º 2
0
        //菜单查询控件
        public async Task <JsonResult> CQueryList(CQueryPageQueryParams cQueryPageQueryParams)
        {
            var resultReply = await _menuClientGroup.QueryListByPageGroup(cQueryPageQueryParams);

            return(Json(resultReply));
        }