优化更新身份证方法
This commit is contained in:
parent
76bd876381
commit
17a1dd4648
@ -9,6 +9,7 @@ import (
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistInfoUser"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/clause"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/logic"
|
||||
)
|
||||
@ -82,7 +83,7 @@ func (a *ArtistInfoUserProvider) UpdateIdCard(ctx context.Context, in *artistInf
|
||||
if in.Birthday != "" {
|
||||
thisUser.RealNameInfo.Birthday = in.Birthday
|
||||
}
|
||||
err = db.DB.Session(&gorm.Session{FullSaveAssociations: true}).Save(&thisUser).Error
|
||||
err = db.DB.Session(&gorm.Session{FullSaveAssociations: true}).Clauses(clause.OnConflict{UpdateAll: true}).Save(&thisUser).Error
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user