Jelajahi Sumber

Merge branch 'test' of http://110.188.24.182:10023/Fengwo/hotline into test

xf 1 bulan lalu
induk
melakukan
4e656abad2

+ 1 - 1
src/Hotline.Api/Controllers/OrderController.cs

@@ -3785,7 +3785,7 @@ public class OrderController : BaseController
 
         var orderDtos = _mapper.Map<ICollection<OrderDto>>(orders);
 
-        if (_appOptions.Value.IsLuZhou && !_sessionContext.OrgIsCenter)
+        if (_appOptions.Value.IsLuZhou)
             orderDtos = orderDtos.Select(p => p.DataMask()).ToList();
 
         dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass<OrderDto>(dto.ColumnInfos);

+ 4 - 2
src/Hotline.Api/Controllers/RoleController.cs

@@ -1,4 +1,5 @@
-using Fw.Utility.UnifyResponse;
+using DocumentFormat.OpenXml.ExtendedProperties;
+using Fw.Utility.UnifyResponse;
 using Hotline.Application.Users;
 using Hotline.Caching.Interfaces;
 using Hotline.Identity.Roles;
@@ -77,7 +78,8 @@ public class RoleController : BaseController
     [HttpGet("paged")]
     public async Task<PagedDto<RoleDto>> GetRuleItems([FromQuery] QueryRolesPagedDto dto)
     {
-        return (await _roleApplication.GetRuleItems(dto).ToPagedListAsync(dto)).ToPaged();
+		var (total, items) =  await _roleApplication.GetRuleItems(dto).ToPagedListAsync(dto);
+		return new PagedDto<RoleDto>(total, _mapper.Map<IReadOnlyList<RoleDto>>(items)); 
     }
 
     /// <summary>

+ 3 - 2
src/Hotline.Application/Users/IRoleApplication.cs

@@ -1,4 +1,5 @@
-using Hotline.Share.Dtos.Roles;
+using Hotline.Identity.Roles;
+using Hotline.Share.Dtos.Roles;
 using SqlSugar;
 using System;
 using System.Collections.Generic;
@@ -9,5 +10,5 @@ using System.Threading.Tasks;
 namespace Hotline.Application.Users;
 public interface IRoleApplication
 {
-    ISugarQueryable<RoleDto> GetRuleItems(QueryRolesPagedDto dto);
+    ISugarQueryable<Role> GetRuleItems(QueryRolesPagedDto dto);
 }

+ 2 - 3
src/Hotline.Application/Users/RoleApplication.cs

@@ -29,7 +29,7 @@ public class RoleApplication : IRoleApplication, IScopeDependency
     }
 
     [ExportExcel("角色")]
-    public ISugarQueryable<RoleDto> GetRuleItems(QueryRolesPagedDto dto)
+    public ISugarQueryable<Role> GetRuleItems(QueryRolesPagedDto dto)
     {
         var query = _roleRepository.Queryable(includeDeleted: true);
         if (dto.IsDeleted.HasValue)
@@ -41,8 +41,7 @@ public class RoleApplication : IRoleApplication, IScopeDependency
             .WhereIF(_sessionContext.OrgIsCenter == false, d => d.RoleType == ERoleType.OrgRole)
             .Where(x => x.Id != RoleSeedData.AdminId)
             .OrderBy(d => d.IsDeleted)
-            .OrderByDescending(d => d.CreationTime)
-            .Select<RoleDto>();
+            .OrderByDescending(d => d.CreationTime);
         return roleQuery;
     }
 }