diff --git a/src/main/java/com/codessquad/qna/web/QuestionPage.java b/src/main/java/com/codessquad/qna/web/QuestionPage.java new file mode 100644 index 000000000..35a3cb73e --- /dev/null +++ b/src/main/java/com/codessquad/qna/web/QuestionPage.java @@ -0,0 +1,65 @@ +package com.codessquad.qna.web; + +import com.codessquad.qna.web.domain.Question; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import java.util.ArrayList; +import java.util.List; + +public class QuestionPage { + private final int COUNT_NUMBERS_TO_SHOW = 5; + private final Pageable pageable; + private int previous; + private int next; + private Page questions; + private List pageNumbers = new ArrayList<>(COUNT_NUMBERS_TO_SHOW); + + public QuestionPage(Pageable pageable, Page questionsByPage) { + this.pageable = pageable; + this.questions = questionsByPage; + this.previous = questionsByPage.previousOrFirstPageable().getPageNumber(); + if (questionsByPage.hasNext()) { + this.next = questionsByPage.nextPageable().getPageNumber(); + } else { + this.next = questionsByPage.getNumber(); + + } + this.pageNumbers = createPageNumbers(); + } + + private List createPageNumbers() { + int currentPage = questions.getNumber(); + int totalPages = questions.getTotalPages(); + int startNumber = (currentPage / COUNT_NUMBERS_TO_SHOW) * COUNT_NUMBERS_TO_SHOW; + int endNumber = startNumber + COUNT_NUMBERS_TO_SHOW - 1; + + for (int i = startNumber; i <= endNumber; i++) { + pageNumbers.add(i); + if (i == totalPages - 1) { + break; + } + } + return pageNumbers; + } + + public Pageable getPageable() { + return pageable; + } + + public int getPrevious() { + return previous; + } + + public int getNext() { + return next; + } + + public Page getQuestions() { + return questions; + } + + public List getPageNumbers() { + return pageNumbers; + } +} diff --git a/src/main/java/com/codessquad/qna/web/controller/ApiAnswerController.java b/src/main/java/com/codessquad/qna/web/controller/ApiAnswerController.java index daa73f0ee..9f2e18138 100644 --- a/src/main/java/com/codessquad/qna/web/controller/ApiAnswerController.java +++ b/src/main/java/com/codessquad/qna/web/controller/ApiAnswerController.java @@ -23,7 +23,7 @@ public ApiAnswerController(AnswerService answerService) { @PostMapping public Answer createAnswer(@PathVariable long questionId, String contents, HttpSession session) { - User user = HttpSessionUtils.getSessionedUser(session).orElseThrow(NotLoginException::new); + User user = HttpSessionUtils.getSessionedUser(session).orElseThrow(NotLoginException::new); return answerService.postAnswer(user, questionId, contents); } @@ -35,17 +35,17 @@ public Result deleteAnswer(@PathVariable("questionId") long questionId, @PathVar } @ExceptionHandler(IllegalEntityIdException.class) - public String handleIllegalEntityIdException(IllegalEntityIdException e) { - return e.getMessage(); + public String handleIllegalEntityIdException() { + return "유효하지 않은 접근입니다"; } @ExceptionHandler(NotLoginException.class) - public String handleNotLoginException(NotLoginException e) { - return e.getMessage(); + public String handleNotLoginException() { + return "로그인이 필요합니다"; } @ExceptionHandler(IllegalAccessException.class) - public String handleIllegalAccessException(IllegalAccessException e) { - return e.getMessage(); + public String handleIllegalAccessException() { + return "자신의 답변만 삭제할 수 있습니다"; } } diff --git a/src/main/java/com/codessquad/qna/web/controller/QuestionController.java b/src/main/java/com/codessquad/qna/web/controller/QuestionController.java index 7e0b0fc92..0b66e42aa 100644 --- a/src/main/java/com/codessquad/qna/web/controller/QuestionController.java +++ b/src/main/java/com/codessquad/qna/web/controller/QuestionController.java @@ -1,10 +1,14 @@ package com.codessquad.qna.web.controller; import com.codessquad.qna.web.HttpSessionUtils; +import com.codessquad.qna.web.QuestionPage; import com.codessquad.qna.web.domain.Question; import com.codessquad.qna.web.domain.User; import com.codessquad.qna.web.exception.NotLoginException; import com.codessquad.qna.web.service.QuestionService; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.data.web.PageableDefault; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; @@ -36,8 +40,9 @@ public String createQuestion(Question question, HttpSession session) { } @GetMapping - public String getQuestions(Model model) { - model.addAttribute("questions", questionService.findQuestions()); + public String getQuestions(@PageableDefault(size = 15, sort = "createdDateTime", direction = Sort.Direction.DESC) Pageable pageable, Model model) { + QuestionPage questionPages = questionService.getQuestionPage(pageable); + model.addAttribute("pages", questionPages); return "/index"; } diff --git a/src/main/java/com/codessquad/qna/web/domain/AbstractEntity.java b/src/main/java/com/codessquad/qna/web/domain/AbstractEntity.java index 120aec036..7a2b5e0db 100644 --- a/src/main/java/com/codessquad/qna/web/domain/AbstractEntity.java +++ b/src/main/java/com/codessquad/qna/web/domain/AbstractEntity.java @@ -12,7 +12,7 @@ @MappedSuperclass @EntityListeners(AuditingEntityListener.class) public class AbstractEntity { - private static final DateTimeFormatter QUESTION_DATETIME_FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"); + private static final DateTimeFormatter DATETIME_FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"); @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @@ -57,7 +57,7 @@ private String getFormattedDate(LocalDateTime dateTime) { if (dateTime == null) { return ""; } - return dateTime.format(QUESTION_DATETIME_FORMAT); + return dateTime.format(DATETIME_FORMAT); } } diff --git a/src/main/java/com/codessquad/qna/web/repository/QuestionRepository.java b/src/main/java/com/codessquad/qna/web/repository/QuestionRepository.java index e325b97aa..26d36de4b 100644 --- a/src/main/java/com/codessquad/qna/web/repository/QuestionRepository.java +++ b/src/main/java/com/codessquad/qna/web/repository/QuestionRepository.java @@ -1,7 +1,10 @@ package com.codessquad.qna.web.repository; import com.codessquad.qna.web.domain.Question; -import org.springframework.data.repository.CrudRepository; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; -public interface QuestionRepository extends CrudRepository { +public interface QuestionRepository extends JpaRepository { + Page findAll(Pageable pageable); } diff --git a/src/main/java/com/codessquad/qna/web/service/QuestionService.java b/src/main/java/com/codessquad/qna/web/service/QuestionService.java index 84ca6d799..8074a99c2 100644 --- a/src/main/java/com/codessquad/qna/web/service/QuestionService.java +++ b/src/main/java/com/codessquad/qna/web/service/QuestionService.java @@ -1,11 +1,13 @@ package com.codessquad.qna.web.service; -import com.codessquad.qna.web.HttpSessionUtils; +import com.codessquad.qna.web.QuestionPage; import com.codessquad.qna.web.domain.Question; import com.codessquad.qna.web.domain.User; import com.codessquad.qna.web.exception.IllegalAccessException; import com.codessquad.qna.web.exception.IllegalEntityIdException; import com.codessquad.qna.web.repository.QuestionRepository; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; @Service @@ -21,10 +23,6 @@ public void postQuestion(Question question, User user) { questionRepository.save(question); } - public Iterable findQuestions() { - return questionRepository.findAll(); - } - public Question findQuestion(long id) { return questionRepository .findById(id) @@ -53,4 +51,14 @@ private void checkSameWriter(Question question, User user) { throw new IllegalAccessException(); } } + + public Page getQuestionsByPage(Pageable pageable) { + return questionRepository.findAll(pageable); + } + + public QuestionPage getQuestionPage(Pageable pageable) { + return new QuestionPage(pageable, getQuestionsByPage(pageable)); + } + + } diff --git a/src/main/java/temp.java b/src/main/java/temp.java new file mode 100644 index 000000000..7be5b5922 --- /dev/null +++ b/src/main/java/temp.java @@ -0,0 +1,10 @@ +public class temp { + public static void main(String[] args) { + for(int i=1; i<=200; i++) { + System.out.println( + "INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('"+ i + "', '1', '6', 'dui', '2021-03-20 16:03:03.106461', '1')" + ); + } + + } +} diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index 7d967462a..35f78ded2 100644 --- a/src/main/resources/data.sql +++ b/src/main/resources/data.sql @@ -2,7 +2,170 @@ INSERT INTO USER (ID, CREATED_DATE_TIME, USER_ID, PASSWORD, NAME, EMAIL) VALUES INSERT INTO USER (ID, CREATED_DATE_TIME, USER_ID, PASSWORD, NAME, EMAIL) VALUES ('2', '2021-03-22 17:03:01.106461', 'sanjigi', 'test', '산지기', 'sanjigi@slipp.net') INSERT INTO USER (ID, CREATED_DATE_TIME, USER_ID, PASSWORD, NAME, EMAIL) VALUES ('3', '2021-03-22 17:03:01.106461', 'hi', 'hi', 'hi', 'hi@slipp.net') -INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('1', '3', 'hello', 'bye', '2021-03-22 17:03:01.106461', '0') -INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('2', '1', 'hoi', 'dui', '2021-03-20 16:03:03.106461', '1') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('1', '1', '1', 'dui', '2020-03-09 16:03:03.106461', '1') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('2', '1', '2', 'dui', '2020-03-08 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('3', '1', '3', 'dui', '2020-03-07 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('4', '1', '4', 'dui', '2020-03-06 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('5', '1', '5', 'dui', '2020-03-05 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('6', '1', '6', 'dui', '2020-03-04 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('7', '1', '7', 'dui', '2020-03-03 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('8', '1', '8', 'dui', '2020-03-02 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('9', '1', '9', 'dui', '2020-03-01 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('10', '1', '10', 'dui', '2020-03-19 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('11', '1', '11', 'dui', '2020-03-18 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('12', '1', '12', 'dui', '2020-03-17 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('13', '1', '13', 'dui', '2020-03-16 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('14', '1', '14', 'dui', '2020-03-15 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('15', '1', '15', 'dui', '2020-03-14 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('16', '1', '16', 'dui', '2020-03-13 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('17', '1', '17', 'dui', '2020-03-12 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('18', '1', '18', 'dui', '2020-03-11 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('19', '1', '19', 'dui', '2020-03-29 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('20', '1', '20', 'dui', '2020-03-28 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('21', '1', '21', 'dui', '2020-03-27 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('22', '1', '22', 'dui', '2020-03-26 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('23', '1', '23', 'dui', '2020-03-25 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('24', '1', '24', 'dui', '2020-03-24 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('25', '1', '25', 'dui', '2020-03-23 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('26', '1', '26', 'dui', '2020-03-22 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('27', '1', '27', 'dui', '2020-03-21 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('28', '1', '28', 'dui', '2020-04-09 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('29', '1', '29', 'dui', '2020-04-08 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('30', '1', '30', 'dui', '2020-04-07 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('31', '1', '31', 'dui', '2020-04-06 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('32', '1', '32', 'dui', '2020-04-05 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('33', '1', '33', 'dui', '2020-04-04 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('34', '1', '34', 'dui', '2020-04-03 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('35', '1', '35', 'dui', '2020-04-02 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('36', '1', '36', 'dui', '2020-04-01 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('37', '1', '37', 'dui', '2020-04-19 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('38', '1', '38', 'dui', '2020-04-18 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('39', '1', '39', 'dui', '2020-04-17 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('40', '1', '40', 'dui', '2020-04-16 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('41', '1', '41', 'dui', '2020-04-15 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('42', '1', '42', 'dui', '2020-04-14 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('43', '1', '43', 'dui', '2020-04-13 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('44', '1', '44', 'dui', '2020-04-12 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('45', '1', '45', 'dui', '2020-04-11 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('46', '1', '46', 'dui', '2020-04-29 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('47', '1', '47', 'dui', '2020-04-28 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('48', '1', '48', 'dui', '2020-04-27 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('49', '1', '49', 'dui', '2020-04-26 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('50', '1', '50', 'dui', '2020-04-25 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('51', '1', '51', 'dui', '2020-04-24 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('52', '1', '52', 'dui', '2020-04-23 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('53', '1', '53', 'dui', '2020-04-22 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('54', '1', '54', 'dui', '2020-04-21 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('55', '1', '55', 'dui', '2020-05-09 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('56', '1', '56', 'dui', '2020-05-08 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('57', '1', '57', 'dui', '2020-05-07 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('58', '1', '58', 'dui', '2020-05-06 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('59', '1', '59', 'dui', '2020-05-05 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('60', '1', '60', 'dui', '2020-05-04 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('61', '1', '61', 'dui', '2020-05-03 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('62', '1', '62', 'dui', '2020-05-02 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('63', '1', '63', 'dui', '2020-05-01 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('64', '1', '64', 'dui', '2020-05-19 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('65', '1', '65', 'dui', '2020-05-18 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('66', '1', '66', 'dui', '2020-05-17 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('67', '1', '67', 'dui', '2020-05-16 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('68', '1', '68', 'dui', '2020-05-15 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('69', '1', '69', 'dui', '2020-05-14 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('70', '1', '70', 'dui', '2020-05-13 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('71', '1', '71', 'dui', '2020-05-12 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('72', '1', '72', 'dui', '2020-05-11 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('73', '1', '73', 'dui', '2020-05-29 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('74', '1', '74', 'dui', '2020-05-28 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('75', '1', '75', 'dui', '2020-05-27 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('76', '1', '76', 'dui', '2020-05-26 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('77', '1', '77', 'dui', '2020-05-25 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('78', '1', '78', 'dui', '2020-05-24 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('79', '1', '79', 'dui', '2020-05-23 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('80', '1', '80', 'dui', '2020-05-22 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('81', '1', '81', 'dui', '2020-05-21 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('82', '1', '82', 'dui', '2020-06-09 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('83', '1', '83', 'dui', '2020-06-08 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('84', '1', '84', 'dui', '2020-06-07 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('85', '1', '85', 'dui', '2020-06-06 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('86', '1', '86', 'dui', '2020-06-05 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('87', '1', '87', 'dui', '2020-06-04 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('88', '1', '88', 'dui', '2020-06-03 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('89', '1', '89', 'dui', '2020-06-02 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('90', '1', '90', 'dui', '2020-06-01 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('91', '1', '91', 'dui', '2020-06-19 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('92', '1', '92', 'dui', '2020-06-18 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('93', '1', '93', 'dui', '2020-06-17 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('94', '1', '94', 'dui', '2020-06-16 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('95', '1', '95', 'dui', '2020-06-15 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('96', '1', '96', 'dui', '2020-06-14 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('97', '1', '97', 'dui', '2020-06-13 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('98', '1', '98', 'dui', '2020-06-12 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('99', '1', '99', 'dui', '2020-06-11 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('100', '1', '100', 'dui', '2020-06-29 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('101', '1', '101', 'dui', '2020-06-28 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('102', '1', '102', 'dui', '2020-06-27 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('103', '1', '103', 'dui', '2020-06-26 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('104', '1', '104', 'dui', '2020-06-25 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('105', '1', '105', 'dui', '2020-06-24 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('106', '1', '106', 'dui', '2020-06-23 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('107', '1', '107', 'dui', '2020-06-22 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('108', '1', '108', 'dui', '2020-06-21 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('109', '1', '109', 'dui', '2020-07-09 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('110', '1', '110', 'dui', '2020-07-08 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('111', '1', '111', 'dui', '2020-07-07 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('112', '1', '112', 'dui', '2020-07-06 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('113', '1', '113', 'dui', '2020-07-05 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('114', '1', '114', 'dui', '2020-07-04 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('115', '1', '115', 'dui', '2020-07-03 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('116', '1', '116', 'dui', '2020-07-02 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('117', '1', '117', 'dui', '2020-07-01 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('118', '1', '118', 'dui', '2020-07-19 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('119', '1', '119', 'dui', '2020-07-18 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('120', '1', '120', 'dui', '2020-07-17 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('121', '1', '121', 'dui', '2020-07-16 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('122', '1', '122', 'dui', '2020-07-15 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('123', '1', '123', 'dui', '2020-07-14 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('124', '1', '124', 'dui', '2020-07-13 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('125', '1', '125', 'dui', '2020-07-12 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('126', '1', '126', 'dui', '2020-07-11 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('127', '1', '127', 'dui', '2020-07-29 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('128', '1', '128', 'dui', '2020-07-28 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('129', '1', '129', 'dui', '2020-07-27 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('130', '1', '130', 'dui', '2020-07-26 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('131', '1', '131', 'dui', '2020-07-25 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('132', '1', '132', 'dui', '2020-07-24 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('133', '1', '133', 'dui', '2020-07-23 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('134', '1', '134', 'dui', '2020-07-22 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('135', '1', '135', 'dui', '2020-07-21 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('136', '1', '136', 'dui', '2020-08-09 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('137', '1', '137', 'dui', '2020-08-08 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('138', '1', '138', 'dui', '2020-08-07 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('139', '1', '139', 'dui', '2020-08-06 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('140', '1', '140', 'dui', '2020-08-05 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('141', '1', '141', 'dui', '2020-08-04 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('142', '1', '142', 'dui', '2020-08-03 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('143', '1', '143', 'dui', '2020-08-02 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('144', '1', '144', 'dui', '2020-08-01 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('145', '1', '145', 'dui', '2020-08-19 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('146', '1', '146', 'dui', '2020-08-18 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('147', '1', '147', 'dui', '2020-08-17 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('148', '1', '148', 'dui', '2020-08-16 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('149', '1', '149', 'dui', '2020-08-15 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('150', '1', '150', 'dui', '2020-08-14 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('151', '1', '151', 'dui', '2020-08-13 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('152', '1', '152', 'dui', '2020-08-12 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('153', '1', '153', 'dui', '2020-08-11 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('154', '1', '154', 'dui', '2020-08-29 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('155', '1', '155', 'dui', '2020-08-28 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('156', '1', '156', 'dui', '2020-08-27 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('157', '1', '157', 'dui', '2020-08-26 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('158', '1', '158', 'dui', '2020-08-25 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('159', '1', '159', 'dui', '2020-08-24 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('160', '1', '160', 'dui', '2020-08-23 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('161', '1', '161', 'dui', '2020-08-22 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('162', '1', '162', 'dui', '2020-08-21 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('163', '1', '163', 'dui', '2020-09-09 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('164', '1', '164', 'dui', '2020-09-08 16:03:03.106461', '0') +INSERT INTO QUESTION (ID, WRITER_ID, TITLE, CONTENTS, CREATED_DATE_TIME, COUNT_OF_ANSWERS) VALUES ('165', '1', '165', 'dui', '2020-09-07 16:03:03.106461', '0') -INSERT INTO ANSWER (ID, CONTENTS, CREATED_DATE_TIME, QUESTION_ID, WRITER_ID) VALUES ('1', 'This is an answer', '2021-03-20 16:03:03.106461', '2', '3') +INSERT INTO ANSWER (ID, CONTENTS, CREATED_DATE_TIME, QUESTION_ID, WRITER_ID) VALUES ('1', 'This is an answer', '2021-03-20 16:03:03.106461', '1', '3') diff --git a/src/main/resources/static/js/scripts.js b/src/main/resources/static/js/scripts.js index 8104adbca..0a225f43e 100755 --- a/src/main/resources/static/js/scripts.js +++ b/src/main/resources/static/js/scripts.js @@ -47,6 +47,9 @@ function deleteAnswer(e) { }) } + + + String.prototype.format = function () { var args = arguments; return this.replace(/{(\d+)}/g, function (match, number) { diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index a46c95920..4cd8f2a43 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -4,6 +4,7 @@
+ {{#pages}}
+ {{/pages}}