...
|
...
|
@@ -2,6 +2,7 @@ package user |
|
|
|
|
|
import (
|
|
|
"context"
|
|
|
"github.com/samber/lo"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/db/transaction"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/contextdata"
|
...
|
...
|
@@ -33,6 +34,9 @@ func (l *SystemUserAccountEnableLogic) SystemUserAccountEnable(req *types.System |
|
|
users []*domain.User
|
|
|
userToken = contextdata.GetUserTokenFromCtx(l.ctx)
|
|
|
)
|
|
|
if !lo.Contains([]int{domain.UserEnable, domain.UserDisable}, req.Status) {
|
|
|
return nil, xerr.NewErrMsg("启用状态有误")
|
|
|
}
|
|
|
if _, users, err = l.svcCtx.UserRepository.Find(l.ctx, conn, domain.IndexCompanyId(userToken.CompanyId)().MustWithKV("ids", req.UserIds).WithFindOnly()); err != nil {
|
|
|
return nil, xerr.NewErrMsgErr("公司不存在", err)
|
|
|
}
|
...
|
...
|
@@ -50,5 +54,6 @@ func (l *SystemUserAccountEnableLogic) SystemUserAccountEnable(req *types.System |
|
|
}, true); err != nil {
|
|
|
return nil, xerr.NewErrMsgErr("更新启用状态失败", err)
|
|
|
}
|
|
|
resp = &types.SystemUserAccountEnableResponse{}
|
|
|
return
|
|
|
} |
...
|
...
|
|