Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
7 个修改的文件
包含
84 行增加
和
11 行删除
| @@ -80,7 +80,7 @@ class TemplateLog extends Command | @@ -80,7 +80,7 @@ class TemplateLog extends Command | ||
| 80 | * @time :2024/11/13 16:19 | 80 | * @time :2024/11/13 16:19 |
| 81 | */ | 81 | */ |
| 82 | public function deleteUserLog(){ | 82 | public function deleteUserLog(){ |
| 83 | - $date = date('Y-m-d H:i:s', strtotime('-60 days')); | 83 | + $date = date('Y-m-d H:i:s', strtotime('-30 days')); |
| 84 | $userLogModel = new UserLog(); | 84 | $userLogModel = new UserLog(); |
| 85 | return $userLogModel->del(['created_at'=>['<=',$date]]); | 85 | return $userLogModel->del(['created_at'=>['<=',$date]]); |
| 86 | } | 86 | } |
| @@ -68,13 +68,37 @@ class CountAllProject extends Command | @@ -68,13 +68,37 @@ class CountAllProject extends Command | ||
| 68 | if(empty($v['online_date'])){ | 68 | if(empty($v['online_date'])){ |
| 69 | $v['online_date'] = null; | 69 | $v['online_date'] = null; |
| 70 | } | 70 | } |
| 71 | + if(!empty($v['category'])){ | ||
| 72 | + $arr = explode('.',$v['category']); | ||
| 73 | + if($arr[0] == 1){ | ||
| 74 | + $v['status'] = 1; | ||
| 75 | + $v['category'] = $arr[1] ?? ''; | ||
| 76 | + }elseif ($arr[0] == 2){ | ||
| 77 | + $v['status'] = 2; | ||
| 78 | + $v['category'] = $arr[1] ?? ''; | ||
| 79 | + }elseif($arr[0] == 3){ | ||
| 80 | + $v['status'] = 3; | ||
| 81 | + $v['category'] = $arr[1] ?? ''; | ||
| 82 | + }elseif ($arr[0] == 4){ | ||
| 83 | + $v['status'] = 7; | ||
| 84 | + $v['category'] = '续费记录单'; | ||
| 85 | + }elseif ($arr[0] == 5){ | ||
| 86 | + $v['status'] = 4; | ||
| 87 | + $v['category'] = '推广续网站'; | ||
| 88 | + }elseif ($arr[0] == 6){ | ||
| 89 | + $v['status'] = 5; | ||
| 90 | + $v['category'] = '未续费项目'; | ||
| 91 | + }else{ | ||
| 92 | + $v['status'] = 6; | ||
| 93 | + $v['category'] = '特殊推广项目'; | ||
| 94 | + } | ||
| 95 | + } | ||
| 71 | if($v['is_admin5'] == 5){ | 96 | if($v['is_admin5'] == 5){ |
| 72 | $v['version'] = 2; | 97 | $v['version'] = 2; |
| 73 | }else{ | 98 | }else{ |
| 74 | $v['version'] = 3; | 99 | $v['version'] = 3; |
| 75 | } | 100 | } |
| 76 | $v['is_upgrade'] = 0; | 101 | $v['is_upgrade'] = 0; |
| 77 | - $v['status'] = 0; | ||
| 78 | $v['created_at'] = $v['updated_at'] = date('Y-m-d H:i:s'); | 102 | $v['created_at'] = $v['updated_at'] = date('Y-m-d H:i:s'); |
| 79 | $data[$k] = $v; | 103 | $data[$k] = $v; |
| 80 | } | 104 | } |
| @@ -131,6 +155,31 @@ class CountAllProject extends Command | @@ -131,6 +155,31 @@ class CountAllProject extends Command | ||
| 131 | $data = []; | 155 | $data = []; |
| 132 | echo '执行页数:' . $i . PHP_EOL . date('Y-m-d H:i:s') . PHP_EOL; | 156 | echo '执行页数:' . $i . PHP_EOL . date('Y-m-d H:i:s') . PHP_EOL; |
| 133 | foreach ($lists['list'] as $k => $v){ | 157 | foreach ($lists['list'] as $k => $v){ |
| 158 | + if(!empty($v['type'])){ | ||
| 159 | + if($v['type'] == 1){ | ||
| 160 | + $type = 1; | ||
| 161 | + $category = '建站进程中'; | ||
| 162 | + }elseif ($v['type'] == 2){ | ||
| 163 | + $type = 2; | ||
| 164 | + $category = '已完成 - 推广进程中'; | ||
| 165 | + }elseif($v['type'] == 3){ | ||
| 166 | + $type = 3; | ||
| 167 | + $category = '已完成 - 建站用户'; | ||
| 168 | + }elseif ($v['type'] == 4){ | ||
| 169 | + $type = 4; | ||
| 170 | + $category = '推广续网站'; | ||
| 171 | + }elseif ($v['type'] == 5){ | ||
| 172 | + $type = 5; | ||
| 173 | + $category = '未续费项目'; | ||
| 174 | + }elseif ($v['type'] == 6){ | ||
| 175 | + $type = 6; | ||
| 176 | + $category = '特殊推广项目'; | ||
| 177 | + }else{ | ||
| 178 | + $type = 7; | ||
| 179 | + $category = '续费记录单'; | ||
| 180 | + } | ||
| 181 | + } | ||
| 182 | + $channel = Channel::getChannelText($v['channel']['user_id'] ?? 0); | ||
| 134 | $data[] = [ | 183 | $data[] = [ |
| 135 | 'project_id'=>$v['id'], | 184 | 'project_id'=>$v['id'], |
| 136 | 'version'=>1,//代表6.0 | 185 | 'version'=>1,//代表6.0 |
| @@ -138,13 +187,15 @@ class CountAllProject extends Command | @@ -138,13 +187,15 @@ class CountAllProject extends Command | ||
| 138 | 'title'=>$v['title'], | 187 | 'title'=>$v['title'], |
| 139 | 'company'=>$v['company'], | 188 | 'company'=>$v['company'], |
| 140 | 'channel'=>Channel::getChannelText($v['channel']['user_id'] ?? 0), | 189 | 'channel'=>Channel::getChannelText($v['channel']['user_id'] ?? 0), |
| 190 | + 'sale'=>$this->end_channel($channel) ?? '', | ||
| 141 | 'join_date'=>$v['cooperate_date'], | 191 | 'join_date'=>$v['cooperate_date'], |
| 142 | 'online_date'=>$v['uptime'], | 192 | 'online_date'=>$v['uptime'], |
| 143 | 'keywords_num'=>$v['key'], | 193 | 'keywords_num'=>$v['key'], |
| 144 | 'service_num'=>$v['day'], | 194 | 'service_num'=>$v['day'], |
| 145 | 'production_num'=>intval(abs((empty($v['uptime']) ? time() : strtotime($v['uptime'])) - strtotime($v['created_at'])) / 86400), | 195 | 'production_num'=>intval(abs((empty($v['uptime']) ? time() : strtotime($v['uptime'])) - strtotime($v['created_at'])) / 86400), |
| 146 | 'plan'=>Project::planMap()[$v['plan']], | 196 | 'plan'=>Project::planMap()[$v['plan']], |
| 147 | - 'status'=>0, | 197 | + 'status'=>$type, |
| 198 | + 'category'=>$category, | ||
| 148 | 'test_domain'=>$v['test_domain'], | 199 | 'test_domain'=>$v['test_domain'], |
| 149 | 'product_domain'=>!empty($v['domain']) ? (new DomainInfo())->getDomain($v['domain']) : '', | 200 | 'product_domain'=>!empty($v['domain']) ? (new DomainInfo())->getDomain($v['domain']) : '', |
| 150 | 'project_manager'=>$manageModel->getName($v['manager_mid'] ?? ''), | 201 | 'project_manager'=>$manageModel->getName($v['manager_mid'] ?? ''), |
| @@ -208,7 +259,10 @@ class CountAllProject extends Command | @@ -208,7 +259,10 @@ class CountAllProject extends Command | ||
| 208 | } | 259 | } |
| 209 | 260 | ||
| 210 | public function end_channel($channel){ | 261 | public function end_channel($channel){ |
| 262 | + if(!empty($channel)){ | ||
| 211 | $parts = explode("-", $channel); | 263 | $parts = explode("-", $channel); |
| 212 | return end($parts); | 264 | return end($parts); |
| 213 | } | 265 | } |
| 266 | + return $channel; | ||
| 267 | + } | ||
| 214 | } | 268 | } |
| @@ -23,6 +23,7 @@ use App\Models\Product\CategoryRelated; | @@ -23,6 +23,7 @@ use App\Models\Product\CategoryRelated; | ||
| 23 | use App\Models\Product\Extend; | 23 | use App\Models\Product\Extend; |
| 24 | use App\Models\Product\ExtendInfo; | 24 | use App\Models\Product\ExtendInfo; |
| 25 | use App\Models\Product\Keyword; | 25 | use App\Models\Product\Keyword; |
| 26 | +use App\Models\Product\KeywordRelated; | ||
| 26 | use App\Models\Product\Product; | 27 | use App\Models\Product\Product; |
| 27 | use App\Models\RouteMap\RouteMap; | 28 | use App\Models\RouteMap\RouteMap; |
| 28 | use App\Models\Template\BCustomTemplate; | 29 | use App\Models\Template\BCustomTemplate; |
| @@ -248,7 +249,7 @@ class ProjectUpdate extends Command | @@ -248,7 +249,7 @@ class ProjectUpdate extends Command | ||
| 248 | if ($custom_types) { | 249 | if ($custom_types) { |
| 249 | $custom_model = new CustomModule(); | 250 | $custom_model = new CustomModule(); |
| 250 | foreach ($custom_types as $v_custom) { | 251 | foreach ($custom_types as $v_custom) { |
| 251 | - if($project_id == 1646 && $v_custom == 'downloads'){ | 252 | + if ($project_id == 1646 && $v_custom == 'downloads') { |
| 252 | //项目ID:1646,不再采集downloads扩展模块 | 253 | //项目ID:1646,不再采集downloads扩展模块 |
| 253 | continue; | 254 | continue; |
| 254 | } | 255 | } |
| @@ -395,6 +396,8 @@ class ProjectUpdate extends Command | @@ -395,6 +396,8 @@ class ProjectUpdate extends Command | ||
| 395 | if ($six_read) { | 396 | if ($six_read) { |
| 396 | //关联分类 | 397 | //关联分类 |
| 397 | CategoryRelated::saveRelated($id, array_column($category_arr, 'id')); | 398 | CategoryRelated::saveRelated($id, array_column($category_arr, 'id')); |
| 399 | + //关联关键词 | ||
| 400 | + KeywordRelated::saveRelated($id, $keyword_id); | ||
| 398 | //扩展字段 | 401 | //扩展字段 |
| 399 | if ($item['extend'] ?? []) { | 402 | if ($item['extend'] ?? []) { |
| 400 | foreach (array_reverse($item['extend']) as $ke => $ve) { | 403 | foreach (array_reverse($item['extend']) as $ke => $ve) { |
| @@ -17,8 +17,8 @@ class Translate | @@ -17,8 +17,8 @@ class Translate | ||
| 17 | { | 17 | { |
| 18 | //接口地址 | 18 | //接口地址 |
| 19 | // public static $url = 'https://translate.hbb618.cn/translates'; | 19 | // public static $url = 'https://translate.hbb618.cn/translates'; |
| 20 | - public static $url = 'https://api.cmer.com/'; | ||
| 21 | - | 20 | +// public static $url = 'https://api.cmer.com/'; |
| 21 | + public static $url = ' https://apius.ai.cc/'; | ||
| 22 | public static $header = array( | 22 | public static $header = array( |
| 23 | 'accept: application/json', | 23 | 'accept: application/json', |
| 24 | 'Content-Type: application/json', | 24 | 'Content-Type: application/json', |
| @@ -25,16 +25,27 @@ class DetailController extends BaseController | @@ -25,16 +25,27 @@ class DetailController extends BaseController | ||
| 25 | * @method :post | 25 | * @method :post |
| 26 | * @time :2024/11/13 9:53 | 26 | * @time :2024/11/13 9:53 |
| 27 | */ | 27 | */ |
| 28 | - public function getDetail(Detail $detail){ | 28 | + public function getDetail(Detail $detail,Column $column){ |
| 29 | $this->request->validate([ | 29 | $this->request->validate([ |
| 30 | 'product_id'=>'required', | 30 | 'product_id'=>'required', |
| 31 | - 'column_id'=>'required' | ||
| 32 | ],[ | 31 | ],[ |
| 33 | 'product_id.required' => '产品id不能为空', | 32 | 'product_id.required' => '产品id不能为空', |
| 34 | - 'column_id.required' => '栏目id不能为空', | ||
| 35 | ]); | 33 | ]); |
| 34 | + $data_column = $column->list([],'id',['*'],'asc'); | ||
| 36 | $data = $detail->list($this->map,'sort',['*'],'asc'); | 35 | $data = $detail->list($this->map,'sort',['*'],'asc'); |
| 37 | - $this->response('success',Code::SUCCESS,$data); | 36 | + if(!empty($data_column) && !empty($data)){ |
| 37 | + foreach ($data_column as $k => $v){ | ||
| 38 | + $column_data = []; | ||
| 39 | + foreach ($data as $v1){ | ||
| 40 | + if($v['id'] == $v1['column_id']){ | ||
| 41 | + $column_data[] = $v1; | ||
| 42 | + } | ||
| 43 | + } | ||
| 44 | + $v['data'] = $column_data; | ||
| 45 | + $data_column[$k] = $v; | ||
| 46 | + } | ||
| 47 | + } | ||
| 48 | + $this->response('success',Code::SUCCESS,$data_column); | ||
| 38 | } | 49 | } |
| 39 | 50 | ||
| 40 | /** | 51 | /** |
| @@ -9,6 +9,7 @@ use App\Models\Product\Category; | @@ -9,6 +9,7 @@ use App\Models\Product\Category; | ||
| 9 | use App\Models\Product\CategoryRelated; | 9 | use App\Models\Product\CategoryRelated; |
| 10 | use App\Models\Product\ExtendInfo; | 10 | use App\Models\Product\ExtendInfo; |
| 11 | use App\Models\Product\Keyword; | 11 | use App\Models\Product\Keyword; |
| 12 | +use App\Models\Product\KeywordRelated; | ||
| 12 | use App\Models\Product\Product; | 13 | use App\Models\Product\Product; |
| 13 | use App\Models\RouteMap\RouteMap; | 14 | use App\Models\RouteMap\RouteMap; |
| 14 | use App\Models\Template\BTemplate; | 15 | use App\Models\Template\BTemplate; |
| @@ -894,6 +895,10 @@ class ProductLogic extends BaseLogic | @@ -894,6 +895,10 @@ class ProductLogic extends BaseLogic | ||
| 894 | if($category_arr){ | 895 | if($category_arr){ |
| 895 | CategoryRelated::saveRelated($id, $category_arr); | 896 | CategoryRelated::saveRelated($id, $category_arr); |
| 896 | } | 897 | } |
| 898 | + //关联关键词 | ||
| 899 | + if($keyword_id){ | ||
| 900 | + KeywordRelated::saveRelated($id, $keyword_id); | ||
| 901 | + } | ||
| 897 | return true; | 902 | return true; |
| 898 | } | 903 | } |
| 899 | return false; | 904 | return false; |
| @@ -189,7 +189,7 @@ class ManageHr extends Base | @@ -189,7 +189,7 @@ class ManageHr extends Base | ||
| 189 | * @time :2023/8/18 14:41 | 189 | * @time :2023/8/18 14:41 |
| 190 | */ | 190 | */ |
| 191 | public function getName($id){ | 191 | public function getName($id){ |
| 192 | - $name = ''; | 192 | + $name = '未分配'; |
| 193 | if(!empty($id)){ | 193 | if(!empty($id)){ |
| 194 | $name = Cache::get('manager_hr_'.$id); | 194 | $name = Cache::get('manager_hr_'.$id); |
| 195 | if(empty($name)){ | 195 | if(empty($name)){ |
-
请 注册 或 登录 后发表评论