refactor: 兑换机制改为一图章一奖品并引入库存
- 废弃 RedemptionRule(集 N 换 1),新增 Prize 表与 Stamp 1:1 关联 - Redemption 记录直接绑定到 stampId + prizeId + prizeName 快照 - 兑换事务用 updateMany + stock>0 条件作乐观锁 - 兑换后保留 Collection 记录,图章持续彩色点亮并标记"已兑换" - 用户端入口改为点击已收集图章弹出兑换,库存为 0 时按钮禁用 - 管理后台删除 /admin/rules,奖品编辑嵌入 StampForm Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,6 @@ import Dashboard from "./admin/Dashboard";
|
||||
import StampList from "./admin/StampList";
|
||||
import ArticleList from "./admin/ArticleList";
|
||||
import MusicList from "./admin/MusicList";
|
||||
import RuleList from "./admin/RuleList";
|
||||
import UsersList from "./admin/UsersList";
|
||||
import RedemptionLog from "./admin/RedemptionLog";
|
||||
|
||||
@@ -39,7 +38,6 @@ export default function App() {
|
||||
<Route path="/admin/stamps" element={<StampList />} />
|
||||
<Route path="/admin/articles" element={<ArticleList />} />
|
||||
<Route path="/admin/music" element={<MusicList />} />
|
||||
<Route path="/admin/rules" element={<RuleList />} />
|
||||
<Route path="/admin/users" element={<UsersList />} />
|
||||
<Route path="/admin/redemptions" element={<RedemptionLog />} />
|
||||
</Route>
|
||||
|
||||
Reference in New Issue
Block a user