小程序一些功能更新
This commit is contained in:
@@ -31,13 +31,27 @@ func (c *cAdminAuth) UserList(ctx context.Context, req *v1.UserListReq) (res *v1
|
||||
}
|
||||
|
||||
func (c *cAdminAuth) UserSetLevel(ctx context.Context, req *v1.UserSetLevelReq) (res *v1.UserSetLevelRes, err error) {
|
||||
return logic.AdminUserSetLevel(ctx, req.UserId, req.LevelKey)
|
||||
return logic.AdminUserSetLevel(ctx, req.UserId, req.LevelKey, req.ExpireAt, req.Remark)
|
||||
}
|
||||
|
||||
func (c *cAdminAuth) UserDetail(ctx context.Context, req *v1.UserDetailReq) (res *v1.UserDetailRes, err error) {
|
||||
return logic.AdminUserDetail(ctx, req.UserId)
|
||||
}
|
||||
|
||||
func (c *cAdminAuth) UserStatus(ctx context.Context, req *v1.UserStatusReq) (res *v1.UserStatusRes, err error) {
|
||||
return logic.AdminUserStatus(ctx, req.UserId, req.Status)
|
||||
}
|
||||
|
||||
// ===== 批量操作(T15)=====
|
||||
|
||||
func (c *cAdminAuth) UserBatch(ctx context.Context, req *v1.UserBatchReq) (res *v1.UserBatchRes, err error) {
|
||||
return logic.AdminUserBatch(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cAdminAuth) ToolsBatch(ctx context.Context, req *v1.ToolsBatchReq) (res *v1.ToolsBatchRes, err error) {
|
||||
return logic.AdminToolsBatch(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cAdminAuth) LevelList(ctx context.Context, req *v1.LevelListReq) (res *v1.LevelListRes, err error) {
|
||||
return logic.AdminLevelList(ctx)
|
||||
}
|
||||
@@ -111,3 +125,25 @@ func (c *cAdminAuth) PlanSave(ctx context.Context, req *v1.PlanSaveReq) (res *v1
|
||||
func (c *cAdminAuth) UserQuotaPeriod(ctx context.Context, req *v1.UserQuotaPeriodReq) (res *v1.UserQuotaPeriodRes, err error) {
|
||||
return logic.AdminUserQuotaPeriod(ctx, req.UserId, req.PeriodDays)
|
||||
}
|
||||
|
||||
// ===== 管理员管理 + 操作审计(T17)=====
|
||||
|
||||
func (c *cAdminAuth) AdminList(ctx context.Context, req *v1.AdminListReq) (res *v1.AdminListRes, err error) {
|
||||
return logic.AdminList(ctx)
|
||||
}
|
||||
|
||||
func (c *cAdminAuth) AdminSave(ctx context.Context, req *v1.AdminSaveReq) (res *v1.AdminSaveRes, err error) {
|
||||
return logic.AdminSave(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cAdminAuth) AdminStatus(ctx context.Context, req *v1.AdminStatusReq) (res *v1.AdminStatusRes, err error) {
|
||||
return logic.AdminStatus(ctx, req.Id, req.Status)
|
||||
}
|
||||
|
||||
func (c *cAdminAuth) AuditList(ctx context.Context, req *v1.AuditListReq) (res *v1.AuditListRes, err error) {
|
||||
return logic.AdminAuditList(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cAdminAuth) AuditRecord(ctx context.Context, req *v1.AuditRecordReq) (res *v1.AuditRecordRes, err error) {
|
||||
return logic.AdminAuditRecord(ctx, req)
|
||||
}
|
||||
|
||||
24
internal/controller/admin_order.go
Normal file
24
internal/controller/admin_order.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "tool-api/api/admin/v1"
|
||||
"tool-api/internal/logic"
|
||||
)
|
||||
|
||||
// AdminOrder 管理端订单管理 + 退款接口
|
||||
type cAdminOrder struct{}
|
||||
|
||||
// AdminOrder 订单域控制器(注册于管理端 Group:AdminAuth + AdminPerm 之后)
|
||||
var AdminOrder = &cAdminOrder{}
|
||||
|
||||
// OrderList 订单列表
|
||||
func (c *cAdminOrder) OrderList(ctx context.Context, req *v1.OrderListReq) (res *v1.OrderListRes, err error) {
|
||||
return logic.AdminOrderList(ctx, req)
|
||||
}
|
||||
|
||||
// OrderRefund 订单退款(可选回收所购服务)
|
||||
func (c *cAdminOrder) OrderRefund(ctx context.Context, req *v1.OrderRefundReq) (res *v1.OrderRefundRes, err error) {
|
||||
return logic.AdminOrderRefund(ctx, req.OutTradeNo, req.RevokeService)
|
||||
}
|
||||
68
internal/controller/coupon.go
Normal file
68
internal/controller/coupon.go
Normal file
@@ -0,0 +1,68 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
adminv1 "tool-api/api/admin/v1"
|
||||
userv1 "tool-api/api/user/v1"
|
||||
"tool-api/internal/logic"
|
||||
)
|
||||
|
||||
// ============================================================================
|
||||
// 优惠券控制器
|
||||
//
|
||||
// 拆成两个对象分别挂到 UserAuth / AdminAuth 两组:
|
||||
// - Coupon 用户端(P5 /coupon/my、P6 /coupon/validate、P7 /coupon/usable)
|
||||
// - AdminCoupon 管理端(A6–A11)
|
||||
// ============================================================================
|
||||
|
||||
// cCoupon 用户端优惠券接口(需用户登录)
|
||||
type cCoupon struct{}
|
||||
|
||||
// cAdminCoupon 管理端优惠券接口(需管理员登录)
|
||||
type cAdminCoupon struct{}
|
||||
|
||||
var (
|
||||
Coupon = &cCoupon{}
|
||||
AdminCoupon = &cAdminCoupon{}
|
||||
)
|
||||
|
||||
// ===== 用户端 =====
|
||||
|
||||
func (c *cCoupon) CouponMy(ctx context.Context, req *userv1.CouponMyReq) (res *userv1.CouponMyRes, err error) {
|
||||
return logic.CouponMy(ctx, req.Status)
|
||||
}
|
||||
|
||||
func (c *cCoupon) CouponValidate(ctx context.Context, req *userv1.CouponValidateReq) (res *userv1.CouponValidateRes, err error) {
|
||||
return logic.CouponValidate(ctx, req.UserCouponId, req.OrderType, req.TargetKey)
|
||||
}
|
||||
|
||||
func (c *cCoupon) CouponUsable(ctx context.Context, req *userv1.CouponUsableReq) (res *userv1.CouponUsableRes, err error) {
|
||||
return logic.CouponUsable(ctx, req.OrderType, req.TargetKey, req.OutTradeNo)
|
||||
}
|
||||
|
||||
// ===== 管理端 =====
|
||||
|
||||
func (c *cAdminCoupon) CouponTemplateList(ctx context.Context, req *adminv1.CouponTemplateListReq) (res *adminv1.CouponTemplateListRes, err error) {
|
||||
return logic.AdminCouponTemplateList(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cAdminCoupon) CouponTemplateSave(ctx context.Context, req *adminv1.CouponTemplateSaveReq) (res *adminv1.CouponTemplateSaveRes, err error) {
|
||||
return logic.AdminCouponTemplateSave(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cAdminCoupon) CouponTemplateToggle(ctx context.Context, req *adminv1.CouponTemplateToggleReq) (res *adminv1.CouponTemplateToggleRes, err error) {
|
||||
return logic.AdminCouponTemplateToggle(ctx, req.Id, req.Status)
|
||||
}
|
||||
|
||||
func (c *cAdminCoupon) CouponGrant(ctx context.Context, req *adminv1.CouponGrantReq) (res *adminv1.CouponGrantRes, err error) {
|
||||
return logic.AdminCouponGrant(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cAdminCoupon) CouponRecordList(ctx context.Context, req *adminv1.CouponRecordListReq) (res *adminv1.CouponRecordListRes, err error) {
|
||||
return logic.AdminCouponRecordList(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cAdminCoupon) CouponRedeem(ctx context.Context, req *adminv1.CouponRedeemReq) (res *adminv1.CouponRedeemRes, err error) {
|
||||
return logic.AdminCouponRedeem(ctx, req.UserCouponId, req.Remark)
|
||||
}
|
||||
116
internal/controller/event.go
Normal file
116
internal/controller/event.go
Normal file
@@ -0,0 +1,116 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "tool-api/api/admin/v1"
|
||||
"tool-api/internal/logic"
|
||||
)
|
||||
|
||||
// cEvent 管理端「年会座次」控制器(绑定在 AdminAuth 分组下)。
|
||||
//
|
||||
// 注意:所有方法必须是标准签名 func(ctx, req) (res, err)。
|
||||
// 不要写 func(*ghttp.Request) 签名的方法 —— GoFrame 的 group.Bind 会把这类方法
|
||||
// 一并自动注册成路由(见 controller/member.go PayNotify 注释、架构 §9.1 R3)。
|
||||
type cEvent struct{}
|
||||
|
||||
// Event 年会座次控制器
|
||||
var Event = &cEvent{}
|
||||
|
||||
// ===== 企业 =====
|
||||
|
||||
func (c *cEvent) EnterpriseList(ctx context.Context, req *v1.EnterpriseListReq) (res *v1.EnterpriseListRes, err error) {
|
||||
return logic.AdminEnterpriseList(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEvent) EnterpriseSave(ctx context.Context, req *v1.EnterpriseSaveReq) (res *v1.EnterpriseSaveRes, err error) {
|
||||
return logic.AdminEnterpriseSave(ctx, req)
|
||||
}
|
||||
|
||||
// ===== 员工 =====
|
||||
|
||||
func (c *cEvent) EmployeeList(ctx context.Context, req *v1.EmployeeListReq) (res *v1.EmployeeListRes, err error) {
|
||||
return logic.AdminEmployeeList(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEvent) EmployeeSave(ctx context.Context, req *v1.EmployeeSaveReq) (res *v1.EmployeeSaveRes, err error) {
|
||||
return logic.AdminEmployeeSave(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEvent) EmployeeStatus(ctx context.Context, req *v1.EmployeeStatusReq) (res *v1.EmployeeStatusRes, err error) {
|
||||
return logic.AdminEmployeeStatus(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEvent) EmployeeBatch(ctx context.Context, req *v1.EmployeeBatchReq) (res *v1.EmployeeBatchRes, err error) {
|
||||
return logic.AdminEmployeeBatch(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEvent) ParticipantExclude(ctx context.Context, req *v1.ParticipantExcludeReq) (res *v1.ParticipantExcludeRes, err error) {
|
||||
return logic.AdminParticipantExclude(ctx, req)
|
||||
}
|
||||
|
||||
// ===== 活动 =====
|
||||
|
||||
func (c *cEvent) EventList(ctx context.Context, req *v1.EventListReq) (res *v1.EventListRes, err error) {
|
||||
return logic.AdminEventList(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEvent) EventSave(ctx context.Context, req *v1.EventSaveReq) (res *v1.EventSaveRes, err error) {
|
||||
return logic.AdminEventSave(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEvent) EventStatus(ctx context.Context, req *v1.EventStatusReq) (res *v1.EventStatusRes, err error) {
|
||||
return logic.AdminEventStatus(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEvent) EventDetail(ctx context.Context, req *v1.EventDetailReq) (res *v1.EventDetailRes, err error) {
|
||||
return logic.AdminEventDetail(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEvent) EventLayoutSave(ctx context.Context, req *v1.EventLayoutSaveReq) (res *v1.EventLayoutSaveRes, err error) {
|
||||
return logic.AdminEventLayoutSave(ctx, req)
|
||||
}
|
||||
|
||||
// ===== 桌 / 座 =====
|
||||
|
||||
func (c *cEvent) TableSave(ctx context.Context, req *v1.TableSaveReq) (res *v1.TableSaveRes, err error) {
|
||||
return logic.AdminTableSave(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEvent) TableDelete(ctx context.Context, req *v1.TableDeleteReq) (res *v1.TableDeleteRes, err error) {
|
||||
return logic.AdminTableDelete(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEvent) SeatSave(ctx context.Context, req *v1.SeatSaveReq) (res *v1.SeatSaveRes, err error) {
|
||||
return logic.AdminSeatSave(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEvent) SeatAuto(ctx context.Context, req *v1.SeatAutoReq) (res *v1.SeatAutoRes, err error) {
|
||||
return logic.AdminSeatAuto(ctx, req)
|
||||
}
|
||||
|
||||
// ===== 员工导入(两段式)=====
|
||||
|
||||
func (c *cEvent) ImportPreview(ctx context.Context, req *v1.ImportPreviewReq) (res *v1.ImportPreviewRes, err error) {
|
||||
return logic.AdminImportPreview(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEvent) ImportConfirm(ctx context.Context, req *v1.ImportConfirmReq) (res *v1.ImportConfirmRes, err error) {
|
||||
return logic.AdminImportConfirm(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEvent) ImportLogList(ctx context.Context, req *v1.ImportLogListReq) (res *v1.ImportLogListRes, err error) {
|
||||
return logic.AdminImportLogList(ctx, req)
|
||||
}
|
||||
|
||||
// ===== 活动小程序码 =====
|
||||
|
||||
func (c *cEvent) EventQrcode(ctx context.Context, req *v1.EventQrcodeReq) (res *v1.EventQrcodeRes, err error) {
|
||||
return logic.AdminEventQrcode(ctx, req)
|
||||
}
|
||||
|
||||
// ===== 查座审计(A19)=====
|
||||
|
||||
func (c *cEvent) EventQueryLog(ctx context.Context, req *v1.EventQueryLogReq) (res *v1.EventQueryLogRes, err error) {
|
||||
return logic.AdminEventQueryLog(ctx, req)
|
||||
}
|
||||
31
internal/controller/event_pub.go
Normal file
31
internal/controller/event_pub.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "tool-api/api/user/v1"
|
||||
"tool-api/internal/logic"
|
||||
)
|
||||
|
||||
// cEventPub 小程序端「年会」公开接口(免登录)。
|
||||
//
|
||||
// ⚠️ 挂到 cmd.go 的**公开组**(与 UserPub/AdminPub 同组)。该组最容易踩 group.Bind 自动注册坑:
|
||||
// GoFrame 会把控制器上所有 func(*ghttp.Request) 签名的方法也自动注册成路由。
|
||||
// → 本控制器**只有**标准签名方法 func(ctx, req) (res, err),不含任何 func(*ghttp.Request)。
|
||||
type cEventPub struct{}
|
||||
|
||||
// EventPub 公开查座控制器
|
||||
var EventPub = &cEventPub{}
|
||||
|
||||
func (c *cEventPub) EventInfo(ctx context.Context, req *v1.EventInfoReq) (res *v1.EventInfoRes, err error) {
|
||||
return logic.EventInfo(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cEventPub) EventSeatQuery(ctx context.Context, req *v1.EventSeatQueryReq) (res *v1.EventSeatQueryRes, err error) {
|
||||
return logic.EventSeatQuery(ctx, req)
|
||||
}
|
||||
|
||||
// EventList 公开可查询活动列表(N4-A):只返已发布活动;无已发布 → {list:[]}
|
||||
func (c *cEventPub) EventList(ctx context.Context, req *v1.EventPublicListReq) (res *v1.EventPublicListRes, err error) {
|
||||
return logic.EventPublicList(ctx)
|
||||
}
|
||||
@@ -20,7 +20,22 @@ func (c *cMember) MemberCenter(ctx context.Context, req *v1.MemberCenterReq) (re
|
||||
}
|
||||
|
||||
func (c *cMember) MemberOrderCreate(ctx context.Context, req *v1.MemberOrderCreateReq) (res *v1.MemberOrderCreateRes, err error) {
|
||||
return logic.MemberOrderCreate(ctx, req.PlanKey, req.Code)
|
||||
return logic.MemberOrderCreate(ctx, req.PlanKey)
|
||||
}
|
||||
|
||||
// MemberOrderPay 对已建待支付订单构建支付参数(N1 两步式的第二步)
|
||||
func (c *cMember) MemberOrderPay(ctx context.Context, req *v1.MemberOrderPayReq) (res *v1.MemberOrderPayRes, err error) {
|
||||
return logic.MemberOrderPay(ctx, req.OutTradeNo, req.Code)
|
||||
}
|
||||
|
||||
// MemberOrderDetail 订单详情
|
||||
func (c *cMember) MemberOrderDetail(ctx context.Context, req *v1.MemberOrderDetailReq) (res *v1.MemberOrderDetailRes, err error) {
|
||||
return logic.MemberOrderDetail(ctx, req.OutTradeNo)
|
||||
}
|
||||
|
||||
// MemberOrderApplyVoucher 应用/更换/清除订单优惠(应用时占用,D3)
|
||||
func (c *cMember) MemberOrderApplyVoucher(ctx context.Context, req *v1.MemberOrderApplyVoucherReq) (res *v1.MemberOrderApplyVoucherRes, err error) {
|
||||
return logic.MemberOrderApplyVoucher(ctx, req.OutTradeNo, req.PromoCode, req.UserCouponId)
|
||||
}
|
||||
|
||||
func (c *cMember) MemberOrderCheck(ctx context.Context, req *v1.MemberOrderCheckReq) (res *v1.MemberOrderCheckRes, err error) {
|
||||
|
||||
46
internal/controller/note.go
Normal file
46
internal/controller/note.go
Normal file
@@ -0,0 +1,46 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "tool-api/api/user/v1"
|
||||
"tool-api/internal/logic"
|
||||
)
|
||||
|
||||
// cNote 笔记域接口(需用户登录,绑定在 UserAuth 分组下)。
|
||||
//
|
||||
// 注意:所有方法必须是标准签名 func(ctx, req) (res, err)。
|
||||
// 不要写 func(*ghttp.Request) 签名的方法 —— GoFrame 的 group.Bind 会把这类方法
|
||||
// 一并自动注册成路由(见 controller/member.go PayNotify 注释)。
|
||||
type cNote struct{}
|
||||
|
||||
// Note 笔记控制器
|
||||
var Note = &cNote{}
|
||||
|
||||
func (c *cNote) NoteList(ctx context.Context, req *v1.NoteListReq) (res *v1.NoteListRes, err error) {
|
||||
return logic.NoteList(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cNote) NoteDetail(ctx context.Context, req *v1.NoteDetailReq) (res *v1.NoteDetailRes, err error) {
|
||||
return logic.NoteDetail(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cNote) NoteSave(ctx context.Context, req *v1.NoteSaveReq) (res *v1.NoteSaveRes, err error) {
|
||||
return logic.SaveNote(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cNote) NoteDelete(ctx context.Context, req *v1.NoteDeleteReq) (res *v1.NoteDeleteRes, err error) {
|
||||
return logic.DeleteNote(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cNote) NoteRestore(ctx context.Context, req *v1.NoteRestoreReq) (res *v1.NoteRestoreRes, err error) {
|
||||
return logic.RestoreNote(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cNote) NoteRemindCancel(ctx context.Context, req *v1.NoteRemindCancelReq) (res *v1.NoteRemindCancelRes, err error) {
|
||||
return logic.CancelRemind(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cNote) NoteSubscribeReport(ctx context.Context, req *v1.NoteSubscribeReportReq) (res *v1.NoteSubscribeReportRes, err error) {
|
||||
return logic.ReportSubscribe(ctx, req)
|
||||
}
|
||||
55
internal/controller/promo.go
Normal file
55
internal/controller/promo.go
Normal file
@@ -0,0 +1,55 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
adminv1 "tool-api/api/admin/v1"
|
||||
userv1 "tool-api/api/user/v1"
|
||||
"tool-api/internal/logic"
|
||||
)
|
||||
|
||||
// ============================================================================
|
||||
// 优惠码控制器
|
||||
//
|
||||
// 拆成两个对象分别挂到 UserAuth / AdminAuth 两组:
|
||||
// - Promo 用户端(P1 /promo/validate)
|
||||
// - AdminPromo 管理端(A1–A5)
|
||||
//
|
||||
// ⚠️ 不能把同一个对象同时 Bind 到两组:group.Bind 会把该对象的**全部**方法都注册到该组,
|
||||
// 导致管理端方法暴露在用户组(或反之)。
|
||||
// ============================================================================
|
||||
|
||||
// cPromo 用户端优惠码接口(需用户登录)
|
||||
type cPromo struct{}
|
||||
|
||||
// cAdminPromo 管理端优惠码接口(需管理员登录)
|
||||
type cAdminPromo struct{}
|
||||
|
||||
var (
|
||||
Promo = &cPromo{}
|
||||
AdminPromo = &cAdminPromo{}
|
||||
)
|
||||
|
||||
func (c *cPromo) PromoValidate(ctx context.Context, req *userv1.PromoValidateReq) (res *userv1.PromoValidateRes, err error) {
|
||||
return logic.PromoValidate(ctx, req.Code, req.OrderType, req.TargetKey)
|
||||
}
|
||||
|
||||
func (c *cAdminPromo) PromoList(ctx context.Context, req *adminv1.PromoListReq) (res *adminv1.PromoListRes, err error) {
|
||||
return logic.AdminPromoList(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cAdminPromo) PromoSave(ctx context.Context, req *adminv1.PromoSaveReq) (res *adminv1.PromoSaveRes, err error) {
|
||||
return logic.AdminPromoSave(ctx, req)
|
||||
}
|
||||
|
||||
func (c *cAdminPromo) PromoToggle(ctx context.Context, req *adminv1.PromoToggleReq) (res *adminv1.PromoToggleRes, err error) {
|
||||
return logic.AdminPromoToggle(ctx, req.Id, req.Status)
|
||||
}
|
||||
|
||||
func (c *cAdminPromo) PromoDelete(ctx context.Context, req *adminv1.PromoDeleteReq) (res *adminv1.PromoDeleteRes, err error) {
|
||||
return logic.AdminPromoDelete(ctx, req.Id)
|
||||
}
|
||||
|
||||
func (c *cAdminPromo) PromoUsages(ctx context.Context, req *adminv1.PromoUsagesReq) (res *adminv1.PromoUsagesRes, err error) {
|
||||
return logic.AdminPromoUsages(ctx, req)
|
||||
}
|
||||
@@ -30,5 +30,10 @@ func (c *cQuota) QuotaPacks(ctx context.Context, req *v1.QuotaPacksReq) (res *v1
|
||||
}
|
||||
|
||||
func (c *cQuota) QuotaOrderCreate(ctx context.Context, req *v1.QuotaOrderCreateReq) (res *v1.QuotaOrderCreateRes, err error) {
|
||||
return logic.QuotaOrderCreate(ctx, req.PackKey, req.ToolKey, req.Code)
|
||||
return logic.QuotaOrderCreate(ctx, req.PackKey, req.ToolKey)
|
||||
}
|
||||
|
||||
// QuotaOrderPay 对已建次数包待支付订单构建支付参数(与会员同构)
|
||||
func (c *cQuota) QuotaOrderPay(ctx context.Context, req *v1.QuotaOrderPayReq) (res *v1.QuotaOrderPayRes, err error) {
|
||||
return logic.QuotaOrderPay(ctx, req.OutTradeNo, req.Code)
|
||||
}
|
||||
|
||||
@@ -42,6 +42,11 @@ func (c *cUserAuth) ProfileUpdate(ctx context.Context, req *v1.ProfileUpdateReq)
|
||||
return logic.ProfileUpdate(ctx, req.Nickname, req.AvatarUrl)
|
||||
}
|
||||
|
||||
// AvatarUpload 用户头像上传(multipart/form-data,字段名 file;N3)
|
||||
func (c *cUserAuth) AvatarUpload(ctx context.Context, req *v1.AvatarUploadReq) (res *v1.AvatarUploadRes, err error) {
|
||||
return logic.AvatarUploadFromRequest(ctx)
|
||||
}
|
||||
|
||||
func (c *cUserAuth) Level(ctx context.Context, req *v1.LevelReq) (res *v1.LevelRes, err error) {
|
||||
return logic.UserLevel(ctx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user