|
@@ -11,6 +11,7 @@ using GxPress.Common.Tools;
|
|
|
using GxPress.Entity;
|
|
|
using GxPress.EnumConst;
|
|
|
using GxPress.Repository.Interface;
|
|
|
+using GxPress.Repository.Interface.AdminVerify;
|
|
|
using GxPress.Request.App.AdminVerify;
|
|
|
using GxPress.Request.App.Group;
|
|
|
using GxPress.Request.App.GroupUser;
|
|
@@ -33,11 +34,11 @@ namespace GxPress.Service.Implement.Group
|
|
|
private readonly IMiddleRepository _middleRepository;
|
|
|
private readonly IMapper _mapper;
|
|
|
private readonly IUserRepository _userRepository;
|
|
|
-
|
|
|
+ private readonly IAdminVerifyRepository adminVerifyRepository;
|
|
|
public GroupService(IGroupRepository groupRepository, IGroupUserRepository groupUserRepository,
|
|
|
ITopicRepository topicRepository, IMiddleService middleService,
|
|
|
IAdminVerifyInsertService adminVerifyService, IMiddleRepository middleRepository, IMapper mapper,
|
|
|
- IUserRepository userRepository)
|
|
|
+ IUserRepository userRepository, IAdminVerifyRepository adminVerifyRepository)
|
|
|
{
|
|
|
_groupRepository = groupRepository;
|
|
|
_groupUserRepository = groupUserRepository;
|
|
@@ -47,6 +48,7 @@ namespace GxPress.Service.Implement.Group
|
|
|
_middleRepository = middleRepository;
|
|
|
_mapper = mapper;
|
|
|
_userRepository = userRepository;
|
|
|
+ this.adminVerifyRepository = adminVerifyRepository;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -230,6 +232,11 @@ namespace GxPress.Service.Implement.Group
|
|
|
{
|
|
|
var result = await _groupRepository.GroupDetailAsync(request);
|
|
|
var user = await _userRepository.GetAsync(result.UserId);
|
|
|
+ if (result.IsUser == false)
|
|
|
+ {
|
|
|
+ var adminVerify = await adminVerifyRepository.GetAsync(Q.Where(nameof(Entity.AdminVerify.VerifyType), 3).Where(nameof(Entity.AdminVerify.SourceId), result.Id));
|
|
|
+ result.IsApply = adminVerify.DisposeType == 0;
|
|
|
+ }
|
|
|
result.UserName = user.Name;
|
|
|
result.GroupUserNumber = result.GroupUserListResult.Count();
|
|
|
//获取小组话题数量
|