```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

feat(admin): 添加金豆列表新增功能并增加订单状态字段

- 在GoldListController中添加Add API接口
- 为GoldBeanOrder模型增加Status字段用于标识订单状态
- 状态字段默认值为0表示待处理,1表示已完成
```
This commit is contained in:
昔念
2026-03-17 22:49:14 +08:00
parent aa6929cd50
commit d1d20a4067
2 changed files with 2 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ func init() {
var task_info_controller = &GoldListController{
&cool.Controller{
Prefix: "/admin/game/goldlist",
Api: []string{"Delete", "Update", "Info", "List", "Page"},
Api: []string{"Add", "Delete", "Update", "Info", "List", "Page"},
Service: service.NewGoldListService(0), //因为page已经过滤所以这里需要改成0
},
}

View File

@@ -16,6 +16,7 @@ type GoldBeanOrder struct {
PlayerID uint64 `gorm:"not null;index:idx_order_player_id;comment:'所属玩家ID'" json:"player_id" description:"所属玩家ID"`
ExchangeNum uint32 `gorm:"not null;default:0;comment:'兑换数量(金豆/金币)'" json:"exchange_num" description:"兑换数量"`
Rate uint32 `gorm:"not null;default:0;comment:'兑换汇率如1金豆=10金币'" json:"rate" description:"兑换汇率"`
Status uint32 `gorm:"not null;default:0;comment:'状态0待处理 1完成'" json:"status" description:"状态"`
}
// -------------------------- 核心配套方法 --------------------------