diff --git a/src/main/java/com/kustacks/kuring/worker/dto/ComplexNoticeFormatDto.java b/src/main/java/com/kustacks/kuring/worker/dto/ComplexNoticeFormatDto.java index ba192438..2a59533f 100644 --- a/src/main/java/com/kustacks/kuring/worker/dto/ComplexNoticeFormatDto.java +++ b/src/main/java/com/kustacks/kuring/worker/dto/ComplexNoticeFormatDto.java @@ -5,7 +5,6 @@ import lombok.Getter; import lombok.NoArgsConstructor; -import java.util.Collections; import java.util.List; @Getter @@ -19,9 +18,4 @@ public class ComplexNoticeFormatDto { public int getNormalNoticeSize() { return normalNoticeList.size(); } - - public void reverseEachNoticeList() { - Collections.reverse(importantNoticeList); - Collections.reverse(normalNoticeList); - } } diff --git a/src/main/java/com/kustacks/kuring/worker/dto/ScrapingResultDto.java b/src/main/java/com/kustacks/kuring/worker/dto/ScrapingResultDto.java index 5ab0365b..1a2cf132 100644 --- a/src/main/java/com/kustacks/kuring/worker/dto/ScrapingResultDto.java +++ b/src/main/java/com/kustacks/kuring/worker/dto/ScrapingResultDto.java @@ -10,5 +10,5 @@ public class ScrapingResultDto { private Document document; - private String url; + private String viewUrl; } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/DepartmentNoticeScraperTemplate.java b/src/main/java/com/kustacks/kuring/worker/scrap/DepartmentNoticeScraperTemplate.java index 74384000..6d9c5935 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/DepartmentNoticeScraperTemplate.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/DepartmentNoticeScraperTemplate.java @@ -32,7 +32,6 @@ public List scrap(DeptInfo deptInfo, Function htmlParsingFromScrapingResult(DeptInfo dept List noticeDtoList = new LinkedList<>(); for (ScrapingResultDto reqResult : requestResults) { Document document = reqResult.getDocument(); - String viewUrl = reqResult.getUrl(); + String viewUrl = reqResult.getViewUrl(); RowsDto rowsDto = deptInfo.parse(document); List importantNoticeFormatDtos = rowsDto.buildImportantRowList(viewUrl); diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/client/notice/KuisNoticeApiClient.java b/src/main/java/com/kustacks/kuring/worker/scrap/client/notice/KuisNoticeApiClient.java index d21c174b..6f60ad8d 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/client/notice/KuisNoticeApiClient.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/client/notice/KuisNoticeApiClient.java @@ -101,6 +101,6 @@ private HttpHeaders createKuisNoticeRequestHeader(String sessionId) { private List convertToCommonFormatDto(List kuisNoticeDtoList) { return kuisNoticeDtoList.stream() .map(dto -> (CommonNoticeFormatDto) dtoConverter.convert(dto)) - .toList(); + .collect(Collectors.toList()); } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/client/notice/LatestPageNoticeApiClient.java b/src/main/java/com/kustacks/kuring/worker/scrap/client/notice/LatestPageNoticeApiClient.java index 96c986cb..56924815 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/client/notice/LatestPageNoticeApiClient.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/client/notice/LatestPageNoticeApiClient.java @@ -1,27 +1,28 @@ package com.kustacks.kuring.worker.scrap.client.notice; -import com.kustacks.kuring.common.exception.code.ErrorCode; import com.kustacks.kuring.common.exception.InternalLogicException; +import com.kustacks.kuring.common.exception.code.ErrorCode; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.JsoupClient; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import lombok.extern.slf4j.Slf4j; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.springframework.stereotype.Component; +import org.springframework.util.StopWatch; import java.io.IOException; -import java.util.LinkedList; +import java.util.Collections; import java.util.List; @Slf4j @Component public class LatestPageNoticeApiClient implements NoticeApiClient { - private static final int PAGE_NUM = 1; // recentPage는 pageNum 인자가 1부터 시작 - private static final int ARTICLE_NUMBERS_PER_PAGE = 12; - private static final int LATEST_SCRAP_TIMEOUT = 60000; // 1분 - private static final int LATEST_SCRAP_ALL_TIMEOUT = 120000; // 2분 + private static final int START_PAGE_NUM = 1; // page는 인자가 1부터 시작 + private static final int ROW_NUMBERS_PER_PAGE = 20; + private static final int LATEST_SCRAP_TIMEOUT = 2000; // 2초 + private static final int LATEST_SCRAP_ALL_TIMEOUT = 60000; // 1분 private final JsoupClient jsoupClient; @@ -31,63 +32,41 @@ public LatestPageNoticeApiClient(JsoupClient normalJsoupClient) { @Override public List request(DeptInfo deptInfo) throws InternalLogicException { - int size = getDeptInfoSize(deptInfo); - - List reqResults = new LinkedList<>(); - for(int i = 0; i < size; i++) { - try { - ScrapingResultDto resultDto = getScrapingResultDto(i, deptInfo, ARTICLE_NUMBERS_PER_PAGE, LATEST_SCRAP_TIMEOUT); - reqResults.add(resultDto); - } catch (IOException e) { - throw new InternalLogicException(ErrorCode.NOTICE_SCRAPER_CANNOT_SCRAP, e); - } catch (NullPointerException | IndexOutOfBoundsException e) { - throw new InternalLogicException(ErrorCode.NOTICE_SCRAPER_CANNOT_PARSE, e); - } + try { + ScrapingResultDto resultDto = getScrapingResultDto(deptInfo, ROW_NUMBERS_PER_PAGE, LATEST_SCRAP_TIMEOUT); + return List.of(resultDto); + } catch (IOException e) { + throw new InternalLogicException(ErrorCode.NOTICE_SCRAPER_CANNOT_SCRAP, e); + } catch (NullPointerException | IndexOutOfBoundsException e) { + throw new InternalLogicException(ErrorCode.NOTICE_SCRAPER_CANNOT_PARSE, e); } - - return reqResults; } @Override public List requestAll(DeptInfo deptInfo) throws InternalLogicException { - int size = getDeptInfoSize(deptInfo); - - List reqResults = new LinkedList<>(); - for (int i = 0; i < size; i++) { - try { - int totalNoticeSize = getTotalNoticeSize(i, deptInfo); - - ScrapingResultDto resultDto = getScrapingResultDto(i, deptInfo, totalNoticeSize, LATEST_SCRAP_ALL_TIMEOUT); - reqResults.add(resultDto); - } catch (IOException e) { - log.info("Department Scrap all IOException: {}", e.getMessage()); - } catch (NullPointerException | IndexOutOfBoundsException e) { - throw new InternalLogicException(ErrorCode.NOTICE_SCRAPER_CANNOT_PARSE, e); - } + try { + String url = buildUrlForTotalNoticeCount(deptInfo); + int totalNoticeSize = getTotalNoticeSize(url); + + ScrapingResultDto resultDto = getScrapingResultDto(deptInfo, totalNoticeSize, LATEST_SCRAP_ALL_TIMEOUT); + return List.of(resultDto); + } catch (IOException e) { + log.info("Department Scrap all IOException: {}", e.getMessage()); + } catch (NullPointerException | IndexOutOfBoundsException e) { + throw new InternalLogicException(ErrorCode.NOTICE_SCRAPER_CANNOT_PARSE, e); } - return reqResults; + return Collections.emptyList(); } - private int getDeptInfoSize(DeptInfo deptInfo) { - return deptInfo.getNoticeScrapInfo().getBoardSeqs().size(); - } - - private ScrapingResultDto getScrapingResultDto(int index, DeptInfo deptInfo, int totalNoticeSize, int timeout) throws IOException { - String requestUrl = deptInfo.createRequestUrl(index, totalNoticeSize, PAGE_NUM); - String viewUrl = deptInfo.createViewUrl(index); - - Document document = jsoupClient.get(requestUrl, timeout); - - return new ScrapingResultDto(document, viewUrl); + private String buildUrlForTotalNoticeCount(DeptInfo deptInfo) { + return deptInfo.createRequestUrl(1, 1); } - private int getTotalNoticeSize(int index, DeptInfo deptInfo) throws IOException, IndexOutOfBoundsException, NullPointerException { - String url = deptInfo.createRequestUrl(index, 1, 1); - + public int getTotalNoticeSize(String url) throws IOException, IndexOutOfBoundsException, NullPointerException { Document document = jsoupClient.get(url, LATEST_SCRAP_TIMEOUT); - Element totalNoticeSizeElement = document.selectFirst(".pl15 > strong"); + Element totalNoticeSizeElement = document.selectFirst(".util-search strong"); if (totalNoticeSizeElement == null) { totalNoticeSizeElement = document.selectFirst(".total_count"); } @@ -95,4 +74,19 @@ private int getTotalNoticeSize(int index, DeptInfo deptInfo) throws IOException, assert totalNoticeSizeElement != null; return Integer.parseInt(totalNoticeSizeElement.ownText()); } + + private ScrapingResultDto getScrapingResultDto(DeptInfo deptInfo, int rowSize, int timeout) throws IOException { + String requestUrl = deptInfo.createRequestUrl(START_PAGE_NUM, rowSize); + String viewUrl = deptInfo.createViewUrl(); + + StopWatch stopWatch = new StopWatch(deptInfo.getDeptName() + "Request"); + stopWatch.start(); + + Document document = jsoupClient.get(requestUrl, timeout); + + stopWatch.stop(); + log.info("[{}] takes {}millis to respond", deptInfo.getDeptName(), stopWatch.getTotalTimeMillis()); + + return new ScrapingResultDto(document, viewUrl); + } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/DeptInfo.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/DeptInfo.java index 9e31983f..15de9917 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/DeptInfo.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/DeptInfo.java @@ -22,7 +22,6 @@ public class DeptInfo { protected StaffScrapInfo staffScrapInfo; protected DepartmentName departmentName; protected String collegeName; - protected String code; public List scrapLatestPageHtml() { return noticeApiClient.request(this); @@ -48,26 +47,22 @@ public List getProfessorForumIds() { return this.staffScrapInfo.getProfessorForumId(); } - public String createRequestUrl(int index, int curPage, int pageNum) { - return UriComponentsBuilder.fromUriString(latestPageNoticeProperties.getListUrl()) - .queryParam("siteId", noticeScrapInfo.getSiteId()) - .queryParam("boardSeq", noticeScrapInfo.getBoardSeqs().get(index)) - .queryParam("menuSeq", noticeScrapInfo.getMenuSeqs().get(index)) - .queryParam("curPage", curPage) - .queryParam("pageNum", pageNum) - .buildAndExpand(departmentName.getHostPrefix()) - .toUriString(); + public String createRequestUrl(int page, int row) { + return UriComponentsBuilder + .fromUriString(latestPageNoticeProperties.getListUrl()) + .queryParam("page", page) + .queryParam("row", row) + .buildAndExpand( + noticeScrapInfo.getSiteName(), + noticeScrapInfo.getSiteName(), + noticeScrapInfo.getSiteId() + ).toUriString(); } - public String createViewUrl(int index) { - return UriComponentsBuilder - .fromUriString(latestPageNoticeProperties.getViewUrl()) - .queryParam("siteId", noticeScrapInfo.getSiteId()) - .queryParam("boardSeq", noticeScrapInfo.getBoardSeqs().get(index)) - .queryParam("menuSeq", noticeScrapInfo.getMenuSeqs().get(index)) - .queryParam("seq", "") - .buildAndExpand(departmentName.getHostPrefix()) - .toUriString(); + public String createViewUrl() { + return latestPageNoticeProperties.getViewUrl() + .replaceAll("\\{department\\}", noticeScrapInfo.getSiteName()) + .replace("{siteId}", String.valueOf(noticeScrapInfo.getSiteId())); } @Override diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/NoticeScrapInfo.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/NoticeScrapInfo.java index bcd46e8e..c4607030 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/NoticeScrapInfo.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/NoticeScrapInfo.java @@ -2,20 +2,14 @@ import lombok.Getter; -import java.util.List; - @Getter public class NoticeScrapInfo { - private final List forumIds; - private final String siteId; - private final List boardSeqs; - private final List menuSeqs; + private final String siteName; + private final int siteId; - public NoticeScrapInfo(List forumIds, String siteId, List boardSeqs, List menuSeqs) { - this.forumIds = forumIds; + public NoticeScrapInfo(String siteName, int siteId) { + this.siteName = siteName; this.siteId = siteId; - this.boardSeqs = boardSeqs; - this.menuSeqs = menuSeqs; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/architecture/ArchitectureDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/architecture/ArchitectureDept.java index 511f72bc..4ba28155 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/architecture/ArchitectureDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/architecture/ArchitectureDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.architecture; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.ARCHITECTURE) +import static com.kustacks.kuring.notice.domain.DepartmentName.ARCHITECTURE; + +@RegisterDepartmentMap(key = ARCHITECTURE) public class ArchitectureDept extends ArchitectureCollege { public ArchitectureDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public ArchitectureDept(NoticeApiClient latestPageN this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("11830", "17940"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("700"); - List menuSeqs = List.of("5168"); - + List professorForumIds = List.of("9815"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "CAKU", boardSeqs, menuSeqs); - this.code = "127320"; - this.departmentName = DepartmentName.ARCHITECTURE; + this.noticeScrapInfo = new NoticeScrapInfo(ARCHITECTURE.getHostPrefix(), 397); + this.departmentName = ARCHITECTURE; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/ApparelDesignDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/ApparelDesignDept.java index c6943f33..9ef0b796 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/ApparelDesignDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/ApparelDesignDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.art_design; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.APPAREL_DESIGN) +import static com.kustacks.kuring.notice.domain.DepartmentName.APPAREL_DESIGN; + +@RegisterDepartmentMap(key = APPAREL_DESIGN) public class ApparelDesignDept extends ArtDesignCollege { public ApparelDesignDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public ApparelDesignDept(NoticeApiClient latestPage this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("9723"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1007"); - List menuSeqs = List.of("6987"); - + List professorForumIds = List.of("11194"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "APPAREL", boardSeqs, menuSeqs); - this.code = "122404"; - this.departmentName = DepartmentName.APPAREL_DESIGN; + this.noticeScrapInfo = new NoticeScrapInfo(APPAREL_DESIGN.getHostPrefix(), 956); + this.departmentName = APPAREL_DESIGN; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/CommunicationDesignDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/CommunicationDesignDept.java index 28b80a5f..1988a209 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/CommunicationDesignDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/CommunicationDesignDept.java @@ -1,36 +1,32 @@ package com.kustacks.kuring.worker.scrap.deptinfo.art_design; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.COMM_DESIGN) +import static com.kustacks.kuring.notice.domain.DepartmentName.COMM_DESIGN; + +@RegisterDepartmentMap(key = COMM_DESIGN) public class CommunicationDesignDept extends ArtDesignCollege { public CommunicationDesignDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; List professorForumIds = Collections.emptyList(); - List forumIds = Collections.emptyList(); - List boardSeqs = Collections.emptyList(); - List menuSeqs = Collections.emptyList(); - this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "COMMDESIGN", boardSeqs, menuSeqs); - this.code = "122402"; - this.departmentName = DepartmentName.COMM_DESIGN; + this.noticeScrapInfo = new NoticeScrapInfo(COMM_DESIGN.getHostPrefix(), 0); + this.departmentName = COMM_DESIGN; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/ContemporaryArtDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/ContemporaryArtDept.java index c320f1fa..2959e33f 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/ContemporaryArtDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/ContemporaryArtDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.art_design; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.CONT_ART) +import static com.kustacks.kuring.notice.domain.DepartmentName.CONT_ART; + +@RegisterDepartmentMap(key = CONT_ART) public class ContemporaryArtDept extends ArtDesignCollege { public ContemporaryArtDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public ContemporaryArtDept(NoticeApiClient latestPa this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("4089"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("986"); - List menuSeqs = List.of("6805"); - + List professorForumIds = List.of("11236"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "CONTEMPORARYART", boardSeqs, menuSeqs); - this.code = "122406"; - this.departmentName = DepartmentName.CONT_ART; + this.noticeScrapInfo = new NoticeScrapInfo(CONT_ART.getHostPrefix(), 489); + this.departmentName = CONT_ART; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/IndustrialDesignDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/IndustrialDesignDept.java index ca7455c9..5abd4254 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/IndustrialDesignDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/IndustrialDesignDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.art_design; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.IND_DESIGN) +import static com.kustacks.kuring.notice.domain.DepartmentName.IND_DESIGN; + +@RegisterDepartmentMap(key = IND_DESIGN) public class IndustrialDesignDept extends ArtDesignCollege { public IndustrialDesignDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public IndustrialDesignDept(NoticeApiClient latestP this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("4085"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("439"); - List menuSeqs = List.of("3015"); - + List professorForumIds = List.of("17316"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "DESIGNID", boardSeqs, menuSeqs); - this.code = "122403"; - this.departmentName = DepartmentName.IND_DESIGN; + this.noticeScrapInfo = new NoticeScrapInfo(IND_DESIGN.getHostPrefix(), 4017); + this.departmentName = IND_DESIGN; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/LivingDesignDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/LivingDesignDept.java index 7d6853cd..a2a1f86c 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/LivingDesignDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/LivingDesignDept.java @@ -1,37 +1,32 @@ package com.kustacks.kuring.worker.scrap.deptinfo.art_design; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; +import static com.kustacks.kuring.notice.domain.DepartmentName.LIVING_DESIGN; + // 교수 소개 구조 다른 홈페이지와 다름.. -@RegisterDepartmentMap(key = DepartmentName.LIVING_DESIGN) +@RegisterDepartmentMap(key = LIVING_DESIGN) public class LivingDesignDept extends ArtDesignCollege { public LivingDesignDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = Collections.emptyList(); - List forumIds = List.of("15382254"); - List boardSeqs = List.of("1512"); - List menuSeqs = List.of("11325"); - + List professorForumIds = List.of("11209"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "LIVINGDESIGN", boardSeqs, menuSeqs); - this.code = "126781"; - this.departmentName = DepartmentName.LIVING_DESIGN; + this.noticeScrapInfo = new NoticeScrapInfo(LIVING_DESIGN.getHostPrefix(), 962); + this.departmentName = LIVING_DESIGN; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/MovingImageFilmDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/MovingImageFilmDept.java index 21a473d7..528d7e9c 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/MovingImageFilmDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/art_design/MovingImageFilmDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.art_design; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.MOV_IMAGE) +import static com.kustacks.kuring.notice.domain.DepartmentName.MOV_IMAGE; + +@RegisterDepartmentMap(key = MOV_IMAGE) public class MovingImageFilmDept extends ArtDesignCollege { public MovingImageFilmDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public MovingImageFilmDept(NoticeApiClient latestPa this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("15032480"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("580"); - List menuSeqs = List.of("4508"); - + List professorForumIds = List.of("11263"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "MOVINGIMAGES", boardSeqs, menuSeqs); - this.code = "127128"; - this.departmentName = DepartmentName.MOV_IMAGE; + this.noticeScrapInfo = new NoticeScrapInfo(MOV_IMAGE.getHostPrefix(), 491); + this.departmentName = MOV_IMAGE; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/business/BusinessAdministrationDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/business/BusinessAdministrationDept.java index 4383a153..c9ff4c70 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/business/BusinessAdministrationDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/business/BusinessAdministrationDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.business; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.BUIS_ADMIN) +import static com.kustacks.kuring.notice.domain.DepartmentName.BUIS_ADMIN; + +@RegisterDepartmentMap(key = BUIS_ADMIN) public class BusinessAdministrationDept extends BusinessCollege { public BusinessAdministrationDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public BusinessAdministrationDept(NoticeApiClient l this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("3685475"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("460"); - List menuSeqs = List.of("3243"); - + List professorForumIds = List.of("10499"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "BIZ", boardSeqs, menuSeqs); - this.code = "126780"; - this.departmentName = DepartmentName.BUIS_ADMIN; + this.noticeScrapInfo = new NoticeScrapInfo(BUIS_ADMIN.getKorName(), 441); + this.departmentName = BUIS_ADMIN; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/business/TechnologicalBusinessDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/business/TechnologicalBusinessDept.java index 5bee5679..f044c500 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/business/TechnologicalBusinessDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/business/TechnologicalBusinessDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.business; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.TECH_BUSI) +import static com.kustacks.kuring.notice.domain.DepartmentName.TECH_BUSI; + +@RegisterDepartmentMap(key = TECH_BUSI) public class TechnologicalBusinessDept extends BusinessCollege { public TechnologicalBusinessDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public TechnologicalBusinessDept(NoticeApiClient la this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("3511696"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1168"); - List menuSeqs = List.of("8081"); - + List professorForumIds = List.of("10526"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "MOT", boardSeqs, menuSeqs); - this.code = "121174"; - this.departmentName = DepartmentName.TECH_BUSI; + this.noticeScrapInfo = new NoticeScrapInfo(TECH_BUSI.getHostPrefix(), 445); + this.departmentName = TECH_BUSI; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/EducationDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/EducationDept.java index 059ba090..b2cadfee 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/EducationDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/EducationDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.education; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.EDUCATION) +import static com.kustacks.kuring.notice.domain.DepartmentName.EDUCATION; + +@RegisterDepartmentMap(key = EDUCATION) public class EducationDept extends EducationCollege { public EducationDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public EducationDept(NoticeApiClient latestPageNoti this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("6238"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("452"); - List menuSeqs = List.of("3147"); - + List professorForumIds = List.of("11444"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "GYOJIK", boardSeqs, menuSeqs); - this.code = "105041"; - this.departmentName = DepartmentName.EDUCATION; + this.noticeScrapInfo = new NoticeScrapInfo(EDUCATION.getHostPrefix(), 507); + this.departmentName = EDUCATION; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/EducationalTechnologyDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/EducationalTechnologyDept.java index b0c96eba..b218dd1b 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/EducationalTechnologyDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/EducationalTechnologyDept.java @@ -1,35 +1,31 @@ package com.kustacks.kuring.worker.scrap.deptinfo.education; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.EDU_TECH) +import static com.kustacks.kuring.notice.domain.DepartmentName.EDU_TECH; + +@RegisterDepartmentMap(key = EDU_TECH) public class EducationalTechnologyDept extends EducationCollege { public EducationalTechnologyDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("5099763"); - List forumIds = List.of("11707"); - List boardSeqs = List.of("1462"); - List menuSeqs = List.of("10740"); - + List professorForumIds = List.of("16532"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "EDUTECH", boardSeqs, menuSeqs); - this.code = "105031"; - this.departmentName = DepartmentName.EDU_TECH; + this.noticeScrapInfo = new NoticeScrapInfo(EDU_TECH.getHostPrefix(), 4020); + this.departmentName = EDU_TECH; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/EnglishEducationDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/EnglishEducationDept.java index 199adca3..a66d0494 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/EnglishEducationDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/EnglishEducationDept.java @@ -1,35 +1,31 @@ package com.kustacks.kuring.worker.scrap.deptinfo.education; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.ENGLISH_EDU) +import static com.kustacks.kuring.notice.domain.DepartmentName.ENGLISH_EDU; + +@RegisterDepartmentMap(key = ENGLISH_EDU) public class EnglishEducationDept extends EducationCollege { public EnglishEducationDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("12930"); - List forumIds = List.of("12927"); - List boardSeqs = List.of("1539"); - List menuSeqs = List.of("11460"); - + List professorForumIds = List.of("11411"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "ENGLISHEDU", boardSeqs, menuSeqs); - this.code = "121175"; - this.departmentName = DepartmentName.ENGLISH_EDU; + this.noticeScrapInfo = new NoticeScrapInfo(ENGLISH_EDU.getHostPrefix(), 505); + this.departmentName = ENGLISH_EDU; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/JapaneseLanguageDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/JapaneseLanguageDept.java index 06259109..7505ed15 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/JapaneseLanguageDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/JapaneseLanguageDept.java @@ -1,36 +1,31 @@ package com.kustacks.kuring.worker.scrap.deptinfo.education; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.JAPANESE_EDU) +import static com.kustacks.kuring.notice.domain.DepartmentName.JAPANESE_EDU; + +@RegisterDepartmentMap(key = JAPANESE_EDU) public class JapaneseLanguageDept extends EducationCollege { public JapaneseLanguageDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("12706"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1092"); - List menuSeqs = List.of("7643"); - + List professorForumIds = List.of("11307"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "JAPAN", boardSeqs, menuSeqs); - this.code = "104981"; - this.departmentName = DepartmentName.JAPANESE_EDU; + this.noticeScrapInfo = new NoticeScrapInfo(JAPANESE_EDU.getHostPrefix(), 497); + this.departmentName = JAPANESE_EDU; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/MathematicsEducationDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/MathematicsEducationDept.java index 9d0630b8..d90f5c1e 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/MathematicsEducationDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/MathematicsEducationDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.education; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.MATH_EDU) +import static com.kustacks.kuring.notice.domain.DepartmentName.MATH_EDU; + +@RegisterDepartmentMap(key = MATH_EDU) public class MathematicsEducationDept extends EducationCollege { public MathematicsEducationDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public MathematicsEducationDept(NoticeApiClient lat this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("4037"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1105"); - List menuSeqs = List.of("7747"); - + List professorForumIds = List.of("11335"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "MATHEDU", boardSeqs, menuSeqs); - this.code = "104991"; - this.departmentName = DepartmentName.MATH_EDU; + this.noticeScrapInfo = new NoticeScrapInfo(MATH_EDU.getHostPrefix(), 499); + this.departmentName = MATH_EDU; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/MusicEducationDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/MusicEducationDept.java index 9225460d..1efab368 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/MusicEducationDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/MusicEducationDept.java @@ -1,35 +1,31 @@ package com.kustacks.kuring.worker.scrap.deptinfo.education; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.MUSIC_EDU) +import static com.kustacks.kuring.notice.domain.DepartmentName.MUSIC_EDU; + +@RegisterDepartmentMap(key = MUSIC_EDU) public class MusicEducationDept extends EducationCollege { public MusicEducationDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("9803"); - List forumIds = List.of("9801"); - List boardSeqs = List.of("1621"); - List menuSeqs = List.of("11972"); - + List professorForumIds = List.of("11383"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "MUSIC", boardSeqs, menuSeqs); - this.code = "105011"; - this.departmentName = DepartmentName.MUSIC_EDU; + this.noticeScrapInfo = new NoticeScrapInfo(MUSIC_EDU.getHostPrefix(), 503); + this.departmentName = MUSIC_EDU; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/PhysicalEducationDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/PhysicalEducationDept.java index 25edea92..c149976a 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/PhysicalEducationDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/education/PhysicalEducationDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.education; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.PHY_EDU) +import static com.kustacks.kuring.notice.domain.DepartmentName.PHY_EDU; + +@RegisterDepartmentMap(key = PHY_EDU) public class PhysicalEducationDept extends EducationCollege { public PhysicalEducationDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public PhysicalEducationDept(NoticeApiClient latest this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("5703"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1097"); - List menuSeqs = List.of("7701"); - + List professorForumIds = List.of("11357"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "KUPE", boardSeqs, menuSeqs); - this.code = "105001"; - this.departmentName = DepartmentName.PHY_EDU; + this.noticeScrapInfo = new NoticeScrapInfo(PHY_EDU.getHostPrefix(), 501); + this.departmentName = PHY_EDU; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/AdvancedIndustrialFusionDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/AdvancedIndustrialFusionDept.java index 99f6cd55..52875c77 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/AdvancedIndustrialFusionDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/AdvancedIndustrialFusionDept.java @@ -1,36 +1,31 @@ package com.kustacks.kuring.worker.scrap.deptinfo.engineering; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.ADV_INDUSTRIAL) +import static com.kustacks.kuring.notice.domain.DepartmentName.ADV_INDUSTRIAL; + +@RegisterDepartmentMap(key = ADV_INDUSTRIAL) public class AdvancedIndustrialFusionDept extends EngineeringCollege { public AdvancedIndustrialFusionDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("4113024"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1109"); - List menuSeqs = List.of("7794"); - + List professorForumIds = List.of("10085"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "AIF", boardSeqs, menuSeqs); - this.code = "127431"; - this.departmentName = DepartmentName.ADV_INDUSTRIAL; + this.noticeScrapInfo = new NoticeScrapInfo(ADV_INDUSTRIAL.getHostPrefix(), 415); + this.departmentName = ADV_INDUSTRIAL; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/BiologicalDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/BiologicalDept.java index 79dd122b..a18ace5f 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/BiologicalDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/BiologicalDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.engineering; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.BIOLOGICAL) +import static com.kustacks.kuring.notice.domain.DepartmentName.BIOLOGICAL; + +@RegisterDepartmentMap(key = BIOLOGICAL) public class BiologicalDept extends EngineeringCollege { public BiologicalDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public BiologicalDept(NoticeApiClient latestPageNot this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("7849"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1131"); - List menuSeqs = List.of("7888"); - + List professorForumIds = List.of("10097"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "MICROBIO", boardSeqs, menuSeqs); - this.code = "122055"; - this.departmentName = DepartmentName.BIOLOGICAL; + this.noticeScrapInfo = new NoticeScrapInfo(BIOLOGICAL.getHostPrefix(), 790); + this.departmentName = BIOLOGICAL; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/ChemicalDivisionDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/ChemicalDivisionDept.java index 1768dd8d..f4bbff37 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/ChemicalDivisionDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/ChemicalDivisionDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.engineering; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.CHEMI_DIV) +import static com.kustacks.kuring.notice.domain.DepartmentName.CHEMI_DIV; + +@RegisterDepartmentMap(key = CHEMI_DIV) public class ChemicalDivisionDept extends EngineeringCollege { public ChemicalDivisionDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public ChemicalDivisionDept(NoticeApiClient latestP this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("18611422"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("228"); - List menuSeqs = List.of("1871"); - + List professorForumIds = List.of("9926"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "CHEMENG", boardSeqs, menuSeqs); - this.code = "127111"; - this.departmentName = DepartmentName.CHEMI_DIV; + this.noticeScrapInfo = new NoticeScrapInfo(CHEMI_DIV.getHostPrefix(), 409); + this.departmentName = CHEMI_DIV; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/CivilEnvironmentDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/CivilEnvironmentDept.java index d2343056..2cceeb0b 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/CivilEnvironmentDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/CivilEnvironmentDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.engineering; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.CIVIL_ENV) +import static com.kustacks.kuring.notice.domain.DepartmentName.CIVIL_ENV; + +@RegisterDepartmentMap(key = CIVIL_ENV) public class CivilEnvironmentDept extends EngineeringCollege { public CivilEnvironmentDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public CivilEnvironmentDept(NoticeApiClient latestP this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("6308"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1049"); - List menuSeqs = List.of("7353"); - + List professorForumIds = List.of("10022"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "CIVILENV", boardSeqs, menuSeqs); - this.code = "127108"; - this.departmentName = DepartmentName.CIVIL_ENV; + this.noticeScrapInfo = new NoticeScrapInfo(CIVIL_ENV.getHostPrefix(), 401); + this.departmentName = CIVIL_ENV; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/ComputerScienceDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/ComputerScienceDept.java index c57a0d2a..933d051a 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/ComputerScienceDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/ComputerScienceDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.engineering; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.COMPUTER) +import static com.kustacks.kuring.notice.domain.DepartmentName.COMPUTER; + +@RegisterDepartmentMap(key = COMPUTER) public class ComputerScienceDept extends EngineeringCollege { public ComputerScienceDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public ComputerScienceDept(NoticeApiClient latestPa this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("12351719"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("882"); - List menuSeqs = List.of("6097"); - + List professorForumIds = List.of("9938"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "CSE", boardSeqs, menuSeqs); - this.code = "127428"; - this.departmentName = DepartmentName.COMPUTER; + this.noticeScrapInfo = new NoticeScrapInfo(COMPUTER.getHostPrefix(), 775); + this.departmentName = COMPUTER; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/ElectricalElectronicsDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/ElectricalElectronicsDept.java index 5e489244..aba3128f 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/ElectricalElectronicsDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/ElectricalElectronicsDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.engineering; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.ELEC_ELEC) +import static com.kustacks.kuring.notice.domain.DepartmentName.ELEC_ELEC; + +@RegisterDepartmentMap(key = ELEC_ELEC) public class ElectricalElectronicsDept extends EngineeringCollege { public ElectricalElectronicsDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public ElectricalElectronicsDept(NoticeApiClient la this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("18634838"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("424"); - List menuSeqs = List.of("2837"); - + List professorForumIds = List.of("10962"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "EE", boardSeqs, menuSeqs); - this.code = "127110"; - this.departmentName = DepartmentName.ELEC_ELEC; + this.noticeScrapInfo = new NoticeScrapInfo(ELEC_ELEC.getHostPrefix(), 407); + this.departmentName = ELEC_ELEC; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/IndustrialDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/IndustrialDept.java index d5508087..1723afcc 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/IndustrialDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/IndustrialDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.engineering; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.INDUSTRIAL) +import static com.kustacks.kuring.notice.domain.DepartmentName.INDUSTRIAL; + +@RegisterDepartmentMap(key = INDUSTRIAL) public class IndustrialDept extends EngineeringCollege { public IndustrialDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public IndustrialDept(NoticeApiClient latestPageNot this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("4930"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("840"); - List menuSeqs = List.of("5857"); - + List professorForumIds = List.of("9972"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "KIES", boardSeqs, menuSeqs); - this.code = "127430"; - this.departmentName = DepartmentName.INDUSTRIAL; + this.noticeScrapInfo = new NoticeScrapInfo(INDUSTRIAL.getHostPrefix(), 413); + this.departmentName = INDUSTRIAL; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/KBeautyIndustryFusionDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/KBeautyIndustryFusionDept.java index 01f60cd8..f7b6f821 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/KBeautyIndustryFusionDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/KBeautyIndustryFusionDept.java @@ -1,35 +1,31 @@ package com.kustacks.kuring.worker.scrap.deptinfo.engineering; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.KBEAUTY) +import static com.kustacks.kuring.notice.domain.DepartmentName.KBEAUTY; + +@RegisterDepartmentMap(key = KBEAUTY) public class KBeautyIndustryFusionDept extends EngineeringCollege { public KBeautyIndustryFusionDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("17275625"); - List forumIds = List.of("17258184"); - List boardSeqs = List.of("1552"); - List menuSeqs = List.of("11545"); - + List professorForumIds = List.of("10127"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "KBEAUTY", boardSeqs, menuSeqs); - this.code = "127432"; - this.departmentName = DepartmentName.KBEAUTY; + this.noticeScrapInfo = new NoticeScrapInfo(KBEAUTY.getHostPrefix(), 419); + this.departmentName = KBEAUTY; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/MechanicalAerospaceDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/MechanicalAerospaceDept.java index 5d100db9..24000c7f 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/MechanicalAerospaceDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/engineering/MechanicalAerospaceDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.engineering; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.MECH_AERO) +import static com.kustacks.kuring.notice.domain.DepartmentName.MECH_AERO; + +@RegisterDepartmentMap(key = MECH_AERO) public class MechanicalAerospaceDept extends EngineeringCollege { public MechanicalAerospaceDept(NoticeApiClient latestPageNoticeApiClient, @@ -24,13 +24,8 @@ public MechanicalAerospaceDept(NoticeApiClient late this.latestPageNoticeProperties = latestPageNoticeProperties; List professorForumIds = List.of("20565480"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("988"); - List menuSeqs = List.of("6823"); - this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "MAE", boardSeqs, menuSeqs); - this.code = "127427"; - this.departmentName = DepartmentName.MECH_AERO; + this.noticeScrapInfo = new NoticeScrapInfo(MECH_AERO.getHostPrefix(), 405); + this.departmentName = MECH_AERO; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/BioMedicalScienceDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/BioMedicalScienceDept.java index 09ab864b..e1660d3c 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/BioMedicalScienceDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/BioMedicalScienceDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.ku_integrated_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.BIO_MEDICAL) +import static com.kustacks.kuring.notice.domain.DepartmentName.BIO_MEDICAL; + +@RegisterDepartmentMap(key = BIO_MEDICAL) public class BioMedicalScienceDept extends KuIntegratedScienceCollege { public BioMedicalScienceDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public BioMedicalScienceDept(NoticeApiClient latest this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("15602966"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("291"); - List menuSeqs = List.of("2199"); - + List professorForumIds = List.of("10770"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "BMSE", boardSeqs, menuSeqs); - this.code = "126918"; - this.departmentName = DepartmentName.BIO_MEDICAL; + this.noticeScrapInfo = new NoticeScrapInfo(BIO_MEDICAL.getHostPrefix(), 880); + this.departmentName = BIO_MEDICAL; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/CosmeticsDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/CosmeticsDept.java index 11c31874..acb1805a 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/CosmeticsDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/CosmeticsDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.ku_integrated_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.COSMETICS) +import static com.kustacks.kuring.notice.domain.DepartmentName.COSMETICS; + +@RegisterDepartmentMap(key = COSMETICS) public class CosmeticsDept extends KuIntegratedScienceCollege { public CosmeticsDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public CosmeticsDept(NoticeApiClient latestPageNoti this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("15623085"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("297"); - List menuSeqs = List.of("2251"); - + List professorForumIds = List.of("15930"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "COSMETICS", boardSeqs, menuSeqs); - this.code = "126916"; - this.departmentName = DepartmentName.COSMETICS; + this.noticeScrapInfo = new NoticeScrapInfo(COSMETICS.getHostPrefix(), 457); + this.departmentName = COSMETICS; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/EnergyDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/EnergyDept.java index dd1eea1d..ce8400b7 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/EnergyDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/EnergyDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.ku_integrated_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.ENERGY) +import static com.kustacks.kuring.notice.domain.DepartmentName.ENERGY; + +@RegisterDepartmentMap(key = ENERGY) public class EnergyDept extends KuIntegratedScienceCollege { public EnergyDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public EnergyDept(NoticeApiClient latestPageNoticeA this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("15618550"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("417"); - List menuSeqs = List.of("2759"); - + List professorForumIds = List.of("10614"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "ENERGY", boardSeqs, menuSeqs); - this.code = "126913"; - this.departmentName = DepartmentName.ENERGY; + this.noticeScrapInfo = new NoticeScrapInfo(ENERGY.getHostPrefix(), 451); + this.departmentName = ENERGY; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/IntergrativeBioscienceBiotechnologyDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/IntergrativeBioscienceBiotechnologyDept.java index fdc0823d..f1ca5d55 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/IntergrativeBioscienceBiotechnologyDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/IntergrativeBioscienceBiotechnologyDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.ku_integrated_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.INT_BIO_TECH) +import static com.kustacks.kuring.notice.domain.DepartmentName.INT_BIO_TECH; + +@RegisterDepartmentMap(key = INT_BIO_TECH) public class IntergrativeBioscienceBiotechnologyDept extends KuIntegratedScienceCollege { public IntergrativeBioscienceBiotechnologyDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public IntergrativeBioscienceBiotechnologyDept(NoticeApiClient professorForumIds = List.of("14570494"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1154"); - List menuSeqs = List.of("8002"); - + List professorForumIds = List.of("10837"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "IBB", boardSeqs, menuSeqs); - this.code = "126920"; - this.departmentName = DepartmentName.INT_BIO_TECH; + this.noticeScrapInfo = new NoticeScrapInfo(INT_BIO_TECH.getHostPrefix(), 895); + this.departmentName = INT_BIO_TECH; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/SmartIctConvergenceDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/SmartIctConvergenceDept.java index cccc1b88..8a8381ac 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/SmartIctConvergenceDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/SmartIctConvergenceDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.ku_integrated_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.SMART_ICT) +import static com.kustacks.kuring.notice.domain.DepartmentName.SMART_ICT; + +@RegisterDepartmentMap(key = SMART_ICT) public class SmartIctConvergenceDept extends KuIntegratedScienceCollege { public SmartIctConvergenceDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public SmartIctConvergenceDept(NoticeApiClient late this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("15596417"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("401"); - List menuSeqs = List.of("2632"); - + List professorForumIds = List.of("10673"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "SICTE", boardSeqs, menuSeqs); - this.code = "126915"; - this.departmentName = DepartmentName.SMART_ICT; + this.noticeScrapInfo = new NoticeScrapInfo(SMART_ICT.getHostPrefix(), 455); + this.departmentName = SMART_ICT; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/SmartVehicleDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/SmartVehicleDept.java index ba05c2f2..2fdf1443 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/SmartVehicleDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/SmartVehicleDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.ku_integrated_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.SMART_VEHICLE) +import static com.kustacks.kuring.notice.domain.DepartmentName.SMART_VEHICLE; + +@RegisterDepartmentMap(key = SMART_VEHICLE) public class SmartVehicleDept extends KuIntegratedScienceCollege { public SmartVehicleDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public SmartVehicleDept(NoticeApiClient latestPageN this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("15883304"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("405"); - List menuSeqs = List.of("2681"); - + List professorForumIds = List.of("10656"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "SMARTVEHICLE", boardSeqs, menuSeqs); - this.code = "126914"; - this.departmentName = DepartmentName.SMART_VEHICLE; + this.noticeScrapInfo = new NoticeScrapInfo(SMART_VEHICLE.getHostPrefix(), 453); + this.departmentName = SMART_VEHICLE; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/StemCellRegenerativeBioTechnologyDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/StemCellRegenerativeBioTechnologyDept.java index 5593af34..c56efea9 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/StemCellRegenerativeBioTechnologyDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/StemCellRegenerativeBioTechnologyDept.java @@ -1,35 +1,31 @@ package com.kustacks.kuring.worker.scrap.deptinfo.ku_integrated_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.STEM_REGEN) +import static com.kustacks.kuring.notice.domain.DepartmentName.STEM_REGEN; + +@RegisterDepartmentMap(key = STEM_REGEN) public class StemCellRegenerativeBioTechnologyDept extends KuIntegratedScienceCollege { public StemCellRegenerativeBioTechnologyDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("14914654"); - List forumIds = List.of("14901014", "14904868"); - List boardSeqs = List.of("1518"); - List menuSeqs = List.of("11307"); - + List professorForumIds = List.of("10744"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "SCRB", boardSeqs, menuSeqs); - this.code = "126917"; - this.departmentName = DepartmentName.STEM_REGEN; + this.noticeScrapInfo = new NoticeScrapInfo(STEM_REGEN.getHostPrefix(), 876); + this.departmentName = STEM_REGEN; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/SystemBiotechnologyDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/SystemBiotechnologyDept.java index c81f82f4..706ba73f 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/SystemBiotechnologyDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/ku_integrated_science/SystemBiotechnologyDept.java @@ -1,35 +1,31 @@ package com.kustacks.kuring.worker.scrap.deptinfo.ku_integrated_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.SYSTEM_BIO_TECH) +import static com.kustacks.kuring.notice.domain.DepartmentName.SYSTEM_BIO_TECH; + +@RegisterDepartmentMap(key = SYSTEM_BIO_TECH) public class SystemBiotechnologyDept extends KuIntegratedScienceCollege { public SystemBiotechnologyDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("14795511"); - List forumIds = List.of("14715702"); - List boardSeqs = List.of("1544"); - List menuSeqs = List.of("11499"); - + List professorForumIds = List.of("10810"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "KUSYSBT", boardSeqs, menuSeqs); - this.code = "126919"; - this.departmentName = DepartmentName.SYSTEM_BIO_TECH; + this.noticeScrapInfo = new NoticeScrapInfo(SYSTEM_BIO_TECH.getHostPrefix(), 887); + this.departmentName = SYSTEM_BIO_TECH; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/ChineseDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/ChineseDept.java index e667a2cc..7b479d59 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/ChineseDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/ChineseDept.java @@ -1,35 +1,31 @@ package com.kustacks.kuring.worker.scrap.deptinfo.liberal_art; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.CHINESE) +import static com.kustacks.kuring.notice.domain.DepartmentName.CHINESE; + +@RegisterDepartmentMap(key = CHINESE) public class ChineseDept extends LiberalArtCollege { public ChineseDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("3086"); - List forumIds = List.of("5335"); - List boardSeqs = List.of("1606"); - List menuSeqs = List.of("12182"); - + List professorForumIds = List.of("3989"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "CHINALL", boardSeqs, menuSeqs); - this.code = "121255"; - this.departmentName = DepartmentName.CHINESE; + this.noticeScrapInfo = new NoticeScrapInfo(CHINESE.getHostPrefix(), 353); + this.departmentName = CHINESE; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/CultureContentDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/CultureContentDept.java index 079dff4d..e30a4596 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/CultureContentDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/CultureContentDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.liberal_art; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.CULTURE_CONT) +import static com.kustacks.kuring.notice.domain.DepartmentName.CULTURE_CONT; + +@RegisterDepartmentMap(key = CULTURE_CONT) public class CultureContentDept extends LiberalArtCollege { public CultureContentDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public CultureContentDept(NoticeApiClient latestPag this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("89388", "3934522", "14064096"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1060"); - List menuSeqs = List.of("7489"); - + List professorForumIds = List.of("8001"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "CULTURECONTENTS", boardSeqs, menuSeqs); - this.code = "121259"; - this.departmentName = DepartmentName.CULTURE_CONT; + this.noticeScrapInfo = new NoticeScrapInfo(CULTURE_CONT.getHostPrefix(), 661); + this.departmentName = CULTURE_CONT; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/EnglishDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/EnglishDept.java index e0856f4f..2c845f60 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/EnglishDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/EnglishDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.liberal_art; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.ENGLISH) +import static com.kustacks.kuring.notice.domain.DepartmentName.ENGLISH; + +@RegisterDepartmentMap(key = ENGLISH) public class EnglishDept extends LiberalArtCollege { public EnglishDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public EnglishDept(NoticeApiClient latestPageNotice this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("7603"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("590"); - List menuSeqs = List.of("4595"); - + List professorForumIds = List.of("3886"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "ENGLISH", boardSeqs, menuSeqs); - this.code = "121254"; - this.departmentName = DepartmentName.ENGLISH; + this.noticeScrapInfo = new NoticeScrapInfo(ENGLISH.getHostPrefix(), 347); + this.departmentName = ENGLISH; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/GeologyDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/GeologyDept.java index 372e43d3..6d3d11ad 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/GeologyDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/GeologyDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.liberal_art; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.GEOLOGY) +import static com.kustacks.kuring.notice.domain.DepartmentName.GEOLOGY; + +@RegisterDepartmentMap(key = GEOLOGY) public class GeologyDept extends LiberalArtCollege { public GeologyDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public GeologyDept(NoticeApiClient latestPageNotice this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("7781"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1036"); - List menuSeqs = List.of("7218"); - + List professorForumIds = List.of("11509"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "KUGEO", boardSeqs, menuSeqs); - this.code = "127107"; - this.departmentName = DepartmentName.GEOLOGY; + this.noticeScrapInfo = new NoticeScrapInfo(GEOLOGY.getHostPrefix(), 373); + this.departmentName = GEOLOGY; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/HistoryDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/HistoryDept.java index e013b319..ffe397ed 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/HistoryDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/HistoryDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.liberal_art; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.HISTORY) +import static com.kustacks.kuring.notice.domain.DepartmentName.HISTORY; + +@RegisterDepartmentMap(key = HISTORY) public class HistoryDept extends LiberalArtCollege { public HistoryDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public HistoryDept(NoticeApiClient latestPageNotice this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("10839"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1259"); - List menuSeqs = List.of("8802"); - + List professorForumIds = List.of("4110"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "KHISTORY", boardSeqs, menuSeqs); - this.code = "121257"; - this.departmentName = DepartmentName.HISTORY; + this.noticeScrapInfo = new NoticeScrapInfo(HISTORY.getHostPrefix(), 361); + this.departmentName = HISTORY; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/KoreanDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/KoreanDept.java index cef8df3f..3eada1f6 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/KoreanDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/KoreanDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.liberal_art; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.KOREAN) +import static com.kustacks.kuring.notice.domain.DepartmentName.KOREAN; + +@RegisterDepartmentMap(key = KOREAN) public class KoreanDept extends LiberalArtCollege { public KoreanDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public KoreanDept(NoticeApiClient latestPageNoticeA this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("31204"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("506"); - List menuSeqs = List.of("3681"); - + List professorForumIds = List.of("3815"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "KOREA", boardSeqs, menuSeqs); - this.code = "121253"; - this.departmentName = DepartmentName.KOREAN; + this.noticeScrapInfo = new NoticeScrapInfo(KOREAN.getHostPrefix(), 334); + this.departmentName = KOREAN; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/MediaCommunicationDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/MediaCommunicationDept.java index a6cba541..a67c7347 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/MediaCommunicationDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/MediaCommunicationDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.liberal_art; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.MEDIA_COMM) +import static com.kustacks.kuring.notice.domain.DepartmentName.MEDIA_COMM; + +@RegisterDepartmentMap(key = MEDIA_COMM) public class MediaCommunicationDept extends LiberalArtCollege { public MediaCommunicationDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public MediaCommunicationDept(NoticeApiClient lates this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("11939245"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1043"); - List menuSeqs = List.of("7275"); - + List professorForumIds = List.of("7879"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "COMM", boardSeqs, menuSeqs); - this.code = "122281"; - this.departmentName = DepartmentName.MEDIA_COMM; + this.noticeScrapInfo = new NoticeScrapInfo(MEDIA_COMM.getHostPrefix(), 375); + this.departmentName = MEDIA_COMM; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/PhilosophyDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/PhilosophyDept.java index 7e2b3a1c..cc82c95a 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/PhilosophyDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/liberal_art/PhilosophyDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.liberal_art; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.PHILOSOPHY) +import static com.kustacks.kuring.notice.domain.DepartmentName.PHILOSOPHY; + +@RegisterDepartmentMap(key = PHILOSOPHY) public class PhilosophyDept extends LiberalArtCollege { public PhilosophyDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public PhilosophyDept(NoticeApiClient latestPageNot this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("8564"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1238"); - List menuSeqs = List.of("8686"); - + List professorForumIds = List.of("4046"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "PHILO", boardSeqs, menuSeqs); - this.code = "121256"; - this.departmentName = DepartmentName.PHILOSOPHY; + this.noticeScrapInfo = new NoticeScrapInfo(PHILOSOPHY.getHostPrefix(), 356); + this.departmentName = PHILOSOPHY; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/real_estate/RealEstateDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/real_estate/RealEstateDept.java index e1f96ba5..2832ff2f 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/real_estate/RealEstateDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/real_estate/RealEstateDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.real_estate; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.REAL_ESTATE) +import static com.kustacks.kuring.notice.domain.DepartmentName.REAL_ESTATE; + +@RegisterDepartmentMap(key = REAL_ESTATE) public class RealEstateDept extends RealEstateCollege { // 부동산학과는 교수진 정보를 렌더링하는 방법이 다름. 따라서 pfForumId 인자를 전달하지 않았다. @@ -24,14 +24,9 @@ public RealEstateDept(NoticeApiClient realEstateNot this.htmlParser = realEstateNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = Collections.emptyList(); - List forumIds = Collections.emptyList(); - List boardSeqs = Collections.emptyList(); - List menuSeqs = Collections.emptyList(); - + List professorForumIds = List.of("13949"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "REALESTATE", boardSeqs, menuSeqs); - this.code = "127426"; - this.departmentName = DepartmentName.REAL_ESTATE; + this.noticeScrapInfo = new NoticeScrapInfo(REAL_ESTATE.getHostPrefix(), 1563); + this.departmentName = REAL_ESTATE; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/AnimalResourcesFoodScienceBiotechnologyDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/AnimalResourcesFoodScienceBiotechnologyDept.java index fb6c5586..648fd59a 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/AnimalResourcesFoodScienceBiotechnologyDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/AnimalResourcesFoodScienceBiotechnologyDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.sanghuo_biology; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.ANIMAL_RESOURCES) +import static com.kustacks.kuring.notice.domain.DepartmentName.ANIMAL_RESOURCES; + +@RegisterDepartmentMap(key = ANIMAL_RESOURCES) public class AnimalResourcesFoodScienceBiotechnologyDept extends SanghuoBiologyCollege { public AnimalResourcesFoodScienceBiotechnologyDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public AnimalResourcesFoodScienceBiotechnologyDept(NoticeApiClient professorForumIds = List.of("15632573"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("202"); - List menuSeqs = List.of("1560"); - + List professorForumIds = List.of("11016"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "FOODBIO", boardSeqs, menuSeqs); - this.code = "126909"; - this.departmentName = DepartmentName.ANIMAL_RESOURCES; + this.noticeScrapInfo = new NoticeScrapInfo(ANIMAL_RESOURCES.getHostPrefix(), 923); + this.departmentName = ANIMAL_RESOURCES; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/AnimalScienceTechnologyDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/AnimalScienceTechnologyDept.java index 4b976a03..83742879 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/AnimalScienceTechnologyDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/AnimalScienceTechnologyDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.sanghuo_biology; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.ANIMAL_SCIENCE) +import static com.kustacks.kuring.notice.domain.DepartmentName.ANIMAL_SCIENCE; + +@RegisterDepartmentMap(key = ANIMAL_SCIENCE) public class AnimalScienceTechnologyDept extends SanghuoBiologyCollege { public AnimalScienceTechnologyDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public AnimalScienceTechnologyDept(NoticeApiClient this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("17673919"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("82"); - List menuSeqs = List.of("797"); - + List professorForumIds = List.of("10902"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "ANIS", boardSeqs, menuSeqs); - this.code = "126907"; - this.departmentName = DepartmentName.ANIMAL_SCIENCE; + this.noticeScrapInfo = new NoticeScrapInfo(ANIMAL_SCIENCE.getHostPrefix(), 914); + this.departmentName = ANIMAL_SCIENCE; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/BiologicalSciencesDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/BiologicalSciencesDept.java index 18d818fb..e325446a 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/BiologicalSciencesDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/BiologicalSciencesDept.java @@ -1,21 +1,21 @@ package com.kustacks.kuring.worker.scrap.deptinfo.sanghuo_biology; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; +import static com.kustacks.kuring.notice.domain.DepartmentName.BIO_SCIENCE; + // 생명과학특성학과의 baseUrl = http://www.konkuk.ac.kr/cms/Common/MessageBoard/ArticleList.do // 생명과학특성학과는 게시글 링크를 비공개로 해놔서 파싱할 수가 없음. 그래서 forumIds를 주석처리해둠. -@RegisterDepartmentMap(key = DepartmentName.BIO_SCIENCE) +@RegisterDepartmentMap(key = BIO_SCIENCE) public class BiologicalSciencesDept extends SanghuoBiologyCollege { public BiologicalSciencesDept(NoticeApiClient latestPageNoticeApiClient, @@ -25,14 +25,9 @@ public BiologicalSciencesDept(NoticeApiClient lates this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("6182"); - List forumIds = Collections.emptyList(); - List boardSeqs = Collections.emptyList(); - List menuSeqs = Collections.emptyList(); - + List professorForumIds = List.of("10864"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "BIOSCIENCE", boardSeqs, menuSeqs); - this.code = "126906"; - this.departmentName = DepartmentName.BIO_SCIENCE; + this.noticeScrapInfo = new NoticeScrapInfo(BIO_SCIENCE.getHostPrefix(), 909); + this.departmentName = BIO_SCIENCE; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/CropScienceDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/CropScienceDept.java index adfcb23a..a6d0302b 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/CropScienceDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/CropScienceDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.sanghuo_biology; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.CROP_SCIENCE) +import static com.kustacks.kuring.notice.domain.DepartmentName.CROP_SCIENCE; + +@RegisterDepartmentMap(key = CROP_SCIENCE) public class CropScienceDept extends SanghuoBiologyCollege { public CropScienceDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public CropScienceDept(NoticeApiClient latestPageNo this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("15766997"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("190"); - List menuSeqs = List.of("1454"); - + List professorForumIds = List.of("10939"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "CROPSCIENCE", boardSeqs, menuSeqs); - this.code = "126908"; - this.departmentName = DepartmentName.CROP_SCIENCE; + this.noticeScrapInfo = new NoticeScrapInfo(CROP_SCIENCE.getHostPrefix(), 471); + this.departmentName = CROP_SCIENCE; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/EnvironmentalHealthScienceDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/EnvironmentalHealthScienceDept.java index 561e6541..d48f1145 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/EnvironmentalHealthScienceDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/EnvironmentalHealthScienceDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.sanghuo_biology; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.ENV_HEALTH_SCIENCE) +import static com.kustacks.kuring.notice.domain.DepartmentName.ENV_HEALTH_SCIENCE; + +@RegisterDepartmentMap(key = ENV_HEALTH_SCIENCE) public class EnvironmentalHealthScienceDept extends SanghuoBiologyCollege { public EnvironmentalHealthScienceDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public EnvironmentalHealthScienceDept(NoticeApiClient professorForumIds = List.of("13900359"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("267"); - List menuSeqs = List.of("2059"); - + List professorForumIds = List.of("11062"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "HEALTHENV", boardSeqs, menuSeqs); - this.code = "126911"; - this.departmentName = DepartmentName.ENV_HEALTH_SCIENCE; + this.noticeScrapInfo = new NoticeScrapInfo(ENV_HEALTH_SCIENCE.getHostPrefix(), 477); + this.departmentName = ENV_HEALTH_SCIENCE; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/FoodMarketingSafetyDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/FoodMarketingSafetyDept.java index 9bac1310..1f7b5d75 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/FoodMarketingSafetyDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/FoodMarketingSafetyDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.sanghuo_biology; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.FOOD_MARKETING) +import static com.kustacks.kuring.notice.domain.DepartmentName.FOOD_MARKETING; + +@RegisterDepartmentMap(key = FOOD_MARKETING) public class FoodMarketingSafetyDept extends SanghuoBiologyCollege { public FoodMarketingSafetyDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public FoodMarketingSafetyDept(NoticeApiClient late this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("15827578"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("262"); - List menuSeqs = List.of("2004"); - + List professorForumIds = List.of("11029"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "KUFSM", boardSeqs, menuSeqs); - this.code = "126910"; - this.departmentName = DepartmentName.FOOD_MARKETING; + this.noticeScrapInfo = new NoticeScrapInfo(FOOD_MARKETING.getHostPrefix(), 929); + this.departmentName = FOOD_MARKETING; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/ForestryLandscapeArchitectureDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/ForestryLandscapeArchitectureDept.java index d276b3f6..1b8bb9b4 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/ForestryLandscapeArchitectureDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_biology/ForestryLandscapeArchitectureDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.sanghuo_biology; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.FORESTRY_LANDSCAPE_ARCH) +import static com.kustacks.kuring.notice.domain.DepartmentName.FORESTRY_LANDSCAPE_ARCH; + +@RegisterDepartmentMap(key = FORESTRY_LANDSCAPE_ARCH) public class ForestryLandscapeArchitectureDept extends SanghuoBiologyCollege { public ForestryLandscapeArchitectureDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public ForestryLandscapeArchitectureDept(NoticeApiClient professorForumIds = List.of("15766919"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("413"); - List menuSeqs = List.of("2729"); - + List professorForumIds = List.of("11103"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "FLA", boardSeqs, menuSeqs); - this.code = "126912"; - this.departmentName = DepartmentName.FORESTRY_LANDSCAPE_ARCH; + this.noticeScrapInfo = new NoticeScrapInfo(FORESTRY_LANDSCAPE_ARCH.getHostPrefix(), 479); + this.departmentName = FORESTRY_LANDSCAPE_ARCH; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_elective/ElectiveEducationCenterDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_elective/ElectiveEducationCenterDept.java index 8050f884..f0ddada1 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_elective/ElectiveEducationCenterDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_elective/ElectiveEducationCenterDept.java @@ -1,35 +1,31 @@ package com.kustacks.kuring.worker.scrap.deptinfo.sanghuo_elective; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.ELE_EDU_CENTER) +import static com.kustacks.kuring.notice.domain.DepartmentName.ELE_EDU_CENTER; + +@RegisterDepartmentMap(key = ELE_EDU_CENTER) public class ElectiveEducationCenterDept extends SanghuoCollege { public ElectiveEducationCenterDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("12886454"); - List forumIds = List.of("8281581"); - List boardSeqs = List.of("1564"); - List menuSeqs = List.of("13921"); - + List professorForumIds = List.of("11471"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "SGEDU", boardSeqs, menuSeqs); - this.code = "126952"; - this.departmentName = DepartmentName.ELE_EDU_CENTER; + this.noticeScrapInfo = new NoticeScrapInfo(ELE_EDU_CENTER.getHostPrefix(), 509); + this.departmentName = ELE_EDU_CENTER; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_elective/VolunteerCenterDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_elective/VolunteerCenterDept.java index bb37cb05..270750a0 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_elective/VolunteerCenterDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/sanghuo_elective/VolunteerCenterDept.java @@ -1,20 +1,21 @@ package com.kustacks.kuring.worker.scrap.deptinfo.sanghuo_elective; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; import java.util.Collections; import java.util.List; +import static com.kustacks.kuring.notice.domain.DepartmentName.VOLUNTEER; + // TODO: 교직원 스크랩 시 장애가 되지 않는지 확인 필요 -@RegisterDepartmentMap(key = DepartmentName.VOLUNTEER) +@RegisterDepartmentMap(key = VOLUNTEER) public class VolunteerCenterDept extends SanghuoCollege { public VolunteerCenterDept(NoticeApiClient latestPageNoticeApiClient, @@ -25,13 +26,8 @@ public VolunteerCenterDept(NoticeApiClient latestPa this.latestPageNoticeProperties = latestPageNoticeProperties; List professorForumIds = Collections.emptyList(); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("773"); - List menuSeqs = List.of("5528"); - this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "VOLUNTEER", boardSeqs, menuSeqs); - this.code = "127424"; - this.departmentName = DepartmentName.VOLUNTEER; + this.noticeScrapInfo = new NoticeScrapInfo(VOLUNTEER.getHostPrefix(), 523); + this.departmentName = VOLUNTEER; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/science/ChemicalsDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/science/ChemicalsDept.java index a6f45723..f0bf5a81 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/science/ChemicalsDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/science/ChemicalsDept.java @@ -1,34 +1,30 @@ package com.kustacks.kuring.worker.scrap.deptinfo.science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.CHEMICALS) +import static com.kustacks.kuring.notice.domain.DepartmentName.CHEMICALS; + +@RegisterDepartmentMap(key = CHEMICALS) public class ChemicalsDept extends ScienceCollege { public ChemicalsDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("8900"); - List forumIds = List.of("8897"); - List boardSeqs = List.of("1525"); - List menuSeqs = List.of("11371"); - + List professorForumIds = List.of("9794"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "CHEMI", boardSeqs, menuSeqs); - this.code = "121261"; - this.departmentName = DepartmentName.CHEMICALS; + this.noticeScrapInfo = new NoticeScrapInfo(CHEMICALS.getHostPrefix(), 739); + this.departmentName = CHEMICALS; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/science/MathematicsDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/science/MathematicsDept.java index beaa400f..b5773ffe 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/science/MathematicsDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/science/MathematicsDept.java @@ -1,35 +1,31 @@ package com.kustacks.kuring.worker.scrap.deptinfo.science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.MATH) +import static com.kustacks.kuring.notice.domain.DepartmentName.MATH; + +@RegisterDepartmentMap(key = MATH) public class MathematicsDept extends ScienceCollege { public MathematicsDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("8663"); - List forumIds = List.of("8652"); - List boardSeqs = List.of("1496"); - List menuSeqs = List.of("11144"); - + List professorForumIds = List.of("9733"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "MATH", boardSeqs, menuSeqs); - this.code = "121260"; - this.departmentName = DepartmentName.MATH; + this.noticeScrapInfo = new NoticeScrapInfo(MATH.getHostPrefix(), 727); + this.departmentName = MATH; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/science/PhysicsDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/science/PhysicsDept.java index 9c42fa22..311ce968 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/science/PhysicsDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/science/PhysicsDept.java @@ -1,34 +1,30 @@ package com.kustacks.kuring.worker.scrap.deptinfo.science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.PHYSICS) +import static com.kustacks.kuring.notice.domain.DepartmentName.PHYSICS; + +@RegisterDepartmentMap(key = PHYSICS) public class PhysicsDept extends ScienceCollege { public PhysicsDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("8747"); - List forumIds = List.of("8897"); - List boardSeqs = List.of("1505"); - List menuSeqs = List.of("11209"); - + List professorForumIds = List.of("9765"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "PHYS", boardSeqs, menuSeqs); - this.code = "126783"; - this.departmentName = DepartmentName.PHYSICS; + this.noticeScrapInfo = new NoticeScrapInfo(PHYSICS.getHostPrefix(), 393); + this.departmentName = PHYSICS; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/AppliedStatisticsDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/AppliedStatisticsDept.java index c0ae1da1..342667aa 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/AppliedStatisticsDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/AppliedStatisticsDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.social_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.STATISTICS) +import static com.kustacks.kuring.notice.domain.DepartmentName.STATISTICS; + +@RegisterDepartmentMap(key = STATISTICS) public class AppliedStatisticsDept extends SocialSciencesCollege { public AppliedStatisticsDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public AppliedStatisticsDept(NoticeApiClient latest this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("5081"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("963"); - List menuSeqs = List.of("6642"); - + List professorForumIds = List.of("10389"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "STAT", boardSeqs, menuSeqs); - this.code = "127124"; - this.departmentName = DepartmentName.STATISTICS; + this.noticeScrapInfo = new NoticeScrapInfo(STATISTICS.getHostPrefix(), 431); + this.departmentName = STATISTICS; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/EconomicsDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/EconomicsDept.java index dd70a551..4c73e944 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/EconomicsDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/EconomicsDept.java @@ -1,36 +1,31 @@ package com.kustacks.kuring.worker.scrap.deptinfo.social_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.ECONOMICS) +import static com.kustacks.kuring.notice.domain.DepartmentName.ECONOMICS; + +@RegisterDepartmentMap(key = ECONOMICS) public class EconomicsDept extends SocialSciencesCollege { public EconomicsDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("9842"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("866"); - List menuSeqs = List.of("5981"); - + List professorForumIds = List.of("10216"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "ECONOMIC", boardSeqs, menuSeqs); - this.code = "127121"; - this.departmentName = DepartmentName.ECONOMICS; + this.noticeScrapInfo = new NoticeScrapInfo(ECONOMICS.getHostPrefix(), 423); + this.departmentName = ECONOMICS; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/GlobalBusinessDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/GlobalBusinessDept.java index 90c0077b..92fca852 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/GlobalBusinessDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/GlobalBusinessDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.social_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.GLOBAL_BUSI) +import static com.kustacks.kuring.notice.domain.DepartmentName.GLOBAL_BUSI; + +@RegisterDepartmentMap(key = GLOBAL_BUSI) public class GlobalBusinessDept extends SocialSciencesCollege { public GlobalBusinessDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public GlobalBusinessDept(NoticeApiClient latestPag this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("7516"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1002"); - List menuSeqs = List.of("7026"); - + List professorForumIds = List.of("10443"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "ITRADE", boardSeqs, menuSeqs); - this.code = "127126"; - this.departmentName = DepartmentName.GLOBAL_BUSI; + this.noticeScrapInfo = new NoticeScrapInfo(GLOBAL_BUSI.getHostPrefix(), 435); + this.departmentName = GLOBAL_BUSI; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/InterDisciplinaryStudiesDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/InterDisciplinaryStudiesDept.java index 864a25d2..89b067df 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/InterDisciplinaryStudiesDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/InterDisciplinaryStudiesDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.social_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.DISCI_STUDIES) +import static com.kustacks.kuring.notice.domain.DepartmentName.DISCI_STUDIES; + +@RegisterDepartmentMap(key = DISCI_STUDIES) public class InterDisciplinaryStudiesDept extends SocialSciencesCollege { public InterDisciplinaryStudiesDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public InterDisciplinaryStudiesDept(NoticeApiClient this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("3716919"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("175"); - List menuSeqs = List.of("1294"); - + List professorForumIds = List.of("0"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "DOLA", boardSeqs, menuSeqs); - this.code = "127125"; - this.departmentName = DepartmentName.DISCI_STUDIES; + this.noticeScrapInfo = new NoticeScrapInfo(DISCI_STUDIES.getHostPrefix(), 0); + this.departmentName = DISCI_STUDIES; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/InternationalTradeDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/InternationalTradeDept.java index ae723262..cc696d76 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/InternationalTradeDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/InternationalTradeDept.java @@ -1,35 +1,31 @@ package com.kustacks.kuring.worker.scrap.deptinfo.social_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.INT_TRADE) +import static com.kustacks.kuring.notice.domain.DepartmentName.INT_TRADE; + +@RegisterDepartmentMap(key = INT_TRADE) public class InternationalTradeDept extends SocialSciencesCollege { public InternationalTradeDept(NoticeApiClient latestPageNoticeApiClient, - NoticeHtmlParserTemplate latestPageNoticeHtmlParserTwo, LatestPageNoticeProperties latestPageNoticeProperties) { + NoticeHtmlParserTemplate latestPageNoticeHtmlParser, LatestPageNoticeProperties latestPageNoticeProperties) { super(); this.noticeApiClient = latestPageNoticeApiClient; - this.htmlParser = latestPageNoticeHtmlParserTwo; + this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("15003249"); - List forumIds = List.of("9517"); - List boardSeqs = List.of("1600"); - List menuSeqs = List.of("11770"); - + List professorForumIds = List.of("10371"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "INT_TRADE", boardSeqs, menuSeqs); - this.code = "127123"; - this.departmentName = DepartmentName.INT_TRADE; + this.noticeScrapInfo = new NoticeScrapInfo(INT_TRADE.getHostPrefix(), 429); + this.departmentName = INT_TRADE; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/PoliticalScienceDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/PoliticalScienceDept.java index 8b53c638..3886b65c 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/PoliticalScienceDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/PoliticalScienceDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.social_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.POLITICS) +import static com.kustacks.kuring.notice.domain.DepartmentName.POLITICS; + +@RegisterDepartmentMap(key = POLITICS) public class PoliticalScienceDept extends SocialSciencesCollege { public PoliticalScienceDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public PoliticalScienceDept(NoticeApiClient latestP this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("6884", "14286274"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1138"); - List menuSeqs = List.of("7929"); - + List professorForumIds = List.of("10199"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "POL", boardSeqs, menuSeqs); - this.code = "127120"; - this.departmentName = DepartmentName.POLITICS; + this.noticeScrapInfo = new NoticeScrapInfo(POLITICS.getHostPrefix(), 803); + this.departmentName = POLITICS; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/PublicAdministrationDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/PublicAdministrationDept.java index d0a12b38..169c612b 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/PublicAdministrationDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/social_science/PublicAdministrationDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.social_science; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.ADMINISTRATION) +import static com.kustacks.kuring.notice.domain.DepartmentName.ADMINISTRATION; + +@RegisterDepartmentMap(key = ADMINISTRATION) public class PublicAdministrationDept extends SocialSciencesCollege { public PublicAdministrationDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public PublicAdministrationDept(NoticeApiClient lat this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("7245"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("1145"); - List menuSeqs = List.of("7970"); - + List professorForumIds = List.of("2507"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "KKUPA", boardSeqs, menuSeqs); - this.code = "127122"; - this.departmentName = DepartmentName.ADMINISTRATION; + this.noticeScrapInfo = new NoticeScrapInfo(ADMINISTRATION.getHostPrefix(), 0); + this.departmentName = ADMINISTRATION; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/veterinary_medicine/VeterinaryMedicineDept.java b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/veterinary_medicine/VeterinaryMedicineDept.java index 558441d1..ebdecf63 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/veterinary_medicine/VeterinaryMedicineDept.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/deptinfo/veterinary_medicine/VeterinaryMedicineDept.java @@ -1,19 +1,19 @@ package com.kustacks.kuring.worker.scrap.deptinfo.veterinary_medicine; -import com.kustacks.kuring.notice.domain.DepartmentName; -import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; +import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.client.notice.NoticeApiClient; +import com.kustacks.kuring.worker.scrap.client.notice.property.LatestPageNoticeProperties; import com.kustacks.kuring.worker.scrap.deptinfo.DeptInfo; import com.kustacks.kuring.worker.scrap.deptinfo.NoticeScrapInfo; import com.kustacks.kuring.worker.scrap.deptinfo.RegisterDepartmentMap; import com.kustacks.kuring.worker.scrap.deptinfo.StaffScrapInfo; -import com.kustacks.kuring.worker.dto.ScrapingResultDto; import com.kustacks.kuring.worker.scrap.parser.notice.NoticeHtmlParserTemplate; -import java.util.Collections; import java.util.List; -@RegisterDepartmentMap(key = DepartmentName.VET_MEDICINE) +import static com.kustacks.kuring.notice.domain.DepartmentName.VET_MEDICINE; + +@RegisterDepartmentMap(key = VET_MEDICINE) public class VeterinaryMedicineDept extends VeterinaryMedicineCollege { public VeterinaryMedicineDept(NoticeApiClient latestPageNoticeApiClient, @@ -23,14 +23,9 @@ public VeterinaryMedicineDept(NoticeApiClient lates this.htmlParser = latestPageNoticeHtmlParser; this.latestPageNoticeProperties = latestPageNoticeProperties; - List professorForumIds = List.of("86647"); - List forumIds = Collections.emptyList(); - List boardSeqs = List.of("475"); - List menuSeqs = List.of("3427"); - + List professorForumIds = List.of("11135", "11136"); this.staffScrapInfo = new StaffScrapInfo(professorForumIds); - this.noticeScrapInfo = new NoticeScrapInfo(forumIds, "VETERINARY", boardSeqs, menuSeqs); - this.code = "105101"; - this.departmentName = DepartmentName.VET_MEDICINE; + this.noticeScrapInfo = new NoticeScrapInfo(VET_MEDICINE.getHostPrefix(), 948); + this.departmentName = VET_MEDICINE; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/parser/notice/LatestPageNoticeHtmlParser.java b/src/main/java/com/kustacks/kuring/worker/scrap/parser/notice/LatestPageNoticeHtmlParser.java index 440df71f..46fbf3f7 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/parser/notice/LatestPageNoticeHtmlParser.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/parser/notice/LatestPageNoticeHtmlParser.java @@ -17,25 +17,23 @@ public boolean support(DeptInfo deptInfo) { @Override protected Elements selectImportantRows(Document document) { - return document.select("#noticeList > tr"); + return document.select(".board-table > tbody > tr").select(".notice"); } @Override protected Elements selectNormalRows(Document document) { - return document.select("#dispList > tr"); + return document.select(".board-table > tbody > tr").not(".notice"); } @Override protected String[] extractNoticeFromRow(Element row) { - String[] oneNoticeInfo = new String[3]; Elements tds = row.getElementsByTag("td"); - Element subjectAndIdElement = tds.get(1).getElementsByTag("a").get(0); - Element postedDateElement = tds.get(3); + // articleId, postedDate, subject + String number = tds.get(1).select("a").attr("onclick").replaceAll("[^0-9]", "").substring(3); + String date = tds.get(3).text(); + String title = tds.get(1).select("strong").text(); - oneNoticeInfo[0] = subjectAndIdElement.attr("data-itsp-view-link"); // articleId - oneNoticeInfo[1] = postedDateElement.ownText(); // postedDate - oneNoticeInfo[2] = subjectAndIdElement.ownText(); // subject - return oneNoticeInfo; + return new String[]{number, date, title}; } } diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/parser/notice/NoticeHtmlParserTemplate.java b/src/main/java/com/kustacks/kuring/worker/scrap/parser/notice/NoticeHtmlParserTemplate.java index aae7d45d..3ca118fb 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/parser/notice/NoticeHtmlParserTemplate.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/parser/notice/NoticeHtmlParserTemplate.java @@ -9,6 +9,7 @@ import java.util.Collections; import java.util.List; +import java.util.stream.Collectors; public abstract class NoticeHtmlParserTemplate { @@ -33,7 +34,7 @@ private List extractNoticeListFromRows(Elements rows) { return rows.stream() .map(this::extractNoticeFromRow) - .toList(); + .collect(Collectors.toList()); } protected abstract boolean support(DeptInfo deptInfo); diff --git a/src/main/java/com/kustacks/kuring/worker/scrap/parser/notice/RowsDto.java b/src/main/java/com/kustacks/kuring/worker/scrap/parser/notice/RowsDto.java index 02c545d2..85904b7b 100644 --- a/src/main/java/com/kustacks/kuring/worker/scrap/parser/notice/RowsDto.java +++ b/src/main/java/com/kustacks/kuring/worker/scrap/parser/notice/RowsDto.java @@ -1,9 +1,10 @@ package com.kustacks.kuring.worker.scrap.parser.notice; import com.kustacks.kuring.worker.update.notice.dto.response.CommonNoticeFormatDto; +import org.springframework.web.util.UriComponentsBuilder; +import java.util.Collections; import java.util.List; -import java.util.stream.Collectors; public class RowsDto { @@ -16,26 +17,36 @@ public RowsDto(List importantRowList, List normalRowList) { } public List buildImportantRowList(String viewUrl) { + Collections.reverse(importantRowList); return importantRowList.stream() .map(row -> CommonNoticeFormatDto .builder() .articleId(row[0]) .postedDate(row[1]) .subject(row[2]) - .fullUrl(viewUrl + row[0]) + .fullUrl( + UriComponentsBuilder.fromUriString(viewUrl) + .buildAndExpand(row[0]) + .toUriString() + ) .important(true) .build()) .toList(); } public List buildNormalRowList(String viewUrl) { + Collections.reverse(normalRowList); return normalRowList.stream() .map(row -> CommonNoticeFormatDto .builder() .articleId(row[0]) .postedDate(row[1]) .subject(row[2]) - .fullUrl(viewUrl + row[0]) + .fullUrl( + UriComponentsBuilder.fromUriString(viewUrl) + .buildAndExpand(row[0]) + .toUriString() + ) .important(false) .build()) .toList(); diff --git a/src/main/java/com/kustacks/kuring/worker/update/notice/CategoryNoticeUpdater.java b/src/main/java/com/kustacks/kuring/worker/update/notice/CategoryNoticeUpdater.java index f9a6a0b0..4a69e5e0 100644 --- a/src/main/java/com/kustacks/kuring/worker/update/notice/CategoryNoticeUpdater.java +++ b/src/main/java/com/kustacks/kuring/worker/update/notice/CategoryNoticeUpdater.java @@ -15,6 +15,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.stereotype.Service; +import java.util.Collections; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.function.Function; @@ -24,24 +25,21 @@ @RequiredArgsConstructor public class CategoryNoticeUpdater { - private final List kuisNoticeInfoList; - private final KuisNoticeScraperTemplate scrapperTemplate; - private final NoticeQueryPort noticeQueryPort; - private final NoticeCommandPort noticeCommandPort; + private final ThreadPoolTaskExecutor noticeUpdaterThreadTaskExecutor; private final FirebaseNotificationService notificationService; private final LibraryNoticeApiClient libraryNoticeApiClient; - private final ThreadPoolTaskExecutor noticeUpdaterThreadTaskExecutor; + private final KuisNoticeScraperTemplate scrapperTemplate; private final NoticeUpdateSupport noticeUpdateSupport; - - private static long startTime = 0L; + private final List kuisNoticeInfoList; + private final NoticeCommandPort noticeCommandPort; + private final NoticeQueryPort noticeQueryPort; /* 학사, 장학, 취창업, 국제, 학생, 산학, 일반, 도서관 공지 갱신 */ - @Scheduled(cron = "0 0/10 6-23 * * *", zone = "Asia/Seoul") // 학교 공지는 오전 6:00 ~ 오후 11:55분 사이에 20분마다 업데이트 된다. + @Scheduled(cron = "0 0/10 6-23 * * *", zone = "Asia/Seoul") // 학교 공지는 오전 6:00 ~ 오후 11:55분 사이에 10분마다 업데이트 된다. public void update() { log.info("========== 공지 업데이트 시작 =========="); - startTime = System.currentTimeMillis(); updateLibrary(); // library는 Kuis공지가 아니라 별도로 먼저 수행한다 @@ -64,7 +62,9 @@ private List updateLibraryNotice(CategoryName categoryNam } private List updateKuisNoticeAsync(KuisNoticeInfo deptInfo, Function> decisionMaker) { - return scrapperTemplate.scrap(deptInfo, decisionMaker); + List noticeDtos = scrapperTemplate.scrap(deptInfo, decisionMaker); + Collections.reverse(noticeDtos); + return noticeDtos; } private List compareLatestAndUpdateDB(List scrapResults, CategoryName categoryName) { @@ -72,12 +72,7 @@ private List compareLatestAndUpdateDB(List scrapR List savedArticleIds = noticeQueryPort.findNormalArticleIdsByCategory(categoryName); // db와 싱크를 맞춘다 - List newNotices = synchronizationWithDb(scrapResults, savedArticleIds, categoryName); - - long endTime = System.currentTimeMillis(); - log.info("[{}] 업데이트 시작으로부터 {}millis 만큼 지남", categoryName.getKorName(), endTime - startTime); - - return newNotices; + return synchronizationWithDb(scrapResults, savedArticleIds, categoryName); } private List synchronizationWithDb(List scrapResults, List savedArticleIds, CategoryName categoryName) { diff --git a/src/main/java/com/kustacks/kuring/worker/update/notice/DepartmentNoticeUpdater.java b/src/main/java/com/kustacks/kuring/worker/update/notice/DepartmentNoticeUpdater.java index 73f00193..78aae86f 100644 --- a/src/main/java/com/kustacks/kuring/worker/update/notice/DepartmentNoticeUpdater.java +++ b/src/main/java/com/kustacks/kuring/worker/update/notice/DepartmentNoticeUpdater.java @@ -37,12 +37,9 @@ public class DepartmentNoticeUpdater { private final FirebaseNotificationService notificationService; private final NoticeUpdateSupport noticeUpdateSupport; - private static long startTime = 0L; - @Scheduled(cron = "0 5/10 8-19 * * *", zone = "Asia/Seoul") // 학교 공지는 오전 8:10 ~ 오후 7:55분 사이에 10분마다 업데이트 된다. public void update() { log.info("******** 학과별 최신 공지 업데이트 시작 ********"); - startTime = System.currentTimeMillis(); for (DeptInfo deptInfo : deptInfoList) { CompletableFuture @@ -55,7 +52,6 @@ public void update() { @Scheduled(cron = "0 0 2 * * *", zone = "Asia/Seoul") // 전체 업데이트는 매일 오전 2시에 한다. public void updateAll() { log.info("******** 학과별 전체 공지 업데이트 시작 ********"); - startTime = System.currentTimeMillis(); for (DeptInfo deptInfo : deptInfoList) { if (deptInfo.isSameDepartment(REAL_ESTATE)) { @@ -69,13 +65,7 @@ public void updateAll() { } private List updateDepartmentAsync(DeptInfo deptInfo, Function> decisionMaker) { - List scrapResults = scrapperTemplate.scrap(deptInfo, decisionMaker); - - for (ComplexNoticeFormatDto scrapResult : scrapResults) { - scrapResult.reverseEachNoticeList(); - } - - return scrapResults; + return scrapperTemplate.scrap(deptInfo, decisionMaker); } private List compareLatestAndUpdateDB(List scrapResults, String departmentName) { @@ -98,9 +88,6 @@ private List compareLatestAndUpdateDB(List scrapResults, St // db와 싱크를 맞춘다 synchronizationWithDb(scrapResult.getNormalNoticeList(), savedNormalArticleIds, departmentNameEnum, false); } - - long endTime = System.currentTimeMillis(); - log.info("[학과] 업데이트 시작으로부터 {}millis 만큼 지남", endTime - startTime); } private void synchronizationWithDb(List scrapResults, List savedArticleIds, DepartmentName departmentNameEnum, boolean important) { diff --git a/src/main/resources/constants.properties b/src/main/resources/constants.properties index 2c65a0eb..ca026383 100644 --- a/src/main/resources/constants.properties +++ b/src/main/resources/constants.properties @@ -2,8 +2,8 @@ notice.kuis.request-url=https://kuis.konkuk.ac.kr/CmmnOneStop/find.do notice.kuis.referer-url=https://kuis.konkuk.ac.kr/index.do notice.normal-base-url=https://old.konkuk.ac.kr/do/MessageBoard/ArticleRead.do notice.library-base-url=https://library.konkuk.ac.kr/library-guide/bulletins/notice -notice.recent.list-url=http://{department}.konkuk.ac.kr/noticeList.do -notice.recent.view-url=http://{department}.konkuk.ac.kr/noticeView.do +notice.recent.list-url=https://{department}.konkuk.ac.kr/bbs/{department}/{siteId}/artclList.do +notice.recent.view-url=https://{department}.konkuk.ac.kr/bbs/{department}/{siteId}/{noticeId}/artclView.do notice.real-estate.list-url=http://www.realestate.ac.kr/gb/bbs/board.php?bo_table=notice notice.real-estate.view-url=http://www.realestate.ac.kr/gb/bbs/board.php?bo_table=notice notice.library.request-url=https://library.konkuk.ac.kr/pyxis-api/1/bulletin-boards/1/bulletins diff --git a/src/main/resources/db/migration/V240226__Truncate_department_notices.sql b/src/main/resources/db/migration/V240226__Truncate_department_notices.sql new file mode 100644 index 00000000..69337fb6 --- /dev/null +++ b/src/main/resources/db/migration/V240226__Truncate_department_notices.sql @@ -0,0 +1,3 @@ +DELETE +FROM notice +WHERE dtype != 'Notice' AND department_name != 'REAL_ESTATE'; diff --git a/src/test/java/com/kustacks/kuring/worker/scrap/client/notice/LatestPageNoticeApiClientTest.java b/src/test/java/com/kustacks/kuring/worker/scrap/client/notice/LatestPageNoticeApiClientTest.java new file mode 100644 index 00000000..74e02566 --- /dev/null +++ b/src/test/java/com/kustacks/kuring/worker/scrap/client/notice/LatestPageNoticeApiClientTest.java @@ -0,0 +1,48 @@ +package com.kustacks.kuring.worker.scrap.client.notice; + +import com.kustacks.kuring.worker.scrap.client.JsoupClient; +import org.jsoup.Jsoup; +import org.jsoup.nodes.Document; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.when; + +@ExtendWith(MockitoExtension.class) +class LatestPageNoticeApiClientTest { + + @Mock + private JsoupClient jsoupClient; + + @DisplayName("공지의 총 개수를 가져온다.") + @Test + public void getTotalNoticeSize() throws IOException { + // given + Document doc = Jsoup.parse(loadHtmlFile("src/test/resources/notice/cse-notice-2024.html")); + when(jsoupClient.get(anyString(), anyInt())).thenReturn(doc); + String url = "https://cse.konkuk.ac.kr/cse/9962/subview.do"; + + // when + int totalNoticeSize = new LatestPageNoticeApiClient(jsoupClient).getTotalNoticeSize(url); + + // then + assertThat(totalNoticeSize).isEqualTo(625); + } + + private static String loadHtmlFile(String filePath) throws IOException { + Path path = Path.of(filePath); + byte[] fileBytes = Files.readAllBytes(path); + return new String(fileBytes, StandardCharsets.UTF_8); + } +} diff --git a/src/test/java/com/kustacks/kuring/worker/scrap/parser/NoticeHtmlParserTemplateTest.java b/src/test/java/com/kustacks/kuring/worker/scrap/parser/NoticeHtmlParserTemplateTest.java index 8e414045..abc06862 100644 --- a/src/test/java/com/kustacks/kuring/worker/scrap/parser/NoticeHtmlParserTemplateTest.java +++ b/src/test/java/com/kustacks/kuring/worker/scrap/parser/NoticeHtmlParserTemplateTest.java @@ -9,6 +9,7 @@ import org.jsoup.nodes.Document; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import org.springframework.web.util.UriComponentsBuilder; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -17,25 +18,79 @@ import java.util.List; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.tuple; import static org.junit.jupiter.api.Assertions.assertAll; class NoticeHtmlParserTemplateTest { + @DisplayName("View Url이 정상적으로 생석되는지 확인한다") + @Test + public void viewUrlCreate() { + // given + String urlTemplate = "https://{department}.konkuk.ac.kr/bbs/{department}/{siteId}/{noticeId}/artclView.do"; + + // when + String viewUrl = urlTemplate + .replaceAll("\\{department\\}", "cse") + .replace("{siteId}", "775"); + + String result = UriComponentsBuilder.fromUriString(viewUrl) + .buildAndExpand(5737) + .toUriString(); + + // then + assertThat(result).isEqualTo("https://cse.konkuk.ac.kr/bbs/cse/775/5737/artclView.do"); + } + @DisplayName("오래된 학과의 홈페이지 공지를 분석한다") @Test void LatestPageNoticeHtmlParser() throws IOException { // given - Document doc = Jsoup.parse(loadHtmlFile("src/test/resources/notice/cse.html")); + Document doc = Jsoup.parse(loadHtmlFile("src/test/resources/notice/cse-notice-2024.html")); + String viewUrl = "https://cse.konkuk.ac.kr/bbs/cse/775/{uniqueNoticeId}/artclView.do"; // when RowsDto rowsDto = new LatestPageNoticeHtmlParser().parse(doc); - List important = rowsDto.buildImportantRowList("important"); - List normal = rowsDto.buildNormalRowList("normal"); + List important = rowsDto.buildImportantRowList(viewUrl); + List normal = rowsDto.buildNormalRowList(viewUrl); // then assertAll( - () -> assertThat(important).hasSize(12), - () -> assertThat(normal).hasSize(12) + () -> assertThat(important).hasSize(15), + () -> assertThat(important) + .extracting("articleId", "subject", "postedDate", "fullUrl", "important") + .containsExactlyInAnyOrder( + tuple("5737", "[졸업] 2024학년도 제135회 학위수여식 관련 졸업가능여부 조회 및 행사 안내", "2024.02.16", "https://cse.konkuk.ac.kr/bbs/cse/775/5737/artclView.do", true), + tuple("828684", "[졸업] 2024년 전기 학위복 대여 및 학위기 배부 장소 안내", "2024.02.05", "https://cse.konkuk.ac.kr/bbs/cse/775/828684/artclView.do", true), + tuple("828683", "[학사] 2024년도 2월 미졸업자 수강신청학점(미졸코드) 변경 안내", "2024.02.02", "https://cse.konkuk.ac.kr/bbs/cse/775/828683/artclView.do", true), + tuple("828681", "[학사] 2024학년도 건국대학교 학부 온라인 요람 발간 안내", "2024.01.31", "https://cse.konkuk.ac.kr/bbs/cse/775/828681/artclView.do", true), + tuple("828680", "[교직] 교직이수예정자의 교직소양 영역 최저이수기준 안내", "2024.01.31", "https://cse.konkuk.ac.kr/bbs/cse/775/828680/artclView.do", true), + tuple("828672", "[학사] 2024-1학기 수강바구니(수강신청) 일정 및 유의사항 안내", "2024.01.12", "https://cse.konkuk.ac.kr/bbs/cse/775/828672/artclView.do", true), + tuple("828670", "[학사] 2024학년도 1학기 조기졸업 신청 안내", "2024.01.08", "https://cse.konkuk.ac.kr/bbs/cse/775/828670/artclView.do", true), + tuple("828669", "[현장실습] 2024학년도 1학기 현장실습학기제 안내", "2024.01.08", "https://cse.konkuk.ac.kr/bbs/cse/775/828669/artclView.do", true), + tuple("828665", "[학사] 2024-1학기 학사구조개편 관련 소속변경 안내", "2023.12.07", "https://cse.konkuk.ac.kr/bbs/cse/775/828665/artclView.do", true), + tuple("828653", "[학사] 가사휴학 연한 제한 제도 시행 안내", "2023.11.03", "https://cse.konkuk.ac.kr/bbs/cse/775/828653/artclView.do", true), + tuple("828351", "[졸업] 컴퓨터공학부 학과별 졸업요건 정리", "2022.02.08", "https://cse.konkuk.ac.kr/bbs/cse/775/828351/artclView.do", true), + tuple("828243", "[졸업] 인턴십 의무이수제 졸업요건 안내", "2021.06.23", "https://cse.konkuk.ac.kr/bbs/cse/775/828243/artclView.do", true), + tuple("828163", "[졸업] 교과목명 신구대비표", "2021.01.25", "https://cse.konkuk.ac.kr/bbs/cse/775/828163/artclView.do", true), + tuple("828089", "[내규] 교환학생 전공학점인정 관련 내규 안내", "2020.07.28", "https://cse.konkuk.ac.kr/bbs/cse/775/828089/artclView.do", true), + tuple("828034", "[내규] 현장실습 전공학점인정 관련 내규 안내", "2020.03.23", "https://cse.konkuk.ac.kr/bbs/cse/775/828034/artclView.do", true) + ), + () -> assertThat(normal).hasSize(10), + () -> assertThat(normal) + .extracting("articleId", "subject", "postedDate", "fullUrl", "important") + .containsExactlyInAnyOrder( + tuple("5744", "[WE人교육센터] 건국대 비교과 프로그램 홍보자료 홍보자료 배포", "2024.02.21", "https://cse.konkuk.ac.kr/bbs/cse/775/5744/artclView.do", false), + tuple("5737", "[졸업] 2024학년도 제135회 학위수여식 관련 졸업가능여부 조회 및 행사 안내", "2024.02.16", "https://cse.konkuk.ac.kr/bbs/cse/775/5737/artclView.do", false), + tuple("5736", "Adobe(어도비) 네임드 라이선스 회수 및 ETLA 라이선스 사용 안내", "2024.02.15", "https://cse.konkuk.ac.kr/bbs/cse/775/5736/artclView.do", false), + tuple("5735", "2024-1학기 학부생 연구인턴 프로그램 시행 안내", "2024.02.14", "https://cse.konkuk.ac.kr/bbs/cse/775/5735/artclView.do", false), + tuple("828684", "[졸업] 2024년 전기 학위복 대여 및 학위기 배부 장소 안내", "2024.02.05", "https://cse.konkuk.ac.kr/bbs/cse/775/828684/artclView.do", false), + tuple("828683", "[학사] 2024년도 2월 미졸업자 수강신청학점(미졸코드) 변경 안내", "2024.02.02", "https://cse.konkuk.ac.kr/bbs/cse/775/828683/artclView.do", false), + tuple("828682", "[학사] 2024-1학기 대학원 개설 교과목 선수강 신청 안내", "2024.01.31", "https://cse.konkuk.ac.kr/bbs/cse/775/828682/artclView.do", false), + tuple("828681", "[학사] 2024학년도 건국대학교 학부 온라인 요람 발간 안내", "2024.01.31", "https://cse.konkuk.ac.kr/bbs/cse/775/828681/artclView.do", false), + tuple("828680", "[교직] 교직이수예정자의 교직소양 영역 최저이수기준 안내", "2024.01.31", "https://cse.konkuk.ac.kr/bbs/cse/775/828680/artclView.do", false), + tuple("828679", "[학사] 성적평점 백분위 환산점수표 관련 규정 개정 안내", "2024.01.30", "https://cse.konkuk.ac.kr/bbs/cse/775/828679/artclView.do", false) + ) ); } diff --git a/src/test/java/com/kustacks/kuring/worker/update/CategoryNoticeUpdaterTest.java b/src/test/java/com/kustacks/kuring/worker/update/CategoryNoticeUpdaterTest.java index 27c28b14..f6c52de4 100644 --- a/src/test/java/com/kustacks/kuring/worker/update/CategoryNoticeUpdaterTest.java +++ b/src/test/java/com/kustacks/kuring/worker/update/CategoryNoticeUpdaterTest.java @@ -14,6 +14,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.test.context.TestPropertySource; +import java.util.Arrays; import java.util.List; import java.util.concurrent.TimeUnit; @@ -67,7 +68,7 @@ void notice_scrap_async_test() throws InterruptedException { } private static List createLibraryFixture() { - return List.of( + return Arrays.asList( CommonNoticeFormatDto.builder().articleId("1").updatedDate("2021-01-01").subject("library1") .postedDate("2021-01-01").fullUrl("https://library.konkuk.ac.kr/library-guide/bulletins/notice/71921").important(false).build(), CommonNoticeFormatDto.builder().articleId("2").updatedDate("2021-01-01").subject("library2") @@ -86,7 +87,7 @@ private static List createLibraryFixture() { } private static List createNoticesFixture() { - return List.of( + return Arrays.asList( CommonNoticeFormatDto.builder().articleId("1").updatedDate("2021-01-01").subject("library1") .postedDate("2021-01-01").fullUrl("https://library.konkuk.ac.kr/library-guide/bulletins/notice/71921").important(false).build(), CommonNoticeFormatDto.builder().articleId("2").updatedDate("2021-01-01").subject("library2") diff --git a/src/test/resources/notice/cse-notice-2024.html b/src/test/resources/notice/cse-notice-2024.html new file mode 100644 index 00000000..4101e280 --- /dev/null +++ b/src/test/resources/notice/cse-notice-2024.html @@ -0,0 +1,2141 @@ + + + + + + + + + + K2Web Wizard + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
학과공지 - 번호, 제목, 작성자, 작성일, 조회수, 첨부파일
번호제목작성자작성일조회수첨부파일
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [졸업] 2024학년도 제135회 학위수여식 관련 졸업가능여부 조회 및 행사 안내 + + + + + + + computer + + + 2024.02.1648 + + + +

1

+ + + +
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [졸업] 2024년 전기 학위복 대여 및 학위기 배부 장소 안내 + + + + + + + 컴퓨터공학부 + + + 2024.02.0539 + + + +

1

+ + + +
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [학사] 2024년도 2월 미졸업자 수강신청학점(미졸코드) 변경 안내 + + + + + + + 컴퓨터공학부 + + + 2024.02.0257 + + + +

2

+ + + +
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [학사] 2024학년도 건국대학교 학부 온라인 요람 발간 안내 + + + + + + + 컴퓨터공학부 + + + 2024.01.3181 + + + +

1

+ + + +
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [교직] 교직이수예정자의 교직소양 영역 최저이수기준 안내 + + + + + + + 컴퓨터공학부 + + + 2024.01.3125 + + + +

1

+ + + +
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [학사] 2024-1학기 수강바구니(수강신청) 일정 및 유의사항 안내 + + + + + + + 컴퓨터공학부 + + + 2024.01.12179 + + + +

4

+ + + +
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [학사] 2024학년도 1학기 조기졸업 신청 안내 + + + + + + + 컴퓨터공학부 + + + 2024.01.0861 + + + +

1

+ + + +
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [현장실습] 2024학년도 1학기 현장실습학기제 안내 + + + + + + + 컴퓨터공학부 + + + 2024.01.0899 + + +

0

+ + + + +
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [학사] 2024-1학기 학사구조개편 관련 소속변경 안내 + + + + + + + 컴퓨터공학부 + + + 2023.12.07222 + + + +

2

+ + + +
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [학사] 가사휴학 연한 제한 제도 시행 안내 + + + + + + + 컴퓨터공학부 + + + 2023.11.0382 + + + +

1

+ + + +
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [졸업] 컴퓨터공학부 학과별 졸업요건 정리 + + + + + + + 컴퓨터공학부 + + + 2022.02.083889 + + + +

1

+ + + +
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [졸업] 인턴십 의무이수제 졸업요건 안내 + + + + + + + 컴퓨터공학부 + + + 2021.06.231576 + + + +

1

+ + + +
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [졸업] 교과목명 신구대비표 + + + + + + + 컴퓨터공학부 + + + 2021.01.251441 + + + +

1

+ + + +
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [내규] 교환학생 전공학점인정 관련 내규 안내 + + + + + + + 컴퓨터공학부 + + + 2020.07.28699 + + + +

1

+ + + +
+ + + + 일반공지 + + + + + [ + + + + 일반공지 + + + ] + [내규] 현장실습 전공학점인정 관련 내규 안내 + + + + + + + 컴퓨터공학부 + + + 2020.03.231731 + + +

0

+ + + + +
625 + + + + + + + + + + + + + + + + [WE人교육센터] 건국대 비교과 프로그램 홍보자료 홍보자료 배포 + + 새글 + + + + + + + + + + + + + + + + + + + + + + computer + + + + + 2024.02.21 + + + + + + 35 + + + + + + + + + + +

0

+ + + + + +
624 + + + + + + + + + + + + + + + + [졸업] 2024학년도 제135회 학위수여식 관련 졸업가능여부 조회 및 행사 안내 + + + + + + + + + + + + + + + + + + + + + + computer + + + + + 2024.02.16 + + + + + + 48 + + + + + + + + + + + +

1

+ + + + +
623 + + + + + + + + + + + + + + + + Adobe(어도비) 네임드 라이선스 회수 및 ETLA 라이선스 사용 안내 + + + + + + + + + + + + + + + + + + + + + + computer + + + + + 2024.02.15 + + + + + + 44 + + + + + + + + + + + +

1

+ + + + +
622 + + + + + + + + + + + + + + + + 2024-1학기 학부생 연구인턴 프로그램 시행 안내 + + + + + + + + + + + + + + + + + + + + + + computer + + + + + 2024.02.14 + + + + + + 66 + + + + + + + + + + + +

4

+ + + + +
621 + + + + + + + + + + + + + + + + [졸업] 2024년 전기 학위복 대여 및 학위기 배부 장소 안내 + + + + + + + + + + + + + + + + + + + + + + 컴퓨터공학부 + + + + + 2024.02.05 + + + + + + 39 + + + + + + + + + + + +

1

+ + + + +
620 + + + + + + + + + + + + + + + + [학사] 2024년도 2월 미졸업자 수강신청학점(미졸코드) 변경 안내 + + + + + + + + + + + + + + + + + + + + + + 컴퓨터공학부 + + + + + 2024.02.02 + + + + + + 57 + + + + + + + + + + + +

2

+ + + + +
619 + + + + + + + + + + + + + + + + [학사] 2024-1학기 대학원 개설 교과목 선수강 신청 안내 + + + + + + + + + + + + + + + + + + + + + + 컴퓨터공학부 + + + + + 2024.01.31 + + + + + + 47 + + + + + + + + + + + +

1

+ + + + +
618 + + + + + + + + + + + + + + + + [학사] 2024학년도 건국대학교 학부 온라인 요람 발간 안내 + + + + + + + + + + + + + + + + + + + + + + 컴퓨터공학부 + + + + + 2024.01.31 + + + + + + 81 + + + + + + + + + + + +

1

+ + + + +
617 + + + + + + + + + + + + + + + + [교직] 교직이수예정자의 교직소양 영역 최저이수기준 안내 + + + + + + + + + + + + + + + + + + + + + + 컴퓨터공학부 + + + + + 2024.01.31 + + + + + + 25 + + + + + + + + + + + +

1

+ + + + +
616 + + + + + + + + + + + + + + + + [학사] 성적평점 백분위 환산점수표 관련 규정 개정 안내 + + + + + + + + + + + + + + + + + + + + + + 컴퓨터공학부 + + + + + 2024.01.30 + + + + + + 26 + + + + + + + + + + + +

1

+ + + + +
+
+
+ +
+ + + + + + + + + +
+
+ 처음 +

163

+다음 페이지 +다음 + +
+
+ +
+ + +
+
+ +
+
+ +
+
+
+ + + + + + + + + + + + + +