本文整理汇总了Java中com.lqr.wechat.db.model.Groups.getPortraitUri方法的典型用法代码示例。如果您正苦于以下问题:Java Groups.getPortraitUri方法的具体用法?Java Groups.getPortraitUri怎么用?Java Groups.getPortraitUri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.lqr.wechat.db.model.Groups
的用法示例。
在下文中一共展示了Groups.getPortraitUri方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: saveOrUpdateGroup
import com.lqr.wechat.db.model.Groups; //导入方法依赖的package包/类
public synchronized void saveOrUpdateGroup(Groups groups) {
if (groups != null) {
String portrait = groups.getPortraitUri();
if (TextUtils.isEmpty(portrait)) {
portrait = RongGenerate.generateDefaultAvatar(groups.getName(), groups.getGroupId());
groups.setPortraitUri(portrait);
}
groups.saveOrUpdate("groupid = ?", groups.getGroupId());
}
}
示例2: setCreatedToTop
import com.lqr.wechat.db.model.Groups; //导入方法依赖的package包/类
private synchronized List<GroupMember> setCreatedToTop(List<GetGroupMemberResponse.ResultEntity> groupMember, String groupId) {
List<GroupMember> newList = new ArrayList<>();
GroupMember created = null;
for (GetGroupMemberResponse.ResultEntity group : groupMember) {
String groupName = null;
String groupPortraitUri = null;
Groups groups = getGroupsById(groupId);
if (groups != null) {
groupName = groups.getName();
groupPortraitUri = groups.getPortraitUri();
}
GroupMember newMember = new GroupMember(groupId,
group.getUser().getId(),
group.getUser().getNickname(),
group.getUser().getPortraitUri(),
group.getDisplayName(),
PinyinUtils.getPinyin(group.getUser().getNickname()),
PinyinUtils.getPinyin(group.getDisplayName()),
groupName,
PinyinUtils.getPinyin(groupName),
groupPortraitUri);
if (group.getRole() == 0) {
created = newMember;
} else {
newList.add(newMember);
}
}
if (created != null) {
newList.add(created);
}
Collections.reverse(newList);
return newList;
}