Commit 7a98c298 by zhangxingmin

配置

parent 76fb63fc
...@@ -39,4 +39,9 @@ public class CodeGeneratorConstants { ...@@ -39,4 +39,9 @@ public class CodeGeneratorConstants {
* 条件类型编码前缀 * 条件类型编码前缀
*/ */
public static final String PREFIX_CONDITION_TYPE_CODE = "CONDITION_TYPE"; public static final String PREFIX_CONDITION_TYPE_CODE = "CONDITION_TYPE";
/**
* 保单发佣批次ID前缀
*/
public static final String PREFIX_FORTUNE_BATCH_BIZ_ID = "FORTUNE_BATCH";
} }
...@@ -89,6 +89,9 @@ public class CodeGenerator { ...@@ -89,6 +89,9 @@ public class CodeGenerator {
} }
public static void main(String[] args) { public static void main(String[] args) {
System.out.println(generate10Code("RULE")); for (int i = 0; i < 5; i++) {
System.out.println(generate10Code("CONDITION"));
}
} }
} }
...@@ -52,14 +52,17 @@ public class RandomStringGenerator { ...@@ -52,14 +52,17 @@ public class RandomStringGenerator {
} }
public static void main(String[] args) { public static void main(String[] args) {
// 生成16位随机字符串(使用安全随机) // // 生成16位随机字符串(使用安全随机)
String random16 = generate(16, true); // String random16 = generate(16, true);
System.out.println("16位: " + random16); // System.out.println("16位: " + random16);
//
// 生成32位随机字符串(使用普通随机) // // 生成32位随机字符串(使用普通随机)
String random32 = generate(32, false); // String random32 = generate(32, false);
System.out.println("32位: " + random32); // System.out.println("32位: " + random32);
for (int i = 0; i < 5; i++) {
System.out.println(generateBizId16("agent_referral_relation"));
}
System.out.println(generateBizId16(CommonEnum.UID_TYPE_USER.getCode()));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment