Merge remote-tracking branch 'origin/master' into akun
正在显示
4 个修改的文件
包含
15 行增加
和
15 行删除
| @@ -69,7 +69,7 @@ class UpdateProgress extends Command | @@ -69,7 +69,7 @@ class UpdateProgress extends Command | ||
| 69 | if(!empty($info)){ | 69 | if(!empty($info)){ |
| 70 | $info = (array)$info; | 70 | $info = (array)$info; |
| 71 | //超时时间 | 71 | //超时时间 |
| 72 | - $time = date("Y-m-d H:i:s",strtotime($info['created_at']) + $info['total_num'] * 60); | 72 | + $time = date("Y-m-d H:i:s",strtotime($info['created_at']) + $info['total_num'] * 30); |
| 73 | if($time > date("Y-m-d H:i:s")){ | 73 | if($time > date("Y-m-d H:i:s")){ |
| 74 | DB::connection('custom_mysql')->table('gl_update_progress')->where('id',$info['id'])->update(['current_num'=>$info['total_num']]); | 74 | DB::connection('custom_mysql')->table('gl_update_progress')->where('id',$info['id'])->update(['current_num'=>$info['total_num']]); |
| 75 | //获取当前项目的用户 | 75 | //获取当前项目的用户 |
| @@ -90,7 +90,7 @@ class VisualizationLogic extends BaseLogic | @@ -90,7 +90,7 @@ class VisualizationLogic extends BaseLogic | ||
| 90 | $typeArray = [1,3,5,7];//单页数据 | 90 | $typeArray = [1,3,5,7];//单页数据 |
| 91 | if(in_array($type,$typeArray)){ | 91 | if(in_array($type,$typeArray)){ |
| 92 | $bTemplateModel = new BTemplate(); | 92 | $bTemplateModel = new BTemplate(); |
| 93 | - $templateInfo = $bTemplateModel->read(['source'=>$source,'source'=>$source_id,'template_id'=>0]); | 93 | + $templateInfo = $bTemplateModel->read(['source'=>$source,'source_id'=>$source_id,'template_id'=>0]); |
| 94 | if($templateInfo === false){ | 94 | if($templateInfo === false){ |
| 95 | $data = [ | 95 | $data = [ |
| 96 | 'html'=>$this->param['html'], | 96 | 'html'=>$this->param['html'], |
| @@ -51,8 +51,8 @@ class ProductLogic extends BaseLogic | @@ -51,8 +51,8 @@ class ProductLogic extends BaseLogic | ||
| 51 | $category_ids = $this->getLastCategoryArr($this->param['category_id']); | 51 | $category_ids = $this->getLastCategoryArr($this->param['category_id']); |
| 52 | $this->param['category_id'] = ','.implode(',',$category_ids).','; | 52 | $this->param['category_id'] = ','.implode(',',$category_ids).','; |
| 53 | } | 53 | } |
| 54 | -// DB::connection('custom_mysql')->beginTransaction(); | ||
| 55 | -// try { | 54 | + DB::connection('custom_mysql')->beginTransaction(); |
| 55 | + try { | ||
| 56 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 56 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| 57 | $id = $this->param['id']; | 57 | $id = $this->param['id']; |
| 58 | //查看路由是否更新 | 58 | //查看路由是否更新 |
| @@ -68,11 +68,11 @@ class ProductLogic extends BaseLogic | @@ -68,11 +68,11 @@ class ProductLogic extends BaseLogic | ||
| 68 | CategoryRelated::saveRelated($id, $category_ids); | 68 | CategoryRelated::saveRelated($id, $category_ids); |
| 69 | //保存扩展字段 | 69 | //保存扩展字段 |
| 70 | $this->saveExtendInfo($id,$extend); | 70 | $this->saveExtendInfo($id,$extend); |
| 71 | -// DB::connection('custom_mysql')->commit(); | ||
| 72 | -// }catch (\Exception $e){ | ||
| 73 | -// DB::connection('custom_mysql')->rollBack(); | ||
| 74 | -// $this->fail('系统错误请联系管理员'); | ||
| 75 | -// } | 71 | + DB::connection('custom_mysql')->commit(); |
| 72 | + }catch (\Exception $e){ | ||
| 73 | + DB::connection('custom_mysql')->rollBack(); | ||
| 74 | + $this->fail('系统错误请联系管理员'); | ||
| 75 | + } | ||
| 76 | //通知更新 | 76 | //通知更新 |
| 77 | $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PRODUCT, 'route'=>$this->param['route']]); | 77 | $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PRODUCT, 'route'=>$this->param['route']]); |
| 78 | return $this->success(); | 78 | return $this->success(); |
| @@ -110,12 +110,12 @@ class RouteMap extends Base | @@ -110,12 +110,12 @@ class RouteMap extends Base | ||
| 110 | try { | 110 | try { |
| 111 | $route_map = self::where('project_id', $project_id)->where('source_id', $source_id)->where('source', $source)->first(); | 111 | $route_map = self::where('project_id', $project_id)->where('source_id', $source_id)->where('source', $source)->first(); |
| 112 | //上线项目 不能修改链接了 | 112 | //上线项目 不能修改链接了 |
| 113 | - if($route_map){ | ||
| 114 | - $project = ProjectLogic::instance()->getInfo($project_id); | ||
| 115 | - if($project['type'] !== Project::STATUS_ONE){ | ||
| 116 | - return $route_map->route; | ||
| 117 | - } | ||
| 118 | - } | 113 | +// if($route_map){ |
| 114 | +// $project = ProjectLogic::instance()->getInfo($project_id); | ||
| 115 | +// if($project['type'] !== Project::STATUS_ONE){ | ||
| 116 | +// return $route_map->route; | ||
| 117 | +// } | ||
| 118 | +// } | ||
| 119 | if(!$route_map){ | 119 | if(!$route_map){ |
| 120 | $route_map = new self(); | 120 | $route_map = new self(); |
| 121 | $route_map->source = $source; | 121 | $route_map->source = $source; |
-
请 注册 或 登录 后发表评论