feat: 优化web

This commit is contained in:
2026-04-23 18:58:13 +08:00
commit 544a2f3428
160 changed files with 27327 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
package service
import "giter.top/smart/internal/iam/entity"
// MergeDataScope 多角色数据范围并集:取最大(PRD:全部 > 本部门及子部门 > 本部门 > 仅本人)
func MergeDataScope(scopes []int16) int16 {
var m int16
for _, s := range scopes {
if s > m {
m = s
}
}
if m == 0 {
return entity.DataScopeSelf
}
return m
}