feat: dbms新增支持工单流程审批

This commit is contained in:
meilin.huang
2024-02-29 22:12:50 +08:00
parent bf75483a3c
commit f93231da61
115 changed files with 3280 additions and 553 deletions

View File

@@ -128,3 +128,18 @@ func ArrayRemoveFunc[T any](arr []T, isDeleteFunc func(T) bool) []T {
}
return newArr
}
// 数组元素去重
func ArrayDeduplicate[T comparable](arr []T) []T {
encountered := map[T]bool{}
result := []T{}
for v := range arr {
if !encountered[arr[v]] {
encountered[arr[v]] = true
result = append(result, arr[v])
}
}
return result
}