新增问诊订单详情。修改错误码格式
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package orderEvaluationResponse
|
||||
|
||||
import (
|
||||
"hospital-admin-api/api/model"
|
||||
)
|
||||
|
||||
type OrderEvaluation struct {
|
||||
EvaluationId string `json:"evaluation_id"` // 主键id
|
||||
DoctorId string `json:"doctor_id"` // 医生id;NOT NULL
|
||||
PatientId string `json:"patient_id"` // 患者id;NOT NULL
|
||||
OrderInquiryId string `json:"order_inquiry_id"` // 订单-问诊id;NOT NULL
|
||||
NameMask string `json:"name_mask"` // 患者姓名(掩码)
|
||||
ReplyQuality float64 `json:"reply_quality"` // 回复质量(百分制)
|
||||
ServiceAttitude float64 `json:"service_attitude"` // 服务态度(百分制)
|
||||
ReplyProgress float64 `json:"reply_progress"` // 回复速度(百分制)
|
||||
AvgScore float64 `json:"avg_score"` // 平均得分(百分制,回复质量占4、服务态度占3、回复速度占3,计算公式:每个得分 * 占比 相加)
|
||||
Type int `json:"type"` // 类型(1:默认评价 2:主动评价)
|
||||
Content string `json:"content"` // 评价内容
|
||||
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
|
||||
UpdatedAt model.LocalTime `json:"updated_at"` // 修改时间
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package orderInquiryCaseResponse
|
||||
|
||||
import (
|
||||
"hospital-admin-api/api/model"
|
||||
)
|
||||
|
||||
// OrderInquiryCase 问诊病例详情
|
||||
type OrderInquiryCase struct {
|
||||
InquiryCaseId string `json:"inquiry_case_id"` // 主键id
|
||||
UserId string `json:"user_id"` // 用户id
|
||||
PatientId string `json:"patient_id"` // 患者id
|
||||
OrderInquiryId string `json:"order_inquiry_id"` // 订单-问诊id;NOT NULL
|
||||
FamilyId string `json:"family_id"` // 家庭成员id
|
||||
Relation int `json:"relation"` // 与患者关系(1:本人 2:父母 3:爱人 4:子女 5:亲戚 6:其他)
|
||||
Status int `json:"status"` // 状态(1:正常 2:删除)
|
||||
Name string `json:"name"` // 患者名称
|
||||
Sex int `json:"sex"` // 患者性别(0:未知 1:男 2:女)
|
||||
Age int `json:"age"` // 患者年龄
|
||||
Height string `json:"height"` // 身高(cm)
|
||||
Weight string `json:"weight"` // 体重(kg)
|
||||
DiseaseClassId string `json:"disease_class_id"` // 疾病分类id-系统
|
||||
DiseaseClassName string `json:"disease_class_name"` // 疾病名称-系统
|
||||
DiagnosisDate model.LocalTime `json:"diagnosis_date"` // 确诊日期
|
||||
DiseaseDesc string `json:"disease_desc"` // 病情描述(主诉)
|
||||
DiagnoseImages string `json:"diagnose_images"` // 复诊凭证(多个使用逗号分隔)
|
||||
IsAllergyHistory int `json:"is_allergy_history"` // 是否存在过敏史(0:否 1:是)
|
||||
AllergyHistory string `json:"allergy_history"` // 过敏史描述
|
||||
IsFamilyHistory int `json:"is_family_history"` // 是否存在家族病史(0:否 1:是)
|
||||
FamilyHistory string `json:"family_history"` // 家族病史描述
|
||||
IsPregnant int `json:"is_pregnant"` // 是否备孕、妊娠、哺乳期(0:否 1:是)
|
||||
Pregnant string `json:"pregnant"` // 备孕、妊娠、哺乳期描述
|
||||
IsTaboo int `json:"is_taboo"` // 是否服用过禁忌药物,且无相关禁忌(0:否 1:是)问诊购药时存在
|
||||
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
|
||||
UpdatedAt model.LocalTime `json:"updated_at"` // 修改时间
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package orderInquiryCouponResponse
|
||||
|
||||
import (
|
||||
"hospital-admin-api/api/model"
|
||||
)
|
||||
|
||||
// OrderInquiryCoupon 优惠卷详情
|
||||
type OrderInquiryCoupon struct {
|
||||
OrderCouponId string `json:"order_coupon_id"` // 主键id
|
||||
OrderInquiryId string `json:"order_inquiry_id"` // 订单-问诊id
|
||||
UserCouponId string `json:"user_coupon_id"` // 用户优惠卷表
|
||||
CouponName string `json:"coupon_name"` // 优惠卷名称
|
||||
CouponUsePrice float64 `json:"coupon_use_price"` // 优惠卷使用金额
|
||||
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
|
||||
UpdatedAt model.LocalTime `json:"updated_at"` // 修改时间
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package orderInquiryRefundResponse
|
||||
|
||||
import (
|
||||
"hospital-admin-api/api/model"
|
||||
)
|
||||
|
||||
type OrderInquiryRefund struct {
|
||||
InquiryRefundId string `json:"inquiry_refund_id"` // 主键id
|
||||
PatientId string `json:"patient_id"` // 患者id
|
||||
OrderInquiryId string `json:"order_inquiry_id"` // 订单-问诊id
|
||||
InquiryNo string `json:"inquiry_no"` // 系统订单编号
|
||||
InquiryRefundNo string `json:"inquiry_refund_no"` // 系统退款编号
|
||||
RefundId string `json:"refund_id"` // 第三方退款单号
|
||||
InquiryRefundStatus int `json:"inquiry_refund_status"` // 问诊订单退款状态(0:无退款 1:申请退款 2:退款中 3:退款成功 4:拒绝退款 5:退款关闭 6:退款异常)
|
||||
RefundTotal float64 `json:"refund_total"` // 退款金额
|
||||
RefundReason string `json:"refund_reason"` // 退款原因
|
||||
SuccessTime model.LocalTime `json:"success_time"` // 退款成功时间
|
||||
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
|
||||
UpdatedAt model.LocalTime `json:"updated_at"` // 修改时间
|
||||
}
|
||||
@@ -3,6 +3,11 @@ package orderInquiryResponse
|
||||
import (
|
||||
"fmt"
|
||||
"hospital-admin-api/api/model"
|
||||
"hospital-admin-api/api/responses/orderEvaluationResponse"
|
||||
"hospital-admin-api/api/responses/orderInquiryCaseResponse"
|
||||
"hospital-admin-api/api/responses/orderInquiryCouponResponse"
|
||||
"hospital-admin-api/api/responses/orderInquiryRefundResponse"
|
||||
"hospital-admin-api/api/responses/userDoctorResponse"
|
||||
)
|
||||
|
||||
// getOrderInquiryPage 获取医生列表-分页
|
||||
@@ -44,6 +49,49 @@ type getOrderInquiryPage struct {
|
||||
UpdatedAt model.LocalTime `json:"updated_at"` // 更新时间
|
||||
}
|
||||
|
||||
// GetOrderInquiry 问诊订单详情
|
||||
type GetOrderInquiry struct {
|
||||
OrderInquiryId string `json:"order_inquiry_id"` // 主键id
|
||||
UserId string `json:"user_id"` // 用户id-患者
|
||||
PatientId string `json:"patient_id"` // 患者id
|
||||
DoctorId string `json:"doctor_id"` // 医生id(未分配时为null)
|
||||
FamilyId string `json:"family_id"` // 家庭成员id(就诊用户)
|
||||
InquiryType int `json:"inquiry_type"` // 订单类型(1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药 5:检测)
|
||||
InquiryMode int `json:"inquiry_mode"` // 订单问诊方式(1:图文 2:视频 3:语音 4:电话 5:会员)
|
||||
InquiryStatus int `json:"inquiry_status"` // 问诊订单状态(1:待支付 2:待分配 3:待接诊 4:已接诊 5:已完成 6:已结束 7:已取消)
|
||||
IsDelete int `json:"is_delete"` // 删除状态(0:否 1:是)
|
||||
InquiryRefundStatus int `json:"inquiry_refund_status"` // 问诊订单退款状态(0:无退款 1:申请退款 2:退款中 3:退款成功 4:拒绝退款 5:退款关闭 6:退款异常)
|
||||
InquiryPayChannel int `json:"inquiry_pay_channel"` // 支付渠道(1:小程序支付 2:微信扫码支付 3:模拟支付)
|
||||
InquiryPayStatus int `json:"inquiry_pay_status"` // 支付状态(1:未支付 2:已支付 3:支付中 4:支付失败 5:支付超时 6:支付关闭 7:已撤销 8:转入退款)
|
||||
InquiryNo string `json:"inquiry_no"` // 系统订单编号
|
||||
EscrowTradeNo string `json:"escrow_trade_no"` // 第三方支付流水号
|
||||
AmountTotal float64 `json:"amount_total"` // 订单金额
|
||||
CouponAmountTotal float64 `json:"coupon_amount_total"` // 优惠卷总金额
|
||||
PaymentAmountTotal float64 `json:"payment_amount_total"` // 实际付款金额
|
||||
PayTime model.LocalTime `json:"pay_time"` // 支付时间
|
||||
ReceptionTime model.LocalTime `json:"reception_time"` // 接诊时间(已接诊)
|
||||
CompleteTime model.LocalTime `json:"complete_time"` // 订单完成时间(问诊完成时间)
|
||||
FinishTime model.LocalTime `json:"finish_time"` // 订单结束时间
|
||||
StatisticsStatus int `json:"statistics_status"` // 订单统计状态(0:未统计 1:已统计 2:统计失败)
|
||||
StatisticsTime model.LocalTime `json:"statistics_time"` // 订单统计时间
|
||||
IsWithdrawal int `json:"is_withdrawal"` // 是否提现(0:否 1:是 2:提现中)
|
||||
WithdrawalTime model.LocalTime `json:"withdrawal_time"` // 提现时间
|
||||
CancelTime model.LocalTime `json:"cancel_time"` // 订单取消时间
|
||||
CancelReason int `json:"cancel_reason"` // 取消订单原因(1:医生未接诊 2:主动取消 3:无可分配医生 4:客服取消 5:支付超时)
|
||||
CancelRemarks string `json:"cancel_remarks"` // 取消订单备注(自动添加)
|
||||
PatientName string `json:"patient_name"` // 患者姓名-就诊人
|
||||
PatientNameMask string `json:"patient_name_mask"` // 患者姓名-就诊人(掩码)
|
||||
PatientSex int `json:"patient_sex"` // 患者性别-就诊人(0:未知 1:男 2:女)
|
||||
PatientAge int `json:"patient_age"` // 患者年龄-就诊人
|
||||
OrderInquiryCoupon *orderInquiryCouponResponse.OrderInquiryCoupon `json:"order_inquiry_coupon"` // 订单优惠卷
|
||||
OrderInquiryCase *orderInquiryCaseResponse.OrderInquiryCase `json:"order_inquiry_case"` // 问诊病例
|
||||
OrderInquiryRefund *orderInquiryRefundResponse.OrderInquiryRefund `json:"order_inquiry_refund"` // 退款数据
|
||||
OrderEvaluation *orderEvaluationResponse.OrderEvaluation `json:"order_evaluation"` // 订单评价
|
||||
UserDoctor *userDoctorResponse.OrderInquiryUserDoctor `json:"user_doctor"` // 医生数据
|
||||
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
|
||||
UpdatedAt model.LocalTime `json:"updated_at"` // 更新时间
|
||||
}
|
||||
|
||||
// GetOrderInquiryPageResponse 获取用户列表-分页
|
||||
func GetOrderInquiryPageResponse(orderInquiry []*model.OrderInquiry) []getOrderInquiryPage {
|
||||
// 处理返回值
|
||||
|
||||
@@ -12,7 +12,7 @@ type res struct {
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
func Result(code int, data interface{}, msg string, c *gin.Context) {
|
||||
func result(code int, data interface{}, msg string, c *gin.Context) {
|
||||
if data == nil {
|
||||
data = gin.H{}
|
||||
}
|
||||
@@ -24,29 +24,29 @@ func Result(code int, data interface{}, msg string, c *gin.Context) {
|
||||
}
|
||||
|
||||
func Ok(c *gin.Context) {
|
||||
Result(consts.HTTP_SUCCESS, map[string]interface{}{}, "成功", c)
|
||||
result(consts.HttpSuccess, map[string]interface{}{}, "成功", c)
|
||||
}
|
||||
|
||||
func OkWithMessage(message string, c *gin.Context) {
|
||||
Result(consts.HTTP_SUCCESS, map[string]interface{}{}, message, c)
|
||||
result(consts.HttpSuccess, map[string]interface{}{}, message, c)
|
||||
}
|
||||
|
||||
func OkWithData(data interface{}, c *gin.Context) {
|
||||
Result(consts.HTTP_SUCCESS, data, "成功", c)
|
||||
result(consts.HttpSuccess, data, "成功", c)
|
||||
}
|
||||
|
||||
func OkWithDetailed(data interface{}, message string, c *gin.Context) {
|
||||
Result(consts.HTTP_SUCCESS, data, message, c)
|
||||
result(consts.HttpSuccess, data, message, c)
|
||||
}
|
||||
|
||||
func Fail(c *gin.Context) {
|
||||
Result(consts.HTTP_ERROR, map[string]interface{}{}, "失败", c)
|
||||
result(consts.HttpError, map[string]interface{}{}, "失败", c)
|
||||
}
|
||||
|
||||
func FailWithMessage(message string, c *gin.Context) {
|
||||
Result(consts.HTTP_ERROR, map[string]interface{}{}, message, c)
|
||||
result(consts.HttpError, map[string]interface{}{}, message, c)
|
||||
}
|
||||
|
||||
func FailWithDetailed(data interface{}, message string, c *gin.Context) {
|
||||
Result(consts.HTTP_ERROR, data, message, c)
|
||||
result(consts.HttpError, data, message, c)
|
||||
}
|
||||
|
||||
@@ -92,6 +92,50 @@ type GetUserDoctor struct {
|
||||
DoctorBankCard doctorBankCardResponse.DoctorBankCard `json:"doctor_bank_card"` // 医生银行卡
|
||||
}
|
||||
|
||||
// UserDoctor 医生详情
|
||||
type UserDoctor struct {
|
||||
DoctorID string `json:"doctor_id"` // 主键id
|
||||
UserID string `json:"user_id"` // 用户id
|
||||
UserName string `json:"user_name"` // 用户名称
|
||||
Status int `json:"status"` // 状态(0:禁用 1:正常 2:删除)
|
||||
IDCardStatus int `json:"idcard_status"` // 实名认证状态(0:未认证 1:认证通过 2:认证失败)
|
||||
IdenAuthStatus int `json:"iden_auth_status"` // 身份认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败)
|
||||
IdenAuthTime model.LocalTime `json:"iden_auth_time"` // 审核时间
|
||||
IdenAuthFailReason string `json:"iden_auth_fail_reason"` // 身份认证失败原因
|
||||
MultiPointStatus int `json:"multi_point_status"` // 医生多点执业认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败)
|
||||
MultiPointTime model.LocalTime `json:"multi_point_time"` // 审核时间
|
||||
MultiPointFailReason string `json:"multi_point_fail_reason"` // 多点执业认证失败原因
|
||||
IsBindBank int `json:"is_bind_bank"` // 是否已绑定结算银行卡(0:否 1:是)
|
||||
IsRecommend int `json:"is_recommend"` // 是否首页推荐(0:否 1:是)
|
||||
Avatar string `json:"avatar"` // 头像
|
||||
DoctorTitle int `json:"doctor_title"` // 医生职称(1:主任医师 2:主任中医师 3:副主任医师 4:副主任中医师 5:主治医师 6:住院医师)
|
||||
DepartmentCustomID string `json:"department_custom_id"` // 科室id-自定义
|
||||
DepartmentCustomName string `json:"department_custom_name"` // 科室名称(如未自己输入,填入标准科室名称)
|
||||
DepartmentCustomMobile string `json:"department_custom_mobile"` // 科室电话
|
||||
HospitalID string `json:"hospital_id"` // 所属医院id
|
||||
ServedPatientsNum int `json:"served_patients_num"` // 服务患者数量(订单结束时统计)
|
||||
PraiseRate float64 `json:"praise_rate"` // 好评率(百分制。订单平均评价中超过4-5分的订单总数 / 总订单数 * 5)
|
||||
AvgResponseTime float64 `json:"avg_response_time"` // 平均响应时间(分钟制)
|
||||
NumberOfFans uint `json:"number_of_fans"` // 被关注数量
|
||||
IsOnline int `json:"is_online"` // 是否在线(0:不在线 1:在线)
|
||||
IsImgExpertReception int `json:"is_img_expert_reception"` // 是否参加专家图文接诊(0:否 1:是)
|
||||
IsImgWelfareReception int `json:"is_img_welfare_reception"` // 是否参加公益图文问诊(0:否 1:是)
|
||||
IsImgQuickReception int `json:"is_img_quick_reception"` // 是否参加快速图文接诊(0:否 1:是)
|
||||
IsPlatformDeepCooperation int `json:"is_platform_deep_cooperation"` // 是否平台深度合作医生(0:否 1:是)
|
||||
IsEnterpriseDeepCooperation int `json:"is_enterprise_deep_cooperation"` // 是否企业深度合作医生(0:否 1:是)
|
||||
IsSysDiagnoCooperation int `json:"is_sys_diagno_cooperation"` // 是否先思达合作医生(0:否 1:是)
|
||||
QrCode string `json:"qr_code"` // 分享二维码
|
||||
BeGoodAt string `json:"be_good_at"` // 擅长
|
||||
BriefIntroduction string `json:"brief_introduction"` // 医生简介
|
||||
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
|
||||
UpdatedAt model.LocalTime `json:"updated_at"` // 更新时间
|
||||
User *userResponse.User `json:"user"` // 用户
|
||||
Hospital *hospitalResponse.Hospital `json:"hospital"` // 医院
|
||||
UserDoctorInfo *userDoctorInfoResponse.UserDoctorInfo `json:"user_doctor_info"` // 医生详情
|
||||
DoctorExpertise []*doctorExpertiseResponse.DoctorExpertise `json:"doctor_expertise"` // 医生专长
|
||||
DoctorBankCard doctorBankCardResponse.DoctorBankCard `json:"doctor_bank_card"` // 医生银行卡
|
||||
}
|
||||
|
||||
// getUserDoctorPendingPage 身份审核-获取医生列表-分页
|
||||
type getUserDoctorPendingPage struct {
|
||||
DoctorID string `json:"doctor_id"` // 主键id
|
||||
@@ -205,6 +249,24 @@ type GetMulti struct {
|
||||
UserDoctorInfo *userDoctorInfoResponse.UserDoctorInfo `json:"user_doctor_info"` // 医生详情
|
||||
}
|
||||
|
||||
// OrderInquiryUserDoctor 订单-医生详情
|
||||
type OrderInquiryUserDoctor struct {
|
||||
DoctorID string `json:"doctor_id"` // 主键id
|
||||
UserID string `json:"user_id"` // 用户id
|
||||
UserName string `json:"user_name"` // 用户名称
|
||||
Status int `json:"status"` // 状态(0:禁用 1:正常 2:删除)
|
||||
IDCardStatus int `json:"idcard_status"` // 实名认证状态(0:未认证 1:认证通过 2:认证失败)
|
||||
MultiPointStatus int `json:"multi_point_status"` // 医生多点执业认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败)
|
||||
Avatar string `json:"avatar"` // 头像
|
||||
DoctorTitle int `json:"doctor_title"` // 医生职称(1:主任医师 2:主任中医师 3:副主任医师 4:副主任中医师 5:主治医师 6:住院医师)
|
||||
DepartmentCustomName string `json:"department_custom_name"` // 科室名称(如未自己输入,填入标准科室名称)
|
||||
HospitalID string `json:"hospital_id"` // 所属医院id
|
||||
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
|
||||
UpdatedAt model.LocalTime `json:"updated_at"` // 更新时间
|
||||
Hospital *hospitalResponse.Hospital `json:"hospital"` // 医院
|
||||
UserDoctorInfo *userDoctorInfoResponse.UserDoctorInfo `json:"user_doctor_info"` // 医生详情
|
||||
}
|
||||
|
||||
// GetUserDoctorPageResponse 获取用户列表-分页
|
||||
func GetUserDoctorPageResponse(userDoctor []*model.UserDoctor) []getUserDoctorPage {
|
||||
// 处理返回值
|
||||
|
||||
Reference in New Issue
Block a user