小程序一些功能更新
This commit is contained in:
@@ -368,6 +368,8 @@ type FeedbackItem struct {
|
||||
Content string `json:"content"`
|
||||
Contact string `json:"contact"`
|
||||
Status int `json:"status"`
|
||||
Reply string `json:"reply"` // 官方回复内容(空=未回复)
|
||||
ReplyAt string `json:"reply_at"` // 最近回复时间
|
||||
CreatedAt string `json:"created_at"`
|
||||
}
|
||||
|
||||
@@ -382,9 +384,11 @@ type FeedbackListRes struct {
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// FeedbackHandleReq 反馈处理:标记已处理,可同时携带官方回复(回复后用户端红点提醒)。
|
||||
type FeedbackHandleReq struct {
|
||||
g.Meta `path:"/feedback/handle" method:"post" tags:"admin" summary:"标记已处理"`
|
||||
Id int64 `v:"required" json:"id"`
|
||||
g.Meta `path:"/feedback/handle" method:"post" tags:"admin" summary:"反馈处理(标记已处理,可回复)"`
|
||||
Id int64 `v:"required" json:"id"`
|
||||
Reply string `json:"reply"`
|
||||
}
|
||||
type FeedbackHandleRes struct{}
|
||||
|
||||
|
||||
@@ -37,6 +37,12 @@ type OrderItem struct {
|
||||
Status int `json:"status"` // 0待支付 1已发货 2已退款 3已关闭
|
||||
StatusText string `json:"status_text"`
|
||||
ServiceRevoked int `json:"service_revoked"` // 退款时是否已回收所购服务:0未回收 1已回收
|
||||
// ===== 渠道与退款 =====
|
||||
PayChannel string `json:"pay_channel"` // wxpay 微信虚拟支付 / apple iOS(App Store IAP,无法 API 退款)
|
||||
RefundStatus int `json:"refund_status"` // 0未退款 1退款中 2退款成功 3退款失败
|
||||
RefundNo string `json:"refund_no"` // 商户退款单号
|
||||
RefundAmount int64 `json:"refund_amount"` // 退款金额(分)
|
||||
RefundReason string `json:"refund_reason"` // 退款原因
|
||||
// ===== 时间 =====
|
||||
CreatedAt string `json:"created_at"` // 创建时间
|
||||
PaidAt string `json:"paid_at"` // 支付时间(发货时写入)
|
||||
@@ -60,20 +66,27 @@ type OrderListRes struct {
|
||||
|
||||
// OrderRefundReq 订单退款。
|
||||
//
|
||||
// RevokeService=true → 退款同时回收所购服务(会员套餐回收有效期;次数包扣回付费次数);
|
||||
// false → 仅改状态为「已退款」,用户权益保留。
|
||||
// 仅「已发货(1)」订单可退款;已是「已退款(2)」的订单幂等返回成功但不重复回收权益。
|
||||
// RevokeService=true → 退款同时回收所购服务(API 路径下意图落 refund_revoke,
|
||||
// 平台确认成功后执行回收;手工路径当场回收)。
|
||||
// Reason 退款原因:手工退款(Manual=true / apple 渠道 / 平台未配置)必填;
|
||||
// Manual=true 不调平台接口,仅登记(iOS 订单 / 已在 MP 后台手工退的场景)。
|
||||
// 仅「已发货(1)」订单可发起;退款中幂等返回;退款失败(3)可重新发起。
|
||||
type OrderRefundReq struct {
|
||||
g.Meta `path:"/order/refund" method:"post" tags:"admin" summary:"订单退款(可选回收所购服务)"`
|
||||
OutTradeNo string `v:"required#订单号不能为空" json:"outTradeNo"`
|
||||
RevokeService bool `json:"revokeService"`
|
||||
Reason string `json:"reason"`
|
||||
Manual bool `json:"manual"`
|
||||
}
|
||||
type OrderRefundRes struct {
|
||||
OutTradeNo string `json:"out_trade_no"`
|
||||
Status int `json:"status"`
|
||||
StatusText string `json:"status_text"`
|
||||
ServiceRevoked bool `json:"service_revoked"` // 该订单当前是否已回收所购服务
|
||||
Revoked bool `json:"revoked"` // 本次调用是否实际执行了退款动作
|
||||
Revoked bool `json:"revoked"` // 本次调用是否实际执行了退款动作(手工路径)
|
||||
Refunding bool `json:"refunding"` // 退款中:已发起平台退款,等待确认
|
||||
RefundStatus int `json:"refund_status"` // 0未退款 1退款中 2退款成功 3退款失败
|
||||
RefundNo string `json:"refund_no"` // 商户退款单号(API 路径返回)
|
||||
AlreadyRefunded bool `json:"already_refunded"` // 幂等命中:调用前已是已退款
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
@@ -60,6 +60,10 @@ type MemberOrderCreateReq struct {
|
||||
g.Meta `path:"/member/order" method:"post" tags:"member" summary:"创建会员订单(待支付,不返回支付参数)"`
|
||||
PlanKey string `v:"required#请选择会员套餐" json:"plan_key"`
|
||||
Code string `json:"code"`
|
||||
// Platform 客户端平台(uni.getSystemInfoSync().platform:ios/android/devtools/h5)。
|
||||
// 缺省时服务端按 User-Agent 兜底推断;ios → pay_channel=apple(iOS 走 App Store IAP,
|
||||
// 开发者无法主动退款,后台据此禁用 API 退款)。
|
||||
Platform string `json:"platform"`
|
||||
}
|
||||
|
||||
// MemberOrderCreateRes 创建会员订单响应(只建单,**不返回支付参数**;N1-1/2)。
|
||||
|
||||
@@ -43,11 +43,12 @@ type NoteDetailRes struct {
|
||||
RemindStatus int `json:"remind_status"`
|
||||
}
|
||||
|
||||
// NoteSaveReq id=0 表示新建;新建计入额度、编辑不计入
|
||||
// NoteSaveReq id=0 表示新建;新建计入额度、编辑不计入。
|
||||
// Title 允许留空:留空时后端自动命名为「未命名笔记 YYYY-MM-DD hh:mm:ss」。
|
||||
type NoteSaveReq struct {
|
||||
g.Meta `path:"/note/save" method:"post" tags:"note" summary:"新建/编辑笔记"`
|
||||
Id int64 `json:"id"`
|
||||
Title string `v:"required|length:1,128#标题不能为空|标题最长 128 字" json:"title"`
|
||||
Title string `v:"length:0,128#标题最长 128 字" json:"title"`
|
||||
Content string `v:"length:0,20000#正文过长" json:"content"`
|
||||
Tags []string `json:"tags"`
|
||||
IsPinned bool `json:"is_pinned"`
|
||||
|
||||
@@ -96,6 +96,8 @@ type QuotaOrderCreateReq struct {
|
||||
PackKey string `v:"required#请选择次数包" json:"pack_key"`
|
||||
ToolKey string `v:"required#请选择要购买的次数包工具" json:"tool_key"`
|
||||
Code string `json:"code"`
|
||||
// Platform 客户端平台(同 MemberOrderCreateReq.Platform;ios → pay_channel=apple)
|
||||
Platform string `json:"platform"`
|
||||
}
|
||||
|
||||
// QuotaOrderCreateRes 创建次数包订单响应(只建单,不返回支付参数)。
|
||||
|
||||
@@ -159,3 +159,30 @@ type FeedbackSubmitReq struct {
|
||||
Contact string `json:"contact"`
|
||||
}
|
||||
type FeedbackSubmitRes struct{}
|
||||
|
||||
// FeedbackMineItem 我的反馈条目(含官方回复)
|
||||
type FeedbackMineItem struct {
|
||||
Id int64 `json:"id"`
|
||||
Content string `json:"content"`
|
||||
Status int `json:"status"` // 0待处理 1已处理
|
||||
ReplyContent string `json:"reply_content"` // 官方回复(空=未回复)
|
||||
ReplyAt string `json:"reply_at"` // 最近回复时间
|
||||
ReplyRead int `json:"reply_read"` // 0=新回复未读(列表内显示「新回复」标签)
|
||||
CreatedAt string `json:"created_at"`
|
||||
}
|
||||
|
||||
// FeedbackMineReq 我的反馈(最近 N 条 + 未读回复数;**不会**自动置已读,已读走 /feedback/read)
|
||||
type FeedbackMineReq struct {
|
||||
g.Meta `path:"/feedback/mine" method:"get" tags:"user" summary:"我的反馈(含官方回复与未读数)"`
|
||||
Limit int `json:"limit"`
|
||||
}
|
||||
type FeedbackMineRes struct {
|
||||
List []FeedbackMineItem `json:"list"`
|
||||
Unread int `json:"unread"` // 有官方回复且未读的条数(红点)
|
||||
}
|
||||
|
||||
// FeedbackReadReq 标记我的全部反馈回复为已读(清红点)
|
||||
type FeedbackReadReq struct {
|
||||
g.Meta `path:"/feedback/read" method:"post" tags:"user" summary:"反馈回复标记已读"`
|
||||
}
|
||||
type FeedbackReadRes struct{}
|
||||
|
||||
Reference in New Issue
Block a user