Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
aic_duty_strategy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yinxiaoling
aic_duty_strategy
Commits
d11b86fd
Commit
d11b86fd
authored
May 11, 2020
by
yinxiaoling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始化建表
parent
6eed3133
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
LoginApiController.php
app/Http/Controllers/LoginApiController.php
+1
-1
DatabaseSeeder.php
database/seeds/DatabaseSeeder.php
+3
-6
No files found.
app/Http/Controllers/LoginApiController.php
View file @
d11b86fd
...
...
@@ -21,7 +21,7 @@ class LoginApiController extends BaseController
if
(
$url
!=
substr
(
md5
(
json_encode
(
$param
)),
1
,
8
)){
return
$this
->
errorWithInfo
(
'url验证不通过'
,
401
);
}
if
(
empty
(
$param
[
'username'
])
||
empty
(
$param
[
'password'
]
)
||
empty
(
$param
[
'from'
]
)
||
$param
[
'from'
]
!=
2
){
if
(
empty
(
$param
[
'username'
])
||
empty
(
$param
[
'password'
]
)){
return
$this
->
errorWithInfo
(
'参数验证不通过'
,
401
);
}
...
...
database/seeds/DatabaseSeeder.php
View file @
d11b86fd
...
...
@@ -16,7 +16,6 @@ class DatabaseSeeder extends Seeder
// $this->call(UsersTableSeeder::class);
$tableName
=
'strategy_set'
;
//策略设置表
if
(
!
Schema
::
hasTable
(
$tableName
)){
//创建表语句
Schema
::
create
(
$tableName
,
function
(
Blueprint
$table
){
$table
->
increments
(
'id'
);
$table
->
string
(
'strategy_sn'
);
//sn编号
...
...
@@ -36,7 +35,7 @@ class DatabaseSeeder extends Seeder
$table
->
timestamp
(
'created_at'
)
->
nullable
();
});
//加索引
Schema
::
table
(
'seating_assistance_project_set'
,
function
(
$table
){
Schema
::
table
(
$tableName
,
function
(
$table
){
$table
->
index
(
'strategy_sn'
);
$table
->
index
(
'disabled'
);
});
...
...
@@ -48,7 +47,6 @@ class DatabaseSeeder extends Seeder
$tableName
=
'strategy_excel'
;
//策略excel数据记录表
if
(
!
Schema
::
hasTable
(
$tableName
)){
//创建表语句
Schema
::
create
(
$tableName
,
function
(
Blueprint
$table
){
$table
->
increments
(
'id'
);
$table
->
string
(
'strategy_sn'
);
//sn编号
...
...
@@ -58,14 +56,13 @@ class DatabaseSeeder extends Seeder
$table
->
timestamp
(
'created_at'
)
->
nullable
();
});
//加索引
Schema
::
table
(
'seating_assistance_project_set'
,
function
(
$table
){
Schema
::
table
(
$tableName
,
function
(
$table
){
$table
->
index
(
'strategy_sn'
);
});
}
$tableName
=
'strategy_task'
;
//任务数据(任务已建未建)
if
(
!
Schema
::
hasTable
(
$tableName
)){
//创建表语句
Schema
::
create
(
$tableName
,
function
(
Blueprint
$table
){
$table
->
increments
(
'id'
);
$table
->
string
(
'name'
);
//sn编号
...
...
@@ -83,7 +80,7 @@ class DatabaseSeeder extends Seeder
$table
->
timestamp
(
'created_at'
)
->
nullable
();
});
//加索引
Schema
::
table
(
'seating_assistance_project_set'
,
function
(
$table
){
Schema
::
table
(
$tableName
,
function
(
$table
){
$table
->
index
(
'is_created'
);
$table
->
index
(
'phone'
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment