Browse Source

返回用户安装的app列表

master
nili 6 months ago
parent
commit
aa495464ab
  1. 14
      game-service/src/main/java/awesome/group/game/service/bo/citrus/UserBo.java

14
game-service/src/main/java/awesome/group/game/service/bo/citrus/UserBo.java

@ -1,8 +1,12 @@
package awesome.group.game.service.bo.citrus; package awesome.group.game.service.bo.citrus;
import awesome.group.game.dao.bean.MatrixUser; import awesome.group.game.dao.bean.MatrixUser;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.util.List;
public class UserBo { public class UserBo {
public Integer id; public Integer id;
public String mobile; public String mobile;
@ -19,9 +23,11 @@ public class UserBo {
public Integer env; public Integer env;
public Integer status; public Integer status;//0正常,-1封禁
public String wxOpenId;//微信openId public String wxOpenId;//微信openId
public List<LocalApp> localAppList;
public long createdAt; public long createdAt;
public UserBo() { public UserBo() {
@ -44,7 +50,11 @@ public class UserBo {
this.env = u.getEnv(); this.env = u.getEnv();
this.status = u.getStatus(); this.status = u.getStatus();
this.createdAt = u.getCreatedAt().getTime(); this.createdAt = u.getCreatedAt().getTime();
if (StringUtils.hasText(u.getLocalApp())) {
Gson gson = new Gson();
this.localAppList = gson.fromJson(u.getLocalApp(), new TypeToken<List<LocalApp>>() {
}.getType());
}
if (!StringUtils.hasText(nickname)) { if (!StringUtils.hasText(nickname)) {
this.nickname = replaceWithX(this.mobile); this.nickname = replaceWithX(this.mobile);
} }

Loading…
Cancel
Save