Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
6 个修改的文件
包含
20 行增加
和
2 行删除
| @@ -273,7 +273,7 @@ class VideoTask extends Command | @@ -273,7 +273,7 @@ class VideoTask extends Command | ||
| 273 | if (strpos(','.$keyword_id.',', ','.$productKeyword->id.',') === false) { | 273 | if (strpos(','.$keyword_id.',', ','.$productKeyword->id.',') === false) { |
| 274 | //不包含 | 274 | //不包含 |
| 275 | $productModel = new Product(); | 275 | $productModel = new Product(); |
| 276 | - $keyword_id = $keyword_id . $productKeyword->id.','; | 276 | + $keyword_id = ','.$keyword_id.',' . $productKeyword->id.','; |
| 277 | $productModel->edit(['keyword_id'=>$keyword_id],['id'=>$item->id]); | 277 | $productModel->edit(['keyword_id'=>$keyword_id],['id'=>$item->id]); |
| 278 | } | 278 | } |
| 279 | $data[] = ['url'=>getImageUrl($item->thumb['url']),'title'=>$item->title]; | 279 | $data[] = ['url'=>getImageUrl($item->thumb['url']),'title'=>$item->title]; |
| @@ -13,9 +13,12 @@ use App\Enums\Common\Code; | @@ -13,9 +13,12 @@ use App\Enums\Common\Code; | ||
| 13 | use App\Http\Controllers\Bside\BaseController; | 13 | use App\Http\Controllers\Bside\BaseController; |
| 14 | use App\Models\HomeCount\Count; | 14 | use App\Models\HomeCount\Count; |
| 15 | use App\Models\HomeCount\MonthCount; | 15 | use App\Models\HomeCount\MonthCount; |
| 16 | +use App\Models\Inquiry\InquiryIP; | ||
| 17 | +use App\Models\Inquiry\InquirySet; | ||
| 16 | use App\Models\News\News; | 18 | use App\Models\News\News; |
| 17 | use App\Models\Product\Category; | 19 | use App\Models\Product\Category; |
| 18 | use App\Models\Product\Product; | 20 | use App\Models\Product\Product; |
| 21 | +use App\Models\Visit\Visit; | ||
| 19 | use Carbon\Carbon; | 22 | use Carbon\Carbon; |
| 20 | 23 | ||
| 21 | class MonthReportController extends BaseController | 24 | class MonthReportController extends BaseController |
| @@ -82,6 +85,9 @@ class MonthReportController extends BaseController | @@ -82,6 +85,9 @@ class MonthReportController extends BaseController | ||
| 82 | $info['news_num_last_7'] = $newsModel->formatQuery( | 85 | $info['news_num_last_7'] = $newsModel->formatQuery( |
| 83 | ['status'=>0,'created_at'=>['between',[now()->subDays(7)->startOfDay()->toDateString(),now()->startOfDay()->toDateString()]] | 86 | ['status'=>0,'created_at'=>['between',[now()->subDays(7)->startOfDay()->toDateString(),now()->startOfDay()->toDateString()]] |
| 84 | ])->count(); | 87 | ])->count(); |
| 88 | + $info['service_duration'] = $this->user['service_duration'];//服务天数 | ||
| 89 | + $info['ip_total'] = (new Visit())->count();//ip总数 | ||
| 90 | + $info['remain_day'] = $this->user['remain_day'];//剩余服务天数 | ||
| 85 | $info['speed'] = round((0.3 + mt_rand()/mt_getrandmax() * (1-0.3)),2); | 91 | $info['speed'] = round((0.3 + mt_rand()/mt_getrandmax() * (1-0.3)),2); |
| 86 | $this->response('success',Code::SUCCESS,$info); | 92 | $this->response('success',Code::SUCCESS,$info); |
| 87 | } | 93 | } |
| @@ -41,6 +41,9 @@ class BaseController extends Controller | @@ -41,6 +41,9 @@ class BaseController extends Controller | ||
| 41 | $this->uid = $info['id']; | 41 | $this->uid = $info['id']; |
| 42 | //参数处理 | 42 | //参数处理 |
| 43 | $this->getParam(); | 43 | $this->getParam(); |
| 44 | + if(!empty($this->user)){ | ||
| 45 | + $this->project = Cache::get('user-'.$this->user['project_id']); | ||
| 46 | + } | ||
| 44 | //日志记录 | 47 | //日志记录 |
| 45 | $this->set_user_log(); | 48 | $this->set_user_log(); |
| 46 | } | 49 | } |
| @@ -158,7 +158,6 @@ class ProjectLogic extends BaseLogic | @@ -158,7 +158,6 @@ class ProjectLogic extends BaseLogic | ||
| 158 | $this->saveProjectAfter($this->param['project_after']); | 158 | $this->saveProjectAfter($this->param['project_after']); |
| 159 | $this->saveMinorLanguages($this->param['minor_language'] ?? []); | 159 | $this->saveMinorLanguages($this->param['minor_language'] ?? []); |
| 160 | $this->syncImageFile($this->param['project_location'],$this->param['id']); | 160 | $this->syncImageFile($this->param['project_location'],$this->param['id']); |
| 161 | - //创建站点 | ||
| 162 | (new SyncService())->projectAcceptAddress($this->param['id']); | 161 | (new SyncService())->projectAcceptAddress($this->param['id']); |
| 163 | } | 162 | } |
| 164 | DB::commit(); | 163 | DB::commit(); |
| @@ -173,6 +173,8 @@ class UserLoginLogic | @@ -173,6 +173,8 @@ class UserLoginLogic | ||
| 173 | $info['is_update_language'] = $project['is_update_language']; | 173 | $info['is_update_language'] = $project['is_update_language']; |
| 174 | $info['configuration'] = $project['deploy_build']['configuration']; | 174 | $info['configuration'] = $project['deploy_build']['configuration']; |
| 175 | $info['project_type'] = $project['type']; | 175 | $info['project_type'] = $project['type']; |
| 176 | + $info['service_duration'] = $project['deploy_build']['service_duration']; | ||
| 177 | + $info['remain_day'] = $project['remain_day']; | ||
| 176 | if($info['is_customized'] == 1){ | 178 | if($info['is_customized'] == 1){ |
| 177 | $info['is_visualization'] = json_decode($project['is_visualization']); | 179 | $info['is_visualization'] = json_decode($project['is_visualization']); |
| 178 | } | 180 | } |
| @@ -272,6 +274,8 @@ class UserLoginLogic | @@ -272,6 +274,8 @@ class UserLoginLogic | ||
| 272 | $info['project_type'] = $project['type']; | 274 | $info['project_type'] = $project['type']; |
| 273 | $info['storage_type'] = $project['storage_type']; | 275 | $info['storage_type'] = $project['storage_type']; |
| 274 | $info['project_location'] = $project['project_location']; | 276 | $info['project_location'] = $project['project_location']; |
| 277 | + $info['service_duration'] = $project['deploy_build']['service_duration'] ?? 0; | ||
| 278 | + $info['remain_day'] = $project['remain_day'] ?? 0; | ||
| 275 | if($info['is_customized'] == 1){ | 279 | if($info['is_customized'] == 1){ |
| 276 | $info['is_visualization'] = json_decode($project['is_visualization']); | 280 | $info['is_visualization'] = json_decode($project['is_visualization']); |
| 277 | } | 281 | } |
| @@ -58,6 +58,7 @@ class CopyProjectJob implements ShouldQueue | @@ -58,6 +58,7 @@ class CopyProjectJob implements ShouldQueue | ||
| 58 | $type = $data['type']; | 58 | $type = $data['type']; |
| 59 | $data['type'] = 0; | 59 | $data['type'] = 0; |
| 60 | $data['status'] = 0; | 60 | $data['status'] = 0; |
| 61 | + $data['finish_remain_day'] = 0; | ||
| 61 | $data['title'] = $data['title'].'-copy'; | 62 | $data['title'] = $data['title'].'-copy'; |
| 62 | unset($data['id']); | 63 | unset($data['id']); |
| 63 | $project_id = $projectModel->insertGetId($data); | 64 | $project_id = $projectModel->insertGetId($data); |
| @@ -82,6 +83,8 @@ class CopyProjectJob implements ShouldQueue | @@ -82,6 +83,8 @@ class CopyProjectJob implements ShouldQueue | ||
| 82 | $optimizeData = $optimizeData->getAttributes(); | 83 | $optimizeData = $optimizeData->getAttributes(); |
| 83 | unset($optimizeData['id'],$optimizeData['domain']); | 84 | unset($optimizeData['id'],$optimizeData['domain']); |
| 84 | $optimizeData['project_id'] = $project_id; | 85 | $optimizeData['project_id'] = $project_id; |
| 86 | + $optimizeData['api_no'] = 0; | ||
| 87 | + $optimizeData['minor_languages'] = json_encode([]); | ||
| 85 | $optimizeModel->insert($optimizeData); | 88 | $optimizeModel->insert($optimizeData); |
| 86 | } | 89 | } |
| 87 | //复制付费表 | 90 | //复制付费表 |
| @@ -160,6 +163,9 @@ class CopyProjectJob implements ShouldQueue | @@ -160,6 +163,9 @@ class CopyProjectJob implements ShouldQueue | ||
| 160 | $sql = DB::connection('custom_tmp_mysql_copy')->select("SHOW CREATE TABLE {$table}"); | 163 | $sql = DB::connection('custom_tmp_mysql_copy')->select("SHOW CREATE TABLE {$table}"); |
| 161 | DB::connection('custom_mysql')->statement(get_object_vars($sql[0])['Create Table']); | 164 | DB::connection('custom_mysql')->statement(get_object_vars($sql[0])['Create Table']); |
| 162 | } | 165 | } |
| 166 | + if($table == 'gl_customer_visit' || $table == 'gl_customer_visit_item' || $table == 'gl_inquiry_other' || $table == 'gl_inquiry_form_data' || $table == 'gl_inquiry_form'){ | ||
| 167 | + continue; | ||
| 168 | + } | ||
| 163 | // DB::connection('custom_mysql')->table($table)->truncate(); // 清空目标表数据 | 169 | // DB::connection('custom_mysql')->table($table)->truncate(); // 清空目标表数据 |
| 164 | DB::connection('custom_mysql')->table($table)->insertUsing( | 170 | DB::connection('custom_mysql')->table($table)->insertUsing( |
| 165 | [], // 列名数组,留空表示插入所有列 | 171 | [], // 列名数组,留空表示插入所有列 |
-
请 注册 或 登录 后发表评论