更新用户资料 删除cp数据缓存
This commit is contained in:
parent
274d7e417c
commit
a8f97920f9
@ -15,6 +15,7 @@ import com.red.circle.other.domain.gateway.approval.ProfileApprovalGateway;
|
||||
import com.red.circle.other.domain.gateway.user.UserProfileGateway;
|
||||
import com.red.circle.other.domain.model.approval.ProfileApprovalContent;
|
||||
import com.red.circle.other.domain.model.user.UserProfile;
|
||||
import com.red.circle.other.infra.database.cache.service.cp.CpRelationshipCacheService;
|
||||
import com.red.circle.other.infra.database.mongo.service.live.RoomProfileManagerService;
|
||||
import com.red.circle.other.infra.database.rds.entity.sys.SysCountryCode;
|
||||
import com.red.circle.other.infra.database.rds.entity.user.user.BaseInfo;
|
||||
@ -28,6 +29,8 @@ import com.red.circle.other.inner.model.dto.user.PhotoItem;
|
||||
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@ -55,6 +58,7 @@ public class UpdateUserProfileCmdExe {
|
||||
private final ProfileApprovalGateway profileApprovalGateway;
|
||||
private final UserProfileAppConvertor userProfileAppConvertor;
|
||||
private final RoomProfileManagerService roomProfileManagerService;
|
||||
private final CpRelationshipCacheService cpRelationshipCacheService;
|
||||
|
||||
public UserProfileDTO execute(UserProfileModifyCmd cmd) {
|
||||
//敏感词
|
||||
@ -137,6 +141,9 @@ public class UpdateUserProfileCmdExe {
|
||||
// 更改国家 设置redis表示已修改 两年过期
|
||||
redisService.setString("IS_UPDATE_COUNTRY:" + cmd.requiredReqUserId(), "1", 730, TimeUnit.DAYS);
|
||||
}
|
||||
|
||||
cpRelationshipCacheService.remove(Collections.singletonList(cmd.requiredReqUserId()));
|
||||
|
||||
return userProfileAppConvertor.toUserProfileDTO(userProfile);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user