diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/FamilyCreateExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/FamilyCreateExe.java index ad009053..28483302 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/FamilyCreateExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/FamilyCreateExe.java @@ -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)