|
...
|
...
|
@@ -277,8 +277,8 @@ class TranslateLogic extends BaseLogic |
|
|
|
if($this->param['url'] == 'other_all_text'){
|
|
|
|
$this->param['language_id'] = 0;
|
|
|
|
}
|
|
|
|
// DB::beginTransaction();
|
|
|
|
// try {
|
|
|
|
DB::beginTransaction();
|
|
|
|
try {
|
|
|
|
$info = $this->model->read(['language_id'=>$this->param['language_id'],'url'=>$this->param['url'],'project_id'=>$this->user['project_id'],'type'=>$this->param['type']]);
|
|
|
|
if($info === false){
|
|
|
|
$sourceInfo = $this->getRouteSource($sendData['new_route']);
|
|
...
|
...
|
@@ -303,11 +303,11 @@ class TranslateLogic extends BaseLogic |
|
|
|
//写日志
|
|
|
|
$userLogModel = new UserLog();
|
|
|
|
$userLogModel->add(['model'=>'translate/save','remark'=>json_encode($this->param,true),'type'=>0,'operator_id'=>$this->user['id'],'project_id'=>$this->user['project_id']]);
|
|
|
|
// DB::commit();
|
|
|
|
// }catch (\Exception $e){
|
|
|
|
// DB::rollback();
|
|
|
|
// $this->fail('系统错误请联系管理员');
|
|
|
|
// }
|
|
|
|
DB::commit();
|
|
|
|
}catch (\Exception $e){
|
|
|
|
DB::rollback();
|
|
|
|
$this->fail('系统错误请联系管理员');
|
|
|
|
}
|
|
|
|
$this->sendMessage($sendData);
|
|
|
|
return $this->success();
|
|
|
|
}
|
...
|
...
|
|