|
|
@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
+import java.util.UUID;
|
|
|
|
|
|
/**
|
|
|
* description
|
|
|
@@ -29,11 +30,13 @@ public class Test {
|
|
|
|
|
|
@org.junit.Test
|
|
|
public void testList() {
|
|
|
- String list = "PreparedStatementCallback; SQL [insert into product$users(pu_date, pu_enuu, pu_prid, pu_useruu) values (?, ?, ?, ?)]; Duplicate entry '10030994-34298797-1000001778' for key 'UNIQUE_ENUU_USERUU_PRID'; nested exception is java.sql.BatchUpdateException: Duplicate entry '10030994-34298797-1000001778' for key 'UNIQUE_ENUU_USERUU_PRID'";
|
|
|
- int li = list.lastIndexOf("-");
|
|
|
- String substring = list.substring(0, li);
|
|
|
- int l = substring.lastIndexOf("-");
|
|
|
- String substring1 = substring.substring(l + 1);
|
|
|
- System.out.println(substring1);
|
|
|
+// String list = "PreparedStatementCallback; SQL [insert into product$users(pu_date, pu_enuu, pu_prid, pu_useruu) values (?, ?, ?, ?)]; Duplicate entry '10030994-34298797-1000001778' for key 'UNIQUE_ENUU_USERUU_PRID'; nested exception is java.sql.BatchUpdateException: Duplicate entry '10030994-34298797-1000001778' for key 'UNIQUE_ENUU_USERUU_PRID'";
|
|
|
+// int li = list.lastIndexOf("-");
|
|
|
+// String substring = list.substring(0, li);
|
|
|
+// int l = substring.lastIndexOf("-");
|
|
|
+// String substring1 = substring.substring(l + 1);
|
|
|
+// System.out.println(substring1);
|
|
|
+ UUID uuid = UUID.randomUUID();
|
|
|
+ System.out.println(uuid);
|
|
|
}
|
|
|
}
|