|
@@ -0,0 +1,23 @@
|
|
|
+package com.boman.web.core.utils;
|
|
|
+
|
|
|
+import com.boman.common.redis.RedisKey;
|
|
|
+
|
|
|
+import java.util.UUID;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author shiqian
|
|
|
+ * @date 2021年08月27日 10:22
|
|
|
+ **/
|
|
|
+public class IdempotencyUtils {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 功能描述: 拼接幂等性的key
|
|
|
+ *
|
|
|
+ * @param tableName tableName
|
|
|
+ * @param username username
|
|
|
+ * @return java.lang.String (tableName:username:uuid)
|
|
|
+ */
|
|
|
+ public static String packKey(String tableName, String username) {
|
|
|
+ return tableName + ":" + username + ":" + UUID.randomUUID().toString();
|
|
|
+ }
|
|
|
+}
|