cp发送头饰逻辑处理
(cherry picked from commit fa9f722253e507477d26183d9afbf39f65c89ba4)
This commit is contained in:
parent
33831a4535
commit
a38dd91403
@ -5,6 +5,7 @@ import com.red.circle.other.domain.gateway.props.ActivitySourceGroupGateway;
|
|||||||
import com.red.circle.other.domain.gateway.props.PropsStoreGateway;
|
import com.red.circle.other.domain.gateway.props.PropsStoreGateway;
|
||||||
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.UserProfile;
|
import com.red.circle.other.domain.model.user.UserProfile;
|
||||||
|
import com.red.circle.other.infra.database.rds.entity.props.PropsBackpack;
|
||||||
import com.red.circle.other.infra.database.rds.entity.user.user.CpLevelConfig;
|
import com.red.circle.other.infra.database.rds.entity.user.user.CpLevelConfig;
|
||||||
import com.red.circle.other.infra.database.rds.entity.user.user.CpRelationship;
|
import com.red.circle.other.infra.database.rds.entity.user.user.CpRelationship;
|
||||||
import com.red.circle.other.infra.database.rds.service.user.user.CpValueService;
|
import com.red.circle.other.infra.database.rds.service.user.user.CpValueService;
|
||||||
@ -16,6 +17,7 @@ import com.red.circle.other.inner.model.dto.activity.props.ActivityRewardProps;
|
|||||||
import com.red.circle.other.inner.model.dto.material.props.ProductProps;
|
import com.red.circle.other.inner.model.dto.material.props.ProductProps;
|
||||||
import com.red.circle.other.inner.model.dto.material.props.PropsResources;
|
import com.red.circle.other.inner.model.dto.material.props.PropsResources;
|
||||||
import com.red.circle.tool.core.collection.CollectionUtils;
|
import com.red.circle.tool.core.collection.CollectionUtils;
|
||||||
|
import com.red.circle.tool.core.date.TimestampUtils;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -34,7 +36,7 @@ import java.util.Objects;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class CpLevelUpAvatarFrameService {
|
public class CpLevelUpAvatarFrameService {
|
||||||
|
|
||||||
private static final int DAYS = 36500;
|
private static final int DAYS = 30;
|
||||||
|
|
||||||
private final CpValueService cpValueService;
|
private final CpValueService cpValueService;
|
||||||
private final UserProfileGateway userProfileGateway;
|
private final UserProfileGateway userProfileGateway;
|
||||||
@ -110,8 +112,9 @@ public class CpLevelUpAvatarFrameService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (propsBackpackService.getUserProps(userId, propsSourceId, PropsCommodityType.AVATAR_FRAME) != null) {
|
PropsBackpack userProps = propsBackpackService.getUserProps(userId, propsSourceId, PropsCommodityType.AVATAR_FRAME);
|
||||||
log.info("CP头像框已存在背包,跳过发放, userId={}, propsSourceId={}", userId, propsSourceId);
|
if (userProps != null && TimestampUtils.expiredIntervalMillisecond(userProps.getExpireTime(), TimestampUtils.now()) < 0) {
|
||||||
|
log.info("CP头像框未过期已存在背包,跳过发放, userId={}, propsSourceId={}", userId, propsSourceId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user