OL.FrameCore.Application/CommonData/CommonDataService.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using OL.FrameCore.Application.CommonData.Dto;
using OL.FrameCore.Application.Dept;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using OL.FrameCore.Application.Module;

namespace OL.FrameCore.Application.CommonData
{
    public class CommonDataService: ICommonDataService
    {
        IDeptService _deptService;
        IModuleService _moduleService;
        public CommonDataService(IDeptService deptService, IModuleService moduleService)
        {
            _deptService = deptService;
            _moduleService = moduleService;
        }

        /// <summary>
        /// 获取部门下拉列表
        /// </summary>
        /// <returns></returns>
        public IList<DropDownModel> GetDeptDropDownList()
        {
            //todo 加缓存

            var listDept = _deptService.GetAllDeptList();

            IList<DropDownModel> list = new List<DropDownModel>();
            foreach (var li in listDept)
            {
                list.Add(new DropDownModel
                {
                    Id = li.Id,
                    Name = li.DeptName,
                    ParentId = li.ParentId,
                    Level = li.DeptLevel
                });
            }

            var result = GetDropDownList(list, 0, "");

            return result;

        }

        /// <summary>
        /// 获取模块下拉列表
        /// </summary>
        /// <returns></returns>
        public IList<DropDownModel> GetModuleDropDownList()
        {
            //todo 加缓存

            var listDept = _moduleService.GetAllModuleList();

            IList<DropDownModel> list = new List<DropDownModel>();
            foreach (var li in listDept)
后面还有 36 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。