新增 获取账户关联问诊订单列表-分页
This commit is contained in:
@@ -49,6 +49,7 @@ type OrderInquiryDto struct {
|
||||
OrderEvaluation *OrderEvaluationDto `json:"order_evaluation"` // 订单评价
|
||||
UserDoctor *UserDoctorDto `json:"user_doctor"` // 医生数据
|
||||
MessageIm []*MessageImDto `json:"message_im"` // 聊天记录
|
||||
EntryStatus *int `json:"entry_status"` // 入账状态(0:未入账 1:已入账 2:入账中 3:入账失败)
|
||||
}
|
||||
|
||||
// GetOrderInquiryDto 问诊订单详情
|
||||
@@ -209,6 +210,62 @@ func GetOrderInquiryRecordListDto(m []*model.OrderInquiry) []*OrderInquiryDto {
|
||||
return responses
|
||||
}
|
||||
|
||||
// GetOrderInquiryForAccountListDto 账户关联问诊订单列表
|
||||
func GetOrderInquiryForAccountListDto(m []*model.OrderInquiry) []*OrderInquiryDto {
|
||||
// 处理返回值
|
||||
responses := make([]*OrderInquiryDto, len(m))
|
||||
|
||||
if len(m) > 0 {
|
||||
for i, v := range m {
|
||||
response := &OrderInquiryDto{
|
||||
OrderInquiryId: fmt.Sprintf("%d", v.OrderInquiryId),
|
||||
UserId: fmt.Sprintf("%d", v.UserId),
|
||||
PatientId: fmt.Sprintf("%d", v.PatientId),
|
||||
DoctorId: fmt.Sprintf("%d", v.DoctorId),
|
||||
FamilyId: fmt.Sprintf("%d", v.FamilyId),
|
||||
InquiryType: v.InquiryType,
|
||||
InquiryMode: v.InquiryMode,
|
||||
InquiryStatus: v.InquiryStatus,
|
||||
IsDelete: v.IsDelete,
|
||||
InquiryRefundStatus: v.InquiryRefundStatus,
|
||||
InquiryPayChannel: v.InquiryPayChannel,
|
||||
InquiryPayStatus: v.InquiryPayStatus,
|
||||
InquiryNo: v.InquiryNo,
|
||||
EscrowTradeNo: v.EscrowTradeNo,
|
||||
AmountTotal: v.AmountTotal,
|
||||
CouponAmountTotal: v.CouponAmountTotal,
|
||||
PaymentAmountTotal: v.PaymentAmountTotal,
|
||||
PayTime: v.PayTime,
|
||||
ReceptionTime: v.ReceptionTime,
|
||||
CompleteTime: v.CompleteTime,
|
||||
FinishTime: v.FinishTime,
|
||||
StatisticsStatus: v.StatisticsStatus,
|
||||
StatisticsTime: v.StatisticsTime,
|
||||
IsWithdrawal: v.IsWithdrawal,
|
||||
WithdrawalTime: v.WithdrawalTime,
|
||||
CancelTime: v.CancelTime,
|
||||
CancelReason: v.CancelReason,
|
||||
CancelRemarks: v.CancelRemarks,
|
||||
PatientNameMask: v.PatientNameMask,
|
||||
PatientSex: v.PatientSex,
|
||||
PatientAge: v.PatientAge,
|
||||
CreatedAt: v.CreatedAt,
|
||||
UpdatedAt: v.UpdatedAt,
|
||||
}
|
||||
|
||||
// 加载医生名称
|
||||
if v.UserDoctor != nil {
|
||||
response = response.LoadDoctorName(v.UserDoctor)
|
||||
}
|
||||
|
||||
// 将转换后的结构体添加到新切片中
|
||||
responses[i] = response
|
||||
}
|
||||
}
|
||||
|
||||
return responses
|
||||
}
|
||||
|
||||
// GetOrderInquiryRecordDto 问诊记录详情
|
||||
func GetOrderInquiryRecordDto(m *model.OrderInquiry) *OrderInquiryDto {
|
||||
var doctorId string
|
||||
|
||||
Reference in New Issue
Block a user