OL.FrameCore.WebUI/Controllers/DeptController.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using OL.FrameCore.Application.CommonData;
using OL.FrameCore.Application.Dept;
using OL.FrameCore.Application.Dept.Dto;
using OL.FrameCore.WebUI.Code;
using OL.FrameCore.WebUI.ViewModels;
using OL.FrameCore.WebUI.ViewModels.Dept;
namespace OL.FrameCore.WebUI.Controllers
{
public class DeptController : ControllerBase
{
IDeptService _deptService;
ICommonDataService _commonDataService;
public DeptController(IDeptService deptService, ICommonDataService commonDataService)
{
_deptService = deptService;
_commonDataService = commonDataService;
}
[Auth("sys_dept_init")]
public IActionResult Index()
{
ViewBag.DeptList = _commonDataService.GetDeptDropDownList();
return View();
}
/// <summary>
/// 获取部门列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Auth("sys_dept_init")]
public IActionResult GetDeptList(GetDetpListViewRequest request)
{
var serviceRequest = ToMap<GetDetpListViewRequest, GetDeptListRequest>(request);
serviceRequest.PageIndex = request.page - 1;
serviceRequest.PageSize = request.limit;
var serviceResult = _deptService.GetDeptList(serviceRequest);
var result = new
{
code = 0,
msg = "",
count = serviceResult.ItemsCount,
data = serviceResult.Items
};
return Json(result);
}
[Auth("sys_dept_init")]
public IActionResult GetDeptTree()
{
var serviceResult = _deptService.GetAllDeptList();
后面还有 87 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
