mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-14 20:30:04 +08:00
update 优惠券接口
This commit is contained in:
@@ -118,7 +118,14 @@
|
||||
|
||||
---
|
||||
|
||||
## 关键设计决策
|
||||
## 前端页面
|
||||
|
||||
| # | 子任务 | 状态 | 文件 |
|
||||
|---|--------|------|------|
|
||||
| F1 | API 文件 | ✅ 完成 | `jsowell-charge-ui/src/api/coupon/template.js` / `record.js` |
|
||||
| F2 | 券模板管理页 | ✅ 完成 | `jsowell-charge-ui/src/views/coupon/template/index.vue` |
|
||||
| F3 | 兑换记录页 | ✅ 完成 | `jsowell-charge-ui/src/views/coupon/record/index.vue` |
|
||||
| F4 | 路由注册 | ✅ 完成 | `jsowell-charge-ui/src/router/index.js` |
|
||||
|
||||
1. **兑换幂等**:`member_coupon.exchange_request_id` 唯一索引,捕获 `DuplicateKeyException` 返回已有结果
|
||||
2. **库存扣减**:`UPDATE ... SET stock_remain=stock_remain-1 WHERE id=? AND (stock_remain>0 OR stock_remain=-1)`
|
||||
|
||||
Reference in New Issue
Block a user