|
...
|
...
|
@@ -131,12 +131,12 @@ class CropImage extends Command |
|
|
|
$val = getImageUrl($val);
|
|
|
|
$data[$key] = $val;
|
|
|
|
}
|
|
|
|
$webSettingImageModel = new WebSettingImage();
|
|
|
|
$info = $webSettingImageModel->read(['project_id'=>$project_id]);
|
|
|
|
$aggregationSettingModel = new AggregationSetting();
|
|
|
|
$info = $aggregationSettingModel->read(['project_id'=>$project_id]);
|
|
|
|
if($info === false){
|
|
|
|
$webSettingImageModel->addReturnId(['project_id'=>$project_id,'top_banner'=>json_encode($data,true)]);
|
|
|
|
$aggregationSettingModel->addReturnId(['project_id'=>$project_id,'top_banner'=>json_encode($data,true)]);
|
|
|
|
}else{
|
|
|
|
$webSettingImageModel->edit(['top_banner'=>json_encode($data,true)],['id'=>$info['id']]);
|
|
|
|
$aggregationSettingModel->edit(['top_banner'=>json_encode($data,true)],['id'=>$info['id']]);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
...
|
...
|
|