first commit
This commit is contained in:
commit
8a618da7ee
1
.example.env
Normal file
1
.example.env
Normal file
@ -0,0 +1 @@
|
||||
APP_DEBUG = true
[APP]
DEFAULT_TIMEZONE = Asia/Shanghai
[DATABASE]
TYPE = mysql
HOSTNAME = 127.0.0.1
DATABASE = test
USERNAME = username
PASSWORD = password
HOSTPORT = 3306
CHARSET = utf8
DEBUG = true
[LANG]
default_lang = zh-cn
|
19
.gitignore
vendored
Normal file
19
.gitignore
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
.DS_Store
|
||||
vendor
|
||||
|
||||
# local env files
|
||||
.env
|
||||
|
||||
# runtime files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
32
LICENSE.txt
Normal file
32
LICENSE.txt
Normal file
@ -0,0 +1,32 @@
|
||||
|
||||
ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
|
||||
版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn)
|
||||
All rights reserved。
|
||||
ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
|
||||
|
||||
Apache Licence是著名的非盈利开源组织Apache采用的协议。
|
||||
该协议和BSD类似,鼓励代码共享和尊重原作者的著作权,
|
||||
允许代码修改,再作为开源或商业软件发布。需要满足
|
||||
的条件:
|
||||
1. 需要给代码的用户一份Apache Licence ;
|
||||
2. 如果你修改了代码,需要在被修改的文件中说明;
|
||||
3. 在延伸的代码中(修改和有源代码衍生的代码中)需要
|
||||
带有原来代码中的协议,商标,专利声明和其他原来作者规
|
||||
定需要包含的说明;
|
||||
4. 如果再发布的产品中包含一个Notice文件,则在Notice文
|
||||
件中需要带有本协议内容。你可以在Notice中增加自己的
|
||||
许可,但不可以表现为对Apache Licence构成更改。
|
||||
具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
52
README.md
Normal file
52
README.md
Normal file
@ -0,0 +1,52 @@
|
||||
ThinkPHP 6.0
|
||||
===============
|
||||
|
||||
> 运行环境要求PHP7.1+。
|
||||
|
||||
## 主要新特性
|
||||
|
||||
* 采用`PHP7`强类型(严格模式)
|
||||
* 支持更多的`PSR`规范
|
||||
* 原生多应用支持
|
||||
* 更强大和易用的查询
|
||||
* 全新的事件系统
|
||||
* 模型事件和数据库事件统一纳入事件系统
|
||||
* 模板引擎分离出核心
|
||||
* 内部功能中间件化
|
||||
* SESSION/Cookie机制改进
|
||||
* 对Swoole以及协程支持改进
|
||||
* 对IDE更加友好
|
||||
* 统一和精简大量用法
|
||||
|
||||
## 安装
|
||||
|
||||
~~~
|
||||
composer create-project topthink/think tp 6.0.*-dev
|
||||
~~~
|
||||
|
||||
如果需要更新框架使用
|
||||
~~~
|
||||
composer update topthink/framework
|
||||
~~~
|
||||
|
||||
## 文档
|
||||
|
||||
[完全开发手册](https://www.kancloud.cn/manual/thinkphp6_0/content)
|
||||
|
||||
## 参与开发
|
||||
|
||||
请参阅 [ThinkPHP 核心框架包](https://github.com/top-think/framework)。
|
||||
|
||||
## 版权信息
|
||||
|
||||
ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
|
||||
|
||||
本项目包含的第三方源码和二进制文件之版权信息另行标注。
|
||||
|
||||
版权所有Copyright © 2006-2019 by ThinkPHP (http://thinkphp.cn)
|
||||
|
||||
All rights reserved。
|
||||
|
||||
ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
|
||||
|
||||
更多细节参阅 [LICENSE.txt](LICENSE.txt)
|
1
app/.htaccess
Normal file
1
app/.htaccess
Normal file
@ -0,0 +1 @@
|
||||
deny from all
|
117
app/BaseController.php
Normal file
117
app/BaseController.php
Normal file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace app;
|
||||
|
||||
use think\App;
|
||||
use think\exception\ValidateException;
|
||||
use think\Validate;
|
||||
|
||||
/**
|
||||
* 控制器基础类
|
||||
*/
|
||||
abstract class BaseController
|
||||
{
|
||||
/**
|
||||
* Request实例
|
||||
* @var \think\Request
|
||||
*/
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* 应用实例
|
||||
* @var \think\App
|
||||
*/
|
||||
protected $app;
|
||||
|
||||
/**
|
||||
* 是否批量验证
|
||||
* @var bool
|
||||
*/
|
||||
protected $batchValidate = false;
|
||||
|
||||
/**
|
||||
* 控制器中间件
|
||||
* @var array
|
||||
*/
|
||||
protected $middleware = [];
|
||||
|
||||
|
||||
/**
|
||||
* 构造方法
|
||||
* @access public
|
||||
* @param App $app 应用对象
|
||||
*/
|
||||
public function __construct(App $app)
|
||||
{
|
||||
$this->app = $app;
|
||||
$this->request = $this->app->request;
|
||||
|
||||
// 控制器初始化
|
||||
$this->initialize();
|
||||
}
|
||||
|
||||
// 初始化
|
||||
protected function initialize()
|
||||
{}
|
||||
|
||||
/**
|
||||
* @param $keys
|
||||
* @return array
|
||||
*/
|
||||
protected function getParams(...$keys){
|
||||
$keys = is_string($keys)?explode(','):$keys;
|
||||
$params = [];
|
||||
foreach ($keys as $key){
|
||||
$params[] = $this->request->param($key);
|
||||
}
|
||||
return $params;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证数据
|
||||
* @access protected
|
||||
* @param array $data 数据
|
||||
* @param string|array $validate 验证器名或者验证规则数组
|
||||
* @param array $message 提示信息
|
||||
* @param bool $batch 是否批量验证
|
||||
* @return array|string|true
|
||||
* @throws ValidateException
|
||||
*/
|
||||
protected function validate(array $data, $validate, array $message = [], bool $batch = false)
|
||||
{
|
||||
if (is_array($validate)) {
|
||||
$v = new Validate();
|
||||
$v->rule($validate);
|
||||
} else {
|
||||
if (strpos($validate, '.')) {
|
||||
// 支持场景
|
||||
list($validate, $scene) = explode('.', $validate);
|
||||
}
|
||||
$class = false !== strpos($validate, '\\') ? $validate : $this->app->parseClass('validate', $validate);
|
||||
$v = new $class();
|
||||
if (!empty($scene)) {
|
||||
$v->scene($scene);
|
||||
}
|
||||
}
|
||||
|
||||
$v->message($message);
|
||||
|
||||
// 是否批量验证
|
||||
if ($batch || $this->batchValidate) {
|
||||
$v->batch(true);
|
||||
}
|
||||
|
||||
return $v->failException(true)->check($data);
|
||||
}
|
||||
|
||||
}
|
29
app/BaseModel.php
Normal file
29
app/BaseModel.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/18
|
||||
* Time: 1:53 PM
|
||||
*/
|
||||
|
||||
namespace app;
|
||||
use think\Model;
|
||||
|
||||
class BaseModel extends Model
|
||||
{
|
||||
/**
|
||||
* @param mixed|string $name
|
||||
* @return array
|
||||
*/
|
||||
public function getPartData($name = null)
|
||||
{
|
||||
if(is_array($name)){
|
||||
$data = [];
|
||||
foreach ($name as $key){
|
||||
$data[$key] = parent::getData($key);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
return parent::getData($name);
|
||||
}
|
||||
}
|
68
app/ExceptionHandle.php
Normal file
68
app/ExceptionHandle.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app;
|
||||
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
use think\exception\Handle;
|
||||
use think\exception\HttpException;
|
||||
use think\exception\HttpResponseException;
|
||||
use think\exception\ValidateException;
|
||||
use think\Response;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* 应用异常处理类
|
||||
*/
|
||||
class ExceptionHandle extends Handle
|
||||
{
|
||||
/**
|
||||
* 不需要记录信息(日志)的异常类列表
|
||||
* @var array
|
||||
*/
|
||||
protected $ignoreReport = [
|
||||
HttpException::class,
|
||||
HttpResponseException::class,
|
||||
ModelNotFoundException::class,
|
||||
DataNotFoundException::class,
|
||||
ValidateException::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* 记录异常信息(包括日志或者其它方式记录)
|
||||
*
|
||||
* @access public
|
||||
* @param Throwable $exception
|
||||
* @return void
|
||||
*/
|
||||
public function report(Throwable $exception): void
|
||||
{
|
||||
// 使用内置的方式记录异常日志
|
||||
parent::report($exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render an exception into an HTTP response.
|
||||
*
|
||||
* @access public
|
||||
* @param \think\Request $request
|
||||
* @param Throwable $e
|
||||
* @return Response
|
||||
*/
|
||||
public function render($request, Throwable $e): Response
|
||||
{
|
||||
// 添加自定义异常处理机制
|
||||
|
||||
// 其他错误交给系统处理
|
||||
return parent::render($request, $e);
|
||||
}
|
||||
}
|
17
app/Request.php
Normal file
17
app/Request.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app;
|
||||
|
||||
class Request extends \think\Request
|
||||
{
|
||||
|
||||
}
|
12
app/common.php
Normal file
12
app/common.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: 流年 <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// 应用公共文件
|
40
app/common/ApiController.php
Normal file
40
app/common/ApiController.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/19
|
||||
* Time: 6:29 PM
|
||||
*/
|
||||
|
||||
namespace app\common;
|
||||
|
||||
use app\BaseController;
|
||||
use app\model\UserInfo;
|
||||
use think\App;
|
||||
|
||||
abstract class ApiController extends BaseController
|
||||
{
|
||||
/**
|
||||
* @var UserInfo
|
||||
*/
|
||||
private $currentUserInfo;
|
||||
|
||||
public function __construct(App $app)
|
||||
{
|
||||
parent::__construct($app);
|
||||
$this->initCurrentUserInfo();
|
||||
}
|
||||
|
||||
protected function initCurrentUserInfo()
|
||||
{
|
||||
$this->currentUserInfo = $this->request->user;
|
||||
}
|
||||
|
||||
protected function getCurrentUserInfo()
|
||||
{
|
||||
if (empty($this->currentUserInfo)) {
|
||||
$this->initCurrentUserInfo();
|
||||
}
|
||||
return $this->currentUserInfo;
|
||||
}
|
||||
}
|
84
app/controller/Admin.php
Normal file
84
app/controller/Admin.php
Normal file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/18
|
||||
* Time: 1:42 PM
|
||||
*/
|
||||
|
||||
namespace app\controller;
|
||||
|
||||
|
||||
use app\BaseController;
|
||||
use app\model\AdminInfo;
|
||||
use app\Request;
|
||||
use app\util\ErrorCode;
|
||||
use app\util\ErrorResponse;
|
||||
use app\util\StringUtil;
|
||||
use think\response\Json;
|
||||
|
||||
class Admin extends BaseController
|
||||
{
|
||||
public function postLogin()
|
||||
{
|
||||
$username = $this->request->param("username");
|
||||
$password = $this->request->param("password");
|
||||
if (empty($username) || empty($password)) {
|
||||
return ErrorResponse::createError(ErrorCode::ERROR_PARAM_REQUIRED, '请提交正确的参数');
|
||||
}
|
||||
usleep(500000);
|
||||
$user = AdminInfo::where('username', $username)->find();
|
||||
|
||||
if ($user->isEmpty()) {
|
||||
return ErrorResponse::createError(ErrorCode::ERROR_ADMIN_LOGIN_PWD, '用户名或者密码错误(1)');
|
||||
}
|
||||
if ($user->password != md5($username . $user->salt)) {
|
||||
return ErrorResponse::createError(ErrorCode::ERROR_ADMIN_LOGIN_PWD, '用户名或者密码错误(2)');;
|
||||
}
|
||||
$data = $user->getPartData(['id', 'username', 'email', 'avatar', 'last_login', 'sex']);
|
||||
$user->save(['last_login' => time()]);
|
||||
return Json::create($data);
|
||||
}
|
||||
|
||||
public function updatePwd()
|
||||
{
|
||||
$originPwd = $this->request->post('origin');
|
||||
$newPwd = $this->request->post('new_pwd');
|
||||
$newPwd2 = $this->request->post('new_pwd2');
|
||||
|
||||
if ($newPwd != $newPwd2) {
|
||||
return ErrorResponse::createError(
|
||||
ErrorCode::ERROR_ADMIN_LOGIN_PWD, '输入密码不一致'
|
||||
);
|
||||
}
|
||||
$admin = $this->getCurrentLoginAdmin();
|
||||
if (!$this->passwordIsCorrect($admin,$originPwd)){
|
||||
return ErrorResponse::createError(
|
||||
ErrorCode::ERROR_ADMIN_PWD_ERROR,'原始密码不正确'
|
||||
);
|
||||
}
|
||||
$salt = StringUtil::generateRandom(6);
|
||||
$admin->save([
|
||||
'password'=>StringUtil::getEncryptPassword($originPwd,$salt),
|
||||
'salt' => $salt
|
||||
]);
|
||||
return \json(['code'=>0]);
|
||||
}
|
||||
|
||||
|
||||
private function passwordIsCorrect(AdminInfo $admin, string $originPwd)
|
||||
{
|
||||
return $admin->password == md5($originPwd . $admin->salt);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return AdminInfo
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
private function getCurrentLoginAdmin()
|
||||
{
|
||||
return AdminInfo::find(4);
|
||||
}
|
||||
}
|
73
app/controller/Evaluation.php
Normal file
73
app/controller/Evaluation.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/19
|
||||
* Time: 5:02 PM
|
||||
*/
|
||||
|
||||
namespace app\controller;
|
||||
|
||||
|
||||
use app\BaseController;
|
||||
use app\common\ApiController;
|
||||
use app\model\EvaluationHistory;
|
||||
use app\service\EvaluationService;
|
||||
use app\util\ErrorCode;
|
||||
use app\util\ErrorResponse;
|
||||
use app\util\SuccessResponse;
|
||||
use think\facade\Config;
|
||||
use think\facade\Request;
|
||||
|
||||
class Evaluation extends ApiController
|
||||
{
|
||||
/**
|
||||
* 用户创建评估记录
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data = $this->request->post(array_keys($_POST));
|
||||
if (empty($data)) {
|
||||
return ErrorResponse::createError(
|
||||
ErrorCode::ERROR_PARAM_REQUIRED, '评估数据缺失'
|
||||
);
|
||||
}
|
||||
$evaluation = EvaluationHistory::create(array_merge([
|
||||
'uid' => $this->getCurrentUserInfo()->id
|
||||
], $data));
|
||||
if ($evaluation->id > 0) {
|
||||
return SuccessResponse::create();
|
||||
}
|
||||
return ErrorResponse::createError(
|
||||
ErrorCode::EVALUATION_SAVE_FAIL, '保存评估数据失败'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户评估的所有项目
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function subjects()
|
||||
{
|
||||
$subjects = Config::get('app.evaluation.subject');
|
||||
return json([
|
||||
$subjects['headache'],
|
||||
$subjects['gastrointestinal'],
|
||||
$subjects['tired'],
|
||||
$subjects['dizzy']
|
||||
]);
|
||||
}
|
||||
|
||||
private function queryByUid($uid)
|
||||
{
|
||||
return EvaluationService::findByUser($uid);
|
||||
}
|
||||
|
||||
public function all()
|
||||
{
|
||||
return SuccessResponse::create(
|
||||
$this->queryByUid($this->getCurrentUserInfo()->id)
|
||||
);
|
||||
}
|
||||
}
|
22
app/controller/Index.php
Normal file
22
app/controller/Index.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace app\controller;
|
||||
|
||||
use app\BaseController;
|
||||
use think\response\Json;
|
||||
|
||||
class Index extends BaseController
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return Json::create([
|
||||
"code" => 0,
|
||||
"message" => "running"
|
||||
]);
|
||||
}
|
||||
|
||||
public function hello($name = 'ThinkPHP6')
|
||||
{
|
||||
return 'hello,' . $name;
|
||||
}
|
||||
}
|
97
app/controller/User.php
Normal file
97
app/controller/User.php
Normal file
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/18
|
||||
* Time: 6:56 PM
|
||||
*/
|
||||
|
||||
namespace app\controller;
|
||||
|
||||
|
||||
use app\BaseController;
|
||||
use app\model\UserInfo;
|
||||
use app\util\ErrorCode;
|
||||
use app\util\ErrorResponse;
|
||||
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||
use PhpOffice\PhpSpreadsheet\Writer\Csv;
|
||||
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
|
||||
|
||||
class User extends BaseController
|
||||
{
|
||||
|
||||
public function search()
|
||||
{
|
||||
list($is_first, $gender, $city, $name) = $this->getParams(
|
||||
'is_first_to_tibet', 'gender', 'city', 'name'
|
||||
);
|
||||
$user = new UserInfo();
|
||||
$userList = UserInfo::with('detail')->select();
|
||||
return json($userList
|
||||
// ->visible([
|
||||
// 'detail'=>['address']
|
||||
// ])
|
||||
->toArray());
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$dataType = $this->request->post('type');
|
||||
// print_r($data);
|
||||
|
||||
$spreadsheet = new Spreadsheet();
|
||||
$sheet = $spreadsheet->getActiveSheet();
|
||||
$sheet->setCellValue('A1', 'Hello World !');
|
||||
// header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
||||
$filename = urlencode("评估记录_") . date('mdHi');
|
||||
// $ua = $_SERVER["HTTP_USER_AGENT"];
|
||||
// $encoded_filename = urlencode($filename);
|
||||
// $encoded_filename = str_replace("+", "%20", $encoded_filename);
|
||||
// if (preg_match("/MSIE/", $ua)) {
|
||||
// header('Content-Disposition: attachment; filename="' . $encoded_filename . '"');
|
||||
// } else if (preg_match("/Firefox/", $ua)) {
|
||||
// header('Content-Disposition: attachment; filename*="utf8\'\'' . $filename . '"');
|
||||
// } else {
|
||||
// header('Content-Disposition: attachment; filename="' . $filename . '"');
|
||||
// }
|
||||
|
||||
$writer = new Csv($spreadsheet);
|
||||
if ($dataType == 'xlsx') {
|
||||
$writer = new Xlsx($spreadsheet);
|
||||
$filename .= '.xlsx';
|
||||
}else {
|
||||
$filename .= '.csv';
|
||||
}
|
||||
header('Content-Disposition: attachment;filename=' . $filename);
|
||||
$writer->save('php://output');
|
||||
exit;
|
||||
}
|
||||
|
||||
public function getExport()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function detail(int $id)
|
||||
{
|
||||
if ($id < 1) {
|
||||
return ErrorResponse::createError(
|
||||
ErrorCode::ERROR_PARAM_ERROR, '用户编号错误'
|
||||
);
|
||||
}
|
||||
$user = UserInfo::find($id);
|
||||
if (empty($user)) {
|
||||
return ErrorResponse::createError(
|
||||
ErrorCode::ERROR_USER_NOT_EXISTS, '用户不存在'
|
||||
);
|
||||
}
|
||||
$userData = $user->getData();
|
||||
$userData['detail'] = $user->getParsedDetail();
|
||||
return json($userData);
|
||||
}
|
||||
}
|
27
app/event.php
Normal file
27
app/event.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// 事件定义文件
|
||||
return [
|
||||
'bind' => [
|
||||
],
|
||||
|
||||
'listen' => [
|
||||
'AppInit' => [],
|
||||
'HttpRun' => [],
|
||||
'HttpEnd' => [],
|
||||
'LogLevel' => [],
|
||||
'LogWrite' => [],
|
||||
],
|
||||
|
||||
'subscribe' => [
|
||||
],
|
||||
];
|
14
app/middleware.php
Normal file
14
app/middleware.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
// 全局请求缓存
|
||||
// \think\middleware\CheckRequestCache::class,
|
||||
// 多语言加载
|
||||
// \think\middleware\LoadLangPack::class,
|
||||
// Session初始化
|
||||
// \think\middleware\SessionInit::class,
|
||||
\app\middleware\Cors::class,
|
||||
\app\middleware\ApiCheck::class,
|
||||
// 页面Trace调试
|
||||
\think\middleware\TraceDebug::class,
|
||||
];
|
51
app/middleware/ApiCheck.php
Normal file
51
app/middleware/ApiCheck.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/19
|
||||
* Time: 6:35 PM
|
||||
*/
|
||||
|
||||
namespace app\middleware;
|
||||
|
||||
use app\model\UserInfo;
|
||||
use app\util\ErrorCode;
|
||||
use app\util\ErrorResponse;
|
||||
use think\facade\Config;
|
||||
use think\facade\Env;
|
||||
use think\Request;
|
||||
|
||||
|
||||
class ApiCheck
|
||||
{
|
||||
/**
|
||||
* 在进行业务前处理用户token
|
||||
* @param Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public function handle(Request $request, \Closure $next)
|
||||
{
|
||||
$open_id = Env::get('app_debug') ? 'wxaffadsf31Dfaf93' : $request->param('open_id');//'wxaffadsf31Dfaf93';
|
||||
|
||||
if (empty($open_id)) {
|
||||
return ErrorResponse::createError(
|
||||
ErrorCode::ERROR_OPENID_REQUIRED, '缺失参数open_id'
|
||||
);
|
||||
}
|
||||
$user = UserInfo::where('open_id', $open_id)->find();
|
||||
if(empty($user)){
|
||||
return ErrorResponse::createError(
|
||||
ErrorCode::ERROR_USER_NOT_EXISTS, '用户不存在或者open_id错误'
|
||||
);
|
||||
}
|
||||
$request->user = $user;
|
||||
//对于 admin -> token
|
||||
//对于 user -> open_id
|
||||
$response = $next($request);
|
||||
return $response;
|
||||
}
|
||||
}
|
27
app/middleware/Cors.php
Normal file
27
app/middleware/Cors.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/19
|
||||
* Time: 5:38 PM
|
||||
*/
|
||||
|
||||
namespace app\middleware;
|
||||
|
||||
use think\App;
|
||||
use think\Config;
|
||||
use think\Request;
|
||||
use think\Response;
|
||||
use think\response\Redirect;
|
||||
|
||||
class Cors
|
||||
{
|
||||
public function handle(Request $request, \Closure $next)
|
||||
{
|
||||
$response = $next($request);
|
||||
$response->header([
|
||||
'Access-Control-Allow-Origin' => '*'
|
||||
]);
|
||||
return $response;
|
||||
}
|
||||
}
|
16
app/model/AdminInfo.php
Normal file
16
app/model/AdminInfo.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/18
|
||||
* Time: 1:51 PM
|
||||
*/
|
||||
|
||||
namespace app\model;
|
||||
|
||||
use app\BaseModel;
|
||||
|
||||
class AdminInfo extends BaseModel
|
||||
{
|
||||
protected $table='admin_info';
|
||||
}
|
17
app/model/EvaluationHistory.php
Normal file
17
app/model/EvaluationHistory.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/19
|
||||
* Time: 5:45 PM
|
||||
*/
|
||||
|
||||
namespace app\model;
|
||||
|
||||
|
||||
use app\BaseModel;
|
||||
|
||||
class EvaluationHistory extends BaseModel
|
||||
{
|
||||
protected $table = 'evaluation_history';
|
||||
}
|
17
app/model/UserDetail.php
Normal file
17
app/model/UserDetail.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/18
|
||||
* Time: 7:23 PM
|
||||
*/
|
||||
|
||||
namespace app\model;
|
||||
|
||||
|
||||
use app\BaseModel;
|
||||
|
||||
class UserDetail extends BaseModel
|
||||
{
|
||||
protected $table = 'user_detail';
|
||||
}
|
36
app/model/UserInfo.php
Normal file
36
app/model/UserInfo.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/18
|
||||
* Time: 7:22 PM
|
||||
*/
|
||||
|
||||
namespace app\model;
|
||||
|
||||
|
||||
use app\BaseModel;
|
||||
|
||||
class UserInfo extends BaseModel
|
||||
{
|
||||
protected $table = 'user_info';
|
||||
|
||||
public function detail()
|
||||
{
|
||||
return $this->hasOne('UserDetail', 'uid', 'id');
|
||||
}
|
||||
|
||||
public function search()
|
||||
{
|
||||
return $this->query("SELECT u.avatar,u.nickname,u.username,u.open_id,d.* from user_detail d , user_info u where u.id = d.uid");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取已经格式过的用户详情
|
||||
* @return UserDetail
|
||||
*/
|
||||
public function getParsedDetail(): UserDetail
|
||||
{
|
||||
return $this->detail;
|
||||
}
|
||||
}
|
19
app/provider.php
Normal file
19
app/provider.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
use app\ExceptionHandle;
|
||||
use app\Request;
|
||||
|
||||
// 容器Provider定义文件
|
||||
return [
|
||||
'think\Request' => Request::class,
|
||||
'think\exception\Handle' => ExceptionHandle::class,
|
||||
];
|
74
app/service/EvaluationService.php
Normal file
74
app/service/EvaluationService.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/19
|
||||
* Time: 5:47 PM
|
||||
*/
|
||||
|
||||
namespace app\service;
|
||||
|
||||
|
||||
use app\model\EvaluationHistory;
|
||||
use app\util\DataStatus;
|
||||
use think\facade\Config;
|
||||
|
||||
class EvaluationService
|
||||
{
|
||||
/**
|
||||
* @param int $id
|
||||
* @return EvaluationHistory|null
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public static function findRecord(int $id)
|
||||
{
|
||||
return EvaluationHistory::find($id);
|
||||
}
|
||||
|
||||
public static function parseEvaluationData($item)
|
||||
{
|
||||
$data = [];
|
||||
$subjects = Config::get('app.evaluation.subject');
|
||||
$results = [
|
||||
['未患有急性高原反应', ''],
|
||||
['属于轻度高反', '适当休息,每天自评一次'],
|
||||
['属于中度高反', '就近就诊(基层医疗机构)'],
|
||||
['属于重度高反', '联系120,医院急诊留观或进入抢救室'],
|
||||
];
|
||||
if (!empty($item)) {
|
||||
$data = [
|
||||
'score' => 0,
|
||||
'options' => []
|
||||
];
|
||||
foreach ($subjects as $key => $sub) {
|
||||
$data['options'][] = array_merge([
|
||||
'subject' => $sub['subject'],
|
||||
], $sub['options'][$item[$key]]);
|
||||
$data['score'] += $sub['options'][$item[$key]]['score'];
|
||||
}
|
||||
$level = 0;
|
||||
if ($data['score'] < 3) $level = 0;
|
||||
elseif ($data['score'] <= 5) $level = 1;
|
||||
elseif ($data['score'] <= 9) $level = 2;
|
||||
else $level = 3;
|
||||
$data['result'] = $results[$level][0];
|
||||
$data['create_time'] = $item['create_time'];
|
||||
$data['suggest'] = $results[$level][1];
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
public static function findByUser(int $uid)
|
||||
{
|
||||
$data = EvaluationHistory::where('uid', $uid)
|
||||
->where(DataStatus::NormalCondition())
|
||||
->select()->toArray();
|
||||
foreach ($data as $k => $v) {
|
||||
//array_merge(['raw' => $v], self::parseEvaluationData($v));
|
||||
$data[$k] = self::parseEvaluationData($v);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
}
|
43
app/util/DataStatus.php
Normal file
43
app/util/DataStatus.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/19
|
||||
* Time: 9:41 PM
|
||||
*/
|
||||
|
||||
namespace app\util;
|
||||
|
||||
|
||||
class DataStatus
|
||||
{
|
||||
const Normal = 1;
|
||||
const Delete = -1;
|
||||
const Disabled = 2;
|
||||
/**
|
||||
* @var string 字段名称
|
||||
*/
|
||||
const FieldKey = 'status';
|
||||
|
||||
/**
|
||||
* 正常状态条件
|
||||
* @return array
|
||||
*/
|
||||
public static function NormalCondition()
|
||||
{
|
||||
return [
|
||||
self::FieldKey => self::Normal
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除状态条件
|
||||
* @return array
|
||||
*/
|
||||
public static function DeleteCondition()
|
||||
{
|
||||
return [
|
||||
self::FieldKey => self::Delete
|
||||
];
|
||||
}
|
||||
}
|
64
app/util/ErrorResponse.php
Normal file
64
app/util/ErrorResponse.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/18
|
||||
* Time: 4:06 PM
|
||||
*/
|
||||
|
||||
namespace app\util;
|
||||
|
||||
|
||||
use think\Response;
|
||||
use think\response\Json;
|
||||
|
||||
class ErrorCode
|
||||
{
|
||||
/**
|
||||
* 参数不足
|
||||
*/
|
||||
const ERROR_PARAM_REQUIRED = 10001;
|
||||
/**
|
||||
* 参数错误
|
||||
*/
|
||||
const ERROR_PARAM_ERROR = 10002;
|
||||
/**
|
||||
* @var 缺失用户openid
|
||||
*/
|
||||
const ERROR_OPENID_REQUIRED = 10003;
|
||||
//用户
|
||||
/**
|
||||
* 用户名或密码错误
|
||||
*/
|
||||
const ERROR_ADMIN_LOGIN_PWD = 2101;
|
||||
/**
|
||||
* 原始密码不正确
|
||||
*/
|
||||
const ERROR_ADMIN_PWD_ERROR = 21010;
|
||||
/**
|
||||
* 输入的密码不一致
|
||||
*/
|
||||
const ERROR_ADMIN_PWD_UN_EQUAL = 21012;
|
||||
|
||||
//用户
|
||||
/**
|
||||
* 用户不存在
|
||||
*/
|
||||
const ERROR_USER_NOT_EXISTS = 22001;
|
||||
|
||||
/**
|
||||
* 评估
|
||||
*/
|
||||
const EVALUATION_SAVE_FAIL = 23005;
|
||||
}
|
||||
|
||||
class ErrorResponse extends Json
|
||||
{
|
||||
public static function createError($errorCode, $errorMessage = ''): Response
|
||||
{
|
||||
return parent::create([
|
||||
"code" => $errorCode,
|
||||
"message" => $errorMessage
|
||||
]); // TODO: Change the autogenerated stub
|
||||
}
|
||||
}
|
29
app/util/StringUtil.php
Normal file
29
app/util/StringUtil.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/18
|
||||
* Time: 5:15 PM
|
||||
*/
|
||||
|
||||
namespace app\util;
|
||||
|
||||
|
||||
class StringUtil
|
||||
{
|
||||
public static function createPassword(string $originPassword,string &$salt = null)
|
||||
{
|
||||
$salt = self::generateRandom(6);
|
||||
return md5($originPassword.$salt);
|
||||
}
|
||||
public static function getEncryptPassword(string $originPassword,string $salt = null){
|
||||
return md5($originPassword.$salt);
|
||||
}
|
||||
|
||||
public static function generateRandom(int $len)
|
||||
{
|
||||
//取随机10位字符串
|
||||
$strings = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890qwertyuiopasdfghjklzxcvbnm";
|
||||
return substr(str_shuffle($strings), mt_rand(0, strlen($strings) - $len -1), $len);
|
||||
}
|
||||
}
|
22
app/util/SuccessResponse.php
Normal file
22
app/util/SuccessResponse.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/19
|
||||
* Time: 7:46 PM
|
||||
*/
|
||||
|
||||
namespace app\util;
|
||||
|
||||
|
||||
use think\Response;
|
||||
use think\response\Json;
|
||||
|
||||
class SuccessResponse extends Json
|
||||
{
|
||||
public static function create($data = null, string $type = '', int $code = 200): Response
|
||||
{
|
||||
$data = $data ?? ['code' => 0, 'message' => 'success'];
|
||||
return parent::create($data, $type, $code);
|
||||
}
|
||||
}
|
26
build.example.php
Normal file
26
build.example.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* php think build 自动生成应用的目录结构的定义示例
|
||||
*/
|
||||
return [
|
||||
// 需要自动创建的文件
|
||||
'__file__' => [],
|
||||
// 需要自动创建的目录
|
||||
'__dir__' => ['controller', 'model', 'view'],
|
||||
// 需要自动创建的控制器
|
||||
'controller' => ['Index'],
|
||||
// 需要自动创建的模型
|
||||
'model' => ['User'],
|
||||
// 需要自动创建的模板
|
||||
'view' => ['index/index'],
|
||||
];
|
42
composer.json
Normal file
42
composer.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "topthink/think",
|
||||
"description": "the new thinkphp framework",
|
||||
"type": "project",
|
||||
"keywords": [
|
||||
"framework",
|
||||
"thinkphp",
|
||||
"ORM"
|
||||
],
|
||||
"homepage": "http://thinkphp.cn/",
|
||||
"license": "Apache-2.0",
|
||||
"authors": [
|
||||
{
|
||||
"name": "liu21st",
|
||||
"email": "liu21st@gmail.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.1.0",
|
||||
"topthink/framework": "6.0.*-dev",
|
||||
"topthink/think-view": "^1.0",
|
||||
"symfony/var-dumper":"^4.2",
|
||||
"phpoffice/phpspreadsheet": "^1.7"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"app\\": "app"
|
||||
},
|
||||
"psr-0": {
|
||||
"": "extend/"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist"
|
||||
},
|
||||
"scripts": {
|
||||
"post-autoload-dump": [
|
||||
"@php think service:discover",
|
||||
"@php think vendor:publish"
|
||||
]
|
||||
}
|
||||
}
|
1088
composer.lock
generated
Normal file
1088
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
50
config/app.php
Normal file
50
config/app.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 应用设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
use think\facade\Env;
|
||||
|
||||
return [
|
||||
// 应用地址
|
||||
'app_host' => Env::get('app.host', ''),
|
||||
// 应用的命名空间
|
||||
'app_namespace' => '',
|
||||
// 是否启用路由
|
||||
'with_route' => true,
|
||||
// 是否启用事件
|
||||
'with_event' => true,
|
||||
// 自动多应用模式
|
||||
'auto_multi_app' => false,
|
||||
// 应用映射(自动多应用模式有效)
|
||||
'app_map' => [],
|
||||
// 域名绑定(自动多应用模式有效)
|
||||
'domain_bind' => [],
|
||||
// 禁止URL访问的应用列表(自动多应用模式有效)
|
||||
'deny_app_list' => [],
|
||||
// 默认应用
|
||||
'default_app' => 'index',
|
||||
// 默认时区
|
||||
'default_timezone' => 'Asia/Shanghai',
|
||||
|
||||
// 异常页面的模板文件
|
||||
'exception_tmpl' => app()->getThinkPath() . 'tpl/think_exception.tpl',
|
||||
|
||||
// 错误显示信息,非调试模式有效
|
||||
'error_message' => '页面错误!请稍后再试~',
|
||||
// 显示错误信息
|
||||
'show_error_msg' => false,
|
||||
'evaluation' => [
|
||||
'subject' => include(__DIR__.'/evaluation_subject.php'),
|
||||
]
|
||||
];
|
39
config/cache.php
Normal file
39
config/cache.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
use think\facade\Env;
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 缓存设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// 默认缓存驱动
|
||||
'default' => Env::get('cache.driver', 'file'),
|
||||
|
||||
// 缓存连接方式配置
|
||||
'stores' => [
|
||||
'file' => [
|
||||
// 驱动方式
|
||||
'type' => 'File',
|
||||
// 缓存保存目录
|
||||
'path' => '',
|
||||
// 缓存前缀
|
||||
'prefix' => '',
|
||||
// 缓存有效期 0表示永久缓存
|
||||
'expire' => 0,
|
||||
// 缓存标签前缀
|
||||
'tag_prefix' => 'tag:',
|
||||
// 序列化机制 例如 ['serialize', 'unserialize']
|
||||
'serialize' => [],
|
||||
],
|
||||
// 更多的缓存连接
|
||||
],
|
||||
];
|
21
config/console.php
Normal file
21
config/console.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 控制台配置
|
||||
// +----------------------------------------------------------------------
|
||||
return [
|
||||
// 执行用户(Windows下无效)
|
||||
'user' => null,
|
||||
// 指令定义
|
||||
'commands' => [
|
||||
],
|
||||
];
|
28
config/cookie.php
Normal file
28
config/cookie.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Cookie设置
|
||||
// +----------------------------------------------------------------------
|
||||
return [
|
||||
// cookie 保存时间
|
||||
'expire' => 0,
|
||||
// cookie 保存路径
|
||||
'path' => '/',
|
||||
// cookie 有效域名
|
||||
'domain' => '',
|
||||
// cookie 启用安全传输
|
||||
'secure' => false,
|
||||
// httponly设置
|
||||
'httponly' => false,
|
||||
// 是否使用 setcookie
|
||||
'setcookie' => true,
|
||||
];
|
69
config/database.php
Normal file
69
config/database.php
Normal file
@ -0,0 +1,69 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
use think\facade\Env;
|
||||
|
||||
return [
|
||||
// 默认使用的数据库连接配置
|
||||
'default' => Env::get('database.driver', 'mysql'),
|
||||
|
||||
// 数据库连接配置信息
|
||||
'connections' => [
|
||||
'mysql' => [
|
||||
// 数据库类型
|
||||
'type' => Env::get('database.type', 'mysql'),
|
||||
// 服务器地址
|
||||
'hostname' => Env::get('database.hostname', '127.0.0.1'),
|
||||
// 数据库名
|
||||
'database' => Env::get('database.database', ''),
|
||||
// 用户名
|
||||
'username' => Env::get('database.username', 'root'),
|
||||
// 密码
|
||||
'password' => Env::get('database.password', ''),
|
||||
// 端口
|
||||
'hostport' => Env::get('database.hostport', '3306'),
|
||||
// 连接dsn
|
||||
'dsn' => '',
|
||||
// 数据库连接参数
|
||||
'params' => [],
|
||||
// 数据库编码默认采用utf8
|
||||
'charset' => Env::get('database.charset', 'utf8'),
|
||||
// 数据库表前缀
|
||||
'prefix' => Env::get('database.prefix', ''),
|
||||
// 数据库调试模式
|
||||
'debug' => Env::get('database.debug', true),
|
||||
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
|
||||
'deploy' => 0,
|
||||
// 数据库读写是否分离 主从式有效
|
||||
'rw_separate' => false,
|
||||
// 读写分离后 主服务器数量
|
||||
'master_num' => 1,
|
||||
// 指定从服务器序号
|
||||
'slave_no' => '',
|
||||
// 是否严格检查字段是否存在
|
||||
'fields_strict' => true,
|
||||
// 是否需要进行SQL性能分析
|
||||
'sql_explain' => false,
|
||||
// Builder类
|
||||
'builder' => '',
|
||||
// Query类
|
||||
'query' => '',
|
||||
// 是否需要断线重连
|
||||
'break_reconnect' => false,
|
||||
],
|
||||
|
||||
// 更多的数据库配置信息
|
||||
],
|
||||
// 自动写入时间戳字段
|
||||
'auto_timestamp' => false,
|
||||
// 时间字段取出后的默认时间格式
|
||||
'datetime_format' => 'Y-m-d H:i:s',
|
||||
];
|
49
config/evaluation_subject.php
Normal file
49
config/evaluation_subject.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: yancheng<cheng@love.xiaoyan.me>
|
||||
* Date: 2019/6/19
|
||||
* Time: 5:11 PM
|
||||
*/
|
||||
return [
|
||||
'headache' => [
|
||||
'title' => '您是否感到头疼不适?',
|
||||
'subject' => '头痛',
|
||||
'options' => [
|
||||
['text' => '无头痛', 'score' => 0],
|
||||
['text' => '轻度头痛', 'score' => 1],
|
||||
['text' => '重度头痛', 'score' => 2],
|
||||
['text' => '严重头痛,丧失活动能力', 'score' => 3],
|
||||
]
|
||||
],
|
||||
'gastrointestinal' => [
|
||||
'title' => '您是否感觉到胃肠道不适?',
|
||||
'subject' => '胃肠道症状',
|
||||
'options' => [
|
||||
['text' => '食欲好', 'score' => 0],
|
||||
['text' => '食欲不振或恶心', 'score' => 1],
|
||||
['text' => '恶心或呕吐(小于等于5次呕吐)', 'score' => 2],
|
||||
['text' => '严重恶心或呕吐(大于5次呕吐),丧失活动能力', 'score' => 3],
|
||||
]
|
||||
],
|
||||
'tired' => [
|
||||
'title' => '您是否感觉到疲劳或虚弱?',
|
||||
'subject' => '劳累或虚弱',
|
||||
'options' => [
|
||||
['text' => '疲劳或虚弱', 'score' => 0],
|
||||
['text' => '轻度疲劳或虚弱', 'score' => 1],
|
||||
['text' => '重度疲劳或虚弱', 'score' => 2],
|
||||
['text' => '严重疲劳或虚弱,丧失活动能力', 'score' => 3],
|
||||
]
|
||||
],
|
||||
'dizzy' => [
|
||||
'title' => '您是否感觉到头晕或眩晕?',
|
||||
'subject' => '头晕或眩晕',
|
||||
'options' => [
|
||||
['text' => '无头晕或眩晕', 'score' => 0],
|
||||
['text' => '轻度头晕或眩晕', 'score' => 1],
|
||||
['text' => '重度头晕或眩晕', 'score' => 2],
|
||||
['text' => '严重头晕或眩晕,丧失活动能力', 'score' => 3],
|
||||
]
|
||||
],
|
||||
];
|
20
config/filesystem.php
Normal file
20
config/filesystem.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
use think\facade\Env;
|
||||
|
||||
return [
|
||||
'default' => Env::get('filesystem.driver', 'local'),
|
||||
'disks' => [
|
||||
'local' => [
|
||||
'driver' => 'local',
|
||||
'root' => app()->getRuntimePath() . 'storage',
|
||||
],
|
||||
'public' => [
|
||||
'driver' => 'local',
|
||||
'root' => app()->getRootPath() . 'public/storage',
|
||||
'url' => '/storage',
|
||||
'visibility' => 'public',
|
||||
],
|
||||
// 更多的磁盘配置信息
|
||||
],
|
||||
];
|
37
config/lang.php
Normal file
37
config/lang.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 多语言设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
use think\facade\Env;
|
||||
|
||||
return [
|
||||
// 默认语言
|
||||
'default_lang' => Env::get('lang.default_lang', 'zh-cn'),
|
||||
// 允许的语言列表
|
||||
'allow_lang_list' => [],
|
||||
// 多语言自动侦测变量名
|
||||
'detect_var' => 'lang',
|
||||
// 是否使用Cookie记录
|
||||
'use_cookie' => true,
|
||||
// 多语言cookie变量
|
||||
'cookie_var' => 'think_lang',
|
||||
// 扩展语言包
|
||||
'extend_list' => [],
|
||||
// Accept-Language转义为对应语言包名称
|
||||
'accept_language' => [
|
||||
'zh-hans-cn' => 'zh-cn',
|
||||
],
|
||||
// 是否支持语言分组
|
||||
'allow_group' => false,
|
||||
];
|
30
config/log.php
Normal file
30
config/log.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 日志设置
|
||||
// +----------------------------------------------------------------------
|
||||
return [
|
||||
// 日志记录方式,内置 file socket 支持扩展
|
||||
'type' => 'File',
|
||||
// 日志保存目录
|
||||
'path' => '',//dirname(__DIR__).'/runtime',
|
||||
// 日志记录级别
|
||||
'level' => [],
|
||||
// 单文件日志写入
|
||||
'single' => false,
|
||||
// 独立日志级别
|
||||
'apart_level' => ['error','sql'],
|
||||
// 最大日志文件数量
|
||||
'max_files' => 500,
|
||||
// 是否关闭日志写入
|
||||
'close' => false,
|
||||
];
|
65
config/route.php
Normal file
65
config/route.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 应用设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// pathinfo分隔符
|
||||
'pathinfo_depr' => '/',
|
||||
// URL伪静态后缀
|
||||
'url_html_suffix' => 'html',
|
||||
// URL普通方式参数 用于自动生成
|
||||
'url_common_param' => true,
|
||||
// 是否开启路由延迟解析
|
||||
'url_lazy_route' => false,
|
||||
// 是否强制使用路由
|
||||
'url_route_must' => false,
|
||||
// 合并路由规则
|
||||
'route_rule_merge' => false,
|
||||
// 路由是否完全匹配
|
||||
'route_complete_match' => false,
|
||||
// 使用注解路由
|
||||
'route_annotation' => false,
|
||||
// 是否开启路由缓存
|
||||
'route_check_cache' => false,
|
||||
// 路由缓存连接参数
|
||||
'route_cache_option' => [],
|
||||
// 路由缓存Key
|
||||
'route_check_cache_key' => '',
|
||||
// 访问控制器层名称
|
||||
'controller_layer' => 'controller',
|
||||
// 空控制器名
|
||||
'empty_controller' => 'Error',
|
||||
// 是否使用控制器后缀
|
||||
'controller_suffix' => false,
|
||||
// 默认的路由变量规则
|
||||
'default_route_pattern' => '[\w\.]+',
|
||||
// 是否自动转换URL中的控制器和操作名
|
||||
'url_convert' => true,
|
||||
// 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
|
||||
'request_cache' => false,
|
||||
// 请求缓存有效期
|
||||
'request_cache_expire' => null,
|
||||
// 全局请求缓存排除规则
|
||||
'request_cache_except' => [],
|
||||
// 默认控制器名
|
||||
'default_controller' => 'Index',
|
||||
// 默认操作名
|
||||
'default_action' => 'index',
|
||||
// 操作方法后缀
|
||||
'action_suffix' => '',
|
||||
// 默认JSONP格式返回的处理方法
|
||||
'default_jsonp_handler' => 'jsonpReturn',
|
||||
// 默认JSONP处理方法
|
||||
'var_jsonp_handler' => 'callback',
|
||||
];
|
27
config/session.php
Normal file
27
config/session.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | 会话设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// session name
|
||||
'name' => '',
|
||||
// SESSION_ID的提交变量,解决flash上传跨域
|
||||
'var_session_id' => '',
|
||||
// 驱动方式 支持file redis memcache memcached
|
||||
'type' => 'file',
|
||||
// 过期时间
|
||||
'expire' => 0,
|
||||
// 前缀
|
||||
'prefix' => '',
|
||||
];
|
25
config/template.php
Normal file
25
config/template.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 模板设置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// 模板引擎类型使用Think
|
||||
'type' => 'Think',
|
||||
// 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
|
||||
'auto_rule' => 1,
|
||||
// 模板路径
|
||||
'view_path' => '',
|
||||
// 模板后缀
|
||||
'view_suffix' => 'html',
|
||||
// 模板文件名分隔符
|
||||
'view_depr' => DIRECTORY_SEPARATOR,
|
||||
// 模板引擎普通标签开始标记
|
||||
'tpl_begin' => '{',
|
||||
// 模板引擎普通标签结束标记
|
||||
'tpl_end' => '}',
|
||||
// 标签库标签开始标记
|
||||
'taglib_begin' => '{',
|
||||
// 标签库标签结束标记
|
||||
'taglib_end' => '}',
|
||||
];
|
27
config/trace.php
Normal file
27
config/trace.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | Trace设置 开启调试模式后有效
|
||||
// +----------------------------------------------------------------------
|
||||
return [
|
||||
// 内置Html 支持扩展
|
||||
'type' => 'Console',
|
||||
'trace_tabs' => [
|
||||
'base'=>'基本',
|
||||
'file'=>'文件',
|
||||
'info'=>'流程',
|
||||
'error'=>'错误',
|
||||
'sql'=>'SQL',
|
||||
'debug'=>'调试',
|
||||
'user'=>'用户'
|
||||
]
|
||||
];
|
2
extend/.gitignore
vendored
Normal file
2
extend/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
8
public/.htaccess
Normal file
8
public/.htaccess
Normal file
@ -0,0 +1,8 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
Options +FollowSymlinks -Multiviews
|
||||
RewriteEngine On
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
|
||||
</IfModule>
|
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
24
public/index.php
Normal file
24
public/index.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// [ 应用入口文件 ]
|
||||
namespace think;
|
||||
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
// 执行HTTP应用并响应
|
||||
$http = (new App())->http;
|
||||
|
||||
$response = $http->run();
|
||||
|
||||
$response->send();
|
||||
|
||||
$http->end($response);
|
2
public/robots.txt
Normal file
2
public/robots.txt
Normal file
@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow:
|
17
public/router.php
Normal file
17
public/router.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
// $Id$
|
||||
|
||||
if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) {
|
||||
return false;
|
||||
} else {
|
||||
require __DIR__ . "/index.php";
|
||||
}
|
2
public/static/.gitignore
vendored
Normal file
2
public/static/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
16
route/app.php
Normal file
16
route/app.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
use think\facade\Route;
|
||||
|
||||
Route::get('hello', function () {
|
||||
return 'hello!';
|
||||
});
|
||||
Route::get('user/detail/:id','User/detail');
|
59
runtime/201906/18.log
Normal file
59
runtime/201906/18.log
Normal file
@ -0,0 +1,59 @@
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:44:05+08:00] ::1 GET localhost:10086/admin/login?username=admin&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.207916s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.135546s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` IN (admin,99d310ce9b1326045cf1446c5840a08c) LIMIT 1 [ RunTime:0.129722s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:48:39+08:00] ::1 GET localhost:10086/admin/login?username=admin&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.198592s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.086700s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `username` = 'admin' AND `password` = '99d310ce9b1326045cf1446c5840a08c' LIMIT 1 [ RunTime:0.145541s ]
|
||||
[ error ] [0]Argument 1 passed to app\BaseModel::getData() must be of the type string or null, array given, called in /Users/keley/dev/altitudereaction/api/app/controller/Admin.php on line 33[/Users/keley/dev/altitudereaction/api/app/BaseModel.php:14]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:50:07+08:00] ::1 GET localhost:10086/admin/login?username=admin&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.126784s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.101802s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `username` = 'admin' LIMIT 1 [ RunTime:0.079279s ]
|
||||
[ error ] [0]method not exist:think\db\Query->empty[/Users/keley/dev/altitudereaction/api/vendor/topthink/framework/src/think/db/BaseQuery.php:139]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:50:29+08:00] ::1 GET localhost:10086/admin/login?username=admin&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.117465s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.092046s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `username` = 'admin' LIMIT 1 [ RunTime:0.122735s ]
|
||||
[ error ] [0]Argument 1 passed to app\BaseModel::getData() must be of the type string or null, array given, called in /Users/keley/dev/altitudereaction/api/app/controller/Admin.php on line 33[/Users/keley/dev/altitudereaction/api/app/BaseModel.php:14]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:50:52+08:00] ::1 GET localhost:10086/admin/login?username=admin&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.473969s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.077633s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `username` = 'admin' LIMIT 1 [ RunTime:0.099419s ]
|
||||
[ error ] [0]Argument 1 passed to app\BaseModel::getData() must be of the type string or null, array given, called in /Users/keley/dev/altitudereaction/api/app/controller/Admin.php on line 33[/Users/keley/dev/altitudereaction/api/app/BaseModel.php:14]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:50:54+08:00] ::1 GET localhost:10086/admin/login?username=admin&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.124527s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.073547s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `username` = 'admin' LIMIT 1 [ RunTime:0.093094s ]
|
||||
[ error ] [0]Argument 1 passed to app\BaseModel::getData() must be of the type string or null, array given, called in /Users/keley/dev/altitudereaction/api/app/controller/Admin.php on line 33[/Users/keley/dev/altitudereaction/api/app/BaseModel.php:14]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:51:07+08:00] ::1 GET localhost:10086/admin/login?username=admin&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.143574s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.306701s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `username` = 'admin' LIMIT 1 [ RunTime:0.143909s ]
|
||||
[ error ] [0]Argument 1 passed to app\BaseModel::getData() must be of the type string or null, array given, called in /Users/keley/dev/altitudereaction/api/app/controller/Admin.php on line 34[/Users/keley/dev/altitudereaction/api/app/BaseModel.php:14]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:52:48+08:00] ::1 GET localhost:10086/admin/login?username=admin&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.144833s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.100029s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `username` = 'admin' LIMIT 1 [ RunTime:0.125900s ]
|
||||
[ error ] [0]Argument 1 passed to app\BaseModel::getPartData() must be of the type string or null, array given, called in /Users/keley/dev/altitudereaction/api/app/controller/Admin.php on line 33[/Users/keley/dev/altitudereaction/api/app/BaseModel.php:15]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:53:32+08:00] ::1 GET localhost:10086/admin/login?username=admin&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.162204s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.088442s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `username` = 'admin' LIMIT 1 [ RunTime:0.094235s ]
|
||||
[ error ] [0]Argument 1 passed to app\BaseModel::getPartData() must be an instance of app\object or null, array given, called in /Users/keley/dev/altitudereaction/api/app/controller/Admin.php on line 33[/Users/keley/dev/altitudereaction/api/app/BaseModel.php:15]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:54:28+08:00] ::1 GET localhost:10086/admin/login?username=admin&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.851370s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.175712s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `username` = 'admin' LIMIT 1 [ RunTime:0.216947s ]
|
||||
[ sql ] [ SQL ] UPDATE `admin_info` SET `last_login` = 1560848067 WHERE `id` = 4 [ RunTime:0.435021s ]
|
105
runtime/log/201906/18.log
Normal file
105
runtime/log/201906/18.log
Normal file
@ -0,0 +1,105 @@
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T13:54:17+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.119652s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.084419s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` = 4 LIMIT 1 [ RunTime:0.101957s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T13:56:35+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.188721s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.057082s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` = 4 LIMIT 1 [ RunTime:0.182802s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T13:57:03+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.123025s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.089469s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` = 4 LIMIT 1 [ RunTime:0.071443s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T13:58:54+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.109069s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.130372s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` = 4 LIMIT 1 [ RunTime:0.094987s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T13:59:55+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ error ] [2002]SQLSTATE[HY000] [2002] Operation timed out[/Users/keley/dev/altitudereaction/api/vendor/topthink/framework/src/think/db/PDOConnection.php:407]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T14:00:08+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.145084s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.078654s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` = 4 LIMIT 1 [ RunTime:0.083915s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T14:00:39+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.129081s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.080370s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` = 4 LIMIT 1 [ RunTime:0.079685s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T14:00:40+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.198407s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.066381s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` = 4 LIMIT 1 [ RunTime:0.086930s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T14:06:06+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.444255s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:2.322329s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` = 4 LIMIT 1 [ RunTime:0.874633s ]
|
||||
[ sql ] [ SQL ] UPDATE `admin_info` SET `last_login` = 1560837965 WHERE `id` = 4 [ RunTime:0.502137s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T14:06:55+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.133188s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.070734s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` = 4 LIMIT 1 [ RunTime:0.085181s ]
|
||||
[ sql ] [ SQL ] UPDATE `admin_info` SET `last_login` = 1560838014 WHERE `id` = 4 [ RunTime:0.074748s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T14:06:56+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.109097s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.100254s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` = 4 LIMIT 1 [ RunTime:0.100522s ]
|
||||
[ sql ] [ SQL ] UPDATE `admin_info` SET `last_login` = 1560838016 WHERE `id` = 4 [ RunTime:0.056056s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T14:06:58+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.113885s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.080844s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` = 4 LIMIT 1 [ RunTime:0.091781s ]
|
||||
[ sql ] [ SQL ] UPDATE `admin_info` SET `last_login` = 1560838018 WHERE `id` = 4 [ RunTime:0.087589s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T15:58:30+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ error ] [2002]SQLSTATE[HY000] [2002] Network is unreachable[/Users/keley/dev/altitudereaction/api/vendor/topthink/framework/src/think/db/PDOConnection.php:407]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T15:59:49+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.131684s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.131051s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` = 4 LIMIT 1 [ RunTime:0.133464s ]
|
||||
[ sql ] [ SQL ] UPDATE `admin_info` SET `last_login` = 1560844788 WHERE `id` = 4 [ RunTime:0.179086s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:28:39+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ error ] [2]Declaration of app\util\ErrorResponse::create($errorCode, $errorMessage = ''): think\Response should be compatible with think\Response::create($data = '', string $type = '', int $code = 200): think\Response[/Users/keley/dev/altitudereaction/api/app/util/ErrorResponse.php:28]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:29:37+08:00] ::1 GET localhost:10086/admin/login
|
||||
[ error ] [2]Declaration of app\util\ErrorResponse::Create($errorCode, $errorMessage = ''): think\Response should be compatible with think\Response::create($data = '', string $type = '', int $code = 200): think\Response[/Users/keley/dev/altitudereaction/api/app/util/ErrorResponse.php:28]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:31:13+08:00] ::1 GET localhost:10086/admin/login?username=123&password=123
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.142830s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.082740s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` = 123 LIMIT 1 [ RunTime:0.180979s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:31:28+08:00] ::1 GET localhost:10086/admin/login?username=123&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.122548s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.146200s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` IN (123,99d310ce9b1326045cf1446c5840a08c) LIMIT 1 [ RunTime:0.213686s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:31:31+08:00] ::1 GET localhost:10086/admin/login?username=admin&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.173646s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.083999s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` IN (admin,99d310ce9b1326045cf1446c5840a08c) LIMIT 1 [ RunTime:0.092524s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:42:54+08:00] ::1 GET localhost:10086/admin/login?username=admin&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ error ] [2002]SQLSTATE[HY000] [2002] Operation timed out[/Users/keley/dev/altitudereaction/api/vendor/topthink/framework/src/think/db/PDOConnection.php:407]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:42:58+08:00] ::1 GET localhost:10086/admin/login?username=admin&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.191577s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.096643s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` IN (admin,99d310ce9b1326045cf1446c5840a08c) LIMIT 1 [ RunTime:0.081175s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-18T16:43:16+08:00] ::1 GET localhost:10086/admin/login?username=admin&password=99d310ce9b1326045cf1446c5840a08c
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.555144s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.180795s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `admin_info` WHERE `id` IN (admin,99d310ce9b1326045cf1446c5840a08c) LIMIT 1 [ RunTime:0.107068s ]
|
4
runtime/log/201906/18_cli.log
Normal file
4
runtime/log/201906/18_cli.log
Normal file
@ -0,0 +1,4 @@
|
||||
[2019-06-18T13:55:41+08:00][ sql ] [ DB ] CONNECT:[ UseTime:0.165426s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[2019-06-18T13:55:41+08:00][ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.073972s ]
|
||||
[2019-06-18T13:56:29+08:00][ sql ] [ DB ] CONNECT:[ UseTime:0.489670s ] mysql:host=118.113.176.144;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[2019-06-18T13:56:30+08:00][ sql ] [ SQL ] SHOW FULL COLUMNS FROM `admin_info` [ RunTime:0.184201s ]
|
45
runtime/log/20190619_error.log
Normal file
45
runtime/log/20190619_error.log
Normal file
@ -0,0 +1,45 @@
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T19:18:43+08:00] ::1 POST localhost:10086/evaluation/create?open_id=123
|
||||
[ error ] [10501]SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null[/Users/keley/dev/altitudereaction/api/vendor/topthink/framework/src/think/db/PDOConnection.php:571]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T19:19:01+08:00] ::1 POST localhost:10086/evaluation/create?open_id=123
|
||||
[ error ] [10501]SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null[/Users/keley/dev/altitudereaction/api/vendor/topthink/framework/src/think/db/PDOConnection.php:571]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T19:19:34+08:00] ::1 POST localhost:10086/evaluation/create?open_id=123
|
||||
[ error ] [10501]SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null[/Users/keley/dev/altitudereaction/api/vendor/topthink/framework/src/think/db/PDOConnection.php:571]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:45:20+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ error ] [0]Too few arguments to function think\db\BaseQuery::when(), 1 passed in /Users/keley/dev/altitudereaction/api/app/service/EvaluationService.php on line 32 and at least 2 expected[/Users/keley/dev/altitudereaction/api/vendor/topthink/framework/src/think/db/concern/WhereQuery.php:514]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:47:50+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ error ] [0]Call to undefined method think\model\Collection::getData()[/Users/keley/dev/altitudereaction/api/app/service/EvaluationService.php:33]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:47:53+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ error ] [0]Call to undefined method think\model\Collection::getData()[/Users/keley/dev/altitudereaction/api/app/service/EvaluationService.php:33]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:48:34+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ error ] [0]variable type error: array[/Users/keley/dev/altitudereaction/api/vendor/topthink/framework/src/think/Response.php:391]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:48:39+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ error ] [0]variable type error: array[/Users/keley/dev/altitudereaction/api/vendor/topthink/framework/src/think/Response.php:391]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:00:04+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ error ] [0]Class 'app\service\Config' not found[/Users/keley/dev/altitudereaction/api/app/service/EvaluationService.php:32]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:00:08+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ error ] [0]Class 'app\service\Config' not found[/Users/keley/dev/altitudereaction/api/app/service/EvaluationService.php:32]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:20:15+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ error ] [8]未定义数组索引: create_time[/Users/keley/dev/altitudereaction/api/app/service/EvaluationService.php:48]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:20:53+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ error ] [8]未定义数组索引: create_time[/Users/keley/dev/altitudereaction/api/app/service/EvaluationService.php:49]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:21:06+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ error ] [8]未定义数组索引: create_time[/Users/keley/dev/altitudereaction/api/app/service/EvaluationService.php:49]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:22:30+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ error ] [8]未定义数组索引: create_time[/Users/keley/dev/altitudereaction/api/app/service/EvaluationService.php:49]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:22:33+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ error ] [8]未定义数组索引: create_time[/Users/keley/dev/altitudereaction/api/app/service/EvaluationService.php:49]
|
274
runtime/log/20190619_sql.log
Normal file
274
runtime/log/20190619_sql.log
Normal file
@ -0,0 +1,274 @@
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T19:18:43+08:00] ::1 POST localhost:10086/evaluation/create?open_id=123
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.072630s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.024094s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.010999s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.011958s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T19:19:01+08:00] ::1 POST localhost:10086/evaluation/create?open_id=123
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.013655s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.012983s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.031214s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.014587s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T19:19:34+08:00] ::1 POST localhost:10086/evaluation/create?open_id=123
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.045469s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.059849s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.019695s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.018596s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T19:20:31+08:00] ::1 POST localhost:10086/evaluation/create?open_id=123
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.016528s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.019317s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.043149s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.059356s ]
|
||||
[ sql ] [ SQL ] INSERT INTO `evaluation_history` SET `uid` = 1 , `headache` = 1 , `gastrointestinal` = 1 , `tired` = 2 , `dizzy` = 0 [ RunTime:0.013059s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T19:37:52+08:00] ::1 POST localhost:10086/evaluation/create?open_id=123
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.029571s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.021740s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.018945s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.015099s ]
|
||||
[ sql ] [ SQL ] INSERT INTO `evaluation_history` SET `uid` = 1 , `headache` = 2 , `gastrointestinal` = 2 , `tired` = 3 , `dizzy` = 1 [ RunTime:0.019218s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T19:53:04+08:00] ::1 POST localhost:10086/evaluation/subject?open_id=123
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.075579s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.030715s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.026150s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T19:53:54+08:00] ::1 POST localhost:10086/evaluation/subjects?open_id=123
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.119953s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.014633s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.012796s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:28:32+08:00] ::1 GET localhost:10086/evaluation/create?open_id=123
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.036869s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.034939s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.043053s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:28:36+08:00] ::1 GET localhost:10086/evaluation/query
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.018833s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.017105s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.009106s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:28:59+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.015130s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.015920s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.012891s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.016801s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 [ RunTime:0.011444s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:45:20+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.064861s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.018636s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.019166s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:45:40+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.101759s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.019040s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.019088s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.086840s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.017835s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:46:14+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.018824s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.018760s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.012488s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.013627s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.010498s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:46:30+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.015989s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.012478s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.019381s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.017662s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.018869s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:47:07+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.124592s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.027237s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.101073s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.020917s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 12 AND `status` = 1 [ RunTime:0.013836s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:47:10+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.020126s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.019201s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.029178s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.069939s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 12 AND `status` = 1 [ RunTime:0.013928s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:47:25+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.027166s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.015205s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.010043s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.016089s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.015747s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:47:27+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.023452s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.019672s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.023957s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.023804s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.093308s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:47:50+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.063488s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.076543s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.018069s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.022133s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.020904s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:47:53+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.024639s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.019629s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.020580s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.019869s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.011351s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:48:08+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.019568s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.013925s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.014127s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.015038s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.011410s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:48:34+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.025869s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.021203s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.012263s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.023847s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.012513s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:48:39+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.064609s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.015136s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.011976s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.017592s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.009396s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:49:08+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.054252s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.060107s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.016747s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.036390s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.017989s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:50:04+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.065763s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.015076s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.012303s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.013731s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.012579s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T21:50:29+08:00] ::1 POST localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.076704s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.016338s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.016505s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.017653s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.015375s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:00:04+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.018964s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.015482s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.023400s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.013782s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.034645s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:00:08+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.044088s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.013052s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.070142s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.029915s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.013846s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:00:23+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.036852s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.083675s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.019821s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.024382s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.014681s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:00:26+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.044411s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.013313s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.013338s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.024562s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.018749s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:00:39+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.046213s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.015595s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.015795s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.015869s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.012787s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:20:15+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.070701s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.017640s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.012036s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.020060s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.011855s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:20:53+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.046068s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.055676s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.014567s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.019149s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.011455s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:21:06+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.040943s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.015285s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.019945s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.047367s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.030720s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:22:30+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.018107s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.017969s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.083855s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.021845s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.044362s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:22:33+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.041565s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.051796s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.009813s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.016085s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.010206s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:24:34+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.018798s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.012571s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.014715s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.019544s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.020720s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:25:08+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.017382s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.011653s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.008427s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.044865s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.017443s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:25:41+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.015503s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.020569s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.015713s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.021426s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.043545s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:26:07+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.097222s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.030871s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.027991s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.031749s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.022143s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-19T22:26:58+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.083497s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.020500s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.017747s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.041400s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.016676s ]
|
21
runtime/log/20190620_sql.log
Normal file
21
runtime/log/20190620_sql.log
Normal file
@ -0,0 +1,21 @@
|
||||
---------------------------------------------------------------
|
||||
[2019-06-20T07:39:15+08:00] ::1 POST localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.087194s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.016463s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.009020s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.032931s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.065017s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-20T07:39:48+08:00] ::1 POST localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.043085s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.021843s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.015011s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.122188s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.015018s ]
|
||||
---------------------------------------------------------------
|
||||
[2019-06-20T07:39:54+08:00] ::1 GET localhost:10086/evaluation/all
|
||||
[ sql ] [ DB ] CONNECT:[ UseTime:0.060226s ] mysql:host=192.168.10.123;port=13306;dbname=altitude_reaction;charset=utf8
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `user_info` [ RunTime:0.072480s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `user_info` WHERE `open_id` = 'wxaffadsf31Dfaf93' LIMIT 1 [ RunTime:0.013577s ]
|
||||
[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `evaluation_history` [ RunTime:0.017088s ]
|
||||
[ sql ] [ SQL ] SELECT * FROM `evaluation_history` WHERE `uid` = 1 AND `status` = 1 [ RunTime:0.008955s ]
|
183
runtime/schema/altitude_reaction.admin_info.php
Normal file
183
runtime/schema/altitude_reaction.admin_info.php
Normal file
@ -0,0 +1,183 @@
|
||||
<?php
|
||||
return array (
|
||||
'id' =>
|
||||
array (
|
||||
'name' => 'id',
|
||||
'type' => 'smallint(10) unsigned',
|
||||
'notnull' => false,
|
||||
'default' => NULL,
|
||||
'primary' => true,
|
||||
'autoinc' => true,
|
||||
'comment' => '',
|
||||
),
|
||||
'user_name' =>
|
||||
array (
|
||||
'name' => 'user_name',
|
||||
'type' => 'varchar(60)',
|
||||
'notnull' => false,
|
||||
'default' => '',
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '',
|
||||
),
|
||||
'email' =>
|
||||
array (
|
||||
'name' => 'email',
|
||||
'type' => 'varchar(60)',
|
||||
'notnull' => false,
|
||||
'default' => '',
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '',
|
||||
),
|
||||
'password' =>
|
||||
array (
|
||||
'name' => 'password',
|
||||
'type' => 'varchar(32)',
|
||||
'notnull' => false,
|
||||
'default' => '',
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '',
|
||||
),
|
||||
'avatar' =>
|
||||
array (
|
||||
'name' => 'avatar',
|
||||
'type' => 'varchar(255)',
|
||||
'notnull' => false,
|
||||
'default' => NULL,
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '',
|
||||
),
|
||||
'sex' =>
|
||||
array (
|
||||
'name' => 'sex',
|
||||
'type' => 'tinyint(2)',
|
||||
'notnull' => false,
|
||||
'default' => '0',
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '',
|
||||
),
|
||||
'salt' =>
|
||||
array (
|
||||
'name' => 'salt',
|
||||
'type' => 'varchar(10)',
|
||||
'notnull' => false,
|
||||
'default' => NULL,
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '',
|
||||
),
|
||||
'add_time' =>
|
||||
array (
|
||||
'name' => 'add_time',
|
||||
'type' => 'int(11)',
|
||||
'notnull' => false,
|
||||
'default' => '0',
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '',
|
||||
),
|
||||
'last_login' =>
|
||||
array (
|
||||
'name' => 'last_login',
|
||||
'type' => 'int(11)',
|
||||
'notnull' => false,
|
||||
'default' => '0',
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '',
|
||||
),
|
||||
'last_ip' =>
|
||||
array (
|
||||
'name' => 'last_ip',
|
||||
'type' => 'varchar(15)',
|
||||
'notnull' => false,
|
||||
'default' => '',
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '',
|
||||
),
|
||||
'action_list' =>
|
||||
array (
|
||||
'name' => 'action_list',
|
||||
'type' => 'text',
|
||||
'notnull' => false,
|
||||
'default' => NULL,
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '',
|
||||
),
|
||||
'nav_list' =>
|
||||
array (
|
||||
'name' => 'nav_list',
|
||||
'type' => 'text',
|
||||
'notnull' => false,
|
||||
'default' => NULL,
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '',
|
||||
),
|
||||
'company_id' =>
|
||||
array (
|
||||
'name' => 'company_id',
|
||||
'type' => 'varchar(128)',
|
||||
'notnull' => false,
|
||||
'default' => '',
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '公司idjson字符串',
|
||||
),
|
||||
'role_id' =>
|
||||
array (
|
||||
'name' => 'role_id',
|
||||
'type' => 'smallint(5)',
|
||||
'notnull' => false,
|
||||
'default' => '0',
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '',
|
||||
),
|
||||
'cate_id' =>
|
||||
array (
|
||||
'name' => 'cate_id',
|
||||
'type' => 'varchar(128)',
|
||||
'notnull' => false,
|
||||
'default' => '',
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => 'json 行业数据',
|
||||
),
|
||||
'region_id' =>
|
||||
array (
|
||||
'name' => 'region_id',
|
||||
'type' => 'int(11)',
|
||||
'notnull' => false,
|
||||
'default' => '0',
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '',
|
||||
),
|
||||
'update_time' =>
|
||||
array (
|
||||
'name' => 'update_time',
|
||||
'type' => 'int(11)',
|
||||
'notnull' => false,
|
||||
'default' => '0',
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '修改时间',
|
||||
),
|
||||
'is_delete' =>
|
||||
array (
|
||||
'name' => 'is_delete',
|
||||
'type' => 'tinyint(4)',
|
||||
'notnull' => false,
|
||||
'default' => '0',
|
||||
'primary' => false,
|
||||
'autoinc' => false,
|
||||
'comment' => '是否删除',
|
||||
),
|
||||
);
|
5
runtime/services.php
Normal file
5
runtime/services.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
// This cache file is automatically generated at:2019-06-19 15:42:50
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
);
|
19
think
Executable file
19
think
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: yunwuxin <448901948@qq.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace think;
|
||||
|
||||
// 加载基础文件
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
// 应用初始化
|
||||
(new App())->console->run();
|
Loading…
x
Reference in New Issue
Block a user