Skip to content

Commit

Permalink
Merge pull request #5 from arklnk/dev
Browse files Browse the repository at this point in the history
D2M
  • Loading branch information
Trevor-Lan authored Aug 28, 2022
2 parents 371334f + f757397 commit bdbef0b
Show file tree
Hide file tree
Showing 29 changed files with 31 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion app/core/cmd/api/internal/logic/sys/job/updatesysjoblogic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions app/core/cmd/api/internal/logic/user/loginlogic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/core/cmd/api/internal/logic/user/logoutlogic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion app/core/model/sysrolemodel.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
3 changes: 1 addition & 2 deletions app/core/model/sysusermodel.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion common/utils/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"encoding/json"
"fmt"

"ark-admin-zero/common/config"
"ark-admin-zero/config"

"github.com/zeromicro/go-zero/core/logx"
)
Expand Down
File renamed without changes.

0 comments on commit bdbef0b

Please sign in to comment.