修改历史问诊医生列表
This commit is contained in:
parent
516a2ace66
commit
4d7776e1b1
@ -1,76 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace App\Model;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
use Hyperf\Database\Model\Collection;
|
|
||||||
use Hyperf\Snowflake\Concern\Snowflake;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @property int $push_id 主键id
|
|
||||||
* @property int $push_user_id 用户id(被推送者)
|
|
||||||
* @property int $event 推送事件(具体定义查看消费端)
|
|
||||||
* @property string $wx_template_id 微信推送模版id
|
|
||||||
* @property string $params 推送所需的参数(json)
|
|
||||||
* @property int $status 推送状态(1:成功 2:失败)
|
|
||||||
* @property string $fail_reason 推送失败原因
|
|
||||||
* @property string $content 推送内容
|
|
||||||
* @property \Carbon\Carbon $created_at 创建时间
|
|
||||||
* @property \Carbon\Carbon $updated_at 修改时间
|
|
||||||
*/
|
|
||||||
class LogMessagePush extends Model
|
|
||||||
{
|
|
||||||
use Snowflake;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The table associated with the model.
|
|
||||||
*/
|
|
||||||
protected ?string $table = 'log_message_push';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The attributes that are mass assignable.
|
|
||||||
*/
|
|
||||||
protected array $fillable = ['push_id', 'push_user_id', 'event', 'wx_template_id', 'params', 'status', 'fail_reason', 'content', 'created_at', 'updated_at'];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The attributes that should be cast to native types.
|
|
||||||
*/
|
|
||||||
protected array $casts = ['push_id' => '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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
72
app/Model/LogPushMessage.php
Normal file
72
app/Model/LogPushMessage.php
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace App\Model;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
use Hyperf\Database\Model\Collection;
|
||||||
|
use Hyperf\Snowflake\Concern\Snowflake;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @property int $log_id 主键id
|
||||||
|
* @property int $to_user_id 用户id(被推送者)
|
||||||
|
* @property int $user_type 用户类型(1:患者 2:医师 3:药师)
|
||||||
|
* @property int $type 推送类型(1:站内 2:短信 3:订阅)
|
||||||
|
* @property int $status 推送状态(1:成功 2:失败)
|
||||||
|
* @property string $fail_reason 推送失败原因
|
||||||
|
* @property string $send_reason 发送原因
|
||||||
|
* @property string $content 发送内容
|
||||||
|
* @property \Carbon\Carbon $created_at 创建时间
|
||||||
|
* @property \Carbon\Carbon $updated_at 修改时间
|
||||||
|
*/
|
||||||
|
class LogPushMessage extends Model
|
||||||
|
{
|
||||||
|
use Snowflake;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table associated with the model.
|
||||||
|
*/
|
||||||
|
protected ?string $table = 'log_push_message';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected array $fillable = ['log_id', 'to_user_id', 'user_type', 'type', 'status', 'fail_reason', 'send_reason', 'content', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
|
protected string $primaryKey = "log_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 $params
|
||||||
|
* @param array $data
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public static function edit(array $params = [], array $data = []): int
|
||||||
|
{
|
||||||
|
return self::where($params)->update($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -447,12 +447,12 @@ class PatientDoctorService extends BaseService
|
|||||||
$params = array();
|
$params = array();
|
||||||
$params['patient_id'] = $user_info['client_user_id'];
|
$params['patient_id'] = $user_info['client_user_id'];
|
||||||
$params['history_status'] = 1;
|
$params['history_status'] = 1;
|
||||||
$result = PatientHistoryInquiryModel::getPage($params,$page,$per_page);
|
$result = PatientHistoryInquiryModel::getPage($params,['*'],$page,$per_page);
|
||||||
}else{
|
}else{
|
||||||
// 关注
|
// 关注
|
||||||
$params = array();
|
$params = array();
|
||||||
$params['patient_id'] = $user_info['client_user_id'];
|
$params['patient_id'] = $user_info['client_user_id'];
|
||||||
$result = PatientFollow::getPage($params,$page,$per_page);
|
$result = PatientFollow::getPage($params,['*'],$page,$per_page);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理数据
|
// 处理数据
|
||||||
|
|||||||
@ -522,24 +522,26 @@ Router::get('/case', [InquiryController::class, 'getPatientInquiryCase']);
|
|||||||
|
|
||||||
Router::get('/testpay', [UserController::class, 'testpay']);
|
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']);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取系统消息列表-系统消息
|
// 获取系统消息列表-系统消息
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user