作者 李宇航

合并分支 'lyh-server' 到 'master'

Lyh server



查看合并请求 !2606
@@ -68,9 +68,7 @@ class UpdateRoute extends Command @@ -68,9 +68,7 @@ class UpdateRoute extends Command
68 */ 68 */
69 public function handle() 69 public function handle()
70 { 70 {
71 - ProjectServer::useProject(4132);  
72 - return $this->product_action(4132);  
73 - DB::disconnect('custom_mysql'); 71 + return $this->_action();
74 } 72 }
75 73
76 /** 74 /**
@@ -156,12 +154,17 @@ class UpdateRoute extends Command @@ -156,12 +154,17 @@ class UpdateRoute extends Command
156 */ 154 */
157 public function _action(){ 155 public function _action(){
158 $projectModel = new Project(); 156 $projectModel = new Project();
159 - $lists = $projectModel->list(['delete_status'=>0,'extend_type'=>0,'type'=>['!=',0]],'id',['id']);  
160 - $keywordModel = new Keyword(); 157 + $lists = $projectModel->list(['id'=>['in',[4379,4380,4381,4382,4383]],'delete_status'=>0,'extend_type'=>0,'type'=>['!=',0]],'id',['id']);
161 foreach ($lists as $v){ 158 foreach ($lists as $v){
162 ProjectServer::useProject($v['id']); 159 ProjectServer::useProject($v['id']);
163 echo date('Y-m-d H:i:s').' 执行的项目id:'.$v['id'].PHP_EOL; 160 echo date('Y-m-d H:i:s').' 执行的项目id:'.$v['id'].PHP_EOL;
164 - $keywordModel->edit(['type'=>1],['id'=>['!=',0]]); 161 + $productModel = new Product();
  162 + $productModel->edit(['project_id'=>$v['id']],['id'=>['!=',0]]);
  163 + $productLists = $productModel->list([],'id',['id','title','route']);
  164 + foreach ($productLists as $item){
  165 + $route = RouteMap::setRoute($item['route'],'product',$item['id'],$v['id']);
  166 + $productModel->edit(['route'=>$route],['id'=>$item['id']]);
  167 + }
165 DB::disconnect('custom_mysql'); 168 DB::disconnect('custom_mysql');
166 } 169 }
167 return true; 170 return true;
@@ -64,7 +64,8 @@ class Channel extends Base @@ -64,7 +64,8 @@ class Channel extends Base
64 return $sales_id; 64 return $sales_id;
65 } 65 }
66 $channel_alias = self::where('id', $user['channel_id'])->value('alias'); 66 $channel_alias = self::where('id', $user['channel_id'])->value('alias');
67 - $channel_alias = $channel_alias . '-' . $user['name']; 67 + $channel_mobile = self::where('id', $user['channel_id'])->value('contact_mobile');
  68 + $channel_alias = $channel_alias . '-' . $user['name'].'-'.$channel_mobile;
68 Cache::put('channel_alias_'.$sales_id,$channel_alias,24 * 3600); 69 Cache::put('channel_alias_'.$sales_id,$channel_alias,24 * 3600);
69 } 70 }
70 return $channel_alias; 71 return $channel_alias;