|
...
|
...
|
@@ -6,6 +6,7 @@ use App\Http\Logic\Bside\BaseLogic; |
|
|
|
use App\Models\Project\Country;
|
|
|
|
use App\Models\WebSetting\Proofreading;
|
|
|
|
use App\Models\WebSetting\WebSettingCountry;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
|
|
|
|
class ProofreadingLogic extends BaseLogic
|
|
|
|
{
|
|
...
|
...
|
@@ -35,7 +36,8 @@ class ProofreadingLogic extends BaseLogic |
|
|
|
* @time :2023/6/12 11:03
|
|
|
|
*/
|
|
|
|
public function proofreadingSave(){
|
|
|
|
// try {
|
|
|
|
DB::beginTransaction();
|
|
|
|
try {
|
|
|
|
//删除以前的数据
|
|
|
|
$this->model->del(['project_id'=>$this->user['project_id'],'language_id'=>$this->param['language_id'],'type'=>$this->param['type']]);
|
|
|
|
foreach ($this->param['data'] as $k => $v){
|
|
...
|
...
|
@@ -48,9 +50,11 @@ class ProofreadingLogic extends BaseLogic |
|
|
|
}
|
|
|
|
//新增
|
|
|
|
$this->model->insert($this->param['data']);
|
|
|
|
// }catch (\Exception $e){
|
|
|
|
// $this->fail('error');
|
|
|
|
// }
|
|
|
|
DB::commit();
|
|
|
|
}catch (\Exception $e){
|
|
|
|
DB::rollBack();
|
|
|
|
$this->fail('error');
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|