微健 AI
将以下提示词粘贴到你的 AI 对话框中:
请根据 https://skillhub.cn/install/skillhub.md,安装 @user_68e12bad/wefit,把微健AI助手添加到你的 AI 助手中。
技能介绍
它在解决什么问题
健身房运营数据的查询难点不在接口数量,而在于同类业务常常对应不同接口,选错了拿到的就是另一维度的结果。比如“还剩多少张有效会员卡”和“这段时间卖了多少卡”是两类完全不同的业务,前者关心卡的存量与状态,后者关心销售流水。商品收银与会员卡销售也是如此:卖蛋白粉走收银记录,办储值卡走发卡记录,两者数据源相互独立。这个技能的价值在于把这些区分规则、调用顺序和错误处理统一封装,让模型在自然语言提问时也能路由到正确的接口。
它的工作机制
APISecret 管理:密钥保存在 skill 目录内的 apisecret/config.md,首次调用时向用户索取并立即写入,之后每次直接读取,不再重复询问。clubId 采用同样的缓存思路,列表缓存在 apisecret/clubs.md,存在即跳过 /getClubs 请求。
统一调用规范:所有接口均为 POST,Base URL 为 https://api.wefitos.com/open,请求头携带 APISECRET,参数通过 body 传递,除 /getClubs 外均须指定 clubId。
分页与错误处理:分页固定 pageSize=100,从 pageIndex=0 循环直到已拉取条数不小于 total,每页响应都要先检查 cn 字段。cn=0 才继续,非 0 立即停止全部后续请求,不允许重试或继续循环,这条规则优先级最高。
适用边界与注意点
cards 与 recharge 必须区分:查卡的数量、到期、剩余天数次数额度、激活状态,走 /timeCardStats、/personalTrainerCardStats、/onceCardStats、/storedValueCardStats,筛选条件按到期时间;查销售记录、发卡明细、合同号、支付方式,走对应的 /get*Recharge 接口,筛选条件按销售或发卡时间。拿不准时可以用原文的判断表对照。
其他细节包括:薪资报表仅返回已创建薪资模版的人员;核销、签到、充值的时间参数命名各不相同,需按接口文档确认;分页拉取完成后按中文列名展示,并自动保存 Excel 到桌面,保存失败时要告知用户而不是静默跳过。
Limits and gotchas
Don't confuse cards with recharge: stats interfaces (/timeCardStats, /personalTrainerCardStats, /onceCardStats, /storedValueCardStats) answer how many cards exist, expiry status, remaining days/sessions/balance, or whether a card is active — filter by expiry time. /get*Recharge interfaces answer sales records, issuance details, contract numbers, and payment methods — filter by sale or issuance time. When unsure, consult the decision table in the original material.
Cashier vs. card sales: /cashRecords covers product retail (water, protein powder, drinks) and shares no data source with membership card sales. Don't mix them up.
Pagination and error handling: every interface uses POST against https://api.wefitos.com/open with an APISECRET header; clubId is required for all but /getClubs. Pagination fixes pageSize=100 and starts at pageIndex=0, looping until the fetched count reaches total. Each page's response is checked for the cn field first: cn=0 continues, any non-zero value stops all subsequent requests immediately — no retries, no continuing the loop. This rule takes top priority across all interfaces, including every page of a pagination cycle.
Other caveats: the wage report only returns people with an existing payroll template; time parameter names differ across verify, sign-in, and recharge interfaces, so check each interface's reference doc; after pulling data the skill displays results with Chinese column names and saves an Excel file to the desktop, reporting failures to the user rather than silently skipping.
使用场景
- 俱乐部管理员盘点储值卡有效期,需按到期时间段拉取卡状态列表并导出 Excel。
- 前台主管月底复盘,要统计本月时间卡销售记录与发卡明细,核对合同号和支付方式。
- 运营人员排查会员卡异常,需查询某会员私教卡剩余课时,确认卡片是否已激活。
- 财务核对门店收入,需区分商品收银流水与会员卡销售记录,分别导出两条数据。
适合人员
- 健身房店长,需要随时核对会员卡存量、到期情况和销售流水。
- 健身俱乐部财务,负责按月拉取收银与发卡记录对账。
- 会籍或运营专员,需要查询某位会员的剩余次数和课时并跟进续卡。
- 数据分析师,要把微健后台的多类接口数据拉全后做汇总建模。