2026-07-07 14:36:40 +08:00
|
|
|
package mapping
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"crypto/sha1"
|
|
|
|
|
"encoding/hex"
|
|
|
|
|
)
|
|
|
|
|
|
2026-07-16 00:53:16 +08:00
|
|
|
func GenerateCheckID(sourceSystem, dataType, sourceRecordID string) string {
|
|
|
|
|
sum := sha1.Sum([]byte(sourceSystem + "|" + dataType + "|" + sourceRecordID))
|
2026-07-07 14:36:40 +08:00
|
|
|
return hex.EncodeToString(sum[:])[:20]
|
|
|
|
|
}
|