mirror of
https://github.com/lzh-1625/go_process_manager.git
synced 2025-10-05 07:56:50 +08:00
rename service
This commit is contained in:
@@ -4,9 +4,9 @@ import (
|
||||
"slices"
|
||||
|
||||
"github.com/lzh-1625/go_process_manager/internal/app/constants"
|
||||
"github.com/lzh-1625/go_process_manager/internal/app/logic"
|
||||
"github.com/lzh-1625/go_process_manager/internal/app/model"
|
||||
"github.com/lzh-1625/go_process_manager/internal/app/repository"
|
||||
"github.com/lzh-1625/go_process_manager/internal/app/service"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@@ -17,7 +17,7 @@ var LogApi = new(logApi)
|
||||
|
||||
func (a *logApi) GetLog(ctx *gin.Context, req model.GetLogReq) {
|
||||
if isAdmin(ctx) {
|
||||
rOk(ctx, "Query successful!", service.LogServiceImpl.Search(req, req.FilterName...))
|
||||
rOk(ctx, "Query successful!", logic.LogLogicImpl.Search(req, req.FilterName...))
|
||||
} else {
|
||||
processNameList := repository.PermissionRepository.GetProcessNameByPermission(getUserName(ctx), constants.OPERATION_LOG)
|
||||
filterName := slices.DeleteFunc(req.FilterName, func(s string) bool {
|
||||
@@ -27,10 +27,10 @@ func (a *logApi) GetLog(ctx *gin.Context, req model.GetLogReq) {
|
||||
filterName = processNameList
|
||||
}
|
||||
errCheck(ctx, len(filterName) == 0, "No information found!")
|
||||
rOk(ctx, "Query successful!", service.LogServiceImpl.Search(req, filterName...))
|
||||
rOk(ctx, "Query successful!", logic.LogLogicImpl.Search(req, filterName...))
|
||||
}
|
||||
}
|
||||
|
||||
func (a *logApi) GetRunningLog(ctx *gin.Context) {
|
||||
rOk(ctx, "Query successful!", service.Loghandler.GetRunning())
|
||||
rOk(ctx, "Query successful!", logic.Loghandler.GetRunning())
|
||||
}
|
||||
|
Reference in New Issue
Block a user