作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

... ... @@ -69,7 +69,7 @@ class UpdateProgress extends Command
if(!empty($info)){
$info = (array)$info;
//超时时间
$time = date("Y-m-d H:i:s",strtotime($info['created_at']) + $info['total_num'] * 60);
$time = date("Y-m-d H:i:s",strtotime($info['created_at']) + $info['total_num'] * 30);
if($time > date("Y-m-d H:i:s")){
DB::connection('custom_mysql')->table('gl_update_progress')->where('id',$info['id'])->update(['current_num'=>$info['total_num']]);
//获取当前项目的用户
... ...
... ... @@ -90,7 +90,7 @@ class VisualizationLogic extends BaseLogic
$typeArray = [1,3,5,7];//单页数据
if(in_array($type,$typeArray)){
$bTemplateModel = new BTemplate();
$templateInfo = $bTemplateModel->read(['source'=>$source,'source'=>$source_id,'template_id'=>0]);
$templateInfo = $bTemplateModel->read(['source'=>$source,'source_id'=>$source_id,'template_id'=>0]);
if($templateInfo === false){
$data = [
'html'=>$this->param['html'],
... ...
... ... @@ -51,8 +51,8 @@ class ProductLogic extends BaseLogic
$category_ids = $this->getLastCategoryArr($this->param['category_id']);
$this->param['category_id'] = ','.implode(',',$category_ids).',';
}
// DB::connection('custom_mysql')->beginTransaction();
// try {
DB::connection('custom_mysql')->beginTransaction();
try {
if(isset($this->param['id']) && !empty($this->param['id'])){
$id = $this->param['id'];
//查看路由是否更新
... ... @@ -68,11 +68,11 @@ class ProductLogic extends BaseLogic
CategoryRelated::saveRelated($id, $category_ids);
//保存扩展字段
$this->saveExtendInfo($id,$extend);
// DB::connection('custom_mysql')->commit();
// }catch (\Exception $e){
// DB::connection('custom_mysql')->rollBack();
// $this->fail('系统错误请联系管理员');
// }
DB::connection('custom_mysql')->commit();
}catch (\Exception $e){
DB::connection('custom_mysql')->rollBack();
$this->fail('系统错误请联系管理员');
}
//通知更新
$this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PRODUCT, 'route'=>$this->param['route']]);
return $this->success();
... ...
... ... @@ -110,12 +110,12 @@ class RouteMap extends Base
try {
$route_map = self::where('project_id', $project_id)->where('source_id', $source_id)->where('source', $source)->first();
//上线项目 不能修改链接了
if($route_map){
$project = ProjectLogic::instance()->getInfo($project_id);
if($project['type'] !== Project::STATUS_ONE){
return $route_map->route;
}
}
// if($route_map){
// $project = ProjectLogic::instance()->getInfo($project_id);
// if($project['type'] !== Project::STATUS_ONE){
// return $route_map->route;
// }
// }
if(!$route_map){
$route_map = new self();
$route_map->source = $source;
... ...