From 4151389fb92c3f1444d033c1eed0a76165799eea Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期四, 13 六月 2024 00:37:37 +0800 Subject: [PATCH] 修改otherfature的数据格式 --- pkg/floor.go | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/floor.go b/pkg/floor.go index 1e2ff9a..379d22b 100644 --- a/pkg/floor.go +++ b/pkg/floor.go @@ -9,7 +9,7 @@ // 鐢熸垚涓�涓寘鍚ゼ灞傜殑浜鸿劯id,瑙f瀽妤煎眰 // 浣跨敤48浣嶆簮id, 鍏朵腑鍓�41浣嶆槸imageid, 涓嶅彲浠ヤ慨鏀� 41-43浣嶅~ 06 浠h〃鍥惧儚, +99 + 3浣嶆ゼ灞�(绗竴浣�0琛ㄧず姝�,1琛ㄧず璐�) func GenerateFaceIdContainFloor(srcId, floorStr string) string { - floorNum, _ := parseFloor(floorStr) + floorNum, _ := ParseFloor(floorStr) newId := srcId[0:43] + "99" + floorNum //newId := srcId[0:43] + "99" + floorNum + snowflake.CreateRandomNumber(1) @@ -25,11 +25,11 @@ return "", fmt.Errorf("invalid flag %s", srcId[43:45]) } - return restoreFloor(srcId[45:48]) + return RestoreFloor(srcId[45:48]) } -// parseFloor parses the floor string and returns a three-character string -func parseFloor(floor string) (string, error) { +// ParseFloor parses the floor string and returns a three-character string +func ParseFloor(floor string) (string, error) { var sign string var number string @@ -53,8 +53,8 @@ return sign + formattedNumber, nil } -// restoreFloor restores the three-character string back to the original floor string -func restoreFloor(encoded string) (string, error) { +// RestoreFloor restores the three-character string back to the original floor string +func RestoreFloor(encoded string) (string, error) { if len(encoded) != 3 { return "", fmt.Errorf("encoded string must be 3 characters long") } -- Gitblit v1.8.0