🐛 修改更新资料bug

This commit is contained in:
loser 2024-03-22 12:29:31 +08:00
parent 433ff17755
commit 389d7c463f

View File

@ -59,8 +59,7 @@ func (UserService) UpdateUserInfo(e *app.User) (err error) {
return
}
if e.SurgeryTime != "" {
if tUser.HospitalId != e.HospitalId {
if e.SurgeryTime != "" || e.SurgeryTime != tUser.SurgeryTime || e.HospitalId != tUser.HospitalId {
err = global.GVA_DB.Delete(&common.UserTodo{}, "user_id = ?", e.ID).Error
if err != nil {
@ -94,7 +93,6 @@ func (UserService) UpdateUserInfo(e *app.User) (err error) {
}
}
}
}
return err
}