Merge remote-tracking branch 'origin/master' into akun
正在显示
4 个修改的文件
包含
22 行增加
和
8 行删除
| @@ -65,9 +65,9 @@ class UpgradeProjectCount extends Command | @@ -65,9 +65,9 @@ class UpgradeProjectCount extends Command | ||
| 65 | ->groupBy('month')->get()->toArray(); | 65 | ->groupBy('month')->get()->toArray(); |
| 66 | foreach ($list as $k=>$v){ | 66 | foreach ($list as $k=>$v){ |
| 67 | $v = (array)$v; | 67 | $v = (array)$v; |
| 68 | - if($v['month'] == date('Y-m')){ | ||
| 69 | - continue; | ||
| 70 | - } | 68 | +// if($v['month'] == date('Y-m')){ |
| 69 | +// continue; | ||
| 70 | +// } | ||
| 71 | $monthCountModel = new MonthCount(); | 71 | $monthCountModel = new MonthCount(); |
| 72 | $info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]); | 72 | $info = $monthCountModel->read(['month'=>$v['month'],'project_id'=>$project_id]); |
| 73 | // 获取当月开始时间 | 73 | // 获取当月开始时间 |
| @@ -115,6 +115,8 @@ class RecommendedSuppliers extends Command | @@ -115,6 +115,8 @@ class RecommendedSuppliers extends Command | ||
| 115 | * @time :2024/7/1 18:07 | 115 | * @time :2024/7/1 18:07 |
| 116 | */ | 116 | */ |
| 117 | public function getKeywords($project_id){ | 117 | public function getKeywords($project_id){ |
| 118 | + $keywordModel = new Keyword(); | ||
| 119 | + $keywordModel-> | ||
| 118 | $info = Keyword::inRandomOrder()->first(); | 120 | $info = Keyword::inRandomOrder()->first(); |
| 119 | $keywordInfo = $this->getPurchaser($info->title,$project_id); | 121 | $keywordInfo = $this->getPurchaser($info->title,$project_id); |
| 120 | if($keywordInfo !== false){ | 122 | if($keywordInfo !== false){ |
| @@ -312,13 +312,13 @@ class ComController extends BaseController | @@ -312,13 +312,13 @@ class ComController extends BaseController | ||
| 312 | public function getMobileProject(){ | 312 | public function getMobileProject(){ |
| 313 | $data = []; | 313 | $data = []; |
| 314 | $userModel = new User(); | 314 | $userModel = new User(); |
| 315 | - $list = $userModel->list(['mobile'=>$this->user['mobile'],'project_id'=>['!=',$this->user['project_id']]],'id',['id','project_id']); | ||
| 316 | - if(!empty($list)){ | 315 | + $project_id = $userModel->formatQuery(['mobile'=>$this->user['mobile'],'project_id'=>['!=',$this->user['project_id']]])->pluck('project_id')->toArray(); |
| 316 | + if(!empty($project_id)){ | ||
| 317 | $projectModel = new Project(); | 317 | $projectModel = new Project(); |
| 318 | - foreach ($list as $k => $v){ | ||
| 319 | - $projectInfo = $projectModel->read(['id'=>$v['project_id']],['id','company']); | 318 | + $list = $projectModel->list(['id'=>['in',$project_id],'delete_status'=>0],'id',['id','company']); |
| 319 | + foreach ($list as $v){ | ||
| 320 | //获取当前项目详情 | 320 | //获取当前项目详情 |
| 321 | - $data[] = ['project_id'=>$projectInfo['id'],'company'=>$projectInfo['company']]; | 321 | + $data[] = ['project_id'=>$v['id'],'company'=>$v['company']]; |
| 322 | } | 322 | } |
| 323 | } | 323 | } |
| 324 | //登录选择项目的有效时间 | 324 | //登录选择项目的有效时间 |
| @@ -7,6 +7,7 @@ use App\Helper\Arr; | @@ -7,6 +7,7 @@ use App\Helper\Arr; | ||
| 7 | use App\Http\Controllers\Bside\BaseController; | 7 | use App\Http\Controllers\Bside\BaseController; |
| 8 | use App\Http\Logic\Bside\Product\KeywordLogic; | 8 | use App\Http\Logic\Bside\Product\KeywordLogic; |
| 9 | use App\Http\Requests\Bside\Product\KeywordRequest; | 9 | use App\Http\Requests\Bside\Product\KeywordRequest; |
| 10 | +use App\Models\Com\NoticeLog; | ||
| 10 | use App\Models\Product\Keyword; | 11 | use App\Models\Product\Keyword; |
| 11 | use App\Models\Product\KeywordRelated; | 12 | use App\Models\Product\KeywordRelated; |
| 12 | use App\Models\Product\Product; | 13 | use App\Models\Product\Product; |
| @@ -232,4 +233,15 @@ class KeywordController extends BaseController | @@ -232,4 +233,15 @@ class KeywordController extends BaseController | ||
| 232 | } | 233 | } |
| 233 | $this->response('success'); | 234 | $this->response('success'); |
| 234 | } | 235 | } |
| 236 | + | ||
| 237 | + /** | ||
| 238 | + * @remark :批量提交更新关键词 | ||
| 239 | + * @name :batchUpdateKeyword | ||
| 240 | + * @author :lyh | ||
| 241 | + * @method :post | ||
| 242 | + * @time :2024/7/2 10:14 | ||
| 243 | + */ | ||
| 244 | + public function batchUpdateKeyword(){ | ||
| 245 | + $noticeLogModel = new NoticeLog(); | ||
| 246 | + } | ||
| 235 | } | 247 | } |
-
请 注册 或 登录 后发表评论