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,21 +670,25 @@ func (s *Service) utilCancelAccountByMids(ctx *gin.Context, midList []int64) err
|
||||||
|
|
||||||
imageIds := make([]int64, 0)
|
imageIds := make([]int64, 0)
|
||||||
imageIds = append(imageIds, cfg.AvatarImageId)
|
imageIds = append(imageIds, cfg.AvatarImageId)
|
||||||
err = _DefaultAccount.OpUpdateByIds(ctx, &accountproto.OpUpdateByIdsReq{
|
|
||||||
Account: &dbstruct.Account{
|
for _, account := range accounts {
|
||||||
Name: goproto.String(cfg.Name),
|
phoneHash := strings.ToLower(util.DerefString(account.PhoneHash))
|
||||||
PhoneHash: goproto.String(cfg.PhoneHash),
|
err = _DefaultAccount.OpUpdate(ctx, &accountproto.OpUpdateReq{
|
||||||
MobilePhone: goproto.String(cfg.MobilePhone),
|
Account: &dbstruct.Account{
|
||||||
Avatar: &dbstruct.MediaComponent{
|
Mid: account.Mid,
|
||||||
ImageIds: &imageIds,
|
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),
|
})
|
||||||
},
|
if err != nil {
|
||||||
Ids: midList,
|
logger.Error("_DefaultAccount OpUpdate fail, err: %v", err)
|
||||||
})
|
return err
|
||||||
if err != nil {
|
}
|
||||||
logger.Error("_DefaultAccount OpUpdateByIds fail, err: %v", err)
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue