Commit 04a65d01 by 阮思源

修改下枚举

parent aab99556
...@@ -459,12 +459,12 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -459,12 +459,12 @@ public class BookGroupBizImpl implements BookGroupBiz {
|| null == bookGroup.getDepLabelId() || null == bookGroup.getPurLabelId() || bookGroup.getJoinGroupType() == null) { || null == bookGroup.getDepLabelId() || null == bookGroup.getPurLabelId() || bookGroup.getJoinGroupType() == null) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "参数有误!"); throw new BookBizException(BookBizException.PARAM_IS_ERROR, "参数有误!");
} }
if (JoinGroupTypeEnum.GROUP_QRCODE.code.equals(bookGroup.getJoinGroupType()) if (JoinGroupTypeEnum.GROUP_QRCODE.getCode().equals(bookGroup.getJoinGroupType())
&& (StringUtil.isEmpty(bookGroup.getJoinTitle()) && (StringUtil.isEmpty(bookGroup.getJoinTitle())
|| StringUtil.isEmpty(bookGroup.getJoinSlogan()))) { || StringUtil.isEmpty(bookGroup.getJoinSlogan()))) {
throw new BookBizException(BookBizException.PARAM_IS_ERROR, "参数有误!"); throw new BookBizException(BookBizException.PARAM_IS_ERROR, "参数有误!");
} }
if (JoinGroupTypeEnum.ROBOT.code.equals(bookGroup.getJoinGroupType()) if (JoinGroupTypeEnum.ROBOT.getCode().equals(bookGroup.getJoinGroupType())
&& (bookGroup.getIsInviteGroup() == null && (bookGroup.getIsInviteGroup() == null
|| StringUtil.isEmpty(bookGroup.getAddFriendGuide()) || StringUtil.isEmpty(bookGroup.getAddFriendGuide())
|| StringUtil.isEmpty(bookGroup.getCustomerServiceName()))) { || StringUtil.isEmpty(bookGroup.getCustomerServiceName()))) {
......
...@@ -16,11 +16,19 @@ public enum JoinGroupTypeEnum { ...@@ -16,11 +16,19 @@ public enum JoinGroupTypeEnum {
*/ */
ROBOT(2, "客服机器人"); ROBOT(2, "客服机器人");
public final Integer code; private final Integer code;
public final String name; private final String name;
JoinGroupTypeEnum(Integer code, String name) { public Integer getCode() {
return code;
}
public String getName() {
return name;
}
private JoinGroupTypeEnum(Integer code, String name) {
this.code = code; this.code = code;
this.name = name; this.name = name;
} }
......
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