创建家族也加限制处理

This commit is contained in:
tianfeng 2025-12-29 16:56:41 +08:00
parent 26fb12f8ca
commit ef3ff35b91

View File

@ -14,6 +14,7 @@ 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.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.rds.entity.family.FamilyBaseInfo; import com.red.circle.other.infra.database.rds.entity.family.FamilyBaseInfo;
import com.red.circle.other.infra.database.rds.entity.family.FamilyCreateRules; import com.red.circle.other.infra.database.rds.entity.family.FamilyCreateRules;
import com.red.circle.other.infra.database.rds.entity.family.FamilyLevelConfig; import com.red.circle.other.infra.database.rds.entity.family.FamilyLevelConfig;
@ -212,6 +213,9 @@ public class FamilyCreateExe {
private void checkParam(FamilyCreateCmd cmd) { private void checkParam(FamilyCreateCmd cmd) {
ResponseAssert.isFalse(ResponseErrorCode.REQUEST_PARAMETER_ERROR, StringUtils.isBlanks( ResponseAssert.isFalse(ResponseErrorCode.REQUEST_PARAMETER_ERROR, StringUtils.isBlanks(
cmd.getFamilyAvatar(), cmd.getFamilyName())); cmd.getFamilyAvatar(), cmd.getFamilyName()));
String string = redisService.getString(FamilyKeys.USER_LEAVE.getKey());
ResponseAssert.isNull(FamilyErrorCode.USER_RECENT_LEAVE, string);
//敏感词 //敏感词
// ResponseAssert.isFalse(DynamicErrorCode.SENSITIVE_WORD_ERROR, SensitiveWordFilter.checkSensitiveWord(cmd.getFamilyName())); // ResponseAssert.isFalse(DynamicErrorCode.SENSITIVE_WORD_ERROR, SensitiveWordFilter.checkSensitiveWord(cmd.getFamilyName()));
// ResponseAssert.isFalse(DynamicErrorCode.SENSITIVE_WORD_ERROR, SensitiveWordFilter.checkSensitiveWord(cmd.getFamilyIntro())); // ResponseAssert.isFalse(DynamicErrorCode.SENSITIVE_WORD_ERROR, SensitiveWordFilter.checkSensitiveWord(cmd.getFamilyIntro()));