|
@@ -26,35 +26,35 @@ public class RepoTest extends ApplicationTests {
|
|
|
@Test
|
|
@Test
|
|
|
public void test() {
|
|
public void test() {
|
|
|
|
|
|
|
|
-// List<Collaborate> users = collaborateRepo.findAll();
|
|
|
|
|
-// users.forEach(user -> {
|
|
|
|
|
-// List<String> strs = new ArrayList<>();
|
|
|
|
|
-// user.getConsent().forEach(con -> {
|
|
|
|
|
-// String path = con.substring(con.lastIndexOf("/", con.lastIndexOf("/") - 1) + 1);
|
|
|
|
|
-// String url = storageService.uploadFromUrl(con, path);
|
|
|
|
|
-// strs.add(url);
|
|
|
|
|
-// });
|
|
|
|
|
-// user.setConsent(strs);
|
|
|
|
|
-// collaborateRepo.save(user);
|
|
|
|
|
-// });
|
|
|
|
|
-
|
|
|
|
|
-// List<Organization> users = organizationRepo.findAll();
|
|
|
|
|
-// users.forEach(user -> {
|
|
|
|
|
-// String con = user.getBusinessLicense();
|
|
|
|
|
-// if (StrUtil.isNotBlank(con)) {
|
|
|
|
|
-//
|
|
|
|
|
-//
|
|
|
|
|
-// String path = con.substring(con.lastIndexOf("/", con.lastIndexOf("/") - 1) + 1);
|
|
|
|
|
-// String url = storageService.uploadFromUrl(con, path);
|
|
|
|
|
-//
|
|
|
|
|
-// user.setBusinessLicense(url);
|
|
|
|
|
-// organizationRepo.save(user);
|
|
|
|
|
-// }
|
|
|
|
|
-// });
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- List<Rate> users = rateRepo.findAll();
|
|
|
|
|
|
|
+ List<Collaborate> users = collaborateRepo.findAll();
|
|
|
users.forEach(user -> {
|
|
users.forEach(user -> {
|
|
|
|
|
+ List<String> strs = new ArrayList<>();
|
|
|
|
|
+ user.getConsent().forEach(con -> {
|
|
|
|
|
+ String path = con.substring(con.lastIndexOf("/", con.lastIndexOf("/") - 1) + 1);
|
|
|
|
|
+ String url = storageService.uploadFromUrl(con, path);
|
|
|
|
|
+ strs.add(url);
|
|
|
|
|
+ });
|
|
|
|
|
+ user.setConsent(strs);
|
|
|
|
|
+ collaborateRepo.save(user);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ List<Organization> users1 = organizationRepo.findAll();
|
|
|
|
|
+ users1.forEach(user -> {
|
|
|
|
|
+ String con = user.getBusinessLicense();
|
|
|
|
|
+ if (StrUtil.isNotBlank(con)) {
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ String path = con.substring(con.lastIndexOf("/", con.lastIndexOf("/") - 1) + 1);
|
|
|
|
|
+ String url = storageService.uploadFromUrl(con, path);
|
|
|
|
|
+
|
|
|
|
|
+ user.setBusinessLicense(url);
|
|
|
|
|
+ organizationRepo.save(user);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ List<Rate> users2 = rateRepo.findAll();
|
|
|
|
|
+ users2.forEach(user -> {
|
|
|
List<String> strs = new ArrayList<>();
|
|
List<String> strs = new ArrayList<>();
|
|
|
List<String> strs1 = new ArrayList<>();
|
|
List<String> strs1 = new ArrayList<>();
|
|
|
List<String> strs2 = new ArrayList<>();
|
|
List<String> strs2 = new ArrayList<>();
|