Explorar el Código

去除显示接口转换

yxh hace 4 años
padre
commit
61cf07da07

+ 1 - 1
internal/app/common/service/cache.go

@@ -38,5 +38,5 @@ func Cache() ICache {
 	} else {
 		ch.GfCache = cache.New(prefix)
 	}
-	return ICache(&ch)
+	return &ch
 }

+ 1 - 1
internal/app/common/service/captcha.go

@@ -32,7 +32,7 @@ var (
 )
 
 func Captcha() ICaptcha {
-	return ICaptcha(&captcha)
+	return &captcha
 }
 
 // GetVerifyImgString 获取字母数字混合验证码

+ 1 - 1
internal/app/common/service/middleware.go

@@ -18,7 +18,7 @@ type middlewareImpl struct{}
 var middleService = middlewareImpl{}
 
 func Middleware() IMiddleware {
-	return IMiddleware(&middleService)
+	return &middleService
 }
 
 func (s *middlewareImpl) MiddlewareCORS(r *ghttp.Request) {

+ 1 - 1
internal/app/common/service/sys_config.go

@@ -35,7 +35,7 @@ type configTmpl struct {
 var configService = configTmpl{}
 
 func Config() IConfig {
-	return IConfig(&configService)
+	return &configService
 }
 
 // List 系统参数列表

+ 1 - 1
internal/app/common/service/sys_dict_data.go

@@ -36,7 +36,7 @@ type dictDataImpl struct {
 var dictData = dictDataImpl{}
 
 func DictData() IDictData {
-	return IDictData(&dictData)
+	return &dictData
 }
 
 // GetDictWithDataByType 通过字典键类型获取选项

+ 1 - 1
internal/app/common/service/sys_dict_type.go

@@ -38,7 +38,7 @@ type dictTypeImpl struct {
 var dictTypeService = dictTypeImpl{}
 
 func DictType() IDictType {
-	return IDictType(&dictTypeService)
+	return &dictTypeService
 }
 
 // List 字典类型列表

+ 1 - 1
internal/app/common/service/token.go

@@ -45,5 +45,5 @@ func GfToken(options *model.TokenOptions) IGfToken {
 		gftoken.WithExcludePaths(options.ExcludePaths),
 		fun,
 	)
-	return IGfToken(&gT)
+	return &gT
 }

+ 1 - 1
internal/app/system/service/context.go

@@ -28,7 +28,7 @@ var contextService = contextServiceImpl{}
 type contextServiceImpl struct{}
 
 func Context() IContext {
-	return IContext(&contextService)
+	return &contextService
 }
 
 // Init 初始化上下文对象指针到上下文对象中,以便后续的请求流程中可以修改。

+ 1 - 1
internal/app/system/service/middleware.go

@@ -28,7 +28,7 @@ type middlewareImpl struct{}
 var middleService = middlewareImpl{}
 
 func Middleware() IMiddleware {
-	return IMiddleware(&middleService)
+	return &middleService
 }
 
 // Ctx 自定义上下文对象

+ 1 - 1
internal/app/system/service/sys_auth_rule.go

@@ -43,7 +43,7 @@ type ruleImpl struct {
 var ruleService = ruleImpl{}
 
 func Rule() IRule {
-	return IRule(&ruleService)
+	return &ruleService
 }
 
 func (s *ruleImpl) GetMenuListSearch(ctx context.Context, req *system.RuleSearchReq) (res []*model.SysAuthRuleInfoRes, err error) {

+ 1 - 1
internal/app/system/service/sys_dept.go

@@ -35,7 +35,7 @@ type IDept interface {
 var deptService = deptImpl{}
 
 func Dept() IDept {
-	return IDept(&deptService)
+	return &deptService
 }
 
 type deptImpl struct {

+ 1 - 1
internal/app/system/service/sys_login_log.go

@@ -37,7 +37,7 @@ var (
 )
 
 func SysLoginLog() ISysLoginLog {
-	return ISysLoginLog(&sysLoginLogService)
+	return &sysLoginLogService
 }
 
 func (s *sysLoginLogImpl) Invoke(ctx context.Context, data *model.LoginLogParams) {

+ 1 - 1
internal/app/system/service/sys_post.go

@@ -33,7 +33,7 @@ type postImpl struct {
 var postService = postImpl{}
 
 func Post() IPost {
-	return IPost(&postService)
+	return &postService
 }
 
 // List 岗位列表

+ 1 - 1
internal/app/system/service/sys_role.go

@@ -37,7 +37,7 @@ type roleImpl struct {
 var roleService = roleImpl{}
 
 func Role() IRole {
-	return IRole(&roleService)
+	return &roleService
 }
 
 func (s *roleImpl) GetRoleListSearch(ctx context.Context, req *system.RoleListReq) (res *system.RoleListRes, err error) {

+ 1 - 1
internal/app/system/service/sys_user.go

@@ -58,7 +58,7 @@ var (
 )
 
 func User() IUser {
-	return IUser(&userService)
+	return &userService
 }
 
 func (s *userImpl) NotCheckAuthAdminIds(ctx context.Context) *gset.Set {