feat(收口): 补齐 8 月迭代缺口并同步 Spec 与证据链
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
- 新增六对成对迁移 000232–000237:H5 弹窗类型、退款结算标识与申请人备注、优先轮询事实字段与两个新终态、通道阈值命中留痕、手机号最近解绑人、提现资格校验留痕 - 退款:原因必填与申请人备注、来源支付与渠道流水冻结、线下处理流水号补录审计、按订单查询可选退款方式、企微审批材料补齐且新增字段缺失映射即明确失败 - 优先轮询:人工关闭、有效期到期独立周期任务、失败与过期人工重触发、事实字段与异常重试查询、资产解析端点只读投影 - 通道阈值:命中事实同事务留痕与命中记录查询;员工账单:列表筛选与详情投影;商户池:列表投影与统计周期语义;H5:弹窗类型与类别排序 - 手机号:有效关联数量与最近解绑人、短信验证码失败次数限制;导出:佣金明细十五列与报表序号列 - 时间筛选:三处新增筛选纳入统一严格解析契约,员工账单产生时间参数改名 - 同步 12 份主 Spec 需求、两端点与异步任务证据链,门禁 context-health 与 OpenSpec 校验通过
This commit is contained in:
@@ -5,10 +5,42 @@ import (
|
||||
|
||||
"github.com/break/junhong_cmp_fiber/internal/handler/admin"
|
||||
"github.com/break/junhong_cmp_fiber/internal/model/dto"
|
||||
"github.com/break/junhong_cmp_fiber/pkg/constants"
|
||||
"github.com/break/junhong_cmp_fiber/pkg/errors"
|
||||
"github.com/break/junhong_cmp_fiber/pkg/middleware"
|
||||
"github.com/break/junhong_cmp_fiber/pkg/openapi"
|
||||
)
|
||||
|
||||
func registerCarrierRoutes(router fiber.Router, handler *admin.CarrierHandler, doc *openapi.Generator, basePath string) {
|
||||
// 通道阈值命中记录使用顶层路径,避免与 /carriers/:id 的参数路由冲突;
|
||||
// 门禁沿用超管/平台路由组级 gate 先例(代理、企业与其他账号统一 403),
|
||||
// 并挂在功能路径组上:Fiber 的组中间件按路径前缀生效。
|
||||
hitGate := func(c *fiber.Ctx) error {
|
||||
userType := middleware.GetUserTypeFromContext(c.UserContext())
|
||||
if userType != constants.UserTypeSuperAdmin && userType != constants.UserTypePlatform {
|
||||
return errors.New(errors.CodeForbidden, constants.PlatformManagementForbiddenMessage)
|
||||
}
|
||||
return c.Next()
|
||||
}
|
||||
|
||||
hits := router.Group("/carrier-traffic-threshold-hits", hitGate)
|
||||
hitsPath := basePath + "/carrier-traffic-threshold-hits"
|
||||
|
||||
Register(hits, doc, hitsPath, "GET", "", handler.ListThresholdHits, RouteSpec{
|
||||
Summary: "查询通道阈值命中记录",
|
||||
Description: "返回达量停机时冻结的数字证据:命中时该卡当前周期的累计流量读数、本次判定实际生效的阈值与单位、" +
|
||||
"计费周期起点、判定时间与触发来源,以及周期恢复的解锁时间与复机结果;" +
|
||||
"阈值与读数为命中时值,之后修改通道阈值不改写历史命中;" +
|
||||
"本次上线前的历史行读数为空按「无」返回,判定时间取既有创建时间,不阻断查询。" +
|
||||
"支持按运营商通道、卡、计费周期起点精确匹配与判定时间闭区间(start_time/end_time,带时区 RFC3339 秒级)筛选," +
|
||||
"按判定时间倒序分页;仅超级管理员与平台账号可访问,并按卡数据范围过滤,越权与不存在不可区分," +
|
||||
"不返回凭证或上游响应原文",
|
||||
Tags: []string{"运营商管理"},
|
||||
Input: new(dto.CarrierThresholdHitListRequest),
|
||||
Output: new(dto.CarrierThresholdHitPageResult),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
carriers := router.Group("/carriers")
|
||||
groupPath := basePath + "/carriers"
|
||||
|
||||
|
||||
@@ -72,29 +72,38 @@ func registerEmployeeCollectionBillRoutes(router fiber.Router, handler *admin.Em
|
||||
adminOnly := requireEmployeeCollectionConfigAccess
|
||||
|
||||
Register(group, doc, billPath, "GET", "", handler.ListBills, RouteSpec{
|
||||
Summary: "查询员工代收款账单",
|
||||
Description: "欠款人仅返回本人欠款账单,超级管理员返回全部;支持来源、状态、时间、欠款人、客户筛选与分页。",
|
||||
Tags: []string{"员工代收款"},
|
||||
Input: new(dto.EmployeeCollectionBillListRequest),
|
||||
Output: new(dto.EmployeeCollectionBillListResponse),
|
||||
Auth: true,
|
||||
Summary: "查询员工代收款账单",
|
||||
Description: "欠款人仅返回本人欠款账单,超级管理员返回全部;支持账单编号(即账单记录标识)、来源、状态、" +
|
||||
"欠款人姓名或账号(子串模糊)、客户名称(子串模糊)、产生时间与核销通过时间筛选与分页。" +
|
||||
"产生时间参数为 `start_time`/`end_time`,核销通过时间为 `decided_start_time`/`decided_end_time`," +
|
||||
"两类均为带显式时区的 RFC3339 秒级闭区间(含两端);旧参数名 `created_from`/`created_to` 与旧日期格式一律以参数非法拒绝。" +
|
||||
"核销通过时间取该账单已通过分摊关联的申请表审批终态时间。" +
|
||||
"响应并列返回未核销金额(应收减已核销)与剩余可核销金额(应收减已核销减审批中预占),已关闭账单两者为零。",
|
||||
Tags: []string{"员工代收款"},
|
||||
Input: new(dto.EmployeeCollectionBillListRequest),
|
||||
Output: new(dto.EmployeeCollectionBillListResponse),
|
||||
Auth: true,
|
||||
})
|
||||
// 统计必须先于 /:id 注册,保证路径按字面量优先匹配。
|
||||
Register(group, doc, billPath, "GET", "/statistics", handler.StatisticsBills, RouteSpec{
|
||||
Summary: "查询员工代收款账单统计",
|
||||
Description: "与账单列表使用相同筛选条件与可见性范围,返回应收、已核销、未核销金额合计与待处理账单数;不接受分页参数。",
|
||||
Tags: []string{"员工代收款"},
|
||||
Input: new(dto.EmployeeCollectionBillStatisticsRequest),
|
||||
Output: new(dto.EmployeeCollectionBillStatisticsResponse),
|
||||
Auth: true,
|
||||
Summary: "查询员工代收款账单统计",
|
||||
Description: "与账单列表使用相同筛选条件(含核销通过时间与模糊筛选)与可见性范围," +
|
||||
"返回应收、已核销、未核销金额合计与待处理账单数;不接受分页参数。",
|
||||
Tags: []string{"员工代收款"},
|
||||
Input: new(dto.EmployeeCollectionBillStatisticsRequest),
|
||||
Output: new(dto.EmployeeCollectionBillStatisticsResponse),
|
||||
Auth: true,
|
||||
})
|
||||
Register(group, doc, billPath, "GET", "/:id", handler.GetBill, RouteSpec{
|
||||
Summary: "查询员工代收款账单详情",
|
||||
Description: "返回账单、来源退款冲销、分摊、核销申请与企业微信审批历史;附件只返回对象键引用。无权限与不存在返回同一错误。",
|
||||
Tags: []string{"员工代收款"},
|
||||
Input: new(dto.IDReq),
|
||||
Output: new(dto.EmployeeCollectionBillDetailResponse),
|
||||
Auth: true,
|
||||
Summary: "查询员工代收款账单详情",
|
||||
Description: "返回账单、来源退款冲销、分摊、核销申请与企业微信审批历史,并返回操作日志安全投影" +
|
||||
"(动作、操作账号名称、时间与前后值摘要,不含凭证内容与完整收款原文)与来源订单快照" +
|
||||
"(来源单号、业务类型、来源金额、来源创建时间、资产标识;来源不可读时字段为空值且不阻断详情)。" +
|
||||
"附件只返回对象键引用。无权限与不存在返回同一错误。",
|
||||
Tags: []string{"员工代收款"},
|
||||
Input: new(dto.IDReq),
|
||||
Output: new(dto.EmployeeCollectionBillDetailResponse),
|
||||
Auth: true,
|
||||
})
|
||||
Register(group, doc, billPath, "POST", "/:id/close", adminOnly(handler.CloseBill), RouteSpec{
|
||||
Summary: "关闭员工代收款账单",
|
||||
|
||||
@@ -25,7 +25,10 @@ func registerH5PopupConfigurationRoutes(router fiber.Router, handler *admin.H5Po
|
||||
|
||||
Register(configurations, doc, groupPath, "POST", "", handler.CreateH5PopupConfiguration, RouteSpec{
|
||||
Summary: "创建运营弹窗配置",
|
||||
Description: "创建全局运营弹窗配置,初始版本为 1。范围同一维度多选取任一命中,未配置范围即全量;" +
|
||||
Description: "创建全局运营弹窗配置,初始版本为 1。弹窗类型 `popup_type` 必填" +
|
||||
"(promotion:套餐政策推广, announcement:通用公告),取值域外或缺失一律以参数非法拒绝;" +
|
||||
"未传优先级时按类型的缺省优先级取值。候选排序先按类型类别(风险换卡提醒 > 套餐政策推广 > 通用公告)," +
|
||||
"再按显式优先级降序、同优先级取最近更新时间最新。范围同一维度多选取任一命中,未配置范围即全量;" +
|
||||
"页面必选;受控动作只允许套餐购买或资产钱包充值,不接受 URL、前端路由或任意动作;结束时间不得早于开始时间。",
|
||||
Tags: []string{"H5 运营弹窗配置"},
|
||||
Auth: true,
|
||||
@@ -44,7 +47,8 @@ func registerH5PopupConfigurationRoutes(router fiber.Router, handler *admin.H5Po
|
||||
Register(configurations, doc, groupPath, "PUT", "/:id", handler.UpdateH5PopupConfiguration, RouteSpec{
|
||||
Summary: "更新运营弹窗配置",
|
||||
Description: "更新运营弹窗配置并递增版本;旧版本已投放通知的内容与快照不被改写," +
|
||||
"新版本可向原命中客户按频率重新投放一次。",
|
||||
"新版本可向原命中客户按频率重新投放一次。`popup_type` 传入时必须落在" +
|
||||
"(promotion:套餐政策推广, announcement:通用公告)取值域内,否则以参数非法拒绝;不传保持原值。",
|
||||
Tags: []string{"H5 运营弹窗配置"},
|
||||
Auth: true,
|
||||
Input: new(dto.UpdateH5PopupConfigurationParams),
|
||||
|
||||
@@ -43,8 +43,8 @@ func registerPaymentMerchantRoutes(router fiber.Router, handler *admin.PaymentMe
|
||||
Register(group, doc, basePath, "GET", "/payment-merchants/:id", wrap(handler.GetMerchant), RouteSpec{Summary: "查询支付商户详情", Description: "仅超级管理员和平台用户可访问。\n\n" + paymentMerchantCredentialDoc, Tags: []string{"支付商户管理"}, Input: new(dto.IDReq), Output: new(dto.PaymentMerchantResponse), Auth: true})
|
||||
Register(group, doc, basePath, "PUT", "/payment-merchants/:id", wrap(handler.UpdateMerchant), RouteSpec{Summary: "更新支付商户", Description: "仅超级管理员和平台用户可访问。\n\n" + paymentMerchantCredentialDoc, Tags: []string{"支付商户管理"}, Input: new(dto.IDReq), Body: new(dto.PaymentMerchantUpdateRequest), Output: new(dto.PaymentMerchantResponse), Auth: true})
|
||||
Register(group, doc, basePath, "DELETE", "/payment-merchants/:id", wrap(handler.DeleteMerchant), RouteSpec{Summary: "删除支付商户", Description: "仅超级管理员和平台用户可访问。", Tags: []string{"支付商户管理"}, Input: new(dto.IDReq), Body: new(dto.PaymentMerchantDeleteRequest), Output: nil, Auth: true})
|
||||
Register(group, doc, basePath, "GET", "/payment-merchant-pools", wrap(handler.ListPools), RouteSpec{Summary: "查询商户池", Description: "仅超级管理员和平台用户可访问。支持分页,返回当前页商户池及其有序成员。", Tags: []string{"商户池管理"}, Input: new(dto.PaymentMerchantPoolListRequest), Output: new(dto.PaymentMerchantPoolResponse), Auth: true})
|
||||
Register(group, doc, basePath, "GET", "/payment-merchant-pools/:id", wrap(handler.GetPool), RouteSpec{Summary: "查询商户池详情", Description: "仅超级管理员和平台用户可访问。", Tags: []string{"商户池管理"}, Input: new(dto.IDReq), Output: new(dto.PaymentMerchantPoolResponse), Auth: true})
|
||||
Register(group, doc, basePath, "GET", "/payment-merchant-pools", wrap(handler.ListPools), RouteSpec{Summary: "查询商户池", Description: "仅超级管理员和平台用户可访问。支持分页,返回当前页商户池及其有序成员,并附带启用成员数量、成员总数量、当前命中商户与最近配置更新时间;当前命中商户按支付创建的同一规则只读计算,无可用成员时为空。", Tags: []string{"商户池管理"}, Input: new(dto.PaymentMerchantPoolListRequest), Output: new(dto.PaymentMerchantPoolResponse), Auth: true})
|
||||
Register(group, doc, basePath, "GET", "/payment-merchant-pools/:id", wrap(handler.GetPool), RouteSpec{Summary: "查询商户池详情", Description: "仅超级管理员和平台用户可访问。返回启用成员数量、成员总数量、当前命中商户与最近配置更新时间;当前命中商户只读计算,不产生支付单也不推进统计世代。", Tags: []string{"商户池管理"}, Input: new(dto.IDReq), Output: new(dto.PaymentMerchantPoolResponse), Auth: true})
|
||||
Register(group, doc, basePath, "POST", "/payment-merchant-pools", wrap(handler.CreatePool), RouteSpec{Summary: "创建商户池", Description: "仅超级管理员和平台用户可访问。", Tags: []string{"商户池管理"}, Input: new(dto.PaymentMerchantPoolRequest), Output: new(dto.PaymentMerchantPoolResponse), Auth: true})
|
||||
Register(group, doc, basePath, "PUT", "/payment-merchant-pools/:id", wrap(handler.UpdatePool), RouteSpec{Summary: "更新商户池", Description: "仅超级管理员和平台用户可访问。", Tags: []string{"商户池管理"}, Input: new(dto.IDReq), Body: new(dto.PaymentMerchantPoolRequest), Output: new(dto.PaymentMerchantPoolResponse), Auth: true})
|
||||
Register(group, doc, basePath, "POST", "/payment-merchant-pools/:id/enable", wrap(handler.EnablePool), RouteSpec{Summary: "启用商户池", Description: "仅超级管理员和平台用户可访问。", Tags: []string{"商户池管理"}, Input: new(dto.IDReq), Output: new(dto.PaymentMerchantPoolResponse), Auth: true})
|
||||
|
||||
@@ -53,7 +53,7 @@ func registerPhoneAssetAssociationRoutes(router fiber.Router, handler *admin.Pho
|
||||
|
||||
Register(group, doc, groupPath, "GET", "", handler.List, RouteSpec{
|
||||
Summary: "查询手机号资产关联列表",
|
||||
Description: constants.PhoneAssetAssociationAccessDescription + "按资产数据范围过滤后分页返回资产(类型/ID/标识)、完整手机号、建立时间、建立来源与状态;支持资产标识、手机号、关联状态与创建时间区间筛选。越权与不存在不形成可枚举差异。",
|
||||
Description: constants.PhoneAssetAssociationAccessDescription + "按资产数据范围过滤后分页返回资产(类型/ID/标识)、完整手机号、建立时间、建立来源与状态;支持资产标识、手机号、关联状态与创建时间区间筛选。越权与不存在不形成可枚举差异。列表按当页涉及的手机号集合一次批量聚合返回该手机号当前有效关联数量(只统计有效关系、卡与设备各计一项,与「最多关联十项」上限判定同一口径);已失效关系随既有失效方式与原因一并返回最近解绑人的账号名称快照、账号标识与解绑时间,关系仍有效时这三项为空,不以创建人或最后更新人填充。以上投影字段只读,不改变既有解绑、换绑与上限判定规则。",
|
||||
Tags: []string{"手机号资产关联"},
|
||||
Input: new(dto.ListPhoneAssetAssociationRequest),
|
||||
Output: new(dto.PhoneAssetAssociationPageResult),
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"github.com/break/junhong_cmp_fiber/pkg/openapi"
|
||||
)
|
||||
|
||||
// registerPollingPriorityRoutes 注册卡轮询优先队列的人工入队与只读查询路由。
|
||||
// 仅挂在既有后台认证中间件组下,不新增认证边界。
|
||||
// registerPollingPriorityRoutes 注册卡轮询优先队列的人工入口(入队、关闭、重触发)与只读查询路由。
|
||||
// 仅挂在既有后台认证中间件组下,不新增认证边界;权限在用例内按账号与数据范围判定。
|
||||
func registerPollingPriorityRoutes(router fiber.Router, handler *admin.PriorityPollingHandler, doc *openapi.Generator, basePath string) {
|
||||
group := router.Group("/polling-priority-items")
|
||||
groupPath := basePath + "/polling-priority-items"
|
||||
@@ -18,6 +18,7 @@ func registerPollingPriorityRoutes(router fiber.Router, handler *admin.PriorityP
|
||||
Summary: "人工优先入队",
|
||||
Description: "为该卡的全部纳入轮询任务类型(实名/流量/套餐/卡状态)建立或合并优先轮询项。" +
|
||||
"同一卡同一任务类型至多一条活动项,重复入队合并触发次数与来源集合;原因必填。" +
|
||||
"入队时冻结资产类型与资产 ID、设备号、店铺与代理归属,并以入队时间作为有效期起算时间。" +
|
||||
"不受既有人工触发的每日次数上限与 24 小时去重约束;不修改调度优先级,也不绕过既有并发上限。",
|
||||
Tags: []string{"轮询管理-优先队列"},
|
||||
Input: new(dto.EnqueuePriorityPollingRequest),
|
||||
@@ -27,17 +28,48 @@ func registerPollingPriorityRoutes(router fiber.Router, handler *admin.PriorityP
|
||||
// 字面量路径必须先于 /:id 注册,保证路径按字面量优先匹配。
|
||||
Register(group, doc, groupPath, "GET", "", handler.ListPriorityItems, RouteSpec{
|
||||
Summary: "查询优先轮询项列表",
|
||||
Description: "分页查询卡轮询优先项,按创建时间倒序,支持卡、任务类型、状态与触发类型筛选。" +
|
||||
"数据范围按卡所属店铺快照下推:代理只能看到自身及下级店铺资产,平台卡不可见。",
|
||||
Description: "分页查询卡轮询优先项,按创建时间倒序,支持卡、任务类型、状态、触发类型、" +
|
||||
"入队时间范围(start_time/end_time,带时区的 RFC3339 秒级时间,闭区间含两端)与「异常与重试」视图筛选" +
|
||||
"(失败终态、已过期、尝试次数达到上限或存在失败原因)。" +
|
||||
"返回资产标识、设备号、店铺与代理归属、触发与尝试次数、最大尝试次数、最近与下一次执行时间、" +
|
||||
"执行起止与耗时、入队与出队时间、执行结果与失败原因、集成交互日志标识。" +
|
||||
"不提供优先级分级;查询不触发关闭或重触发。数据范围按卡所属店铺快照下推:" +
|
||||
"代理只能看到自身及下级店铺资产,平台卡不可见。",
|
||||
Tags: []string{"轮询管理-优先队列"},
|
||||
Input: new(dto.PriorityPollingItemListRequest),
|
||||
Output: new(dto.PriorityPollingItemListResponse),
|
||||
Auth: true,
|
||||
})
|
||||
// 参数路由的子路径必须先于 /:id 注册,避免同段匹配歧义。
|
||||
Register(group, doc, groupPath, "POST", "/:id/close", handler.Close, RouteSpec{
|
||||
Summary: "人工关闭优先轮询项",
|
||||
Description: "仅超级管理员与平台账号。仅允许关闭待执行或执行中的优先项:原因必填并写入审计(操作者、时间与原因)," +
|
||||
"未完成项转已关闭终态并出队,不再发起任何上游调用,既有执行结果与失败原因一律保留。" +
|
||||
"越权与不存在返回同一错误。",
|
||||
Tags: []string{"轮询管理-优先队列"},
|
||||
Input: new(dto.IDReq),
|
||||
Body: new(dto.ClosePriorityPollingItemRequest),
|
||||
Output: new(dto.ClosePriorityPollingItemResponse),
|
||||
Auth: true,
|
||||
})
|
||||
Register(group, doc, groupPath, "POST", "/:id/retrigger", handler.Retrigger, RouteSpec{
|
||||
Summary: "人工重触发优先轮询项",
|
||||
Description: "权限与人工入队一致(超级管理员、平台账号与数据范围内的代理账号),仅允许对失败出队或已过期的项重触发。" +
|
||||
"复用人工入队入口为该卡**该任务类型**建立新的活动项(尝试次数从零开始),原因必填并与操作者一同写入审计。" +
|
||||
"不绕过活动项唯一键代表的并发上限、停复机持锁拒绝与任务类型范围;越权与不存在返回同一错误。",
|
||||
Tags: []string{"轮询管理-优先队列"},
|
||||
Input: new(dto.IDReq),
|
||||
Body: new(dto.RetriggerPriorityPollingItemRequest),
|
||||
Output: new(dto.RetriggerPriorityPollingItemResponse),
|
||||
Auth: true,
|
||||
})
|
||||
Register(group, doc, groupPath, "GET", "/:id", handler.GetPriorityItem, RouteSpec{
|
||||
Summary: "查询优先轮询项详情",
|
||||
Description: "查询单条卡轮询优先项。越权与不存在返回同一响应,不产生可枚举差异。" +
|
||||
"不提供优先级分级、有效期与人工重触发入口。",
|
||||
Description: "查询单条卡轮询优先项,字段与列表一致:资产标识、设备号、店铺与代理归属、任务类型、" +
|
||||
"触发类型与来源、触发与尝试次数、最大尝试次数、最近与下一次执行时间、执行起止与耗时、" +
|
||||
"入队与出队时间、执行结果与失败原因、集成交互日志标识,以及只读的有效期起算时间。" +
|
||||
"不提供优先级分级;有效期到期由独立周期任务处理,人工关闭与人工重触发为独立受权限控制的写入口," +
|
||||
"查询不会隐式触发二者。越权与不存在返回同一响应,不产生可枚举差异。",
|
||||
Tags: []string{"轮询管理-优先队列"},
|
||||
Input: new(dto.IDReq),
|
||||
Output: new(dto.PriorityPollingItemResponse),
|
||||
|
||||
@@ -42,6 +42,18 @@ func registerRefundRoutes(router fiber.Router, handler *admin.RefundHandler, doc
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
// 字面量路径必须先于同段参数路由 /:id 注册:Fiber 按注册顺序匹配,若 /:id 在前,
|
||||
// "order-options" 会被当作退款申请 ID 解析而永远命中不到本端点。
|
||||
// 该端点留在 /refunds 组内,以继承既有组级门禁(超管/平台/代理,企业账号拒绝)。
|
||||
Register(refund, doc, groupPath, "GET", "/order-options", handler.OrderOptions, RouteSpec{
|
||||
Summary: "按来源订单查询可选退款方式",
|
||||
Description: "只读查询,不产生任何副作用。复用创建与重提使用的方式判定与原路可退的凭证判定,不新增第二套判定;判定所需事实缺失时返回不可用原因而非报错。查询受订单数据范围约束,越权与订单不存在不可区分。",
|
||||
Tags: []string{"退款管理"},
|
||||
Input: new(dto.RefundOrderOptionsRequest),
|
||||
Output: new(dto.RefundOrderOptionsResponse),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(refund, doc, groupPath, "GET", "/:id", handler.GetByID, RouteSpec{
|
||||
Summary: "退款申请详情",
|
||||
Tags: []string{"退款管理"},
|
||||
@@ -84,10 +96,19 @@ func registerRefundRoutes(router fiber.Router, handler *admin.RefundHandler, doc
|
||||
|
||||
Register(refund, doc, groupPath, "POST", "/:id/resubmit", handler.Resubmit, RouteSpec{
|
||||
Summary: "重新提交退款申请",
|
||||
Description: "仅已拒绝、已退回或原路退款失败且无审批异常的退款申请可重提;重提时实收金额仍由系统重新派生冻结并忽略请求中的 actual_received_amount,每次重提新增一条审批尝试记录并创建新的企业微信审批实例,历史尝试材料与审批结果不被覆盖。",
|
||||
Description: "仅已拒绝、已退回或原路退款失败且无审批异常的退款申请可重提;重提时实收金额仍由系统重新派生冻结并忽略请求中的 actual_received_amount,退款原因去除首尾空白后不得为空,每次重提新增一条审批尝试记录并创建新的企业微信审批实例,历史尝试材料与审批结果不被覆盖。",
|
||||
Tags: []string{"退款管理"},
|
||||
Input: new(dto.ResubmitRefundRequest),
|
||||
Output: nil,
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(refund, doc, groupPath, "POST", "/:id/offline-settlement", handler.RegisterOfflineSettlement, RouteSpec{
|
||||
Summary: "登记线下退款处理流水号",
|
||||
Description: "仅客户收款信息退款(线下到账方式)可登记;重复提交即更正,历史值由审计留存。登记只写线下处理流水号与登记人、登记时间,不改变退款状态、实收金额、套餐失效与佣金回溯规则。",
|
||||
Tags: []string{"退款管理"},
|
||||
Input: new(dto.OfflineSettlementRequest),
|
||||
Output: new(dto.RefundResponse),
|
||||
Auth: true,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ func registerShopRoutes(router fiber.Router, handler *admin.ShopHandler, doc *op
|
||||
|
||||
Register(shops, doc, groupPath, "GET", "", coreShopManagement(handler.List), RouteSpec{
|
||||
Summary: "店铺列表",
|
||||
Description: constants.ShopManagementAccessDescription + constants.ShopListPaginationDescription,
|
||||
Description: constants.ShopManagementAccessDescription + constants.ShopListPaginationDescription + shopDownstreamAgentDescription,
|
||||
Tags: []string{"店铺管理"},
|
||||
Input: new(dto.ShopListRequest),
|
||||
Output: new(dto.ShopPageResult),
|
||||
@@ -84,7 +84,7 @@ func registerShopDetailRoute(router fiber.Router, handler *admin.ShopHandler, do
|
||||
groupPath := basePath + "/shops"
|
||||
Register(shops, doc, groupPath, "GET", "/:id", coreShopManagement(handler.Detail), RouteSpec{
|
||||
Summary: "查询店铺详情",
|
||||
Description: constants.ShopManagementAccessDescription + " 返回与店铺列表一致的业务员归属摘要。",
|
||||
Description: constants.ShopManagementAccessDescription + " 返回与店铺列表一致的业务员归属摘要。" + shopDownstreamAgentDescription,
|
||||
Tags: []string{"店铺管理"},
|
||||
Input: new(dto.IDReq),
|
||||
Output: new(dto.ShopResponse),
|
||||
@@ -92,6 +92,9 @@ func registerShopDetailRoute(router fiber.Router, handler *admin.ShopHandler, do
|
||||
})
|
||||
}
|
||||
|
||||
// shopDownstreamAgentDescription 说明店铺列表与详情返回的直接下级代理数量口径。
|
||||
const shopDownstreamAgentDescription = " 同时返回直接下级代理数量(未删除且上级店铺标识等于该店铺的店铺数),按页批量聚合、受店铺数据范围约束,无下级返回 0;该字段只读,不影响上下级关系、佣金关系与通知范围。"
|
||||
|
||||
func coreShopManagement(handler fiber.Handler) fiber.Handler {
|
||||
return func(c *fiber.Ctx) error {
|
||||
if middleware.GetUserTypeFromContext(c.UserContext()) == constants.UserTypeEnterprise {
|
||||
|
||||
Reference in New Issue
Block a user