Merge branch 'main' into feat-IRONFANS-117-Robin
This commit is contained in:
commit
0ef3755334
|
@ -670,21 +670,25 @@ func (s *Service) utilCancelAccountByMids(ctx *gin.Context, midList []int64) err
|
|||
|
||||
imageIds := make([]int64, 0)
|
||||
imageIds = append(imageIds, cfg.AvatarImageId)
|
||||
err = _DefaultAccount.OpUpdateByIds(ctx, &accountproto.OpUpdateByIdsReq{
|
||||
Account: &dbstruct.Account{
|
||||
Name: goproto.String(cfg.Name),
|
||||
PhoneHash: goproto.String(cfg.PhoneHash),
|
||||
MobilePhone: goproto.String(cfg.MobilePhone),
|
||||
Avatar: &dbstruct.MediaComponent{
|
||||
ImageIds: &imageIds,
|
||||
|
||||
for _, account := range accounts {
|
||||
phoneHash := strings.ToLower(util.DerefString(account.PhoneHash))
|
||||
err = _DefaultAccount.OpUpdate(ctx, &accountproto.OpUpdateReq{
|
||||
Account: &dbstruct.Account{
|
||||
Mid: account.Mid,
|
||||
Name: goproto.String(cfg.Name),
|
||||
PhoneHash: goproto.String(phoneHash),
|
||||
MobilePhone: goproto.String(cfg.MobilePhone),
|
||||
Avatar: &dbstruct.MediaComponent{
|
||||
ImageIds: &imageIds,
|
||||
},
|
||||
Status: goproto.Int64(consts.AccountStatus_Cancelled),
|
||||
},
|
||||
Status: goproto.Int64(consts.AccountStatus_Cancelled),
|
||||
},
|
||||
Ids: midList,
|
||||
})
|
||||
if err != nil {
|
||||
logger.Error("_DefaultAccount OpUpdateByIds fail, err: %v", err)
|
||||
return err
|
||||
})
|
||||
if err != nil {
|
||||
logger.Error("_DefaultAccount OpUpdate fail, err: %v", err)
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue