where(['mer_id' => $mer_id])->find()) { return self::setErrorInfo('绑定记录未找到或已删除'); } } catch (DbException $e) { return self::setErrorInfo($e->getMessage()); } $res = self::where('mer_id', $mer_id)->update(['is_del' => 1, 'update' => time()]); if ($res) { return true; } else { return self::setErrorInfo('删除失败'); } } public static function checkOne($app_id, $sign, $sign_time) { $app_secret = self::where(['appid' => $app_id])->value('boofly_app_secret'); if (!$app_secret) { return false; } return $sign == self::sign($app_id, $app_secret, $sign_time); } public static function sign($app_id, $app_secret, $time) { return md5(md5($app_id . $time . $app_secret . $time . $app_id . $app_secret)); } }