|
@@ -21,7 +21,7 @@ using GxPress.Result.App.GroupUser;
|
|
|
using GxPress.Service.Interface.AdminVerify;
|
|
|
using GxPress.Service.Interface.Group;
|
|
|
using GxPress.Service.Interface.Middle;
|
|
|
-
|
|
|
+using GxPress.Repository.Interface.Group;
|
|
|
namespace GxPress.Service.Implement.Group
|
|
|
{
|
|
|
public partial class GroupService : IGroupService
|
|
@@ -35,10 +35,11 @@ namespace GxPress.Service.Implement.Group
|
|
|
private readonly IMapper _mapper;
|
|
|
private readonly IUserRepository _userRepository;
|
|
|
private readonly IAdminVerifyRepository adminVerifyRepository;
|
|
|
+ private readonly IGroupCategoryRepository groupCategoryRepository;
|
|
|
public GroupService(IGroupRepository groupRepository, IGroupUserRepository groupUserRepository,
|
|
|
ITopicRepository topicRepository, IMiddleService middleService,
|
|
|
IAdminVerifyInsertService adminVerifyService, IMiddleRepository middleRepository, IMapper mapper,
|
|
|
- IUserRepository userRepository, IAdminVerifyRepository adminVerifyRepository)
|
|
|
+ IUserRepository userRepository, IAdminVerifyRepository adminVerifyRepository, IGroupCategoryRepository groupCategoryRepository)
|
|
|
{
|
|
|
_groupRepository = groupRepository;
|
|
|
_groupUserRepository = groupUserRepository;
|
|
@@ -49,6 +50,7 @@ namespace GxPress.Service.Implement.Group
|
|
|
_mapper = mapper;
|
|
|
_userRepository = userRepository;
|
|
|
this.adminVerifyRepository = adminVerifyRepository;
|
|
|
+ this.groupCategoryRepository = groupCategoryRepository;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -227,8 +229,6 @@ namespace GxPress.Service.Implement.Group
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 获取小组详情
|
|
|
/// </summary>
|
|
@@ -243,6 +243,12 @@ namespace GxPress.Service.Implement.Group
|
|
|
var adminVerify = await adminVerifyRepository.GetAsync(Q.Where(nameof(Entity.AdminVerify.VerifyType), 3).Where(nameof(Entity.AdminVerify.SourceId), result.Id));
|
|
|
result.IsApply = adminVerify != null && adminVerify.DisposeType == 0;
|
|
|
}
|
|
|
+ if (result.GroupCategroyId > 0)
|
|
|
+ {
|
|
|
+ var groupCategory = await groupCategoryRepository.GetAsync(result.GroupCategroyId);
|
|
|
+ if (groupCategory != null)
|
|
|
+ result.CategroyName = groupCategory.PiazzaName;
|
|
|
+ }
|
|
|
result.UserName = user.Name;
|
|
|
result.GroupUserNumber = result.GroupUserListResult.Count();
|
|
|
//获取小组话题数量
|