恢复余额功能 & 管理员修改余额功能

This commit is contained in:
2026-03-30 14:59:35 +08:00
parent 22cb2d50d3
commit 4481c581e9
27 changed files with 1246 additions and 204 deletions

View File

@@ -72,6 +72,7 @@ func PageChannelByAdmin(c *fiber.Ctx) error {
q.User.As("User").Name.As("User__name"),
).
Where(do).
Order(q.Channel.CreatedAt.Desc()).
FindByPage(req.GetOffset(), req.GetLimit())
if err != nil {
return err
@@ -190,6 +191,10 @@ func CreateChannel(c *fiber.Ctx) error {
}
// 创建通道
var isp *m.EdgeISP
if req.Isp != nil {
isp = u.X(m.ToEdgeISP(*req.Isp))
}
result, err := s.Channel.CreateChannels(
ip,
req.ResourceId,
@@ -197,7 +202,7 @@ func CreateChannel(c *fiber.Ctx) error {
req.AuthType == s.ChannelAuthTypePass,
req.Count,
s.EdgeFilter{
Isp: u.ElseTo(req.Isp, m.ToEdgeISP),
Isp: isp,
Prov: req.Prov,
City: req.City,
},