|
@ -20,7 +20,7 @@ class WeChatTokenRepo {
|
|
|
*/
|
|
|
static findOne(handler) {
|
|
|
ImDb.execQuery({
|
|
|
"sql": "select access_token, expires_in, add_timestamp from wechat_access_tokens order by add_timestamp desc limit 0, 1"
|
|
|
"sql": "select access_token, expires_in, add_timestamp from wlyy.wx_access_token where acc_id = 'gh_ffd64560fb21' order by add_timestamp desc limit 0, 1"
|
|
|
, "handler": handler
|
|
|
});
|
|
|
};
|
|
@ -35,7 +35,7 @@ class WeChatTokenRepo {
|
|
|
*/
|
|
|
static save(accessToken, expireIn, createTime, handler) {
|
|
|
ImDb.execQuery({
|
|
|
"sql": "insert into wechat_access_tokens (access_token, expires_in, add_timestamp) values (?,?,?)"
|
|
|
"sql": "insert into wlyy.wx_access_token (acc_id,access_token, expires_in, add_timestamp) values ('gh_ffd64560fb21',?,?,?)"
|
|
|
, "args": [accessToken, expireIn, createTime.getTime()]
|
|
|
, "handler": handler
|
|
|
});
|