修改了白名单验证

This commit is contained in:
2025-01-13 16:27:55 +08:00
parent 88a27a131b
commit fedcae5c04
2 changed files with 23 additions and 6 deletions
+8 -1
View File
@@ -11,6 +11,7 @@ import (
"fmt"
"github.com/gin-gonic/gin"
"math"
"strconv"
"time"
)
@@ -138,6 +139,12 @@ func (b *Res) GetResCaseRecordList(c *gin.Context) {
return
}
projectId, err := strconv.ParseInt(req.ProjectId, 10, 64)
if err != nil {
responses.Fail(c)
return
}
req.PlatformId = platformId
if req.StartTime != "" {
@@ -287,7 +294,7 @@ func (b *Res) GetResCaseRecordList(c *gin.Context) {
user, _ := userDao.GetUserById(v.UserId)
if user != nil {
// 检测用户是否白名单
isWhite, _ := projectPlatformWhiteService.CheckProjectPlatformWhiteByUser(user, v.PlatformId)
isWhite, _ := projectPlatformWhiteService.CheckProjectPlatformWhiteByUser(user, projectId, v.PlatformId)
if isWhite {
response.IsVip = 1
}