Commit 2f5076af by 高鹏

Merge branch 'feat-rsy' into 'master'

群名称#校验

See merge request rays/pcloud-book!152
parents 186c4ada c6afc4cb
......@@ -418,6 +418,9 @@ public class BookGroupBizImpl implements BookGroupBiz {
|| StringUtil.isEmpty(bookGroup.getJoinSlogan()) ) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "参数有误!");
}
if (bookGroup.getGroupQrcodeName().contains("#")){
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "名称不能包含#!");
}
BookGroup group = bookGroupDao.getById(bookGroup.getId());
if (null == group) {
throw new BookBizException(BookBizException.PARAM_IS_NULL, "群二维码不存在!");
......
......@@ -306,6 +306,9 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
if (isHaveThisClassify) {
throw new BookBizException(BookBizException.ERROR, "已存在该分类!");
}
if (classify != null && classify.contains("#")) {
throw new BookBizException(BookBizException.ERROR, "名称不能包含#!");
}
}
@ParamLog("获取社群下有多少分类")
......
......@@ -420,6 +420,9 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
if (wechatGroupName == null) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "微信群名称不能为空");
}
if (wechatGroupName.contains("#")) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "名称不能包含#");
}
ChangeGroupNameDTO changeGroupNameDTO = groupQrcodeDao.getUpdateGroupNameParam(id);
groupQrcodeDao.modifyNameById(wechatGroupName, id, updateUser);
if (changeGroupNameDTO != null) {
......
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