|
...
|
...
|
@@ -13,6 +13,8 @@ use App\Models\Product\CategoryRelated; |
|
|
|
use App\Models\Product\Keyword;
|
|
|
|
use App\Models\Product\KeywordRelated;
|
|
|
|
use App\Models\Product\Product;
|
|
|
|
use App\Models\Template\BSetting;
|
|
|
|
use App\Models\Template\BTemplate;
|
|
|
|
use App\Models\User\User;
|
|
|
|
use App\Rules\Ids;
|
|
|
|
use Illuminate\Http\Request;
|
|
...
|
...
|
@@ -51,6 +53,7 @@ class ProductController extends BaseController |
|
|
|
foreach ($lists['list'] as $k=>$v){
|
|
|
|
//处理参数
|
|
|
|
$v = $this->handleParam($v);
|
|
|
|
$v['is_renovation'] = $this->getProductIsRenovation($v['id']);
|
|
|
|
$lists['list'][$k] = $v;
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -58,6 +61,32 @@ class ProductController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :查看产品是否已装修
|
|
|
|
* @name :getProductIsRenovation
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/9/13 14:02
|
|
|
|
*/
|
|
|
|
public function getProductIsRenovation($id){
|
|
|
|
$templateSettingModel = new BSetting();
|
|
|
|
$info = $templateSettingModel->read(['project_id'=>$this->user['project_id']]);
|
|
|
|
if($info !== false){
|
|
|
|
$webTemplateModel = new BTemplate();
|
|
|
|
$param = [
|
|
|
|
'source'=>2,
|
|
|
|
'project_id'=>$this->user['project_id'],
|
|
|
|
'source_id'=>$id,
|
|
|
|
'template_id'=>$info['template_id']
|
|
|
|
];
|
|
|
|
$templateInfo = $webTemplateModel->read($param);
|
|
|
|
if($templateInfo !== false){
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :处理列表参数
|
|
|
|
* @name :handleParam
|
|
|
|
* @author :lyh
|
...
|
...
|
|