refactor all service dependency injection
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user