创建家族使用靓号处理
This commit is contained in:
parent
fc2e03f0be
commit
92893dfd77
@ -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.common.account.FamilyAccountShortProduction;
|
||||||
import com.red.circle.other.app.dto.cmd.family.FamilyCreateCmd;
|
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.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.domain.model.user.UserProfile;
|
||||||
import com.red.circle.other.infra.common.family.FamilyCommon;
|
import com.red.circle.other.infra.common.family.FamilyCommon;
|
||||||
import com.red.circle.other.infra.database.cache.key.FamilyKeys;
|
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 com.red.circle.wallet.inner.model.enums.GoldOrigin;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@ -142,7 +145,7 @@ public class FamilyCreateExe {
|
|||||||
|
|
||||||
familyBaseInfoService.save(new FamilyBaseInfo()
|
familyBaseInfoService.save(new FamilyBaseInfo()
|
||||||
.setId(familyId)
|
.setId(familyId)
|
||||||
.setFamilyAccount(userProfile.getAccount())
|
.setFamilyAccount(Optional.ofNullable(userProfile.getOwnSpecialId()).map(OwnSpecialId::getAccount).orElse(userProfile.getAccount()))
|
||||||
.setFamilyAvatar(ResponseAssert.requiredSuccess(
|
.setFamilyAvatar(ResponseAssert.requiredSuccess(
|
||||||
ossServiceClient
|
ossServiceClient
|
||||||
.processImgSaveAsCompressZoom(cmd.getFamilyAvatar(), ImageSizeConst.COVER_HEIGHT)
|
.processImgSaveAsCompressZoom(cmd.getFamilyAvatar(), ImageSizeConst.COVER_HEIGHT)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user