cn.zhxu.bp.Scoped Maven / Gradle / Ivy
The newest version!
package cn.zhxu.bp;
import com.fasterxml.jackson.annotation.JsonIgnore;
public interface Scoped {
Integer getGroupId();
String getCreateBy();
@JsonIgnore
default String getCreateUserId() {
String createBy = getCreateBy();
if (createBy == null)
return null;
int idx = createBy.indexOf(':');
if (idx <= 0) {
return null;
}
return createBy.substring(0, idx);
}
}