家庭组 权益修改
Build docker and publish / build (20.15.1) (push) Successful in 8m16s

This commit is contained in:
2026-03-04 22:02:42 -08:00
parent 3594097d47
commit 4349a7ea2f
28 changed files with 960 additions and 96 deletions
@@ -6,6 +6,7 @@ import (
"time"
"github.com/gin-gonic/gin"
commonLogic "github.com/perfect-panel/server/internal/logic/common"
"github.com/perfect-panel/server/internal/model/user"
"github.com/perfect-panel/server/pkg/constant"
"github.com/perfect-panel/server/pkg/xerr"
@@ -71,7 +72,12 @@ func (l *DeviceWsConnectLogic) DeviceWsConnect(c *gin.Context) error {
}
//默认在线设备1
maxDevice := 3
subscribe, err := l.svcCtx.UserModel.QueryUserSubscribe(l.ctx, userInfo.Id, 1, 2)
entitlement, err := commonLogic.ResolveEntitlementUser(l.ctx, l.svcCtx.DB, userInfo.Id)
if err != nil {
return err
}
subscribe, err := l.svcCtx.UserModel.QueryUserSubscribe(l.ctx, entitlement.EffectiveUserID, 1, 2)
if err == nil {
for _, sub := range subscribe {
if time.Now().Before(sub.ExpireTime) {