优化更新证件信息的逻辑

This commit is contained in:
徐俊杰 2023-03-30 14:38:11 +08:00
parent 17a1dd4648
commit c3aff4f68e

View File

@ -55,7 +55,8 @@ func (a *ArtistInfoUserProvider) RegisterUser(ctx context.Context, req *artistIn
func (a *ArtistInfoUserProvider) UpdateIdCard(ctx context.Context, in *artistInfoUser.UpdateIdCardRequest) (rep *artistInfoUser.CommonNoParams, err error) {
var thisUser model.User
db.DB.Where("mgmt_acc_id = ?", in.MgmtAccId).Preload("RealNameInfo").Find(&thisUser)
db.DB.Unscoped().Where("mgmt_acc_id = ?", in.MgmtAccId).Preload("RealNameInfo").Find(&thisUser)
thisUser.DeletedAt = 0
if thisUser.RealNameInfo == nil {
thisUser.RealNameInfo = &model.RealName{}
}