master
parent
d4f460c3ae
commit
4c84b402ad
|
|
@ -2760,9 +2760,7 @@ public class AccountService extends Controller {
|
||||||
String access_token = wechatObject.getString("access_token");
|
String access_token = wechatObject.getString("access_token");
|
||||||
|
|
||||||
String acc = wechatObject.getString("unionid");
|
String acc = wechatObject.getString("unionid");
|
||||||
logger.info("wechatObject请求成功:" + wechatObject);
|
|
||||||
JSONObject userinfoObject = WeChatOpenIdValidator.getUserInfoByOpenId(access_token, acc);
|
JSONObject userinfoObject = WeChatOpenIdValidator.getUserInfoByOpenId(access_token, acc);
|
||||||
logger.info("userinfoObject请求成功:" + userinfoObject);
|
|
||||||
|
|
||||||
reqData.putUtfString("acc", acc);
|
reqData.putUtfString("acc", acc);
|
||||||
reqData.putUtfString("code", code);
|
reqData.putUtfString("code", code);
|
||||||
|
|
@ -2874,6 +2872,14 @@ public class AccountService extends Controller {
|
||||||
//
|
//
|
||||||
// DataBase.use().executeUpdateLogin(lockSql, params3);
|
// DataBase.use().executeUpdateLogin(lockSql, params3);
|
||||||
|
|
||||||
|
// 默认添加第一个设备
|
||||||
|
String lockSql = "update account set is_lock=? WHERE id=?";
|
||||||
|
String[] params3 = new String[2];
|
||||||
|
params3[0] = 1 + "";
|
||||||
|
params3[1] = accountid + "";
|
||||||
|
|
||||||
|
DataBase.use().executeUpdateLogin(lockSql, params3);
|
||||||
|
|
||||||
this.sendResponse(ErrorCode._SUCC, resData);
|
this.sendResponse(ErrorCode._SUCC, resData);
|
||||||
} finally {
|
} finally {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue