info address

This commit is contained in:
eson
2023-09-26 12:24:09 +08:00
parent 79120e1fd9
commit c42c37f65e
4 changed files with 8 additions and 5 deletions

View File

@@ -42,6 +42,10 @@ func (l *AddressUpdateLogic) AddressUpdate(req *types.AddressRequest, userinfo *
now := time.Now().UTC()
if req.AddressId == 0 {
return resp.SetStatusWithMessage(basic.CodeApiErr, "address_id must setting")
}
address := gmodel.FsAddress{
AddressId: req.AddressId,
UserId: &userinfo.UserId,
@@ -56,10 +60,9 @@ func (l *AddressUpdateLogic) AddressUpdate(req *types.AddressRequest, userinfo *
City: &req.City,
State: &req.State,
Utime: &now,
Ltime: &now,
}
err := l.svcCtx.AllModels.FsAddress.UpdateAddAddress(l.ctx, &address)
err := l.svcCtx.AllModels.FsAddress.UpdateAddress(l.ctx, &address)
if err != nil {
return resp.SetStatusWithMessage(basic.CodeApiErr, err.Error())
}