diff --git a/app/core/cmd/api/internal/logic/config/dict/addconfigdictlogic.go b/app/core/cmd/api/internal/logic/config/dict/addconfigdictlogic.go index 107dc4d..8d87b10 100644 --- a/app/core/cmd/api/internal/logic/config/dict/addconfigdictlogic.go +++ b/app/core/cmd/api/internal/logic/config/dict/addconfigdictlogic.go @@ -6,8 +6,8 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" "ark-admin-zero/app/core/model" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" diff --git a/app/core/cmd/api/internal/logic/config/dict/deleteconfigdictlogic.go b/app/core/cmd/api/internal/logic/config/dict/deleteconfigdictlogic.go index a559eca..312985e 100644 --- a/app/core/cmd/api/internal/logic/config/dict/deleteconfigdictlogic.go +++ b/app/core/cmd/api/internal/logic/config/dict/deleteconfigdictlogic.go @@ -5,8 +5,8 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" + "ark-admin-zero/config" "github.com/zeromicro/go-zero/core/logx" ) diff --git a/app/core/cmd/api/internal/logic/config/dict/updateconfigdictlogic.go b/app/core/cmd/api/internal/logic/config/dict/updateconfigdictlogic.go index fc65ad9..def4abc 100644 --- a/app/core/cmd/api/internal/logic/config/dict/updateconfigdictlogic.go +++ b/app/core/cmd/api/internal/logic/config/dict/updateconfigdictlogic.go @@ -5,8 +5,8 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" diff --git a/app/core/cmd/api/internal/logic/log/login/getlogloginpagelogic.go b/app/core/cmd/api/internal/logic/log/login/getlogloginpagelogic.go index c665bcd..1d02249 100644 --- a/app/core/cmd/api/internal/logic/log/login/getlogloginpagelogic.go +++ b/app/core/cmd/api/internal/logic/log/login/getlogloginpagelogic.go @@ -5,8 +5,8 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" diff --git a/app/core/cmd/api/internal/logic/sys/dept/addsysdeptlogic.go b/app/core/cmd/api/internal/logic/sys/dept/addsysdeptlogic.go index 26c43f5..5233232 100644 --- a/app/core/cmd/api/internal/logic/sys/dept/addsysdeptlogic.go +++ b/app/core/cmd/api/internal/logic/sys/dept/addsysdeptlogic.go @@ -6,8 +6,8 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" "ark-admin-zero/app/core/model" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" diff --git a/app/core/cmd/api/internal/logic/sys/dept/updatesysdeptlogic.go b/app/core/cmd/api/internal/logic/sys/dept/updatesysdeptlogic.go index cfee448..7a0cb39 100644 --- a/app/core/cmd/api/internal/logic/sys/dept/updatesysdeptlogic.go +++ b/app/core/cmd/api/internal/logic/sys/dept/updatesysdeptlogic.go @@ -6,9 +6,9 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" "ark-admin-zero/app/core/model" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" "ark-admin-zero/common/utils" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" diff --git a/app/core/cmd/api/internal/logic/sys/job/updatesysjoblogic.go b/app/core/cmd/api/internal/logic/sys/job/updatesysjoblogic.go index a9efbd4..5480811 100644 --- a/app/core/cmd/api/internal/logic/sys/job/updatesysjoblogic.go +++ b/app/core/cmd/api/internal/logic/sys/job/updatesysjoblogic.go @@ -6,6 +6,7 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" "ark-admin-zero/common/errorx" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" @@ -31,7 +32,7 @@ func (l *UpdateSysJobLogic) UpdateSysJob(req *types.UpdateSysJobReq) error { return errorx.NewDefaultError(errorx.JobIdErrorCode) } - if req.Status == 0 { + if req.Status == config.SysDisable { count, _ := l.svcCtx.SysUserModel.FindCountByJobId(l.ctx, req.Id) if count > 0 { return errorx.NewDefaultError(errorx.JobIsUsingErrorCode) diff --git a/app/core/cmd/api/internal/logic/sys/menu/addsyspermmenulogic.go b/app/core/cmd/api/internal/logic/sys/menu/addsyspermmenulogic.go index 6cd5f32..d2e471e 100644 --- a/app/core/cmd/api/internal/logic/sys/menu/addsyspermmenulogic.go +++ b/app/core/cmd/api/internal/logic/sys/menu/addsyspermmenulogic.go @@ -7,8 +7,8 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" "ark-admin-zero/app/core/model" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" diff --git a/app/core/cmd/api/internal/logic/sys/menu/deletesyspermmenulogic.go b/app/core/cmd/api/internal/logic/sys/menu/deletesyspermmenulogic.go index c314a9f..5a31aa1 100644 --- a/app/core/cmd/api/internal/logic/sys/menu/deletesyspermmenulogic.go +++ b/app/core/cmd/api/internal/logic/sys/menu/deletesyspermmenulogic.go @@ -5,8 +5,8 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" + "ark-admin-zero/config" "github.com/zeromicro/go-zero/core/logx" ) diff --git a/app/core/cmd/api/internal/logic/sys/menu/updatesyspermmenulogic.go b/app/core/cmd/api/internal/logic/sys/menu/updatesyspermmenulogic.go index 25e740c..bfec687 100644 --- a/app/core/cmd/api/internal/logic/sys/menu/updatesyspermmenulogic.go +++ b/app/core/cmd/api/internal/logic/sys/menu/updatesyspermmenulogic.go @@ -7,9 +7,9 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" "ark-admin-zero/app/core/model" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" "ark-admin-zero/common/utils" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" diff --git a/app/core/cmd/api/internal/logic/sys/profession/updatesysprofessionlogic.go b/app/core/cmd/api/internal/logic/sys/profession/updatesysprofessionlogic.go index 3753418..4f855d2 100644 --- a/app/core/cmd/api/internal/logic/sys/profession/updatesysprofessionlogic.go +++ b/app/core/cmd/api/internal/logic/sys/profession/updatesysprofessionlogic.go @@ -6,6 +6,7 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" "ark-admin-zero/common/errorx" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" @@ -31,7 +32,7 @@ func (l *UpdateSysProfessionLogic) UpdateSysProfession(req *types.UpdateSysProfe return errorx.NewDefaultError(errorx.ProfessionIdErrorCode) } - if req.Status == 0 { + if req.Status == config.SysDisable { count, _ := l.svcCtx.SysUserModel.FindCountByProfessionId(l.ctx, req.Id) if count > 0 { return errorx.NewDefaultError(errorx.JobIsUsingErrorCode) diff --git a/app/core/cmd/api/internal/logic/sys/role/addsysrolelogic.go b/app/core/cmd/api/internal/logic/sys/role/addsysrolelogic.go index ef1399c..6376d94 100644 --- a/app/core/cmd/api/internal/logic/sys/role/addsysrolelogic.go +++ b/app/core/cmd/api/internal/logic/sys/role/addsysrolelogic.go @@ -7,8 +7,8 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" "ark-admin-zero/app/core/model" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" diff --git a/app/core/cmd/api/internal/logic/sys/role/deletesysrolelogic.go b/app/core/cmd/api/internal/logic/sys/role/deletesysrolelogic.go index fa04a7e..192209e 100644 --- a/app/core/cmd/api/internal/logic/sys/role/deletesysrolelogic.go +++ b/app/core/cmd/api/internal/logic/sys/role/deletesysrolelogic.go @@ -5,8 +5,8 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" + "ark-admin-zero/config" "github.com/zeromicro/go-zero/core/logx" ) diff --git a/app/core/cmd/api/internal/logic/sys/role/updatesysrolelogic.go b/app/core/cmd/api/internal/logic/sys/role/updatesysrolelogic.go index a72b5ac..8ebfafa 100644 --- a/app/core/cmd/api/internal/logic/sys/role/updatesysrolelogic.go +++ b/app/core/cmd/api/internal/logic/sys/role/updatesysrolelogic.go @@ -7,9 +7,9 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" "ark-admin-zero/app/core/model" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" "ark-admin-zero/common/utils" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" diff --git a/app/core/cmd/api/internal/logic/sys/user/addsysuserlogic.go b/app/core/cmd/api/internal/logic/sys/user/addsysuserlogic.go index 4e67f67..60b0901 100644 --- a/app/core/cmd/api/internal/logic/sys/user/addsysuserlogic.go +++ b/app/core/cmd/api/internal/logic/sys/user/addsysuserlogic.go @@ -7,9 +7,9 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" "ark-admin-zero/app/core/model" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" "ark-admin-zero/common/utils" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" diff --git a/app/core/cmd/api/internal/logic/sys/user/deletesysuserlogic.go b/app/core/cmd/api/internal/logic/sys/user/deletesysuserlogic.go index 0541308..af3f797 100644 --- a/app/core/cmd/api/internal/logic/sys/user/deletesysuserlogic.go +++ b/app/core/cmd/api/internal/logic/sys/user/deletesysuserlogic.go @@ -5,8 +5,8 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" + "ark-admin-zero/config" "github.com/zeromicro/go-zero/core/logx" ) diff --git a/app/core/cmd/api/internal/logic/sys/user/getsysuserrdpjinfologic.go b/app/core/cmd/api/internal/logic/sys/user/getsysuserrdpjinfologic.go index 1c9ee52..9eadd13 100644 --- a/app/core/cmd/api/internal/logic/sys/user/getsysuserrdpjinfologic.go +++ b/app/core/cmd/api/internal/logic/sys/user/getsysuserrdpjinfologic.go @@ -8,8 +8,8 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" "ark-admin-zero/app/core/model" - "ark-admin-zero/common/config" "ark-admin-zero/common/utils" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" diff --git a/app/core/cmd/api/internal/logic/sys/user/updatesysuserlogic.go b/app/core/cmd/api/internal/logic/sys/user/updatesysuserlogic.go index 33b1da9..fd93408 100644 --- a/app/core/cmd/api/internal/logic/sys/user/updatesysuserlogic.go +++ b/app/core/cmd/api/internal/logic/sys/user/updatesysuserlogic.go @@ -7,9 +7,9 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" "ark-admin-zero/common/utils" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" diff --git a/app/core/cmd/api/internal/logic/user/getlogincaptchalogic.go b/app/core/cmd/api/internal/logic/user/getlogincaptchalogic.go index de17ff7..18f7170 100644 --- a/app/core/cmd/api/internal/logic/user/getlogincaptchalogic.go +++ b/app/core/cmd/api/internal/logic/user/getlogincaptchalogic.go @@ -5,8 +5,8 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" - "ark-admin-zero/common/config" "ark-admin-zero/common/utils" + "ark-admin-zero/config" "github.com/mojocn/base64Captcha" "github.com/satori/go.uuid" diff --git a/app/core/cmd/api/internal/logic/user/getuserpermmenulogic.go b/app/core/cmd/api/internal/logic/user/getuserpermmenulogic.go index 0da0d11..148bc5a 100644 --- a/app/core/cmd/api/internal/logic/user/getuserpermmenulogic.go +++ b/app/core/cmd/api/internal/logic/user/getuserpermmenulogic.go @@ -8,9 +8,9 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" "ark-admin-zero/app/core/model" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" "ark-admin-zero/common/utils" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" diff --git a/app/core/cmd/api/internal/logic/user/loginlogic.go b/app/core/cmd/api/internal/logic/user/loginlogic.go index 5503b3f..4ebde82 100644 --- a/app/core/cmd/api/internal/logic/user/loginlogic.go +++ b/app/core/cmd/api/internal/logic/user/loginlogic.go @@ -9,9 +9,9 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" "ark-admin-zero/app/core/model" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" "ark-admin-zero/common/utils" + "ark-admin-zero/config" "github.com/golang-jwt/jwt/v4" "github.com/zeromicro/go-zero/core/logx" @@ -52,7 +52,7 @@ func (l *LoginLogic) Login(req *types.LoginReq, r *http.Request) (resp *types.Lo if sysUser.Id != config.SysProtectUserId { dept, _ := l.svcCtx.SysDeptModel.FindOne(l.ctx, sysUser.DeptId) - if dept.Status == 0 { + if dept.Status == config.SysDisable { return nil, errorx.NewDefaultError(errorx.AccountDisableErrorCode) } } diff --git a/app/core/cmd/api/internal/logic/user/logoutlogic.go b/app/core/cmd/api/internal/logic/user/logoutlogic.go index 11f2541..ee04a32 100644 --- a/app/core/cmd/api/internal/logic/user/logoutlogic.go +++ b/app/core/cmd/api/internal/logic/user/logoutlogic.go @@ -5,8 +5,8 @@ import ( "strconv" "ark-admin-zero/app/core/cmd/api/internal/svc" - "ark-admin-zero/common/config" "ark-admin-zero/common/utils" + "ark-admin-zero/config" "github.com/zeromicro/go-zero/core/logx" ) diff --git a/app/core/cmd/api/internal/logic/user/updateuserpasswordlogic.go b/app/core/cmd/api/internal/logic/user/updateuserpasswordlogic.go index 99b4b85..7a01d16 100644 --- a/app/core/cmd/api/internal/logic/user/updateuserpasswordlogic.go +++ b/app/core/cmd/api/internal/logic/user/updateuserpasswordlogic.go @@ -5,9 +5,9 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" "ark-admin-zero/common/utils" + "ark-admin-zero/config" "github.com/zeromicro/go-zero/core/logx" ) diff --git a/app/core/cmd/api/internal/logic/user/updateuserprofilelogic.go b/app/core/cmd/api/internal/logic/user/updateuserprofilelogic.go index 3106f03..4cfa693 100644 --- a/app/core/cmd/api/internal/logic/user/updateuserprofilelogic.go +++ b/app/core/cmd/api/internal/logic/user/updateuserprofilelogic.go @@ -5,9 +5,9 @@ import ( "ark-admin-zero/app/core/cmd/api/internal/svc" "ark-admin-zero/app/core/cmd/api/internal/types" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" "ark-admin-zero/common/utils" + "ark-admin-zero/config" "github.com/jinzhu/copier" "github.com/zeromicro/go-zero/core/logx" diff --git a/app/core/cmd/api/internal/middleware/permmenuauthmiddleware.go b/app/core/cmd/api/internal/middleware/permmenuauthmiddleware.go index 409ae44..4855690 100644 --- a/app/core/cmd/api/internal/middleware/permmenuauthmiddleware.go +++ b/app/core/cmd/api/internal/middleware/permmenuauthmiddleware.go @@ -5,9 +5,9 @@ import ( "strconv" "strings" - "ark-admin-zero/common/config" "ark-admin-zero/common/errorx" "ark-admin-zero/common/utils" + "ark-admin-zero/config" "github.com/zeromicro/go-zero/core/stores/redis" "github.com/zeromicro/go-zero/rest/httpx" diff --git a/app/core/model/sysrolemodel.go b/app/core/model/sysrolemodel.go index f0947cd..647c357 100644 --- a/app/core/model/sysrolemodel.go +++ b/app/core/model/sysrolemodel.go @@ -1,7 +1,7 @@ package model import ( - "ark-admin-zero/common/config" + "ark-admin-zero/config" "context" "fmt" "github.com/zeromicro/go-zero/core/stores/cache" diff --git a/app/core/model/sysusermodel.go b/app/core/model/sysusermodel.go index a3deefe..3e760b0 100644 --- a/app/core/model/sysusermodel.go +++ b/app/core/model/sysusermodel.go @@ -1,12 +1,11 @@ package model import ( + "ark-admin-zero/config" "context" "fmt" "time" - "ark-admin-zero/common/config" - "github.com/zeromicro/go-zero/core/stores/cache" "github.com/zeromicro/go-zero/core/stores/sqlx" ) diff --git a/common/utils/function.go b/common/utils/function.go index 3343b13..92e0cfb 100644 --- a/common/utils/function.go +++ b/common/utils/function.go @@ -6,7 +6,7 @@ import ( "encoding/json" "fmt" - "ark-admin-zero/common/config" + "ark-admin-zero/config" "github.com/zeromicro/go-zero/core/logx" ) diff --git a/common/config/system.go b/config/core.go similarity index 100% rename from common/config/system.go rename to config/core.go