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

@@ -1,10 +1,12 @@
package application
import (
"bsm/full/module/base/mgt/internal/impl"
"bsm/full/module/base/mgt/internal/libs"
"bsm/full/module/base/mgt/internal/logic/tool"
"bsm/full/module/base/mgt/internal/models"
"bsm/full/module/base/mgt/internal/types"
"git.apinb.com/bsm-sdk/core/errcode"
"git.apinb.com/bsm-sdk/core/infra"
"git.apinb.com/bsm-sdk/core/printer"
@@ -17,7 +19,7 @@ func UserFetch(c *gin.Context) {
var (
request = types.FetchBase{}
data = models.MgtApplication{}
db = models.DBService.Model(&models.MgtApplication{}).Select("id", "identity", "title")
db = impl.DBService.Model(&models.MgtApplication{}).Select("id", "identity", "title")
count int64 = 0
)
err := c.ShouldBindJSON(&request)
@@ -56,7 +58,7 @@ func RoleFetch(c *gin.Context) {
var (
request = types.FetchBase{}
data = make([]models.MgtApplication, 0)
db = models.DBService.Model(&models.MgtApplication{}).Select("id", "identity", "title")
db = impl.DBService.Model(&models.MgtApplication{}).Select("id", "identity", "title")
count int64 = 0
)
err := c.ShouldBindJSON(&request)
@@ -97,7 +99,7 @@ func PermissionFetch(c *gin.Context) {
var (
request = types.FetchBase{}
data = make([]models.MgtApplication, 0)
db = models.DBService.Model(&models.MgtApplication{}).Select("id", "identity", "title")
db = impl.DBService.Model(&models.MgtApplication{}).Select("id", "identity", "title")
count int64 = 0
)
err := c.ShouldBindJSON(&request)