|
@@ -3,6 +3,7 @@ package com.ym.mec.biz.dal.entity;
|
|
|
import com.ym.mec.biz.dal.enums.im.EImGroupRoleType;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.Getter;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
|
|
|
|
import com.ym.mec.common.entity.BaseEntity;
|
|
@@ -98,6 +99,9 @@ public class ImGroupMember extends BaseEntity {
|
|
|
|
|
|
public void setIsAdmin(boolean admin) {
|
|
|
isAdmin = admin;
|
|
|
+ if (admin){
|
|
|
+ this.groupRoleType = EImGroupRoleType.Owner;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public void setGroupRoleType(EImGroupRoleType groupRoleType) {
|
|
@@ -106,6 +110,9 @@ public class ImGroupMember extends BaseEntity {
|
|
|
|
|
|
public void setRoleType(String roleType) {
|
|
|
this.roleType = roleType;
|
|
|
+ if(this.groupRoleType == null){
|
|
|
+ this.groupRoleType = StringUtils.isEmpty(roleType)? EImGroupRoleType.Admin:EImGroupRoleType.Member;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public void setType(String type) {
|