Browse Source

微信可以不绑定

master
nili 7 months ago
parent
commit
6cd1e86598
  1. 2
      game-service/src/main/java/awesome/group/game/service/bo/matrix/UmengConfigBo.java
  2. 13
      game-service/src/main/java/awesome/group/game/service/citrus/UserService.java

2
game-service/src/main/java/awesome/group/game/service/bo/matrix/UmengConfigBo.java

@ -6,5 +6,7 @@ public class UmengConfigBo {
public String umengAppCode;
public String umengAppKey;
public boolean bindWx;
}

13
game-service/src/main/java/awesome/group/game/service/citrus/UserService.java

@ -57,6 +57,8 @@ public class UserService {
public static final int TRANSFER_SUCCESS = 3;
public static final int TRANSFER_FAIL = -1;
private Gson gson = new Gson();
public MatrixUser login(LoginReq req) {
Assert.isTrue(req != null, "非法请求");
@ -108,7 +110,16 @@ public class UserService {
public UserBo getUser(Integer uid) {
MatrixUser u = userMapper.selectById(uid);
return new UserBo(u);
MatrixApp app = new MatrixApp();
UserBo res = new UserBo(u);
if (!StringUtils.hasText(app.getUmeng())) {
return res;
}
UmengConfigBo configBo = gson.fromJson(app.getUmeng(), UmengConfigBo.class);
if (!configBo.bindWx) {
res.wxOpenId = "-1";//不需要绑定微信
}
return res;
}
public void bindAliPay(Integer uid, String name, String aliPayAccount) {

Loading…
Cancel
Save