Merge pull request 'main' (#424) from main into test
Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/424
This commit is contained in:
commit
1659bace4e
|
@ -670,22 +670,26 @@ 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{
|
||||
|
||||
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(cfg.PhoneHash),
|
||||
PhoneHash: goproto.String(phoneHash),
|
||||
MobilePhone: goproto.String(cfg.MobilePhone),
|
||||
Avatar: &dbstruct.MediaComponent{
|
||||
ImageIds: &imageIds,
|
||||
},
|
||||
Status: goproto.Int64(consts.AccountStatus_Cancelled),
|
||||
},
|
||||
Ids: midList,
|
||||
})
|
||||
if err != nil {
|
||||
logger.Error("_DefaultAccount OpUpdateByIds fail, err: %v", err)
|
||||
logger.Error("_DefaultAccount OpUpdate fail, err: %v", err)
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
|
|
Loading…
Reference in New Issue