修改参与人id

This commit is contained in:
巴掌 committed 2020-04-22 13:33:35 +08:00
1 parent 210ce3c278
commit da16f34715
5 files changed
+12 -10

No files matched your search

+5 -3
View File
@@ -206,7 +206,7 @@ class Admin
foreach ($oldId as $key => $value) {
$oldList = $value->getData();
$oldList['fzschool_id'] = $oldList['fzschool'];
$oldList['category_id'] = $oldList['category'];
$oldList['category_id'] = getNewCategory($oldList['category']);
$newList = $new->create($oldList);
if ($newList) {
$i ++;
@@ -237,7 +237,8 @@ class Admin
unset($oldList['update_time']);
unset($oldList['create_time']);
unset($oldList['delete_time']);
$oldList['category_id'] = $oldList['category'];
$oldList['category'] === 1 ? $oldList['category_id'] = 11901
: $oldList['category_id'] = 11902;
$oldList['rongyu_id'] = $oldList['rongyuid'];
$oldList['teacher_id'] = $oldList['teacherid'];
$newList[] = $oldList;
@@ -392,7 +393,8 @@ class Admin
unset($oldList['delete_time']);
$oldList['ketiinfo_id'] = $oldList['ketiinfoid'];
$oldList['teacher_id'] = $oldList['teacherid'];
$oldList['category_id'] = $oldList['category'];
$oldList['category'] === 1 ? $oldList['category_id'] = 11901
: $oldList['category_id'] = 11902;
$newList[] = $oldList;
}
+2 -2
View File
@@ -202,7 +202,7 @@ class KetiInfo extends BaseModel
public function ktZcr()
{
return $this->hasMany('\app\keti\model\KetiCanyu', 'ketiinfo_id', 'id')
->where('category_id', 1);
->where('category_id', 11901);
}
@@ -210,7 +210,7 @@ class KetiInfo extends BaseModel
public function ktCy()
{
return $this->hasMany('\app\keti\model\KetiCanyu', 'ketiinfo_id', 'id')
->where('category_id', 2);
->where('category_id', 11902);
}
+2 -2
View File
@@ -243,7 +243,7 @@ class JsRongyuInfo extends BaseModel
// 获奖人信息关联
public function hjJsry()
{
return $this->hasMany('\app\rongyu\model\JsRongyuCanyu', 'rongyu_id', 'id')->where('category_id',1);
return $this->hasMany('\app\rongyu\model\JsRongyuCanyu', 'rongyu_id', 'id')->where('category_id',11901);
}
@@ -257,7 +257,7 @@ class JsRongyuInfo extends BaseModel
// 参与人关联
public function cyJsry()
{
return $this->hasMany('\app\rongyu\model\JsRongyuCanyu', 'rongyu_id', 'id')->where('category_id',2);
return $this->hasMany('\app\rongyu\model\JsRongyuCanyu', 'rongyu_id', 'id')->where('category_id', 11902);
}
Loaded 3 of 5 files, more files were not shown because too many files have changed in this diff. Show more