医生增加是否接受抄方 属性
This commit is contained in:
parent
a4698621bf
commit
4133c7e26b
@ -37,6 +37,7 @@ type UserDoctorDto struct {
|
||||
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:是)
|
||||
IsTransferPrescription int `json:"is_transfer_prescription"` // 是否接受抄方(0:否 1:是)
|
||||
QrCode string `json:"qr_code"` // 分享二维码
|
||||
BeGoodAt string `json:"be_good_at"` // 擅长
|
||||
BriefIntroduction string `json:"brief_introduction"` // 医生简介
|
||||
@ -77,6 +78,7 @@ type UserDoctorPendingDto struct {
|
||||
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:是)
|
||||
IsTransferPrescription int `json:"is_transfer_prescription"` // 是否接受抄方(0:否 1:是)
|
||||
IsRecommend int `json:"is_recommend"` // 是否首页推荐(0:否 1:是)
|
||||
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
|
||||
UpdatedAt model.LocalTime `json:"updated_at"` // 更新时间
|
||||
@ -144,7 +146,9 @@ func GetUserDoctorDto(m *model.UserDoctor) *UserDoctorDto {
|
||||
AvgResponseTime: m.AvgResponseTime,
|
||||
NumberOfFans: m.NumberOfFans,
|
||||
IsPlatformDeepCooperation: m.IsPlatformDeepCooperation,
|
||||
IsEnterpriseDeepCooperation: m.IsEnterpriseDeepCooperation,
|
||||
IsSysDiagnoCooperation: m.IsSysDiagnoCooperation,
|
||||
IsTransferPrescription: m.IsTransferPrescription,
|
||||
QrCode: utils.AddOssDomain(m.QrCode),
|
||||
BeGoodAt: m.BeGoodAt,
|
||||
BriefIntroduction: m.BriefIntroduction,
|
||||
@ -183,6 +187,8 @@ func GetUserDoctorListDto(m []*model.UserDoctor) []*UserDoctorDto {
|
||||
AvgResponseTime: v.AvgResponseTime,
|
||||
NumberOfFans: v.NumberOfFans,
|
||||
IsPlatformDeepCooperation: v.IsPlatformDeepCooperation,
|
||||
IsEnterpriseDeepCooperation: v.IsEnterpriseDeepCooperation,
|
||||
IsTransferPrescription: v.IsTransferPrescription,
|
||||
CreatedAt: v.CreatedAt,
|
||||
UpdatedAt: v.UpdatedAt,
|
||||
}
|
||||
@ -241,6 +247,7 @@ func GetUserDoctorPendingDto(m *model.UserDoctor) *UserDoctorPendingDto {
|
||||
IsPlatformDeepCooperation: m.IsPlatformDeepCooperation,
|
||||
IsEnterpriseDeepCooperation: m.IsEnterpriseDeepCooperation,
|
||||
IsSysDiagnoCooperation: m.IsSysDiagnoCooperation,
|
||||
IsTransferPrescription: m.IsTransferPrescription,
|
||||
IsRecommend: m.IsRecommend,
|
||||
CreatedAt: m.CreatedAt,
|
||||
UpdatedAt: m.UpdatedAt,
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
"hospital-admin-api/global"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// UserDoctor 用户-医生表
|
||||
@ -42,6 +43,7 @@ type UserDoctor struct {
|
||||
IsPlatformDeepCooperation int `gorm:"column:is_platform_deep_cooperation;type:tinyint(1);default:0;comment:是否平台深度合作医生(0:否 1:是)" json:"is_platform_deep_cooperation"`
|
||||
IsEnterpriseDeepCooperation int `gorm:"column:is_enterprise_deep_cooperation;type:tinyint(1);default:0;comment:是否企业深度合作医生(0:否 1:是)" json:"is_enterprise_deep_cooperation"`
|
||||
IsSysDiagnoCooperation int `gorm:"column:is_sys_diagno_cooperation;type:tinyint(1);default:0;comment:是否先思达合作医生(0:否 1:是)" json:"is_sys_diagno_cooperation"`
|
||||
IsTransferPrescription int `gorm:"column:is_transfer_prescription;type:tinyint(1);default:0;comment:是否接受抄方(0:否 1:是)" json:"is_transfer_prescription"`
|
||||
QrCode string `gorm:"column:qr_code;type:varchar(255);comment:分享二维码" json:"qr_code"`
|
||||
BeGoodAt string `gorm:"column:be_good_at;type:text;comment:擅长" json:"be_good_at"`
|
||||
BriefIntroduction string `gorm:"column:brief_introduction;type:text;comment:医生简介" json:"brief_introduction"`
|
||||
|
||||
@ -48,6 +48,7 @@ type PutUserDoctor struct {
|
||||
HospitalId string `json:"hospital_id" form:"hospital_id" validate:"required" label:"所属医院id"`
|
||||
IsPlatformDeepCooperation int `json:"is_platform_deep_cooperation" form:"is_platform_deep_cooperation" label:"平台深度合作医生"` // 是否平台深度合作医生(0:否 1:是)
|
||||
IsSysDiagnoCooperation int `json:"is_sys_diagno_cooperation" form:"is_sys_diagno_cooperation" label:"是否先思达合作医生)"` // 是否先思达合作医生(0:否 1:是)
|
||||
IsTransferPrescription int `json:"is_transfer_prescription" form:"is_transfer_prescription" label:"是否接受抄方"` // 是否接受抄方(0:否 1:是)
|
||||
BeGoodAt string `json:"be_good_at" form:"be_good_at" validate:"required" label:"擅长"`
|
||||
BriefIntroduction string `json:"brief_introduction" form:"brief_introduction" validate:"required" label:"医生简介"`
|
||||
LicenseCert []string `json:"license_cert" form:"license_cert" label:"医师执业证"`
|
||||
@ -78,6 +79,7 @@ type AddUserDoctor struct {
|
||||
HospitalId string `json:"hospital_id" form:"hospital_id" validate:"required" label:"所属医院id"`
|
||||
IsPlatformDeepCooperation int `json:"is_platform_deep_cooperation" form:"is_platform_deep_cooperation" label:"平台深度合作医生"` // 是否平台深度合作医生(0:否 1:是)
|
||||
IsSysDiagnoCooperation int `json:"is_sys_diagno_cooperation" form:"is_sys_diagno_cooperation" label:"是否先思达合作医生)"` // 是否先思达合作医生(0:否 1:是)
|
||||
IsTransferPrescription int `json:"is_transfer_prescription" form:"is_transfer_prescription" label:"是否接受抄方"` // 是否接受抄方(0:否 1:是)
|
||||
BeGoodAt string `json:"be_good_at" form:"be_good_at" validate:"required" label:"擅长"`
|
||||
BriefIntroduction string `json:"brief_introduction" form:"brief_introduction" validate:"required" label:"医生简介"`
|
||||
LicenseCert []string `json:"license_cert" form:"license_cert" validate:"required" label:"医师执业证"`
|
||||
|
||||
@ -175,6 +175,11 @@ func (r *UserDoctorService) PutUserDoctor(doctorId int64, req requests.PutUserDo
|
||||
userDoctorData["is_sys_diagno_cooperation"] = req.IsSysDiagnoCooperation
|
||||
}
|
||||
|
||||
// 处理是否接受抄方
|
||||
if userDoctor.IsTransferPrescription != req.IsTransferPrescription {
|
||||
userDoctorData["is_transfer_prescription"] = req.IsTransferPrescription
|
||||
}
|
||||
|
||||
// 是否推荐
|
||||
if userDoctor.IsRecommend != req.IsRecommend {
|
||||
userDoctorData["is_recommend"] = req.IsRecommend
|
||||
@ -970,6 +975,7 @@ func (r *UserDoctorService) AddUserDoctor(userId string, req requests.AddUserDoc
|
||||
HospitalID: hospitalId,
|
||||
IsPlatformDeepCooperation: req.IsPlatformDeepCooperation,
|
||||
IsSysDiagnoCooperation: req.IsSysDiagnoCooperation,
|
||||
IsTransferPrescription: req.IsTransferPrescription,
|
||||
BeGoodAt: req.BeGoodAt,
|
||||
BriefIntroduction: req.BriefIntroduction,
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user