Files
guilixu-admin/.workbuddy/memory/2026-07-16.md
赵忠林 6c50ffa58b refactor(cms): 更新商城名称及相关展示文案
- 将网页标题由“企业商城”修改为“小程序商城”
- 修改仪表盘技术支持项显示名称为“企业官网”
- 更新登录页默认配置中站点名称为“小程序商城”
2026-07-16 14:10:23 +08:00

32 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 2026-07-16
## 续费扫码支付链路修复(前后端联动)
### 问题1小程序 pay 页扫码后误显"支付成功"
- 文件:`websopy-taro/src/passport/pay/index.tsx`
- 根因:`fetchDetail``subscription.status === 'active'` 判定已支付。但后端 `renewPay` 为了避免放弃支付导致服务中断,**故意保留** `status='active'`、仅设 `payStatus=0`
- 修复:判断改为 `payStatus === 1`;同时处理 `cancelled`/`expired` 状态。详见 `websopy-taro/.workbuddy/memory/2026-07-16.md`
### 问题2用户点"立即支付"后端返回"该订阅已激活"
- 文件:`/Users/gxwebsoft/JAVA/websopy-java/src/main/java/com/gxwebsoft/app/controller/AppSubscriptionController.java`
- 根因:`pay/{id}`line 339-341`mp-prepay`line 539-541两处拦截只看 `status='active'`,与上次 `mp-confirm` 同样的坑——续费的 `active+payStatus=0` 被误拦。
- 修复:两处拦截条件对齐 `mp-confirm`,改为 `status='active' && payStatus==1` 才拦截,放行续费的 `active+payStatus=0`
- commit`7c95f8e` (本地 main待 push + 服务器部署)。
### 关键规则(防回归)
判断"是否已支付"必须用 `payStatus`0=未支付 / 1=已支付),**不能**用 `status`(订阅生命周期 active/pending/expired/cancelled。续费场景下这两个字段完全解耦后端 `renewPay` 保留 `status='active'` + 设 `payStatus=0`
后端三处拦截条件现在全部对齐:
- `pay/{id}` line 339-343
- `mp-prepay` line 541-545
- `mp-confirm` line 573之前已修
### 部署待办(用户操作)
1. 后端:`cd /Users/gxwebsoft/JAVA/websopy-java && git push`,然后远程服务器 `git pull && mvn clean package -DskipTests && docker-compose up -d --build cms-api`(或对应重启方式)。
2. 小程序端:`websopy-taro` 重新编译上传体验版/正式版。
3. 联调验证admin 点"立即续费" → 弹码 → 微信扫码 → 进小程序应显示"确认支付"页(不再误显成功)→ 点"立即支付" → 微信支付 → 显示"支付成功" → 跳转 `/user/apps/index`