2 Star 5 Fork 7

联犀/中台模块

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
userAreaApplyIndexLogic.go 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
杨磊 提交于 4个月前 . feat: 更新mod
package datamanagelogic
import (
"context"
"gitee.com/unitedrhino/core/service/syssvr/internal/logic"
"gitee.com/unitedrhino/core/service/syssvr/internal/repo/relationDB"
"gitee.com/unitedrhino/core/service/syssvr/internal/svc"
"gitee.com/unitedrhino/core/service/syssvr/pb/sys"
"github.com/zeromicro/go-zero/core/logx"
)
type UserAreaApplyIndexLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewUserAreaApplyIndexLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserAreaApplyIndexLogic {
return &UserAreaApplyIndexLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *UserAreaApplyIndexLogic) UserAreaApplyIndex(in *sys.UserAreaApplyIndexReq) (*sys.UserAreaApplyIndexResp, error) {
f := relationDB.UserAreaApplyFilter{AuthTypes: in.AuthTypes, AreaID: in.AreaID}
total, err := relationDB.NewUserAreaApplyRepo(l.ctx).CountByFilter(l.ctx, f)
if err != nil {
return nil, err
}
list, err := relationDB.NewUserAreaApplyRepo(l.ctx).FindByFilter(l.ctx, f, logic.ToPageInfo(in.Page))
if err != nil {
return nil, err
}
return &sys.UserAreaApplyIndexResp{List: ToUserAreaApplyInfos(list), Total: total}, nil
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/unitedrhino/core.git
git@gitee.com:unitedrhino/core.git
unitedrhino
core
中台模块
v1.2.6

搜索帮助