Commit c282fa86 authored by alex yao's avatar alex yao

fix: 昵称过长提醒

parent 10f52bd6
......@@ -4,6 +4,7 @@ import javax.annotation.Resource;
import cn.com.poc.common.utils.Assert;
import cn.com.poc.common.utils.BlContext;
import cn.com.poc.common.utils.StringUtils;
import cn.com.poc.support.security.oauth.constants.OauthConstants;
import cn.com.poc.support.security.oauth.entity.UserBaseEntity;
import cn.com.poc.user.convert.MemberInfoConvert;
......
......@@ -89,6 +89,9 @@ public class BizMemberInfoServiceImpl extends BaseServiceImpl
Assert.notNull(memberInfoEntity.getMemberId());
BizMemberInfoModel bizMemberInfoModel = repository.get(memberInfoEntity.getMemberId());
if (StringUtils.isNotBlank(memberInfoEntity.getNickName())) {
if (memberInfoEntity.getNickName().length() > 20) {
throw new I18nMessageException("exception/nickName.max.len");
}
bizMemberInfoModel.setNickName(memberInfoEntity.getNickName());
}
if (StringUtils.isNotBlank(memberInfoEntity.getAvatarUrl())) {
......
......@@ -75,3 +75,4 @@ email.is.exist=The email already exists
file.load.error=File loading failure
content.cannot.null=Content can not be null
arg.cannot.null=Arg can not be null
nickName.max.len=Overnickname
\ No newline at end of file
......@@ -75,3 +75,4 @@ email.is.exist=\u8BE5\u90AE\u7BB1\u5DF2\u5B58\u5728
file.load.error=\u6587\u4EF6\u52A0\u8F7D\u5931\u8D25
content.cannot.null=\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A
arg.cannot.null=\u8BF7\u6C42\u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A
nickName.max.len=\u6635\u79F0\u8FC7\u957F
\ No newline at end of file
......@@ -75,3 +75,4 @@ email.is.exist=\u8A72\u90F5\u7BB1\u5DF2\u5B58\u5728
file.load.error=\u6587\u4EF6\u52A0\u8F09\u5931\u6557
content.cannot.null=\u5185\u5BB9\u4E0D\u80FD\u7232\u7A7A
arg.cannot.null=\u8ACB\u6C42\u53C3\u6578\u4E0D\u80FD\u7232\u7A7A
nickName.max.len=\u6635\u7A31\u904E\u9577
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment