用户信息bug
This commit is contained in:
@@ -29,12 +29,6 @@ public class AccountCheckServiceImpl implements AccountCheckService {
|
||||
|
||||
@Override
|
||||
public String getUserId(String code) {
|
||||
// let param = {
|
||||
// appid:'wxb1f499f0a173865b',
|
||||
// secret:'833eefaf9206337d6c2d643f94baef7b',
|
||||
// js_code: res.code,
|
||||
// grant_type: 'authorization_code'
|
||||
// };
|
||||
Map param = new HashMap<>();
|
||||
param.put("appid",WX_APP_ID);
|
||||
param.put("secret",WX_APP_SECRET);
|
||||
@@ -43,7 +37,7 @@ public class AccountCheckServiceImpl implements AccountCheckService {
|
||||
String result = HttpUtils.doPost(WX_OPENID_URL, param);
|
||||
String openid = (String) JsonUtils.decode(result,Map.class).get("openid");
|
||||
String uid = userMapper.getUserByOpenid(openid);
|
||||
if (StringUtils.isEmpty(uid)){
|
||||
if (StringUtils.isEmpty(uid) && StringUtils.isEmpty(openid)){
|
||||
// 没有这个用户,需要构建用户对象
|
||||
User user = new User();
|
||||
uid = QuinnUtils.getUuid();
|
||||
|
||||
Reference in New Issue
Block a user