refactor all service dependency injection

This commit is contained in:
2026-08-10 11:35:48 +08:00
parent 007a7ba38a
commit c883cc52a2
152 changed files with 1030 additions and 223 deletions

View File

@@ -4,8 +4,10 @@ import (
"context"
"time"
"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"
@@ -24,7 +26,7 @@ func Delete(ctx context.Context, in *pb.IdentRequest) (reply *pb.IdentityStatusR
return nil, errcode.ErrInvalidArgument
}
if err := models.DBService.Where("id = ? or identity = ?", in.GetId(), in.GetIdentity()).Delete(&models.MarketSupply{}).Error; err != nil {
if err := impl.DBService.Where("id = ? or identity = ?", in.GetId(), in.GetIdentity()).Delete(&models.MarketSupply{}).Error; err != nil {
printer.Error(err.Error())
return nil, err
}