作者 lyh

gx

... ... @@ -611,46 +611,6 @@ class ProjectLogic extends BaseLogic
if($type != 0){
$this->copyMysql($this->param['project_id'],$project_id);
}
<<<<<<< HEAD
//复制付费表
$paymentModel = new Payment();
$paymentData = $paymentModel::where('project_id', $this->param['project_id'])->first();
if(!empty($paymentData)){
$paymentData = $paymentData->getAttributes();
unset($paymentData['id']);
$paymentData['project_id'] = $project_id;
$paymentModel->insert($paymentData);
}
//复制售后表
$afterModel = new After();
$afterData = $afterModel::where('project_id', $this->param['project_id'])->first();
if(!empty($afterData)){
$afterData = $afterData->getAttributes();
unset($afterData['id']);
$afterData['project_id'] = $project_id;
$afterModel->insert($afterData);
}
//复制用户
$userModel = new UserModel();
$userData = $userModel::where('project_id', $this->param['project_id'])->where('role_id',0)->first();
if(!empty($userData)){
$userData = $userData->getAttributes();
unset($userData['id']);
$userData['project_id'] = $project_id;
$userModel->insert($userData);
}
//复制设置的模版
$settingTemplateModel = new Setting();
$settingData = $settingTemplateModel::where('project_id', $this->param['project_id'])->first();
if(!empty($settingData)){
$settingData = $settingData->getAttributes();
unset($settingData['id']);
$settingData['project_id'] = $project_id;
$settingTemplateModel->insert($settingData);
}
$this->copyMysql($this->param['project_id'],$project_id);
=======
>>>>>>> e1fa24b098cb6fa80fc919409b2426954c9a660b
return $this->success($data);
}
... ...