stanley-king 8 vuotta sitten
vanhempi
commit
6ca376d79c
2 muutettua tiedostoa jossa 35 lisäystä ja 3 poistoa
  1. 1 1
      mobile/control/fcode.php
  2. 34 2
      test/DBTest.php

+ 1 - 1
mobile/control/fcode.php

@@ -29,7 +29,7 @@ class fcodeControl extends mobileControl
 
         if(session_helper::need_wechat_author()) {
             $author = new thrid_author\wxauthor();
-            $url = "/mobile/index.php?act=fcode&op=index&common_id={$common_id}&batch_code={$batch_code}";
+            $url = BASE_SITE_URL . "/mobile/index.php?act=fcode&op=index&common_id={$common_id}&batch_code={$batch_code}";
             $author->enter($url);
             return;
         }

+ 34 - 2
test/DBTest.php

@@ -75,8 +75,6 @@ class DBTest extends PHPUnit_Framework_TestCase
         $mysql = @new mysqli('192.168.1.103', 'root', '55668899', 'pandashop', '3306');
     }
 
-
-
     public function testTableInfo()
     {
         $mod_member = Model('member');
@@ -251,4 +249,38 @@ class DBTest extends PHPUnit_Framework_TestCase
             $model->commit();
         }
     }
+
+    public function testMessage()
+    {
+        $mod_message = Model('message');
+        //INSERT INTO `lrlz_message` (`message_parent_id`,`from_member_id`,`from_member_name`,
+        //`to_member_id`,`to_member_name`,`message_body`,
+        //`message_time`,
+        //`message_update_time`,`message_type`,`message_ismore`,
+        //`read_member_id`,`del_member_id`)
+
+        // VALUES('0','0','',
+        //'36646','','你的账户于 2017-05-12 09:02:52 账户资金有变化,描述:领取红包,红包单号: 14281494512386767010 make_type=2,可用金额变化 :4.30元,冻结金额变化:0.00元。<a href=\"http://p.lrlz.com/shop/index.php?act=predeposit&op=pd_log_list\" target=\"_blank\">点击查看余额</a>',
+        //'1494550972',
+        //'1494550972','1','0',
+        //'','')
+
+        $data = ['message_parent_id' => 0,
+            'from_member_id' => 0,
+            'from_member_name' => '',
+            'to_member_name' => '',
+            'msg_content' => '你的账户于 2017-05-12 09:02:52 账户资金有变化,描述:领取红包,红包单号: 14281494512386767010 make_type=2,可用金额变化 :4.30元,冻结金额变化:0.00元。<a href=\"http://p.lrlz.com/shop/index.php?act=predeposit&op=pd_log_list\" target=\"_blank\">点击查看余额</a>',
+            'message_time' => time(),
+            'message_update_time' => time(),
+            'message_type' => 1,
+            'message_ismore' => 0,
+            'read_member_id' => '',
+            'del_member_id' => '',
+        ];
+        for ($i = 0; $i < 1000000; $i++) {
+            $data['member_id'] = mt_rand(10000,100000);
+            $insert_id = $mod_message->saveMessage($data);
+            Log::record("id = {$insert_id}",Log::DEBUG);
+        }
+    }
 }