修改医生详情接口返回数据
This commit is contained in:
@@ -21,7 +21,7 @@ type UserCaCertService struct {
|
||||
|
||||
// GetUserCloudCert 申请云证书-个人
|
||||
func (r *UserCaCertService) GetUserCloudCert(tx *gorm.DB, userId int64) (bool, error) {
|
||||
userCaCertDao := dao.UserCaCert{}
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
|
||||
// 检测是否存在云证书
|
||||
maps := make(map[string]interface{})
|
||||
@@ -138,7 +138,7 @@ func (r *UserCaCertService) GetUserCloudCert(tx *gorm.DB, userId int64) (bool, e
|
||||
// GetHospitalCloudCert 申请云证书-医院
|
||||
func (r *UserCaCertService) GetHospitalCloudCert(tx *gorm.DB) (bool, error) {
|
||||
var userId int64 = 5345345461
|
||||
userCaCertDao := dao.UserCaCert{}
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
|
||||
// 检测是否存在云证书
|
||||
maps := make(map[string]interface{})
|
||||
@@ -196,7 +196,7 @@ func (r *UserCaCertService) GetHospitalCloudCert(tx *gorm.DB) (bool, error) {
|
||||
|
||||
// EditUserCloudCert 修改云证书-个人
|
||||
func (r *UserCaCertService) EditUserCloudCert(tx *gorm.DB, userId int64) (bool, error) {
|
||||
userCaCertDao := dao.UserCaCert{}
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
|
||||
// 检测是否存在云证书
|
||||
maps := make(map[string]interface{})
|
||||
@@ -320,7 +320,7 @@ func (r *UserCaCertService) EditUserCloudCert(tx *gorm.DB, userId int64) (bool,
|
||||
|
||||
// RenewUserCloudCert 更新云证书-个人-续约
|
||||
func (r *UserCaCertService) RenewUserCloudCert(tx *gorm.DB, userId int64) (bool, error) {
|
||||
userCaCertDao := dao.UserCaCert{}
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
|
||||
// 检测是否存在云证书
|
||||
maps := make(map[string]interface{})
|
||||
@@ -407,7 +407,7 @@ func (r *UserCaCertService) RenewUserCloudCert(tx *gorm.DB, userId int64) (bool,
|
||||
func (r *UserCaCertService) RenewHospitalCloudCert(tx *gorm.DB) (bool, error) {
|
||||
var userId int64 = 5345345461
|
||||
|
||||
userCaCertDao := dao.UserCaCert{}
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
|
||||
// 检测是否存在云证书
|
||||
maps := make(map[string]interface{})
|
||||
@@ -460,7 +460,7 @@ func (r *UserCaCertService) RenewHospitalCloudCert(tx *gorm.DB) (bool, error) {
|
||||
|
||||
// RemoveUserCloudCert 注销云证书-个人
|
||||
func (r *UserCaCertService) RemoveUserCloudCert(tx *gorm.DB, userId int64) (bool, error) {
|
||||
userCaCertDao := dao.UserCaCert{}
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
|
||||
// 检测是否存在云证书
|
||||
maps := make(map[string]interface{})
|
||||
@@ -529,7 +529,7 @@ func (r *UserCaCertService) RemoveUserCloudCert(tx *gorm.DB, userId int64) (bool
|
||||
|
||||
// AddUserSignConfig 添加用户签章配置
|
||||
func (r *UserCaCertService) AddUserSignConfig(tx *gorm.DB, req requests.AddUserSignConfig) (bool, error) {
|
||||
userCaCertDao := dao.UserCaCert{}
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
|
||||
var entityId string // 唯一标识
|
||||
var cardNum string // 身份证号/信用代码
|
||||
|
||||
@@ -38,6 +38,13 @@ func (r *UserDoctorService) GetUserDoctor(doctorId int64) (getUserDoctorResponse
|
||||
doctorBankCardDao := dao.DoctorBankCardDao{}
|
||||
doctorBankCard, err := doctorBankCardDao.GetDoctorBankCardByDoctorId(doctorId)
|
||||
|
||||
// 获取医生云证书数据
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
maps := make(map[string]interface{})
|
||||
maps["user_id"] = userDoctor.UserId
|
||||
maps["type"] = 2
|
||||
userCaCert, _ := userCaCertDao.GetUserCaCert(maps)
|
||||
|
||||
// 处理返回值
|
||||
getUserDoctorResponse = dto.GetUserDoctorDto(userDoctor)
|
||||
|
||||
@@ -56,6 +63,9 @@ func (r *UserDoctorService) GetUserDoctor(doctorId int64) (getUserDoctorResponse
|
||||
// 加载医生详情
|
||||
getUserDoctorResponse.LoadUserDoctorInfo(userDoctor.UserDoctorInfo)
|
||||
|
||||
// 加载医生云证书详情
|
||||
getUserDoctorResponse.LoadUserCaCert(userCaCert)
|
||||
|
||||
return getUserDoctorResponse, nil
|
||||
}
|
||||
|
||||
@@ -91,7 +101,7 @@ func (r *UserDoctorService) PutUserDoctor(doctorId int64, req requests.PutUserDo
|
||||
doctorBankCard, _ := doctorBankCardDao.GetDoctorBankCardByDoctorId(doctorId)
|
||||
|
||||
// 获取医生云证书
|
||||
userCaCertDao := dao.UserCaCert{}
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
|
||||
maps := make(map[string]interface{})
|
||||
maps["user_id"] = userDoctor.UserId
|
||||
@@ -661,7 +671,7 @@ func (r *UserDoctorService) PutUserDoctor(doctorId int64, req requests.PutUserDo
|
||||
signImage := utils.RemoveOssDomain(req.SignImage)
|
||||
if signImage != userDoctorInfo.SignImage {
|
||||
// 检测是否存在云证书
|
||||
userCaCertDao := dao.UserCaCert{}
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
userCaCerts, err := userCaCertDao.GetUserCaCertListByUserId(userDoctor.UserId)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
@@ -1439,7 +1449,7 @@ func (r *UserDoctorService) PutMulti(doctorId int64, req requests.PutMulti) (boo
|
||||
userCaCertService := UserCaCertService{}
|
||||
|
||||
// 检测是否存在云证书
|
||||
userCaCertDao := dao.UserCaCert{}
|
||||
userCaCertDao := dao.UserCaCertDao{}
|
||||
|
||||
maps := make(map[string]interface{})
|
||||
maps["user_id"] = userDoctor.UserId
|
||||
|
||||
Reference in New Issue
Block a user