From d4ea0133b16e10fea3d01eb357b51f27a2f3dd77 Mon Sep 17 00:00:00 2001
From: "ZLW-PC\\Administrator" <374861669@qq.com>
Date: Mon, 26 Mar 2018 11:47:23 +0800
Subject: [PATCH] redissession
---
app/Common/Factory.php | 31 ++
app/Common/RedisSession.php | 172 ++++++
app/Common/ReturnData.php | 19 +-
app/Common/WxComponent.php | 889 +++++++++++++++++++++++++++++++
app/Common/aes/ReadMe.txt | 4 +
app/Common/aes/demo.php | 40 ++
app/Common/aes/errorCode.php | 35 ++
app/Common/aes/pkcs7Encoder.php | 166 ++++++
app/Common/aes/sha1.php | 36 ++
app/Common/aes/wxBizMsgCrypt.php | 150 ++++++
app/Common/aes/xmlparse.php | 54 ++
lqycms.sql | 30 +-
12 files changed, 1613 insertions(+), 13 deletions(-)
create mode 100644 app/Common/Factory.php
create mode 100644 app/Common/RedisSession.php
create mode 100644 app/Common/WxComponent.php
create mode 100644 app/Common/aes/ReadMe.txt
create mode 100644 app/Common/aes/demo.php
create mode 100644 app/Common/aes/errorCode.php
create mode 100644 app/Common/aes/pkcs7Encoder.php
create mode 100644 app/Common/aes/sha1.php
create mode 100644 app/Common/aes/wxBizMsgCrypt.php
create mode 100644 app/Common/aes/xmlparse.php
diff --git a/app/Common/Factory.php b/app/Common/Factory.php
new file mode 100644
index 0000000..789c7c8
--- /dev/null
+++ b/app/Common/Factory.php
@@ -0,0 +1,31 @@
+ null, //数据库连接句柄
+ 'host' => null,
+ 'port' => null,
+ 'lifeTime' => null,
+ 'prefix' => 'PHPREDIS_SESSION:'
+ );
+
+ /**
+ * 构造函数
+ * @param $options 设置信息数组
+ */
+ public function __construct($options=array())
+ {
+ if(!class_exists("redis", false)){
+ die("必须安装redis扩展");
+ }
+ if(!isset($options['lifeTime']) || $options['lifeTime'] <= 0){
+ $options['lifeTime'] = ini_get('session.gc_maxlifetime');
+ }
+ $this->_options = array_merge($this->_options, $options);
+ }
+
+ /**
+ * 开始使用该驱动的session
+ */
+ public function begin()
+ {
+ if($this->_options['host'] === null || $this->_options['port'] === null || $this->_options['lifeTime'] === null)
+ {
+ return false;
+ }
+
+ //设置session处理函数
+ session_set_save_handler(
+ array($this, 'open'),
+ array($this, 'close'),
+ array($this, 'read'),
+ array($this, 'write'),
+ array($this, 'destory'),
+ array($this, 'gc')
+ );
+ }
+
+ /**
+ * 自动开始回话或者session_start()开始回话后第一个调用的函数
+ * 类似于构造函数的作用
+ * @param $savePath 默认的保存路径
+ * @param $sessionName 默认的参数名,PHPSESSID
+ */
+ public function open($savePath, $sessionName)
+ {
+ if(is_resource($this->_options['handler'])) return true;
+ //连接redis
+ $redisHandle = new Redis();
+ $redisHandle->connect($this->_options['host'], $this->_options['port']);
+ if(!$redisHandle){
+ return false;
+ }
+
+ $this->_options['handler'] = $redisHandle;
+// $this->gc(null);
+ return true;
+ }
+
+ /**
+ * 类似于析构函数,在write之后调用或者session_write_close()函数之后调用
+ */
+ public function close()
+ {
+ return $this->_options['handler']->close();
+ }
+
+ /**
+ * 读取session信息
+ * @param $sessionId 通过该Id唯一确定对应的session数据
+ * @return session信息/空串
+ */
+ public function read($sessionId)
+ {
+ $sessionId = $this->_options['prefix'].$sessionId;
+ return $this->_options['handler']->get($sessionId);
+ }
+
+ /**
+ * 写入或者修改session数据
+ * @param $sessionId 要写入数据的session对应的id
+ * @param $sessionData 要写入的数据,已经序列化过了
+ */
+ public function write($sessionId, $sessionData)
+ {
+ $sessionId = $this->_options['prefix'].$sessionId;
+ return $this->_options['handler']->setex($sessionId, $this->_options['lifeTime'], $sessionData);
+ }
+
+ /**
+ * 主动销毁session会话
+ * @param $sessionId 要销毁的会话的唯一id
+ */
+ public function destory($sessionId)
+ {
+ $sessionId = $this->_options['prefix'].$sessionId;
+ // $array = $this->print_stack_trace();
+ // log::write($array);
+ return $this->_options['handler']->delete($sessionId) >= 1 ? true : false;
+ }
+
+ /**
+ * 清理绘画中的过期数据
+ * @param 有效期
+ */
+ public function gc($lifeTime)
+ {
+ //获取所有sessionid,让过期的释放掉
+ //$this->_options['handler']->keys("*");
+ return true;
+ }
+
+ //打印堆栈信息
+ public function print_stack_trace()
+ {
+ $array = debug_backtrace();
+ //截取用户信息
+ $var = $this->read(session_id());
+ $s = strpos($var, "index_dk_user|");
+ $e = strpos($var, "}authId|");
+ $user = substr($var,$s+14,$e-13);
+ $user = unserialize($user);
+ //print_r($array);//信息很齐全
+ unset ( $array [0] );
+
+ if(!empty($user))
+ {
+ $traceInfo = $user['id'].'|'.$user['user_name'].'|'.$user['user_phone'].'|'.$user['presona_name'].'++++++++++++++++\n';
+ }
+ else
+ {
+ $traceInfo = '++++++++++++++++\n';
+ }
+
+ $time = date ( "y-m-d H:i:m" );
+ foreach ( $array as $t )
+ {
+ $traceInfo .= '[' . $time . '] ' . $t ['file'] . ' (' . $t ['line'] . ') ';
+ $traceInfo .= $t ['class'] . $t ['type'] . $t ['function'] . '(';
+ $traceInfo .= implode ( ', ', $t ['args'] );
+ $traceInfo .= ")\n";
+ }
+
+ $traceInfo .= '++++++++++++++++';
+ return $traceInfo;
+ }
+}
+
+//-------------------------------------------
+//示例
+//入口处调用
+
+/* $handler = new redisSession(array(
+ 'host' => "127.0.0.1",
+ 'port' => "6379"
+));
+$handler->begin(); */
\ No newline at end of file
diff --git a/app/Common/ReturnData.php b/app/Common/ReturnData.php
index 93c07cd..4bd0151 100644
--- a/app/Common/ReturnData.php
+++ b/app/Common/ReturnData.php
@@ -105,19 +105,20 @@ class ReturnData
$msg = self::$codeTexts[$code];
}
- return array('code' => $code, 'msg' => $msg, 'data' => $data);
+ return self::custom($code, $msg, $data);
}
-
+
public static function success($data = null, $msg = '')
{
+
if (empty($msg) && isset(self::$codeTexts[self::SUCCESS]))
{
$msg = self::$codeTexts[self::SUCCESS];
}
- return array('code' => self::SUCCESS, 'msg' => $msg, 'data' => $data);
+ return self::custom(self::SUCCESS, $msg, $data);
}
-
+
public static function error($code, $data = null, $msg = '')
{
if (empty($msg) && isset(self::$codeTexts[$code]))
@@ -131,11 +132,19 @@ class ReturnData
$msg = '系统错误';
}
- return array('code' => $code, 'msg' => $msg, 'data' => $data);
+ return self::custom($code, $msg, $data);
}
public static function custom($code, $msg = '', $data = null)
{
return array('code' => $code, 'msg' => $msg, 'data' => $data);
}
+
+ //判断是否成功
+ public static function checkSuccess($data)
+ {
+ if ($data['code'] == self::SUCCESS){return true;}
+
+ return false;
+ }
}
\ No newline at end of file
diff --git a/app/Common/WxComponent.php b/app/Common/WxComponent.php
new file mode 100644
index 0000000..0934653
--- /dev/null
+++ b/app/Common/WxComponent.php
@@ -0,0 +1,889 @@
+component_appid = $component_appid;
+ $this->component_appsecret = $component_appsecret;
+ $this->component_verify_ticket = $component_verify_ticket;
+ $this->encodingAesKey = $encodingAesKey;
+ $this->token = $token;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getLogcallback()
+ {
+ return $this->_logcallback;
+ }
+
+ /**
+ * @param callable $logcallback
+ */
+ public function setLogcallback($logcallback)
+ {
+ $this->_logcallback = $logcallback;
+ return $this;
+ }
+
+ /**
+ * 设置新的票据
+ * @param $component_verify_ticket
+ */
+ public function setComponentVerifyTicket($component_verify_ticket)
+ {
+ $this->component_verify_ticket = $component_verify_ticket;
+ }
+
+ /**
+ * 得到公众号服务授权的URL
+ * @param string $pre_auth_code
+ * @param string $redirect_uri
+ * @return string
+ */
+ public function getAuthCbUrl($pre_auth_code, $redirect_uri)
+ {
+ return self::WX_AUTH_CB_URL . "component_appid=" . urlencode($this->component_appid)
+ . "&pre_auth_code=" . urlencode($pre_auth_code) . "&redirect_uri=" . urlencode($redirect_uri);
+ }
+
+ /**
+ * 获得服务访问授权key
+ * @return bool|mixed {
+ * "component_access_token":"61W3mEpU66027wgNZ_MhGHNQDHnFATkDa9-2llqrMBjUwxRSNPbVsMmyD-yq8wZETSoE5NQgecigDrSHkPtIYA",
+ * "expires_in":7200
+ * }
+ */
+ public function getAccessToken()
+ {
+ $arr = array('component_appid' => $this->component_appid,
+ 'component_appsecret' => $this->component_appsecret,
+ 'component_verify_ticket' => $this->component_verify_ticket,
+ );
+ $result = $this->httpPost(self::API_URL_PREFIX . self::GET_ACCESS_TOKEN_URL, json_encode($arr));
+ if ($result) {
+ $json = json_decode($result, true);
+ if (!$json || !empty($json['errcode'])) {
+ $this->errCode = $json['errcode'];
+ $this->errMsg = $json['errmsg'];
+ return false;
+ }
+ return $json;
+ }
+ return false;
+ }
+
+ /**
+ * 获得预授权码
+ * @param $access_token
+ * @return bool|mixed{
+ * "pre_auth_code":"Cx_Dk6qiBE0Dmx4EmlT3oRfArPvwSQ-oa3NL_fwHM7VI08r52wazoZX2Rhpz1dEw",
+ * "expires_in":600
+ * }
+ */
+ public function getPreauthCode($access_token)
+ {
+ $arr = array('component_appid' => $this->component_appid);
+ $result = $this->httpPost(self::API_URL_PREFIX . self::GET_PREAUTHCODE_URL . $access_token, json_encode($arr));
+ if ($result) {
+ $json = json_decode($result, true);
+ if (!$json || !empty($json['errcode'])) {
+ $this->errCode = $json['errcode'];
+ $this->errMsg = $json['errmsg'];
+ return false;
+ }
+ return $json;
+ }
+ return false;
+ }
+
+ /**
+ * 使用授权码换取公众号的授权信息
+ * @param $access_token
+ * @param $auth_code
+ * @return bool|mixed{ "authorization_info": {
+ * "authorizer_appid": "wxf8b4f85f3a794e77",
+ * "authorizer_access_token": "QXjUqNqfYVH0yBE1iI_7vuN_9gQbpjfK7hYwJ3P7xOa88a89-Aga5x1NMYJyB8G2yKt1KCl0nPC3W9GJzw0Zzq_dBxc8pxIGUNi_bFes0qM",
+ * "expires_in": 7200,
+ * "authorizer_refresh_token": "dTo-YCXPL4llX-u1W1pPpnp8Hgm4wpJtlR6iV0doKdY",
+ * "func_info": [{ "funcscope_category": { "id": 1 } },
+ * {"funcscope_category": {"id": 2 }},
+ * {"funcscope_category": {"id": 3}}]
+ * }
+ */
+ public function getWxAuthInfo($access_token, $auth_code)
+ {
+ $arr = array('component_appid' => $this->component_appid, 'authorization_code' => $auth_code);
+ $result = $this->httpPost(self::API_URL_PREFIX . self::GET_WX_AUTH_INFO_URL . $access_token, json_encode($arr));
+ if ($result) {
+ $json = json_decode($result, true);
+ if (!$json || !empty($json['errcode'])) {
+ $this->log('test--------------' . $result);
+ $this->errCode = $json['errcode'];
+ $this->errMsg = $json['errmsg'];
+ return false;
+ }
+ return $json;
+ }
+ return false;
+ }
+
+ /**
+ * 获取(刷新)授权公众号的令牌
+ * @param $access_token
+ * @param $authorizer_appid
+ * @param $authorizer_refresh_token
+ * @return bool|mixed {
+ * "authorizer_access_token": "aaUl5s6kAByLwgV0BhXNuIFFUqfrR8vTATsoSHukcIGqJgrc4KmMJ-JlKoC_-NKCLBvuU1cWPv4vDcLN8Z0pn5I45mpATruU0b51hzeT1f8",
+ * "expires_in": 7200,
+ * "authorizer_refresh_token": "BstnRqgTJBXb9N2aJq6L5hzfJwP406tpfahQeLNxX0w"
+ * }
+ */
+ public function getWxAccessToken($access_token, $authorizer_appid, $authorizer_refresh_token)
+ {
+ $arr = array('component_appid' => $this->component_appid,
+ 'authorizer_appid' => $authorizer_appid,
+ 'authorizer_refresh_token' => $authorizer_refresh_token);
+ $result = $this->httpPost(self::API_URL_PREFIX . self::GET_WX_ACCESS_TOKEN_URL . $access_token, json_encode($arr));
+ if ($result) {
+ $json = json_decode($result, true);
+ if (!$json || !empty($json['errcode'])) {
+ $this->errCode = $json['errcode'];
+ $this->errMsg = $json['errmsg'];
+ return false;
+ }
+ return $json;
+ }
+ return false;
+ }
+
+ /**
+ * 获取授权方的账户信息
+ * @param $access_token
+ * @param $authorizer_appid
+ * @return bool|mixed {"authorizer_info": {
+ * "nick_name": "微信SDK Demo Special",
+ * "head_img": "http://wx.qlogo.cn/mmopen/GPyw0pGicibl5Eda4GmSSbTguhjg9LZjumHmVjybjiaQXnE9XrXEts6ny9Uv4Fk6hOScWRDibq1fI0WOkSaAjaecNTict3n6EjJaC/0",
+ * "service_type_info": { "id": 2 },
+ * "verify_type_info": { "id": 0 },
+ * "user_name":"gh_eb5e3a772040",
+ * "alias":"paytest01"
+ * },
+ * "authorization_info": {
+ * "appid": "wxf8b4f85f3a794e77",
+ * "func_info": [ { "funcscope_category": { "id": 1 } }, { "funcscope_category": { "id": 2 } }, { "funcscope_category": { "id": 3 } }]
+ * }}
+ */
+ public function getWxAccountInfo($access_token, $authorizer_appid)
+ {
+ $arr = array('component_appid' => $this->component_appid,
+ 'authorizer_appid' => $authorizer_appid);
+ $result = $this->httpPost(self::API_URL_PREFIX . self::GET_WX_ACCOUNT_INFO_URL . $access_token, json_encode($arr));
+ if ($result) {
+ $json = json_decode($result, true);
+ if (!$json || !empty($json['errcode'])) {
+ $this->log('test###--------------' . $result);
+ $this->errCode = $json['errcode'];
+ $this->errMsg = $json['errmsg'];
+ return false;
+ }
+ return $json;
+ }
+ return false;
+ }
+
+ /**
+ * 获取授权方的选项信息
+ * @param $access_token
+ * @param $authorizer_appid
+ * @param $option_name
+ * @return bool|mixed { "authorizer_appid":"wx7bc5ba58cabd00f4",
+ * "option_name":"voice_recognize",
+ * "option_value":"1" }
+ */
+ public function getWxOptionInfo($access_token, $authorizer_appid, $option_name)
+ {
+ $arr = array('component_appid' => $this->component_appid,
+ 'authorizer_appid' => $authorizer_appid,
+ 'option_name' => $option_name);
+ $result = $this->httpPost(self::API_URL_PREFIX . self::GET_WX_OPTION_INFO_URL . $access_token, json_encode($arr));
+ if ($result) {
+ $json = json_decode($result, true);
+ if (!$json || !empty($json['errcode'])) {
+ $this->errCode = $json['errcode'];
+ $this->errMsg = $json['errmsg'];
+ return false;
+ }
+ return $json;
+ }
+ return false;
+ }
+
+ /**
+ * 设置授权方的选项信息
+ * @param $access_token
+ * @param $authorizer_appid
+ * @param $option_name
+ * @param $option_value
+ * @return bool|mixed { "errcode":0, "errmsg":"ok" }
+ */
+ public function setWxOptionInfo($access_token, $authorizer_appid, $option_name, $option_value)
+ {
+ $arr = array('component_appid' => $this->component_appid,
+ 'authorizer_appid' => $authorizer_appid,
+ 'option_name' => $option_name,
+ 'option_value' => $option_value);
+ $result = $this->httpPost(self::API_URL_PREFIX . self::SET_WX_OPTION_INFO_URL . $access_token, json_encode($arr));
+ if ($result) {
+ $json = json_decode($result, true);
+ if (!$json || $json['errcode'] > 0) {
+ $this->errCode = $json['errcode'];
+ $this->errMsg = $json['errmsg'];
+ return false;
+ }
+ return $json;
+ }
+ return false;
+ }
+
+ /**
+ * 处理component_verify_ticket
+ *
+ */
+
+ /**
+ * @return array|bool
+ *
是的发生
','sn123456','45000.00','/uploads/2017/06/201706041951031181.jpg',1512273964,1496577749,'示例,产品,一','','是的发生',0,'0.00','50000.00',99,1,0,'0.00','0.00',NULL,NULL,0,'0.00',0,'/uploads/2017/06/201706041951031181.jpg',NULL,NULL,50,0),(2,1,1,30,'示例产品二','说的是','sn987','1.00','/uploads/2017/06/201706042011354141.jpg',1496578330,1496578313,'产品,示例,二','','',0,'3.00','2.00',106,1,3,'0.00','0.00',NULL,NULL,NULL,'0.00',NULL,'/uploads/2017/06/201706042011354141.jpg',NULL,NULL,50,0),(3,1,0,37,'示例产品三','是的发生','sn232143','5.10','/uploads/2017/06/201706042012428057.jpg',1496578380,1496578380,'示例,产品,三','','',0,'3.00','4.00',103,1,1,'0.00','0.00',NULL,NULL,NULL,'0.00',NULL,'/uploads/2017/06/201706042012428057.jpg',NULL,NULL,50,1),(4,1,0,106,'示例产品四2','电热熔
','sn9809702','5.00','/uploads/2017/06/201706042013331349.jpg',1519736409,1496578429,'示例,产品,四','','电热熔',0,'3.00','6.00',91,1,4,'0.00','0.00',NULL,NULL,1518435963,'2.00',1519905139,'/uploads/2017/06/201706042013331349.jpg',NULL,NULL,50,0); +insert into `fl_goods`(`id`,`typeid`,`tuijian`,`click`,`title`,`body`,`sn`,`price`,`litpic`,`pubdate`,`add_time`,`keywords`,`seotitle`,`description`,`status`,`shipping_fee`,`market_price`,`goods_number`,`user_id`,`sale`,`cost_price`,`goods_weight`,`point`,`comments`,`promote_start_date`,`promote_price`,`promote_end_date`,`goods_img`,`warn_number`,`spec`,`listorder`,`brand_id`) values (1,2,1,5672,'示例产品一','是的发生
','sn123456','45000.00','/uploads/2017/06/201706041951031181.jpg',1512273964,1496577749,'示例,产品,一','','是的发生',0,'0.00','50000.00',99,1,0,'0.00','0.00',NULL,NULL,0,'0.00',0,'/uploads/2017/06/201706041951031181.jpg',NULL,NULL,50,0),(2,1,1,32,'示例产品二','说的是','sn987','1.00','/uploads/2017/06/201706042011354141.jpg',1496578330,1496578313,'产品,示例,二','','',0,'3.00','2.00',106,1,3,'0.00','0.00',NULL,NULL,NULL,'0.00',NULL,'/uploads/2017/06/201706042011354141.jpg',NULL,NULL,50,0),(3,1,0,37,'示例产品三','是的发生','sn232143','5.10','/uploads/2017/06/201706042012428057.jpg',1496578380,1496578380,'示例,产品,三','','',0,'3.00','4.00',103,1,1,'0.00','0.00',NULL,NULL,NULL,'0.00',NULL,'/uploads/2017/06/201706042012428057.jpg',NULL,NULL,50,1),(4,1,0,107,'示例产品四2','电热熔
','sn9809702','5.00','/uploads/2017/06/201706042013331349.jpg',1519736409,1496578429,'示例,产品,四','','电热熔',0,'3.00','6.00',91,1,4,'0.00','0.00',NULL,NULL,1518435963,'2.00',1519905139,'/uploads/2017/06/201706042013331349.jpg',NULL,NULL,50,0); /*Table structure for table `fl_goods_brand` */ @@ -669,20 +671,19 @@ DROP TABLE IF EXISTS `fl_payment`; CREATE TABLE `fl_payment` ( `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, `pay_code` varchar(20) NOT NULL DEFAULT '' COMMENT '支付方式的英文缩写', - `pay_name` varchar(120) NOT NULL DEFAULT '' COMMENT '支付方式名称', + `pay_name` varchar(100) NOT NULL DEFAULT '' COMMENT '支付方式名称', `pay_fee` varchar(10) NOT NULL DEFAULT '0' COMMENT '支付费用', `pay_des` text NOT NULL COMMENT '支付方式描述', - `pay_order` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '支付方式在页面的显示顺序', `pay_config` text NOT NULL COMMENT '支付方式的配置信息,包括商户号和密钥什么的', `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否可用;0否;1是', `listorder` smallint(5) NOT NULL DEFAULT '0' COMMENT '排序', PRIMARY KEY (`id`), UNIQUE KEY `pay_code` (`pay_code`) -) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC COMMENT='支付方式表'; /*Data for the table `fl_payment` */ -insert into `fl_payment`(`id`,`pay_code`,`pay_name`,`pay_fee`,`pay_des`,`pay_order`,`pay_config`,`status`,`listorder`) values (1,'balance','余额支付','0','使用帐户余额支付。只有会员才能使用,通过设置信用额度,可以透支。',0,'a:0:{}',1,0),(2,'weixin','微信','0','微信',0,'a:0:{}',1,0),(3,'alipay','支付宝','0','支付宝',0,'a:0:{}',1,0),(4,'cod','货到付款','0','开通城市:×××\r\n货到付款区域:×××',0,'a:0:{}',0,0),(5,'bank','银行汇款/转帐','0','银行名称\r\n收款人信息:全称 ××× ;帐号或地址 ××× ;开户行 ×××。\r\n注意事项:办理电汇时,请在电汇单“汇款用途”一栏处注明您的订单号。',0,'a:0:{}',0,0); +insert into `fl_payment`(`id`,`pay_code`,`pay_name`,`pay_fee`,`pay_des`,`pay_config`,`status`,`listorder`) values (1,'balance','余额支付','0','使用帐户余额支付。只有会员才能使用,通过设置信用额度,可以透支。','a:0:{}',1,0),(2,'weixin','微信','0','微信','a:0:{}',1,0),(3,'alipay','支付宝','0','支付宝','a:0:{}',1,0),(4,'cod','货到付款','0','开通城市:×××\r\n货到付款区域:×××','a:0:{}',0,0),(5,'bank','银行汇款/转帐','0','银行名称\r\n收款人信息:全称 ××× ;帐号或地址 ××× ;开户行 ×××。\r\n注意事项:办理电汇时,请在电汇单“汇款用途”一栏处注明您的订单号。','a:0:{}',0,0); /*Table structure for table `fl_refund` */ @@ -776,6 +777,19 @@ CREATE TABLE `fl_searchword` ( insert into `fl_searchword`(`id`,`name`,`title`,`description`,`content`,`pubdate`,`keywords`,`click`,`litpic`,`template`,`filename`) values (1,'百度金融2','百度金融title2','百度金融description2','百度金融content2
',1496229526,'百度金融keywords2',250,'/uploads/2017/05/201705311643481302.png','tag2','bdjr2'),(2,'李彦宏','李彦宏title','李彦宏description','李彦宏content
',1484910609,'李彦宏keywords',361,'','tag','leo'),(3,'asd','asd','asd','asdsa
',1496229768,'asd',209,'','tag','asd'); +/*Table structure for table `fl_session` */ + +DROP TABLE IF EXISTS `fl_session`; + +CREATE TABLE `fl_session` ( + `session_id` varchar(255) NOT NULL, + `session_expire` int(11) NOT NULL DEFAULT '0', + `session_data` blob, + UNIQUE KEY `session_id` (`session_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +/*Data for the table `fl_session` */ + /*Table structure for table `fl_slide` */ DROP TABLE IF EXISTS `fl_slide`; @@ -932,11 +946,11 @@ CREATE TABLE `fl_token` ( `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `expired_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='token表'; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='token表'; /*Data for the table `fl_token` */ -insert into `fl_token`(`id`,`token`,`type`,`uid`,`data`,`created_at`,`expired_at`) values (1,'72d623d26a1a6d61186a97f9ccf752f7',1,1,NULL,'2017-08-07 13:29:01','2018-05-22 11:15:27'); +insert into `fl_token`(`id`,`token`,`type`,`uid`,`data`,`created_at`,`expired_at`) values (1,'72d623d26a1a6d61186a97f9ccf752f7',1,1,NULL,'2017-08-07 13:29:01','2018-05-22 11:15:27'),(2,'70a0c1ba8fb4a4c394dd2bdf7d6106ec',2,3,'','2018-03-09 12:22:03','2018-04-08 12:22:03'); /*Table structure for table `fl_user` */