feat(admin): 添加金豆列表新增功能并增加订单状态字段 - 在GoldListController中添加Add API接口 - 为GoldBeanOrder模型增加Status字段用于标识订单状态 - 状态字段默认值为0表示待处理,1表示已完成 ```
This commit is contained in:
@@ -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
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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:"状态"`
|
||||
}
|
||||
|
||||
// -------------------------- 核心配套方法 --------------------------
|
||||
|
||||
Reference in New Issue
Block a user