删除无效openid玩家

This commit is contained in:
aozhiwei 2019-09-16 17:01:09 +08:00
parent a4e99d45ff
commit ee1748d981

View File

@ -208,6 +208,17 @@ class KefuController {
}
}
protected function delOvertimeOpenid($accountid)
{
$conn = $this->getMysql($accountid);
error_log('del:' . $accountid);
$ret = $conn->execScript('DELETE FROM accounts ' .
'WHERE accountid=:accountid;',
array(
':accountid' => $accountid,
));
}
private function sendKefuMsg($accountid, $data)
{
try {
@ -231,6 +242,7 @@ class KefuController {
if ($ret_info['errcode'] == 40003) {
//无效的openid更换appid appkey导致之前的openid失效
//从db里删除这种过期的openid
$this->delOvertimeOpenid($accountid);
return true;
}
error_log('重新获取access_token');