作者 zhl

u

@@ -65,9 +65,12 @@ class SendKeyword extends Command @@ -65,9 +65,12 @@ class SendKeyword extends Command
65 ->get(); 65 ->get();
66 $time = time(); 66 $time = time();
67 $send_num = [30 => 1000, 60 => 3000, 90 => 6000]; 67 $send_num = [30 => 1000, 60 => 3000, 90 => 6000];
  68 + $ban_domain = $this->banDomain();
68 foreach ($projects as $item) { 69 foreach ($projects as $item) {
69 if (empty($item->is_auto_keywords)) 70 if (empty($item->is_auto_keywords))
70 continue; 71 continue;
  72 + if (in_array($item->domain, $ban_domain))
  73 + continue;
71 if (empty($item->api_no)) { 74 if (empty($item->api_no)) {
72 $this->output('项目ID:' . $item->id . ', api_no为空;'); 75 $this->output('项目ID:' . $item->id . ', api_no为空;');
73 continue; 76 continue;
@@ -99,6 +102,7 @@ class SendKeyword extends Command @@ -99,6 +102,7 @@ class SendKeyword extends Command
99 DB::disconnect('custom_mysql'); 102 DB::disconnect('custom_mysql');
100 // 数据成功后推送同志 103 // 数据成功后推送同志
101 if ($send) { 104 if ($send) {
  105 + $item = $item->toArray();
102 unset($item['main_lang_id']); 106 unset($item['main_lang_id']);
103 unset($item['is_auto_keywords']); 107 unset($item['is_auto_keywords']);
104 $item['day'] = $day; 108 $item['day'] = $day;
@@ -130,6 +134,11 @@ class SendKeyword extends Command @@ -130,6 +134,11 @@ class SendKeyword extends Command
130 return true; 134 return true;
131 } 135 }
132 136
  137 + /**
  138 + * 通知
  139 + * @param $item
  140 + * @return bool
  141 + */
133 public function sendNotice($item) 142 public function sendNotice($item)
134 { 143 {
135 try { 144 try {
@@ -144,6 +153,52 @@ class SendKeyword extends Command @@ -144,6 +153,52 @@ class SendKeyword extends Command
144 } 153 }
145 154
146 /** 155 /**
  156 + * 禁用
  157 + * @return array
  158 + */
  159 + public function banDomain()
  160 + {
  161 + $array = [
  162 + 'www.venttopurifier.com',
  163 + 'www.gwxpcsheet.com',
  164 + 'www.bizzyboi.com',
  165 + 'www.wholesaleladyclothing.com',
  166 + 'www.chuanbokeji.com',
  167 + 'www.goalwhite.com',
  168 + 'www.yusunheating.com',
  169 + 'www.bretonprecision.com',
  170 + 'www.chinarendering.com',
  171 + 'www.centurybeauty.com',
  172 + 'www.vazpocable.com',
  173 + 'www.tengda-smart.com',
  174 + 'www.kayne-bm.com',
  175 + 'www.aimazingbag.com',
  176 + 'www.alpha-lifetech.com',
  177 + 'www.junyi-laser.com',
  178 + 'www.unionfurnish.com',
  179 + 'www.zphydraulic.com',
  180 + 'www.younisicleaning.com',
  181 + 'www.shibaodeprecision.com',
  182 + 'www.semmcocoa.com',
  183 + 'www.sbdmold.com',
  184 + 'www.utsfabrictester.com',
  185 + 'www.tlgantryrobot.com',
  186 + 'www.slabyte.com',
  187 + 'www.hysum.com',
  188 + 'www.rsecobag.com',
  189 + 'www.yuchomachine.com',
  190 + 'www.hidinosaurs.com',
  191 + 'www.medigauze.com',
  192 + 'www.shtangkefresh.com',
  193 + 'www.fkcrane.com',
  194 + 'www.zkmparts.com',
  195 + 'www.zhishuogroup.com',
  196 + 'www.yunlinplushtoys.com',
  197 + ];
  198 + return $array;
  199 + }
  200 +
  201 + /**
147 * @param $message 202 * @param $message
148 */ 203 */
149 public function output($message) 204 public function output($message)