diff --git a/server/home-user-auth/internal/logic/useraddaddresslogic.go b/server/home-user-auth/internal/logic/useraddaddresslogic.go index 0fac637f..be56cd5e 100644 --- a/server/home-user-auth/internal/logic/useraddaddresslogic.go +++ b/server/home-user-auth/internal/logic/useraddaddresslogic.go @@ -45,8 +45,7 @@ func (l *UserAddAddressLogic) UserAddAddress(req *types.RequestAddAddress, useri // 如果ID为0, 表示新增地址 if req.Id == 0 { var ( - country string = "USA" // 国家默认为美国 - isDefautl int64 = 1 // 默认地址为1 + country string = "USA" // 国家默认为美国 ) createOne := &gmodel.FsAddress{ // 构建FsAddress结构体 FirstName: &req.FirstName, @@ -60,7 +59,6 @@ func (l *UserAddAddressLogic) UserAddAddress(req *types.RequestAddAddress, useri Status: &status, UserId: &userinfo.UserId, ZipCode: &req.ZipCode, - IsDefault: &isDefautl, } created, err := m.CreateOne(l.ctx, createOne) // 新增地址 if err != nil { @@ -82,7 +80,6 @@ func (l *UserAddAddressLogic) UserAddAddress(req *types.RequestAddAddress, useri Status: &status, UserId: &userinfo.UserId, ZipCode: &req.ZipCode, - IsDefault: &req.IsDefault, } // 插入数据库 更新地址 diff --git a/server/info/internal/logic/addressaddlogic.go b/server/info/internal/logic/addressaddlogic.go index 606dea84..b53a3978 100644 --- a/server/info/internal/logic/addressaddlogic.go +++ b/server/info/internal/logic/addressaddlogic.go @@ -49,9 +49,8 @@ func (l *AddressAddLogic) AddressAdd(req *types.AddressRequest, userinfo *auth.U // 如果ID为0, 表示新增地址 var ( - country string = "USA" // 国家默认为美国 - isDefautl int64 = 1 // 默认地址为1 - status int64 = 1 // 默认地址状态为1(正常) + country string = "USA" // 国家默认为美国 + status int64 = 1 // 默认地址状态为1(正常) ) createOne := &gmodel.FsAddress{ // 构建FsAddress结构体 @@ -66,7 +65,6 @@ func (l *AddressAddLogic) AddressAdd(req *types.AddressRequest, userinfo *auth.U Status: &status, UserId: &userinfo.UserId, ZipCode: &req.ZipCode, - IsDefault: &isDefautl, } address, err := m.CreateOne(l.ctx, createOne) // 新增地址 if err != nil {