nili
7 months ago
6 changed files with 70 additions and 8 deletions
@ -0,0 +1,35 @@ |
|||||
|
package awesome.group.game.service.bo.citrus; |
||||
|
|
||||
|
import awesome.group.game.dao.bean.MatrixUser; |
||||
|
import org.springframework.util.StringUtils; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public class TeamBo { |
||||
|
public List<Member> memberList; |
||||
|
|
||||
|
public TeamBo() { |
||||
|
} |
||||
|
|
||||
|
public TeamBo(List<MatrixUser> list) { |
||||
|
this.memberList = list.stream().map(Member::new).toList(); |
||||
|
} |
||||
|
|
||||
|
public static class Member { |
||||
|
public String nickname; |
||||
|
public String avatar; |
||||
|
public Long contributeGoldCoin; |
||||
|
|
||||
|
public Member() { |
||||
|
} |
||||
|
|
||||
|
public Member(MatrixUser u) { |
||||
|
this.nickname = u.getNickname(); |
||||
|
this.avatar = u.getAvatar(); |
||||
|
this.contributeGoldCoin = u.getContributeIncome(); |
||||
|
if (!StringUtils.hasText(this.nickname)) { |
||||
|
this.nickname = UserBo.replaceWithX(u.getMobile()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue