修改删除及获取常用语接口
This commit is contained in:
parent
593b7956b3
commit
5492abefb8
@ -206,9 +206,6 @@ class UserDoctorController extends AbstractController
|
|||||||
*/
|
*/
|
||||||
public function deleteDoctorWords(): ResponseInterface
|
public function deleteDoctorWords(): ResponseInterface
|
||||||
{
|
{
|
||||||
$request = $this->container->get(UserDoctorRequest::class);
|
|
||||||
$request->scene('deleteDoctorWords')->validateResolved();
|
|
||||||
|
|
||||||
$UserDoctorService = new UserDoctorService();
|
$UserDoctorService = new UserDoctorService();
|
||||||
$data = $UserDoctorService->deleteDoctorWords();
|
$data = $UserDoctorService->deleteDoctorWords();
|
||||||
return $this->response->json($data);
|
return $this->response->json($data);
|
||||||
|
|||||||
@ -50,10 +50,6 @@ class UserDoctorRequest extends FormRequest
|
|||||||
'words',
|
'words',
|
||||||
'words_type'
|
'words_type'
|
||||||
],
|
],
|
||||||
'deleteDoctorWords' => [ // 删除常用语
|
|
||||||
'words',
|
|
||||||
'words_type'
|
|
||||||
],
|
|
||||||
'getDoctorEvaluationList' => [ // 获取医生评价
|
'getDoctorEvaluationList' => [ // 获取医生评价
|
||||||
'doctor_id',
|
'doctor_id',
|
||||||
'evaluation_type',
|
'evaluation_type',
|
||||||
|
|||||||
@ -590,6 +590,7 @@ class UserDoctorService extends BaseService
|
|||||||
foreach ($basic_words as $item) {
|
foreach ($basic_words as $item) {
|
||||||
$data = array();
|
$data = array();
|
||||||
$data['words'] = $item['basics_words'];
|
$data['words'] = $item['basics_words'];
|
||||||
|
$data['doctor_words_id'] = "";
|
||||||
$data['is_system'] = 1;
|
$data['is_system'] = 1;
|
||||||
$result[] = $data;
|
$result[] = $data;
|
||||||
}
|
}
|
||||||
@ -605,6 +606,7 @@ class UserDoctorService extends BaseService
|
|||||||
foreach ($doctor_words as $item) {
|
foreach ($doctor_words as $item) {
|
||||||
$data = array();
|
$data = array();
|
||||||
$data['words'] = $item['words'];
|
$data['words'] = $item['words'];
|
||||||
|
$data['doctor_words_id'] = $item['doctor_words_id'];
|
||||||
$data['is_system'] = 0;
|
$data['is_system'] = 0;
|
||||||
$result[] = $data;
|
$result[] = $data;
|
||||||
}
|
}
|
||||||
@ -661,14 +663,12 @@ class UserDoctorService extends BaseService
|
|||||||
{
|
{
|
||||||
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||||
|
|
||||||
$words = $this->request->input('words');
|
$doctor_words_id = $this->request->route('doctor_words_id');
|
||||||
$words_type = $this->request->input('words_type');
|
|
||||||
|
|
||||||
// 查询是否重复
|
// 查询是否重复
|
||||||
$params = array();
|
$params = array();
|
||||||
$params['doctor_id'] = $user_info['client_user_id'];
|
$params['doctor_id'] = $user_info['client_user_id'];
|
||||||
$params['words_type'] = $words_type;
|
$params['doctor_words_id'] = $doctor_words_id;
|
||||||
$params['words'] = $words;
|
|
||||||
$doctor_words = DoctorWord::getOne($params);
|
$doctor_words = DoctorWord::getOne($params);
|
||||||
if (empty($doctor_words)) {
|
if (empty($doctor_words)) {
|
||||||
return fail();
|
return fail();
|
||||||
|
|||||||
@ -163,7 +163,7 @@ Router::addGroup('/doctor', function () {
|
|||||||
Router::post('', [UserDoctorController::class, 'addDoctorWords']);
|
Router::post('', [UserDoctorController::class, 'addDoctorWords']);
|
||||||
|
|
||||||
// 删除常用语列表
|
// 删除常用语列表
|
||||||
Router::delete('', [UserDoctorController::class, 'deleteDoctorWords']);
|
Router::delete('/{doctor_words_id:\d+}', [UserDoctorController::class, 'deleteDoctorWords']);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 医生数据
|
// 医生数据
|
||||||
@ -482,6 +482,9 @@ Router::addGroup('/basic', function () {
|
|||||||
// 搜索商品
|
// 搜索商品
|
||||||
Router::get('/search', [BasicDataController::class, 'getProductSearch']);
|
Router::get('/search', [BasicDataController::class, 'getProductSearch']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 获取民族列表数据
|
||||||
|
Router::get('/operation/manual', [BasicDataController::class, 'getOperationManual']);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取医生评价
|
// 获取医生评价
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user