1
This commit is contained in:
parent
5492abefb8
commit
2b121804d0
@ -145,4 +145,9 @@ class BasicDataController extends AbstractController
|
|||||||
$data = $BasicDataService->getDiseaseIcdSearch();
|
$data = $BasicDataService->getDiseaseIcdSearch();
|
||||||
return $this->response->json($data);
|
return $this->response->json($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getNation(){
|
||||||
|
$params = array();
|
||||||
|
// $basic_nation = BasicNation::
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -6,6 +6,7 @@ namespace App\Model;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
use Hyperf\Database\Model\Collection;
|
||||||
use Hyperf\Snowflake\Concern\Snowflake;
|
use Hyperf\Snowflake\Concern\Snowflake;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -28,11 +29,6 @@ class BasicJob extends Model
|
|||||||
*/
|
*/
|
||||||
protected array $fillable = ['job_id', 'job_name', 'created_at', 'updated_at'];
|
protected array $fillable = ['job_id', 'job_name', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
/**
|
|
||||||
* The attributes that should be cast to native types.
|
|
||||||
*/
|
|
||||||
protected array $casts = ['job_id' => 'string', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
|
|
||||||
|
|
||||||
protected string $primaryKey = "job_id";
|
protected string $primaryKey = "job_id";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,4 +41,15 @@ class BasicJob extends Model
|
|||||||
{
|
{
|
||||||
return self::where($params)->first($fields);
|
return self::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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ namespace App\Model;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
use Hyperf\Database\Model\Collection;
|
||||||
use Hyperf\Snowflake\Concern\Snowflake;
|
use Hyperf\Snowflake\Concern\Snowflake;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -28,11 +29,6 @@ class BasicNation extends Model
|
|||||||
*/
|
*/
|
||||||
protected array $fillable = ['nation_id', 'nation_name', 'created_at', 'updated_at'];
|
protected array $fillable = ['nation_id', 'nation_name', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
/**
|
|
||||||
* The attributes that should be cast to native types.
|
|
||||||
*/
|
|
||||||
protected array $casts = ['nation_id' => 'string', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
|
|
||||||
|
|
||||||
protected string $primaryKey = "nation_id";
|
protected string $primaryKey = "nation_id";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,4 +41,15 @@ class BasicNation extends Model
|
|||||||
{
|
{
|
||||||
return self::where($params)->first($fields);
|
return self::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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -483,8 +483,8 @@ Router::addGroup('/basic', function () {
|
|||||||
Router::get('/search', [BasicDataController::class, 'getProductSearch']);
|
Router::get('/search', [BasicDataController::class, 'getProductSearch']);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取民族列表数据
|
// 获取民族数据
|
||||||
Router::get('/operation/manual', [BasicDataController::class, 'getOperationManual']);
|
Router::get('/nation', [BasicDataController::class, 'getNation']);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取医生评价
|
// 获取医生评价
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user