From 4d7776e1b19047f1ec201b97efd78718e95f4f1e Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Mon, 20 Mar 2023 09:52:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8E=86=E5=8F=B2=E9=97=AE?= =?UTF-8?q?=E8=AF=8A=E5=8C=BB=E7=94=9F=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Model/LogMessagePush.php | 76 --------------------------- app/Model/LogPushMessage.php | 72 +++++++++++++++++++++++++ app/Services/PatientDoctorService.php | 4 +- config/routes.php | 26 ++++----- 4 files changed, 88 insertions(+), 90 deletions(-) delete mode 100644 app/Model/LogMessagePush.php create mode 100644 app/Model/LogPushMessage.php diff --git a/app/Model/LogMessagePush.php b/app/Model/LogMessagePush.php deleted file mode 100644 index 841135e..0000000 --- a/app/Model/LogMessagePush.php +++ /dev/null @@ -1,76 +0,0 @@ - 'integer', 'push_user_id' => 'integer', 'event' => 'integer', 'status' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime']; - - protected string $primaryKey = "push_id"; - - /** - * 获取信息-单条 - * @param array $params - * @param array $fields - * @return object|null - */ - public static function getOne(array $params, array $fields = ['*']): object|null - { - 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); - } - - /** - * 新增 - * @param array $data - * @return LogMessagePush|\Hyperf\Database\Model\Model - */ - public static function addLogMessagePush(array $data): LogMessagePush|\Hyperf\Database\Model\Model - { - return self::create($data); - } -} diff --git a/app/Model/LogPushMessage.php b/app/Model/LogPushMessage.php new file mode 100644 index 0000000..0248c74 --- /dev/null +++ b/app/Model/LogPushMessage.php @@ -0,0 +1,72 @@ +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); + } + + /** + * 修改 + * @param array $params + * @param array $data + * @return int + */ + public static function edit(array $params = [], array $data = []): int + { + return self::where($params)->update($data); + } +} diff --git a/app/Services/PatientDoctorService.php b/app/Services/PatientDoctorService.php index d1db6a3..be3c746 100644 --- a/app/Services/PatientDoctorService.php +++ b/app/Services/PatientDoctorService.php @@ -447,12 +447,12 @@ class PatientDoctorService extends BaseService $params = array(); $params['patient_id'] = $user_info['client_user_id']; $params['history_status'] = 1; - $result = PatientHistoryInquiryModel::getPage($params,$page,$per_page); + $result = PatientHistoryInquiryModel::getPage($params,['*'],$page,$per_page); }else{ // 关注 $params = array(); $params['patient_id'] = $user_info['client_user_id']; - $result = PatientFollow::getPage($params,$page,$per_page); + $result = PatientFollow::getPage($params,['*'],$page,$per_page); } // 处理数据 diff --git a/config/routes.php b/config/routes.php index 25f19ca..73b212d 100644 --- a/config/routes.php +++ b/config/routes.php @@ -522,24 +522,26 @@ Router::get('/case', [InquiryController::class, 'getPatientInquiryCase']); Router::get('/testpay', [UserController::class, 'testpay']); +// 地址管理 +Router::addGroup('/address', function () { + // 获取地址列表 + Router::put('', [UserController::class, 'putUserAvatar']); + + // 添加地址 + Router::post('', [CallBackController::class, 'imCallBack']); + + // 修改地址 + Router::put('', [CallBackController::class, 'imCallBack']); + + // 删除地址 + Router::delete('', [CallBackController::class, 'imCallBack']); +}); // 未开发接口 -// 获取地址列表-地址管理 -Router::post('/10', [CallBackController::class, 'imCallBack']); - -// 获取地址列表-地址管理 -Router::post('/11', [CallBackController::class, 'imCallBack']); - -// 添加/修改地址-地址管理 -Router::post('/12', [CallBackController::class, 'imCallBack']); - -// 删除地址-地址管理 -Router::post('/13', [CallBackController::class, 'imCallBack']); - // 获取系统消息列表-系统消息