by Robin at 20240520
This commit is contained in:
parent
90d11b400e
commit
5eb15ae3a1
|
@ -685,6 +685,20 @@ func (s *Service) utilCancelAccountByMids(ctx *gin.Context, midList []int64) err
|
||||||
Status: goproto.Int64(consts.AccountStatus_Cancelled),
|
Status: goproto.Int64(consts.AccountStatus_Cancelled),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
if qmgo.IsDup(err) {
|
||||||
|
err = _DefaultAccount.OpUpdate(ctx, &accountproto.OpUpdateReq{
|
||||||
|
Account: &dbstruct.Account{
|
||||||
|
Mid: account.Mid,
|
||||||
|
Name: goproto.String(cfg.Name),
|
||||||
|
PhoneHash: goproto.String(phoneHash + qmgo.NewObjectID().Hex()),
|
||||||
|
MobilePhone: goproto.String(cfg.MobilePhone),
|
||||||
|
Avatar: &dbstruct.MediaComponent{
|
||||||
|
ImageIds: &imageIds,
|
||||||
|
},
|
||||||
|
Status: goproto.Int64(consts.AccountStatus_Cancelled),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("_DefaultAccount OpUpdate fail, err: %v", err)
|
logger.Error("_DefaultAccount OpUpdate fail, err: %v", err)
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue