修正问诊类目录
This commit is contained in:
+12
-5
@@ -6,6 +6,7 @@ namespace App\Model;
|
||||
|
||||
|
||||
|
||||
use Hyperf\Database\Model\Collection;
|
||||
use Hyperf\Database\Model\Relations\HasOne;
|
||||
use Hyperf\Snowflake\Concern\Snowflake;
|
||||
|
||||
@@ -46,11 +47,6 @@ class Product extends Model
|
||||
*/
|
||||
protected array $fillable = ['product_id', 'product_platform_id', 'product_name', 'common_name', 'product_price', 'mnemonic_code', 'product_type', 'product_platform_code', 'product_pharmacy_code', 'product_cover_img', 'product_spec', 'license_number', 'manufacturer', 'single_unit', 'single_use', 'packaging_unit', 'frequency_use', 'available_days', 'product_remarks', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*/
|
||||
protected array $casts = ['product_id' => 'integer', 'product_platform_id' => 'integer', 'product_type' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
|
||||
|
||||
protected string $primaryKey = "product_id";
|
||||
|
||||
/**
|
||||
@@ -86,4 +82,15 @@ class Product extends Model
|
||||
->where($params)
|
||||
->first($fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据-多
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @return Collection|array
|
||||
*/
|
||||
public static function getList(array $params = [], array $fields = ['*']): Collection|array
|
||||
{
|
||||
return self::where($params)->get($fields);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,6 @@ class UserDoctor extends Model
|
||||
$datas = self::with([
|
||||
'Hospital:hospital_id,hospital_name,hospital_level_name',
|
||||
'DoctorInquiryConfig',
|
||||
'DoctorInquiryConfig.SystemInquiryConfig'
|
||||
])
|
||||
->where($params)
|
||||
->orderBy("is_platform_deep_cooperation", "desc")
|
||||
|
||||
Reference in New Issue
Block a user