合并冲突
This commit is contained in:
1 parent
c6c99252ee
commit
f37b0c2616
22 files changed
+80
-62
No files matched your search
@@ -30,12 +30,12 @@ class Admin
|
||||
$old = new \app\admin\model\Admin;
|
||||
|
||||
// 整理数据
|
||||
// $oldId = $old->select()->toArray();
|
||||
$oldId = $old->column('id');
|
||||
$oldId = $old::withTrashed()->select();
|
||||
$new->where('id', '>', 0)->delete();
|
||||
$i = 0;
|
||||
foreach ($oldId as $key => $value) {
|
||||
$oldList = $old->find($value)->getData();
|
||||
$oldList = $value->getData();
|
||||
$oldList['school_id'] = $oldList['school'];
|
||||
$newList = $new->create($oldList);
|
||||
if ($newList) {
|
||||
$i ++;
|
||||
@@ -53,12 +53,11 @@ class Admin
|
||||
$old = new \app\teach\model\Banji;
|
||||
|
||||
// 整理数据
|
||||
// $oldId = $old->select()->toArray();
|
||||
$oldId = $old->column('id');
|
||||
$oldId = $old::withTrashed()->select();
|
||||
$new->where('id', '>', 0)->delete();
|
||||
$i = 0;
|
||||
foreach ($oldId as $key => $value) {
|
||||
$oldList = $old->find($value)->getData();
|
||||
$oldList = $value->getData();
|
||||
$oldList['school_id'] = $oldList['school'];
|
||||
$oldList['xueduan_id'] = 10302;
|
||||
$newList = $new->create($oldList);
|
||||
@@ -79,7 +78,7 @@ class Admin
|
||||
$old = new \app\chengji\model\Chengji;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
$oldId = $old::withTrashed()
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
@@ -89,6 +88,7 @@ class Admin
|
||||
$oldList = $value->getData();
|
||||
unset($oldList['id']);
|
||||
$oldList['defenlv'] = $oldList['defen'];
|
||||
$oldList['subject_id'] = getNewSubject($oldList['subject_id']);
|
||||
$newList[] = $oldList;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ class Admin
|
||||
$old = new \app\rongyu\model\DwRongyu;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
$oldId = $old::withTrashed()
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
@@ -137,7 +137,7 @@ class Admin
|
||||
$old = new \app\rongyu\model\DwRongyuCanyu;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
$oldId = $old::withTrashed()
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
@@ -169,7 +169,7 @@ class Admin
|
||||
$old = new \app\system\model\Fields;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
$oldId = $old::withTrashed()
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
@@ -197,7 +197,7 @@ class Admin
|
||||
$old = new \app\rongyu\model\JsRongyu;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
$oldId = $old::withTrashed()
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
@@ -225,7 +225,7 @@ class Admin
|
||||
$old = new \app\rongyu\model\JsRongyuCanyu;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
$oldId = $old::withTrashed()
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
@@ -258,7 +258,7 @@ class Admin
|
||||
$old = new \app\rongyu\model\JsRongyuInfo;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
$oldId = $old::withTrashed()
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
@@ -282,18 +282,18 @@ class Admin
|
||||
|
||||
|
||||
// Kaohao
|
||||
public function kaohao()
|
||||
public function kaohao($page)
|
||||
{
|
||||
set_time_limit(0);
|
||||
$new = new \app\update\model\Kaohao;
|
||||
$old = new \app\kaohao\model\Kaohao;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
// ->limit(10)
|
||||
dump('第'.$page.'页');
|
||||
$oldId = $old::withTrashed()
|
||||
->page($page, 500)
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
// $new->where('id', '>', 0)->delete();
|
||||
|
||||
$i = 0;
|
||||
foreach ($oldId as $key => $value) {
|
||||
@@ -320,7 +320,7 @@ class Admin
|
||||
$old = new \app\Kaoshi\model\Kaoshi;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
$oldId = $old::withTrashed()
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
@@ -350,7 +350,7 @@ class Admin
|
||||
$old = new \app\Keti\model\Keti;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
$oldId = $old::withTrashed()
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
@@ -378,7 +378,7 @@ class Admin
|
||||
$old = new \app\Keti\model\KetiCanyu;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
$oldId = $old::withTrashed()
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
@@ -405,14 +405,14 @@ class Admin
|
||||
|
||||
|
||||
// KetiInfo
|
||||
public function KetiINfo()
|
||||
public function KetiInfo()
|
||||
{
|
||||
set_time_limit(0);
|
||||
$new = new \app\update\model\KetiInfo;
|
||||
$old = new \app\Keti\model\KetiInfo;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
$oldId = $old::withTrashed()
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
@@ -443,7 +443,7 @@ class Admin
|
||||
$old = new \app\system\model\School;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
$oldId = $old::withTrashed()
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
@@ -465,7 +465,7 @@ class Admin
|
||||
}
|
||||
|
||||
// Student
|
||||
public function Student()
|
||||
public function Student($page)
|
||||
{
|
||||
set_time_limit(0);
|
||||
$new = new \app\update\model\Student;
|
||||
@@ -473,10 +473,11 @@ class Admin
|
||||
$pinyin = new \Overtrue\Pinyin\Pinyin;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
dump('第'.$page.'页');
|
||||
$oldId = $old->withTrashed()
|
||||
->page($page, 500)
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
// $new->where('id', '>', 0)->delete();
|
||||
|
||||
$i = 0;
|
||||
foreach ($oldId as $key => $value) {
|
||||
@@ -498,7 +499,7 @@ class Admin
|
||||
|
||||
|
||||
// Teacher
|
||||
public function Teacher()
|
||||
public function Teacher($page)
|
||||
{
|
||||
set_time_limit(0);
|
||||
$new = new \app\update\model\Teacher;
|
||||
@@ -506,10 +507,11 @@ class Admin
|
||||
$pinyin = new \Overtrue\Pinyin\Pinyin;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
dump('第'.$page.'页');
|
||||
$oldId = $old::withTrashed()
|
||||
->page($page, 500)
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
// $new->where('id', '>', 0)->delete();
|
||||
|
||||
$i = 0;
|
||||
foreach ($oldId as $key => $value) {
|
||||
@@ -541,7 +543,7 @@ class Admin
|
||||
$old = new \app\teach\model\Xueqi;
|
||||
|
||||
// 整理数据
|
||||
$oldId = $old
|
||||
$oldId = $old::withTrashed()
|
||||
->select();
|
||||
|
||||
$new->where('id', '>', 0)->delete();
|
||||
|
||||
@@ -23,14 +23,14 @@ Route::group('admin', function () {
|
||||
Route::rule('jsrongyu','admin/jsrongyu','get'); # 信息列表
|
||||
Route::rule('jsrongyucanyu','admin/jsrongyucanyu','get'); # 信息列表
|
||||
Route::rule('jsrongyuinfo','admin/jsrongyuinfo','get'); # 信息列表
|
||||
Route::rule('kaohao','admin/kaohao','get'); # 信息列表
|
||||
Route::rule('kaohao/<page>','admin/kaohao','get'); # 信息列表
|
||||
Route::rule('kaoshi','admin/kaoshi','get'); # 信息列表
|
||||
Route::rule('keti','admin/keti','get'); # 信息列表
|
||||
Route::rule('keticanyu','admin/keticanyu','get'); # 信息列表
|
||||
Route::rule('ketiinfo','admin/ketiinfo','get'); # 信息列表
|
||||
Route::rule('school','admin/school','get'); # 信息列表
|
||||
Route::rule('student','admin/student','get'); # 信息列表
|
||||
Route::rule('teacher','admin/teacher','get'); # 信息列表
|
||||
Route::rule('student/<page>','admin/student','get'); # 信息列表
|
||||
Route::rule('teacher/<page>','admin/teacher','get'); # 信息列表
|
||||
Route::rule('xueqi','admin/xueqi','get'); # 信息列表
|
||||
});
|
||||
|
||||
@@ -22,6 +22,19 @@
|
||||
</div>
|
||||
{/block}
|
||||
{block name="table"}
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body ">
|
||||
<blockquote class="layui-elem-quote layui-quote-nm">
|
||||
Kaohao、Stuent、Teacher三个表的数据需要分页迁移,否则会卡死。
|
||||
<br>
|
||||
127.0.0.1/update/admin/kaosho/1 1是页码<br>
|
||||
127.0.0.1/update/admin/student/1 1是页码<br>
|
||||
127.0.0.1/update/admin/teacher/1 1是页码<br>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col>
|
||||
|
||||
Loaded 3 of 22 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user