家族列表接口新增
This commit is contained in:
parent
61efa5e88f
commit
b4a3aafd1b
@ -36,7 +36,7 @@ public class FamilyBaseInfoQryCmd extends HistoryRangeTimeQryPageCmd {
|
||||
/**
|
||||
* 家族账号.
|
||||
*/
|
||||
private Long familyAccount;
|
||||
private String familyAccount;
|
||||
|
||||
/**
|
||||
* 族长ID.
|
||||
|
||||
@ -29,7 +29,7 @@ public class ApprovalFamilyDTO implements Serializable {
|
||||
/**
|
||||
* 家族账号
|
||||
*/
|
||||
private Long familyAccount;
|
||||
private String familyAccount;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -42,7 +42,7 @@ public class FamilyBaseInfoDTO implements Serializable {
|
||||
* 家族账号.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long familyAccount;
|
||||
private String familyAccount;
|
||||
|
||||
/**
|
||||
* 家族头像.
|
||||
|
||||
@ -37,7 +37,7 @@ public class FamilyDetailsDTO implements Serializable {
|
||||
* 家族账号.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long familyAccount;
|
||||
private String familyAccount;
|
||||
|
||||
/**
|
||||
* 家族头像.
|
||||
|
||||
@ -8,6 +8,7 @@ import com.red.circle.other.app.dto.clientobject.family.FamilyBaseInfoCO;
|
||||
import com.red.circle.other.app.dto.clientobject.family.FamilyCreateRulesCO;
|
||||
import com.red.circle.other.app.dto.clientobject.family.FamilyLeaderboardCO;
|
||||
import com.red.circle.other.app.dto.clientobject.family.FamilyLevelParentCacheCO;
|
||||
import com.red.circle.other.app.dto.clientobject.family.FamilyListCO;
|
||||
import com.red.circle.other.app.dto.clientobject.family.FamilyMemberCO;
|
||||
import com.red.circle.other.app.dto.clientobject.family.FamilyMsgListCO;
|
||||
import com.red.circle.other.app.dto.clientobject.family.MyFamilyApplyCO;
|
||||
@ -23,6 +24,7 @@ import com.red.circle.other.app.dto.cmd.family.FamilyGrantUserRoleCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyGroupChatPayCheckCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyGroupChatQueryCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyInfoEditCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyListCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyMemberListCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyMemberListQueryCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyMessageHandleCmd;
|
||||
@ -33,6 +35,7 @@ import com.red.circle.other.app.dto.cmd.family.FamilyRemoveUserCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyUserInfoQueryCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.ReceiveFamilyAwardCmd;
|
||||
import com.red.circle.other.app.service.family.FamilyService;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -61,6 +64,14 @@ public class FamilyRestController extends BaseController {
|
||||
|
||||
private final FamilyService familyService;
|
||||
|
||||
/**
|
||||
* 家族列表.
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public PageResult<FamilyListCO> familyList(FamilyListCmd cmd) {
|
||||
return familyService.familyList(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建家族.
|
||||
*/
|
||||
@ -119,20 +130,7 @@ public class FamilyRestController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 家族族长信息(与家族成员信息 数据结构一致).
|
||||
*
|
||||
* @eo.name 家族族长信息(与家族成员信息 数据结构一致).
|
||||
* @eo.url /admin
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/admin")
|
||||
public FamilyMemberCO getAdmin(FamilyAdminQueryCmd cmd) {
|
||||
return familyService.getAdmin(cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 家族成员信息.(旧:list_member)
|
||||
* 家族成员信息
|
||||
*/
|
||||
@GetMapping("/list/member")
|
||||
public List<FamilyMemberCO> listMember(FamilyMemberListQueryCmd cmd) {
|
||||
@ -140,25 +138,7 @@ public class FamilyRestController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 家族成员信息-不分页.
|
||||
* @eo.name 家族成员信息.
|
||||
* @eo.url /members
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/members")
|
||||
public List<FamilyMemberCO> getMembers(FamilyMemberListCmd cmd) {
|
||||
return familyService.getMembers(cmd);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 授权用户家族权限.(旧:grant_user_role)
|
||||
*
|
||||
* @eo.name 授权用户家族权限.
|
||||
* @eo.url /grant-user-role
|
||||
* @eo.method post
|
||||
* @eo.request-type json
|
||||
* 授权用户家族权限
|
||||
*/
|
||||
@PostMapping("/grant-user-role")
|
||||
public void grantUserRole(@RequestBody FamilyGrantUserRoleCmd cmd) {
|
||||
@ -186,7 +166,7 @@ public class FamilyRestController extends BaseController {
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/list/level-config")
|
||||
// @GetMapping("/list/level-config")
|
||||
public List<FamilyLevelParentCacheCO> listLevelConfig(AppExtCommand cmd) {
|
||||
return familyService.listLevelConfig(cmd);
|
||||
}
|
||||
@ -199,7 +179,7 @@ public class FamilyRestController extends BaseController {
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/list/online-room")
|
||||
// @GetMapping("/list/online-room")
|
||||
public List<RoomVoiceProfileCO> listOnlineRoom(@Validated FamilyOnlineRoomQueryCmd cmd) {
|
||||
return familyService.listOnlineRoom(cmd);
|
||||
}
|
||||
@ -238,7 +218,7 @@ public class FamilyRestController extends BaseController {
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/member-user-info")
|
||||
// @GetMapping("/member-user-info")
|
||||
public FamilyUserInfoCO memberUserInfo(@Validated FamilyUserInfoQueryCmd cmd) {
|
||||
return familyService.memberUserInfo(cmd);
|
||||
}
|
||||
@ -251,7 +231,7 @@ public class FamilyRestController extends BaseController {
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/trigger-daily-task")
|
||||
// @GetMapping("/trigger-daily-task")
|
||||
public void triggerDailyTask(FamilyDailyTaskCmd cmd) {
|
||||
familyService.triggerDailyTask(cmd);
|
||||
}
|
||||
@ -264,7 +244,7 @@ public class FamilyRestController extends BaseController {
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/family-create-rule")
|
||||
// @GetMapping("/family-create-rule")
|
||||
public FamilyCreateRulesCO familyCreateRule(AppExtCommand cmd) {
|
||||
return familyService.familyCreateRule(cmd);
|
||||
}
|
||||
@ -277,7 +257,7 @@ public class FamilyRestController extends BaseController {
|
||||
* @eo.method get
|
||||
* @eo.request-type formdata
|
||||
*/
|
||||
@GetMapping("/my-family-reward")
|
||||
// @GetMapping("/my-family-reward")
|
||||
public FamilyRewardCO myFamilyReward(AppExtCommand cmd) {
|
||||
return familyService.myFamilyReward(cmd);
|
||||
}
|
||||
@ -290,7 +270,7 @@ public class FamilyRestController extends BaseController {
|
||||
* @eo.method post
|
||||
* @eo.request-type json
|
||||
*/
|
||||
@PostMapping("/receive-award")
|
||||
// @PostMapping("/receive-award")
|
||||
public void receiveAward(@RequestBody @Validated ReceiveFamilyAwardCmd cmd) {
|
||||
familyService.receiveFamilyAward(cmd);
|
||||
}
|
||||
@ -303,7 +283,7 @@ public class FamilyRestController extends BaseController {
|
||||
* @eo.method post
|
||||
* @eo.request-type json
|
||||
*/
|
||||
@PostMapping("/purchasing/group-chat")
|
||||
// @PostMapping("/purchasing/group-chat")
|
||||
public BigDecimal purchasingFamilyGroupChat(@RequestBody @Validated FamilyGroupChatQueryCmd cmd) {
|
||||
return familyService.purchasingFamilyGroupChat(cmd);
|
||||
}
|
||||
@ -311,7 +291,7 @@ public class FamilyRestController extends BaseController {
|
||||
/**
|
||||
* 解散-家族群聊.
|
||||
*/
|
||||
@PostMapping("/dismiss/group-chat")
|
||||
// @PostMapping("/dismiss/group-chat")
|
||||
public void dismissFamilyGroupChat(@RequestBody FamilyGroupChatQueryCmd cmd) {
|
||||
|
||||
familyService.dismissFamilyGroupChat(cmd);
|
||||
@ -325,7 +305,7 @@ public class FamilyRestController extends BaseController {
|
||||
* @eo.method get
|
||||
* @eo.request-type json
|
||||
*/
|
||||
@GetMapping("/group/chat/exists")
|
||||
// @GetMapping("/group/chat/exists")
|
||||
public Boolean getFamilyGroupChatIsPay(@Validated FamilyGroupChatPayCheckCmd cmd) {
|
||||
return familyService.getFamilyGroupChatIsPay(cmd);
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ import com.red.circle.framework.core.response.ResponseErrorCode;
|
||||
import com.red.circle.other.app.common.account.FamilyAccountShortProduction;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyCreateCmd;
|
||||
import com.red.circle.other.domain.gateway.user.UserProfileGateway;
|
||||
import com.red.circle.other.domain.model.user.UserProfile;
|
||||
import com.red.circle.other.infra.common.family.FamilyCommon;
|
||||
import com.red.circle.other.infra.database.rds.entity.family.FamilyBaseInfo;
|
||||
import com.red.circle.other.infra.database.rds.entity.family.FamilyCreateRules;
|
||||
@ -136,9 +137,11 @@ public class FamilyCreateExe {
|
||||
}
|
||||
|
||||
private void createFamily(FamilyCreateCmd cmd, Long levelConfigId, Long familyId) {
|
||||
UserProfile userProfile = userProfileGateway.getByUserId(cmd.getReqUserId());
|
||||
|
||||
familyBaseInfoService.save(new FamilyBaseInfo()
|
||||
.setId(familyId)
|
||||
.setFamilyAccount(shortAccountManager.getFamilyAccount())
|
||||
.setFamilyAccount(userProfile.getAccount())
|
||||
.setFamilyAvatar(ResponseAssert.requiredSuccess(
|
||||
ossServiceClient
|
||||
.processImgSaveAsCompressZoom(cmd.getFamilyAvatar(), ImageSizeConst.COVER_HEIGHT)
|
||||
|
||||
@ -0,0 +1,79 @@
|
||||
package com.red.circle.other.app.command.family;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.framework.mybatis.entity.TimestampBaseEntity;
|
||||
import com.red.circle.other.app.dto.clientobject.family.FamilyListCO;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyListCmd;
|
||||
import com.red.circle.other.infra.database.rds.entity.family.FamilyBaseInfo;
|
||||
import com.red.circle.other.infra.database.rds.entity.family.FamilyLevelConfig;
|
||||
import com.red.circle.other.infra.database.rds.service.family.FamilyBaseInfoService;
|
||||
import com.red.circle.other.infra.database.rds.service.family.FamilyLevelConfigService;
|
||||
import com.red.circle.other.infra.database.rds.service.family.FamilyMemberInfoService;
|
||||
import com.red.circle.tool.core.collection.CollectionUtils;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 家族列表查询.
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class FamilyListExe {
|
||||
|
||||
private final FamilyBaseInfoService familyBaseInfoService;
|
||||
private final FamilyLevelConfigService familyLevelConfigService;
|
||||
private final FamilyMemberInfoService familyMemberInfoService;
|
||||
|
||||
public PageResult<FamilyListCO> execute(FamilyListCmd cmd) {
|
||||
Page<FamilyBaseInfo> page = new Page<>();
|
||||
IPage<FamilyBaseInfo> baseInfoIPage = familyBaseInfoService.page(page,
|
||||
Wrappers.<FamilyBaseInfo>lambdaQuery().orderByDesc(TimestampBaseEntity::getCreateTime));
|
||||
|
||||
PageResult<FamilyListCO> pageResult = new PageResult<>();
|
||||
pageResult.setCurrent(page.getCurrent());
|
||||
pageResult.setSize(page.getSize());
|
||||
pageResult.setTotal(baseInfoIPage.getTotal());
|
||||
|
||||
if (CollectionUtils.isEmpty(baseInfoIPage.getRecords())) {
|
||||
return PageResult.newPageResult(0);
|
||||
}
|
||||
|
||||
List<FamilyBaseInfo> familyList = baseInfoIPage.getRecords();
|
||||
|
||||
Set<Long> familyIds = familyList.stream()
|
||||
.map(FamilyBaseInfo::getId)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
Set<Long> levelIds = familyList.stream()
|
||||
.map(FamilyBaseInfo::getFamilyLevelId)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
Map<Long, Long> memberCountMap = familyMemberInfoService.mapMemberCountByFamilyIds(familyIds);
|
||||
Map<Long, FamilyLevelConfig> levelConfigMap = familyLevelConfigService.mapByIds(levelIds);
|
||||
|
||||
List<FamilyListCO> records = familyList.stream().map(family -> {
|
||||
FamilyLevelConfig levelConfig = levelConfigMap.get(family.getFamilyLevelId());
|
||||
Long currentMember = memberCountMap.getOrDefault(family.getId(), 0L);
|
||||
|
||||
return new FamilyListCO()
|
||||
.setFamilyId(family.getId())
|
||||
.setFamilyAccount(family.getFamilyAccount())
|
||||
.setFamilyAvatar(family.getFamilyAvatar())
|
||||
.setFamilyName(family.getFamilyName())
|
||||
.setFamilyIntro(family.getFamilyIntro())
|
||||
.setFamilyNotice(family.getFamilyNotice())
|
||||
.setCurrentMember(currentMember.intValue())
|
||||
.setMaxMember(levelConfig != null ? levelConfig.getMaxMember() : 0);
|
||||
}).toList();
|
||||
|
||||
pageResult.setRecords(records);
|
||||
return pageResult;
|
||||
}
|
||||
}
|
||||
@ -13,10 +13,8 @@ import com.red.circle.other.inner.enums.FamilyMessageStatusEnum;
|
||||
import com.red.circle.other.inner.model.dto.famliy.FamilyDetailsDTO;
|
||||
import com.red.circle.tool.core.collection.CollectionUtils;
|
||||
import com.red.circle.tool.core.date.TimestampUtils;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -37,6 +35,7 @@ public class MyFamilyApplyListExe {
|
||||
List<FamilyMessage> msgList = familyMessageService.query()
|
||||
.eq(FamilyMessage::getSenderUser, cmd.getReqUserId())
|
||||
.lt(Objects.nonNull(cmd.getLastId()), FamilyMessage::getId, cmd.getLastId())
|
||||
.in(FamilyMessage::getStatus, Arrays.asList(FamilyMessageStatusEnum.PENDING.getCode(), FamilyMessageStatusEnum.REJECTED.getCode()))
|
||||
.orderByDesc(FamilyMessage::getId)
|
||||
.last(PageConstant.DEFAULT_LIMIT)
|
||||
.list();
|
||||
|
||||
@ -26,10 +26,12 @@ import com.red.circle.other.app.command.family.FamilyUserExitExe;
|
||||
import com.red.circle.other.app.command.family.FamilyUserInfoExe;
|
||||
import com.red.circle.other.app.command.family.ReceiveFamilyAwardExe;
|
||||
import com.red.circle.other.app.command.family.MyFamilyApplyListExe;
|
||||
import com.red.circle.other.app.command.family.FamilyListExe;
|
||||
import com.red.circle.other.app.dto.clientobject.family.FamilyBaseInfoCO;
|
||||
import com.red.circle.other.app.dto.clientobject.family.FamilyCreateRulesCO;
|
||||
import com.red.circle.other.app.dto.clientobject.family.FamilyLeaderboardCO;
|
||||
import com.red.circle.other.app.dto.clientobject.family.FamilyLevelParentCacheCO;
|
||||
import com.red.circle.other.app.dto.clientobject.family.FamilyListCO;
|
||||
import com.red.circle.other.app.dto.clientobject.family.FamilyMemberCO;
|
||||
import com.red.circle.other.app.dto.clientobject.family.FamilyMsgListCO;
|
||||
import com.red.circle.other.app.dto.clientobject.family.MyFamilyApplyCO;
|
||||
@ -45,6 +47,7 @@ import com.red.circle.other.app.dto.cmd.family.FamilyGrantUserRoleCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyGroupChatPayCheckCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyGroupChatQueryCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyInfoEditCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyListCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyMemberListCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyMemberListQueryCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyMessageHandleCmd;
|
||||
@ -54,6 +57,7 @@ import com.red.circle.other.app.dto.cmd.family.FamilyOnlineRoomQueryCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyRemoveUserCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.FamilyUserInfoQueryCmd;
|
||||
import com.red.circle.other.app.dto.cmd.family.ReceiveFamilyAwardCmd;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@ -99,6 +103,7 @@ public class FamilyServiceImpl implements FamilyService {
|
||||
private final FamilyMemberIdGetUserIdExe familyMemberIdGetUserIdExe;
|
||||
private final FamilyPurchasingGroupChatExe familyPurchasingGroupChatExe;
|
||||
private final MyFamilyApplyListExe myFamilyApplyListExe;
|
||||
private final FamilyListExe familyListExe;
|
||||
private final DistributedLockUtil distributedLockUtil;
|
||||
|
||||
@Override
|
||||
@ -236,4 +241,9 @@ public class FamilyServiceImpl implements FamilyService {
|
||||
return myFamilyApplyListExe.execute(cmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<FamilyListCO> familyList(FamilyListCmd cmd) {
|
||||
return familyListExe.execute(cmd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ public class FamilyBaseInfoCO extends ClientObject {
|
||||
/**
|
||||
* 家族账号.
|
||||
*/
|
||||
private Long familyAccount;
|
||||
private String familyAccount;
|
||||
|
||||
/**
|
||||
* 家族头像.
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
package com.red.circle.other.app.dto.clientobject.family;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 家族列表信息.
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class FamilyListCO {
|
||||
|
||||
/**
|
||||
* 家族id.
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long familyId;
|
||||
|
||||
/**
|
||||
* 家族账号.
|
||||
*/
|
||||
private String familyAccount;
|
||||
|
||||
/**
|
||||
* 家族头像.
|
||||
*/
|
||||
private String familyAvatar;
|
||||
|
||||
/**
|
||||
* 家族名称.
|
||||
*/
|
||||
private String familyName;
|
||||
|
||||
/**
|
||||
* 家族介绍.
|
||||
*/
|
||||
private String familyIntro;
|
||||
|
||||
/**
|
||||
* 家族公告.
|
||||
*/
|
||||
private String familyNotice;
|
||||
|
||||
/**
|
||||
* 家族当前成员数.
|
||||
*/
|
||||
private Integer currentMember;
|
||||
|
||||
/**
|
||||
* 最大成员数.
|
||||
*/
|
||||
private Integer maxMember;
|
||||
}
|
||||
@ -33,7 +33,7 @@ public class FamilyUserInfoCO extends ClientObject {
|
||||
/**
|
||||
* 家族账号.
|
||||
*/
|
||||
private Long familyAccount;
|
||||
private String familyAccount;
|
||||
|
||||
/**
|
||||
* 家族头像.
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package com.red.circle.other.app.dto.cmd.family;
|
||||
|
||||
import com.red.circle.common.business.dto.PageQueryCmd;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 家族列表查询.
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class FamilyListCmd extends PageQueryCmd {
|
||||
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.red.circle.other.app.service.family;
|
||||
|
||||
|
||||
import com.red.circle.common.business.dto.cmd.AppExtCommand;
|
||||
import com.red.circle.framework.dto.PageResult;
|
||||
import com.red.circle.other.app.dto.clientobject.family.*;
|
||||
import com.red.circle.other.app.dto.clientobject.room.RoomVoiceProfileCO;
|
||||
import com.red.circle.other.app.dto.cmd.family.*;
|
||||
@ -139,4 +140,9 @@ public interface FamilyService {
|
||||
* 我的家族申请列表.
|
||||
*/
|
||||
List<MyFamilyApplyCO> myApplyList(MyFamilyApplyListCmd cmd);
|
||||
|
||||
/**
|
||||
* 家族列表.
|
||||
*/
|
||||
PageResult<FamilyListCO> familyList(FamilyListCmd cmd);
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ public class FamilyProfile implements Serializable {
|
||||
/**
|
||||
* 家族account.
|
||||
*/
|
||||
Long familyAccount;
|
||||
String familyAccount;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -43,7 +43,7 @@ public class FamilyBaseInfo extends TimestampBaseEntity {
|
||||
* 家族账号.
|
||||
*/
|
||||
@TableField("family_account")
|
||||
private Long familyAccount;
|
||||
private String familyAccount;
|
||||
|
||||
/**
|
||||
* 家族头像.
|
||||
|
||||
@ -90,7 +90,6 @@ public class FamilyMemberInfoServiceImpl extends
|
||||
@Override
|
||||
public Integer getFamilyMemberCount(Long familyId) {
|
||||
return Optional.ofNullable(query().eq(FamilyMemberInfo::getFamilyId, familyId)
|
||||
//.in(FamilyMemberInfo::getMemberRole, "ADMIN","MEMBER")
|
||||
.count())
|
||||
.map(Long::intValue)
|
||||
.orElse(0);
|
||||
@ -104,7 +103,8 @@ public class FamilyMemberInfoServiceImpl extends
|
||||
return Maps.newHashMap();
|
||||
}
|
||||
|
||||
return Optional.ofNullable(query().in(FamilyMemberInfo::getFamilyId, familyIds).list())
|
||||
return Optional.ofNullable(query().in(FamilyMemberInfo::getFamilyId, familyIds)
|
||||
.select(FamilyMemberInfo::getFamilyId).list())
|
||||
.map(members -> members.stream()
|
||||
.collect(Collectors.groupingBy(FamilyMemberInfo::getFamilyId, Collectors.counting())))
|
||||
.orElse(Maps.newHashMap());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user