feat: 添加查看授权和编辑授权功能, 代理充值使用 NumberField 组件

This commit is contained in:
2026-05-07 01:34:05 +08:00
parent a2eccb9818
commit 7a3353ee96
3 changed files with 234 additions and 11 deletions
+4 -2
View File
@@ -661,8 +661,9 @@ func handleUpdateAgentCardTypes(c *gin.Context) {
var reqBody struct {
CardTypes []struct {
CardTypeID uint `json:"card_type_id"`
CanGenerate bool `json:"can_generate"`
CardTypeID uint `json:"card_type_id"`
CanGenerate bool `json:"can_generate"`
Price float64 `json:"price"`
} `json:"card_types"`
}
if err := c.ShouldBindJSON(&reqBody); err != nil {
@@ -689,6 +690,7 @@ func handleUpdateAgentCardTypes(c *gin.Context) {
AgentApplicationID: agentApp.ID,
CardTypeID: ct.CardTypeID,
CanGenerate: ct.CanGenerate,
Price: ct.Price,
}
if err := tx.Create(&agentCardType).Error; err != nil {
tx.Rollback()