diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index 24bdf81a..262c77bf 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -1196,8 +1196,13 @@ class UserController extends BaseController $data['create_time'] = time(); $data['create_ip'] = get_client_ip(); // $data['create_device_number'] = time(); - - $user_play->add($data); + // 修改重复插入问题 增加唯一索引 记录重复插入异常 + try { + $user_play->add($data); + } catch (\Exception $e) { + Log::write('Duplicate Exception:' .json_encode($e->getMessage()), Log::ERR); + } + $this->updateLoginRecord($data); }