创建家族使用靓号处理

This commit is contained in:
tianfeng 2025-12-29 17:12:49 +08:00
parent fc2e03f0be
commit 92893dfd77

View File

@ -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.OwnSpecialId;
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.cache.key.FamilyKeys;
@ -36,6 +37,8 @@ import com.red.circle.wallet.inner.model.cmd.GoldReceiptCmd;
import com.red.circle.wallet.inner.model.enums.GoldOrigin;
import java.math.BigDecimal;
import java.util.Objects;
import java.util.Optional;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@ -142,7 +145,7 @@ public class FamilyCreateExe {
familyBaseInfoService.save(new FamilyBaseInfo()
.setId(familyId)
.setFamilyAccount(userProfile.getAccount())
.setFamilyAccount(Optional.ofNullable(userProfile.getOwnSpecialId()).map(OwnSpecialId::getAccount).orElse(userProfile.getAccount()))
.setFamilyAvatar(ResponseAssert.requiredSuccess(
ossServiceClient
.processImgSaveAsCompressZoom(cmd.getFamilyAvatar(), ImageSizeConst.COVER_HEIGHT)