using DS.Module.Core; using DS.Module.Core.Data; using DS.WMS.Core.System.Dtos; using DS.WMS.Core.System.Interface; using Microsoft.AspNetCore.Mvc; using SqlSugar; namespace DS.WMS.AdminApi.Controllers; /// /// 企业用户管理模块 /// public class TenantController : ApiController { private readonly ITenantService _invokeService; /// /// 构造函数 /// /// public TenantController(ITenantService invokeService) { _invokeService = invokeService; } /// /// 企业用户列表 /// /// /// [HttpPost] [Route("GetTenantList")] public DataResult> GetTenantList([FromBody] PageRequest request) { var res = _invokeService.GetListByPage(request); return res; } /// /// 获取企业用户信息 /// /// /// [HttpGet] [Route("GetTenantInfo")] public DataResult GetTenantInfo([FromQuery] string id) { var res = _invokeService.GetTenantInfo(id); return res; } /// /// 获取租户权限 /// /// 租户Id /// [HttpGet] [Route("GetTenantPermission")] public DataResult GetTenantPermission([FromQuery] string id) { var res = _invokeService.GetTenantPermission(id); return res; } /// /// 获取租户权限授权数 /// /// 租户Id /// [HttpGet] [Route("GetPermissionAuthList")] public DataResult> GetPermissionAuthList([FromQuery] string id) { var res = _invokeService.GetPermissionAuthList(id); return res; } /// /// 租户权限模块授权 /// /// /// [HttpPost] [Route("UpdateTenantPermission")] public DataResult UpdateTenantPermission([FromBody] TenantPermissionReq req) { return _invokeService.UpdateTenantPermission(req); } /// /// 获取租户表差异 /// /// 租户Id /// [HttpGet] [Obsolete] [Route("GetSaasTableDifference")] public DataResult> GetSaasTableDifference([FromQuery] string id) { var res = _invokeService.GetSaasTableDifference(id); return res; } /// /// 更新租户表差异 /// /// 主键id /// [HttpPost] [Obsolete] [Route("UpdateSaasTableInfo")] public DataResult UpdateSaasTableInfo([FromBody] IdModel req) { return _invokeService.UpdateSaasTableInfo(req); } }