Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: errorhandler rename to dberrorhandler #242

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rpc/internal/logic/api/create_api_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand Down Expand Up @@ -36,7 +36,7 @@ func (l *CreateApiLogic) CreateApi(in *core.ApiInfo) (*core.BaseIDResp, error) {
SetNotNilServiceName(in.ServiceName).
Save(l.ctx)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.BaseIDResp{Id: result.ID, Msg: i18n.CreateSuccess}, nil
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/api/delete_api_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/suyuan32/simple-admin-core/rpc/ent/api"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand All @@ -31,7 +31,7 @@ func NewDeleteApiLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteA
func (l *DeleteApiLogic) DeleteApi(in *core.IDsReq) (*core.BaseResp, error) {
_, err := l.svcCtx.DB.API.Delete().Where(api.IDIn(in.Ids...)).Exec(l.ctx)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.BaseResp{Msg: i18n.DeleteSuccess}, nil
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/api/get_api_by_id_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/suyuan32/simple-admin-common/utils/pointy"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand All @@ -29,7 +29,7 @@ func NewGetApiByIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetApi
func (l *GetApiByIdLogic) GetApiById(in *core.IDReq) (*core.ApiInfo, error) {
result, err := l.svcCtx.DB.API.Get(l.ctx, in.Id)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.ApiInfo{
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/api/get_api_list_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/suyuan32/simple-admin-core/rpc/ent/api"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand Down Expand Up @@ -49,7 +49,7 @@ func (l *GetApiListLogic) GetApiList(in *core.ApiListReq) (*core.ApiListResp, er
}
result, err := l.svcCtx.DB.API.Query().Where(predicates...).Page(l.ctx, in.Page, in.PageSize)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

resp := &core.ApiListResp{}
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/api/update_api_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand Down Expand Up @@ -36,7 +36,7 @@ func (l *UpdateApiLogic) UpdateApi(in *core.ApiInfo) (*core.BaseResp, error) {
SetNotNilServiceName(in.ServiceName).
Exec(l.ctx)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.BaseResp{Msg: i18n.UpdateSuccess}, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/suyuan32/simple-admin-core/rpc/ent"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand Down Expand Up @@ -45,7 +45,7 @@ func (l *CreateOrUpdateMenuAuthorityLogic) CreateOrUpdateMenuAuthority(in *core.
return nil
})
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.BaseResp{Msg: i18n.UpdateSuccess}, nil
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/authority/get_menu_authority_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/suyuan32/simple-admin-core/rpc/ent/role"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand All @@ -29,7 +29,7 @@ func NewGetMenuAuthorityLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
func (l *GetMenuAuthorityLogic) GetMenuAuthority(in *core.IDReq) (*core.RoleMenuAuthorityResp, error) {
menus, err := l.svcCtx.DB.Role.Query().Where(role.ID(in.Id)).QueryMenus().IDs(l.ctx)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.RoleMenuAuthorityResp{MenuId: menus}, nil
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/department/create_department_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/suyuan32/simple-admin-common/utils/pointy"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand Down Expand Up @@ -41,7 +41,7 @@ func (l *CreateDepartmentLogic) CreateDepartment(in *core.DepartmentInfo) (*core
SetNotNilParentID(in.ParentId).
Save(l.ctx)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.BaseIDResp{Id: result.ID, Msg: i18n.CreateSuccess}, nil
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/department/delete_department_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/suyuan32/simple-admin-core/rpc/ent/department"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand Down Expand Up @@ -47,7 +47,7 @@ func (l *DeleteDepartmentLogic) DeleteDepartment(in *core.IDsReq) (*core.BaseRes

_, err = l.svcCtx.DB.Department.Delete().Where(department.IDIn(in.Ids...)).Exec(l.ctx)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.BaseResp{Msg: i18n.DeleteSuccess}, nil
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/department/get_department_by_id_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/suyuan32/simple-admin-common/utils/pointy"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand All @@ -29,7 +29,7 @@ func NewGetDepartmentByIdLogic(ctx context.Context, svcCtx *svc.ServiceContext)
func (l *GetDepartmentByIdLogic) GetDepartmentById(in *core.IDReq) (*core.DepartmentInfo, error) {
result, err := l.svcCtx.DB.Department.Get(l.ctx, in.Id)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.DepartmentInfo{
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/department/get_department_list_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/suyuan32/simple-admin-core/rpc/ent/predicate"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"
)

Expand Down Expand Up @@ -38,7 +38,7 @@ func (l *GetDepartmentListLogic) GetDepartmentList(in *core.DepartmentListReq) (
}
result, err := l.svcCtx.DB.Department.Query().Where(predicates...).Page(l.ctx, in.Page, in.PageSize)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

resp := &core.DepartmentListResp{}
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/department/update_department_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/suyuan32/simple-admin-common/utils/pointy"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand Down Expand Up @@ -41,7 +41,7 @@ func (l *UpdateDepartmentLogic) UpdateDepartment(in *core.DepartmentInfo) (*core
SetNotNilParentID(in.ParentId).
Exec(l.ctx)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.BaseResp{Msg: i18n.UpdateSuccess}, nil
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/dictionary/create_dictionary_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/suyuan32/simple-admin-common/utils/pointy"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand Down Expand Up @@ -36,7 +36,7 @@ func (l *CreateDictionaryLogic) CreateDictionary(in *core.DictionaryInfo) (*core
SetNotNilDesc(in.Desc).
Save(l.ctx)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.BaseIDResp{Id: result.ID, Msg: i18n.CreateSuccess}, nil
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/dictionary/delete_dictionary_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/suyuan32/simple-admin-core/rpc/ent/dictionarydetail"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand Down Expand Up @@ -47,7 +47,7 @@ func (l *DeleteDictionaryLogic) DeleteDictionary(in *core.IDsReq) (*core.BaseRes
return nil
})
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.BaseResp{Msg: i18n.DeleteSuccess}, nil
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/dictionary/get_dictionary_by_id_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/suyuan32/simple-admin-common/utils/pointy"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand All @@ -29,7 +29,7 @@ func NewGetDictionaryByIdLogic(ctx context.Context, svcCtx *svc.ServiceContext)
func (l *GetDictionaryByIdLogic) GetDictionaryById(in *core.IDReq) (*core.DictionaryInfo, error) {
result, err := l.svcCtx.DB.Dictionary.Get(l.ctx, in.Id)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.DictionaryInfo{
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/dictionary/get_dictionary_list_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/suyuan32/simple-admin-core/rpc/ent/predicate"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"
)

Expand All @@ -35,7 +35,7 @@ func (l *GetDictionaryListLogic) GetDictionaryList(in *core.DictionaryListReq) (
}
result, err := l.svcCtx.DB.Dictionary.Query().Where(predicates...).Page(l.ctx, in.Page, in.PageSize)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

resp := &core.DictionaryListResp{}
Expand Down
4 changes: 2 additions & 2 deletions rpc/internal/logic/dictionary/update_dictionary_logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/suyuan32/simple-admin-common/utils/pointy"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand Down Expand Up @@ -36,7 +36,7 @@ func (l *UpdateDictionaryLogic) UpdateDictionary(in *core.DictionaryInfo) (*core
SetNotNilDesc(in.Desc).
Exec(l.ctx)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.BaseResp{Msg: i18n.UpdateSuccess}, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/suyuan32/simple-admin-common/utils/pointy"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand Down Expand Up @@ -38,7 +38,7 @@ func (l *CreateDictionaryDetailLogic) CreateDictionaryDetail(in *core.Dictionary
SetNotNilDictionaryID(in.DictionaryId).
Save(l.ctx)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.BaseIDResp{Id: result.ID, Msg: i18n.CreateSuccess}, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/suyuan32/simple-admin-core/rpc/ent/dictionarydetail"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand All @@ -31,7 +31,7 @@ func NewDeleteDictionaryDetailLogic(ctx context.Context, svcCtx *svc.ServiceCont
func (l *DeleteDictionaryDetailLogic) DeleteDictionaryDetail(in *core.IDsReq) (*core.BaseResp, error) {
_, err := l.svcCtx.DB.DictionaryDetail.Delete().Where(dictionarydetail.IDIn(in.Ids...)).Exec(l.ctx)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.BaseResp{Msg: i18n.DeleteSuccess}, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/suyuan32/simple-admin-core/rpc/ent/dictionary"
"github.com/suyuan32/simple-admin-core/rpc/ent/dictionarydetail"
"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand All @@ -32,14 +32,14 @@ func NewGetDictionaryDetailByDictionaryNameLogic(ctx context.Context, svcCtx *sv
func (l *GetDictionaryDetailByDictionaryNameLogic) GetDictionaryDetailByDictionaryName(in *core.BaseMsg) (*core.DictionaryDetailListResp, error) {
dictionaryData, err := l.svcCtx.DB.Dictionary.Query().Where(dictionary.NameEQ(in.Msg)).First(l.ctx)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

result, err := l.svcCtx.DB.DictionaryDetail.Query().Where(dictionarydetail.DictionaryID(dictionaryData.ID)).Page(l.ctx, 1, 10000, func(pager *ent.DictionaryDetailPager) {
pager.Order = ent.Asc(dictionarydetail.FieldSort)
})
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

resp := &core.DictionaryDetailListResp{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/suyuan32/simple-admin-common/utils/pointy"

"github.com/suyuan32/simple-admin-core/rpc/internal/svc"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/errorhandler"
"github.com/suyuan32/simple-admin-core/rpc/internal/utils/dberrorhandler"
"github.com/suyuan32/simple-admin-core/rpc/types/core"

"github.com/zeromicro/go-zero/core/logx"
Expand All @@ -29,7 +29,7 @@ func NewGetDictionaryDetailByIdLogic(ctx context.Context, svcCtx *svc.ServiceCon
func (l *GetDictionaryDetailByIdLogic) GetDictionaryDetailById(in *core.IDReq) (*core.DictionaryDetailInfo, error) {
result, err := l.svcCtx.DB.DictionaryDetail.Get(l.ctx, in.Id)
if err != nil {
return nil, errorhandler.DefaultEntError(l.Logger, err, in)
return nil, dberrorhandler.DefaultEntError(l.Logger, err, in)
}

return &core.DictionaryDetailInfo{
Expand Down
Loading