作者 lyh

gx

... ... @@ -115,6 +115,8 @@ class RecommendedSuppliers extends Command
* @time :2024/7/1 18:07
*/
public function getKeywords($project_id){
$keywordModel = new Keyword();
$keywordModel->
$info = Keyword::inRandomOrder()->first();
$keywordInfo = $this->getPurchaser($info->title,$project_id);
if($keywordInfo !== false){
... ...
... ... @@ -312,13 +312,13 @@ class ComController extends BaseController
public function getMobileProject(){
$data = [];
$userModel = new User();
$list = $userModel->list(['mobile'=>$this->user['mobile'],'project_id'=>['!=',$this->user['project_id']]],'id',['id','project_id']);
if(!empty($list)){
$project_id = $userModel->formatQuery(['mobile'=>$this->user['mobile'],'project_id'=>['!=',$this->user['project_id']]])->pluck('project_id')->toArray();
if(!empty($project_id)){
$projectModel = new Project();
$list = $projectModel->list(['id'=>['in',$project_id],'deleted_status'=>0],'id',['id','company']);
foreach ($list as $k => $v){
$projectInfo = $projectModel->read(['id'=>$v['project_id']],['id','company']);
//获取当前项目详情
$data[] = ['project_id'=>$projectInfo['id'],'company'=>$projectInfo['company']];
$data[] = ['project_id'=>$v['id'],'company'=>$v['company']];
}
}
//登录选择项目的有效时间
... ...