feat(ent): 生成支付应用实体及相关操作代码
- 新增 App 实体定义,包含字段如 ID、创建时间、更新时间、状态、租户 ID、删除时间、应用密钥、应用名称、订单通知 URL 和退款通知 URL - 实现 App 实体的 CRUD 操作,包括创建、查询、删除等功能 - 支持与支付渠道(PayChannel)和支付通知任务(PayNotifyTask)关联关系的操作 - 自动生成数据库表结构映射及 SQL 查询逻辑 - 提供批量创建和单个/多个对象查询接口 - 包含默认值设置、数据校验以及错误处理机制
This commit is contained in:
parent
5aabd0a3a8
commit
7cdff30203
|
|
@ -2,6 +2,7 @@ package user
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
"github.com/saas-mingyang/mingyang-admin-common/utils/pointy"
|
"github.com/saas-mingyang/mingyang-admin-common/utils/pointy"
|
||||||
"mingyang-admin-app-rpc/ent/predicate"
|
"mingyang-admin-app-rpc/ent/predicate"
|
||||||
"mingyang-admin-app-rpc/ent/user"
|
"mingyang-admin-app-rpc/ent/user"
|
||||||
|
|
@ -45,6 +46,7 @@ func (l *ListUsersLogic) ListUsers(in *app.PageUserRequest) (*app.PageUserRespon
|
||||||
if result == nil || result.List == nil {
|
if result == nil || result.List == nil {
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
fmt.Printf("result.List:%s\n", result.List)
|
||||||
resp.Total = result.PageDetails.Total
|
resp.Total = result.PageDetails.Total
|
||||||
for _, v := range result.List {
|
for _, v := range result.List {
|
||||||
if v == nil {
|
if v == nil {
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,11 @@ func NewQueryUserPagePcLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Q
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// C端用户分页查询
|
// QueryUserPagePc C端用户分页查询
|
||||||
func (l *QueryUserPagePcLogic) QueryUserPagePc(in *app.PageUserRequest) (*app.PageUserResponse, error) {
|
func (l *QueryUserPagePcLogic) QueryUserPagePc(in *app.PageUserRequest) (*app.PageUserResponse, error) {
|
||||||
// todo: add your logic here and delete this line
|
users, err := NewListUsersLogic(l.ctx, l.svcCtx).ListUsers(in)
|
||||||
|
if err != nil {
|
||||||
return &app.PageUserResponse{}, nil
|
return nil, err
|
||||||
|
}
|
||||||
|
return users, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ func NewUpdateUserPcAvatarLogic(ctx context.Context, svcCtx *svc.ServiceContext)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// C端用户修改头像
|
// UpdateUserPcAvatar C端用户修改头像
|
||||||
func (l *UpdateUserPcAvatarLogic) UpdateUserPcAvatar(in *app.UpdateUserAvatarReq) (*app.BaseResp, error) {
|
func (l *UpdateUserPcAvatarLogic) UpdateUserPcAvatar(in *app.UpdateUserAvatarReq) (*app.BaseResp, error) {
|
||||||
// todo: add your logic here and delete this line
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ func NewUpdateUserPcInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// C端用户修改信息
|
// UpdateUserPcInfo C端用户修改信息
|
||||||
func (l *UpdateUserPcInfoLogic) UpdateUserPcInfo(in *app.UserInfo) (*app.BaseResp, error) {
|
func (l *UpdateUserPcInfoLogic) UpdateUserPcInfo(in *app.UserInfo) (*app.BaseResp, error) {
|
||||||
// todo: add your logic here and delete this line
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ func NewUpdateUserPcPasswordLogic(ctx context.Context, svcCtx *svc.ServiceContex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// C端用户修改密码
|
// UpdateUserPcPassword C端用户修改密码
|
||||||
func (l *UpdateUserPcPasswordLogic) UpdateUserPcPassword(in *app.UpdateUserPcPasswordReq) (*app.BaseResp, error) {
|
func (l *UpdateUserPcPasswordLogic) UpdateUserPcPassword(in *app.UpdateUserPcPasswordReq) (*app.BaseResp, error) {
|
||||||
// todo: add your logic here and delete this line
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ func NewUpdateUserPcStatusLogic(ctx context.Context, svcCtx *svc.ServiceContext)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// C端用户修改状态
|
// UpdateUserPcStatus C端用户修改状态
|
||||||
func (l *UpdateUserPcStatusLogic) UpdateUserPcStatus(in *app.IDReq) (*app.BaseResp, error) {
|
func (l *UpdateUserPcStatusLogic) UpdateUserPcStatus(in *app.IDReq) (*app.BaseResp, error) {
|
||||||
// todo: add your logic here and delete this line
|
// todo: add your logic here and delete this line
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue