refactor all service dependency injection
This commit is contained in:
@@ -4,8 +4,10 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"bsm/full/module/ec/address/internal/impl"
|
||||
"bsm/full/module/ec/address/internal/models"
|
||||
pb "bsm/full/module/ec/address/pb"
|
||||
|
||||
"git.apinb.com/bsm-sdk/core/errcode"
|
||||
"git.apinb.com/bsm-sdk/core/printer"
|
||||
"git.apinb.com/bsm-sdk/core/service"
|
||||
@@ -24,7 +26,7 @@ func Get(ctx context.Context, in *pb.IdentRequest) (reply *pb.AddressItem, err e
|
||||
}
|
||||
|
||||
address := new(models.AddressLibrary)
|
||||
err = models.DBService.Where("id=?", in.Id).First(&address).Error
|
||||
err = impl.DBService.Where("id=?", in.Id).First(&address).Error
|
||||
|
||||
if err != nil {
|
||||
if errors.Is(err, models.ErrNotFound) {
|
||||
|
||||
Reference in New Issue
Block a user