|
@ -3,6 +3,7 @@ package awesome.group.game.dao.bean; |
|
|
import com.baomidou.mybatisplus.annotation.IdType; |
|
|
import com.baomidou.mybatisplus.annotation.IdType; |
|
|
import com.baomidou.mybatisplus.annotation.TableId; |
|
|
import com.baomidou.mybatisplus.annotation.TableId; |
|
|
import lombok.Data; |
|
|
import lombok.Data; |
|
|
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
|
@Data |
|
|
@Data |
|
|
public class WeGameUser { |
|
|
public class WeGameUser { |
|
@ -19,4 +20,19 @@ public class WeGameUser { |
|
|
private String unionId; |
|
|
private String unionId; |
|
|
private String sessionKey; |
|
|
private String sessionKey; |
|
|
private Integer score; |
|
|
private Integer score; |
|
|
|
|
|
|
|
|
|
|
|
public String getNickname() { |
|
|
|
|
|
if (StringUtils.hasText(nickname)) { |
|
|
|
|
|
return nickname; |
|
|
|
|
|
} |
|
|
|
|
|
int len = openId.length(); |
|
|
|
|
|
return "匿名用户" + openId.substring(len - 6, len); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getAvatarUrl(){ |
|
|
|
|
|
if (StringUtils.hasText(avatarUrl)) { |
|
|
|
|
|
return avatarUrl; |
|
|
|
|
|
} |
|
|
|
|
|
return "https://thirdwx.qlogo.cn/mmopen/vi_32/SaE2E40RYKicFybiaUzFn6VZ5s8VgrkabnxUFx9JtU23M9lWEU6otWD61sTWc5oWwIS1rYbuSXwZ2LES5FO7qiaog/132"; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|