diff --git a/dao/user.go b/dao/user.go index a725174..7da04ed 100644 --- a/dao/user.go +++ b/dao/user.go @@ -116,6 +116,10 @@ func AddUserSync(req proto.UserAddOrUpdate) uint { if res.Error != nil { return 0 } + res = DB.Exec("update users set created_at=null where id=?", req.ID) + if res.Error != nil { + return 0 + } return req.ID } @@ -125,6 +129,10 @@ func UpdateUserSync(req proto.UserAddOrUpdate) uint { if res.Error != nil { return 0 } + res = DB.Exec("update users set created_at=null where id=?", req.ID) + if res.Error != nil { + return 0 + } return req.ID }