修正问诊类目录
This commit is contained in:
@@ -8,6 +8,7 @@ use App\Model\DiseaseClassExpertise;
|
||||
use App\Model\Hospital;
|
||||
use App\Model\HospitalDepartmentCustom;
|
||||
use App\Model\OperationManual;
|
||||
use App\Model\Product;
|
||||
|
||||
/**
|
||||
* 基础数据服务类
|
||||
@@ -189,4 +190,36 @@ class BasicDataService extends BaseService
|
||||
$disease_class_expertise = DiseaseClassExpertise::getOrderList($params,$fields);
|
||||
return success($disease_class_expertise);
|
||||
}
|
||||
|
||||
public function getProductSearch(){
|
||||
$product_keyword = $this->request->input('product_keyword');
|
||||
|
||||
$fields = [
|
||||
'product_id',
|
||||
'product_name',
|
||||
'product_cover_img',
|
||||
'product_spec',
|
||||
'manufacturer',
|
||||
'single_unit',
|
||||
'single_use',
|
||||
'packaging_unit',
|
||||
'frequency_use',
|
||||
'available_days',
|
||||
];
|
||||
$params = array();
|
||||
$params[] = ['product_name','like','%' . $product_keyword . '%'];
|
||||
|
||||
$product = Product::getList($params,$fields);
|
||||
if (empty($product)){
|
||||
return success();
|
||||
}
|
||||
|
||||
foreach ($product as &$item){
|
||||
$item['product_cover_img'] = addAliyunOssWebsite($item['product_cover_img']);
|
||||
|
||||
$item['product_name'] = $item['product_name'] . ' ' . $item['product_spec'];
|
||||
}
|
||||
|
||||
return success($product->toArray());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user