refactor all service dependency injection
This commit is contained in:
@@ -3,8 +3,10 @@ package supply
|
||||
import (
|
||||
"context"
|
||||
|
||||
"bsm/full/module/ec/market/internal/impl"
|
||||
"bsm/full/module/ec/market/internal/models"
|
||||
pb "bsm/full/module/ec/market/pb"
|
||||
|
||||
"git.apinb.com/bsm-sdk/core/errcode"
|
||||
"git.apinb.com/bsm-sdk/core/printer"
|
||||
"git.apinb.com/bsm-sdk/core/service"
|
||||
@@ -28,7 +30,7 @@ func Fetch(ctx context.Context, in *pb.MarketFetchRequest) (reply *pb.SupplyRepl
|
||||
if in.GetPageSize() < 10 {
|
||||
in.PageSize = 50
|
||||
}
|
||||
tx := models.DBService.Model(&models.MarketSupply{}).Where("status = ?", 1)
|
||||
tx := impl.DBService.Model(&models.MarketSupply{}).Where("status = ?", 1)
|
||||
if in.GetIdentity() != "" {
|
||||
tx.Where("identity = ?", in.GetIdentity())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user