-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
105 additions
and
14 deletions.
There are no files selected for viewing
Binary file modified
BIN
+269 Bytes
(120%)
build/classes/java/main/com/example/SeaReaUrl_back/FraudAccount.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
src/main/java/com/example/SeaReaUrl_back/InitFraudAccount.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package com.example.SeaReaUrl_back; | ||
|
||
import jakarta.annotation.PostConstruct; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.transaction.annotation.Transactional; | ||
import jakarta.persistence.EntityManager; | ||
|
||
@Component | ||
@RequiredArgsConstructor | ||
public class InitFraudAccount { | ||
|
||
private final InitFraudAccountService initFraudAccountService; | ||
|
||
@PostConstruct | ||
public void init() { | ||
initFraudAccountService.init(); | ||
} | ||
|
||
@Component | ||
@Transactional | ||
@RequiredArgsConstructor | ||
static class InitFraudAccountService { | ||
|
||
private final EntityManager em; | ||
|
||
public void init() { | ||
FraudAccount fraudAccount1 = createFraudAccount("https://www.instagram.com/newjeans_official/", false, 0L,0L); | ||
FraudAccount fraudAccount2 = createFraudAccount("NewJeans_twt", false, 0L,0L); | ||
FraudAccount fraudAccount3 = createFraudAccount("https://www.facebook.com/official.newjeans/", false, 0L,0L); | ||
FraudAccount fraudAccount4 = createFraudAccount("https://www.instagram.com/jennierubyjane/", false, 0L,0L); | ||
FraudAccount fraudAccount5 = createFraudAccount("https://www.instagram.com/thv/", false, 0L,0L); | ||
FraudAccount fraudAccount6 = createFraudAccount("elonmusk", false, 0L,0L); | ||
FraudAccount fraudAccount7 = createFraudAccount("https://www.instagram.com/hm_son7/", false, 0L,0L); | ||
FraudAccount fraudAccount8 = createFraudAccount("https://www.facebook.com/HeungMinSonOfficial/", false, 0L,0L); | ||
FraudAccount fraudAccount9 = createFraudAccount("https://www.instagram.com/paikscuisine_official/", false, 0L,0L); | ||
FraudAccount fraudAccount10 = createFraudAccount("https://www.instagram.com/gamst17172/", false, 0L,0L); | ||
FraudAccount fraudAccount11 = createFraudAccount("https://www.instagram.com/hhh_07/", false, 0L,0L); | ||
|
||
em.persist(fraudAccount1); | ||
em.persist(fraudAccount2); | ||
em.persist(fraudAccount3); | ||
em.persist(fraudAccount4); | ||
em.persist(fraudAccount5); | ||
em.persist(fraudAccount6); | ||
em.persist(fraudAccount7); | ||
em.persist(fraudAccount8); | ||
em.persist(fraudAccount9); | ||
em.persist(fraudAccount10); | ||
em.persist(fraudAccount11); | ||
|
||
|
||
|
||
} | ||
private FraudAccount createFraudAccount(String accountName, Boolean isFraud, Long view, Long report) { | ||
return new FraudAccount(accountName, isFraud, view, report); | ||
} | ||
|
||
} | ||
|
||
|
||
} |
9 changes: 4 additions & 5 deletions
9
src/main/java/com/example/SeaReaUrl_back/IsFraudUrlResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
package com.example.SeaReaUrl_back; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.*; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class IsFraudUrlResponse { | ||
private List<String> responseList; | ||
// private List<String> responseList; | ||
private String fraudPossibility; | ||
} |