From 72cef158a10c9c71ae7d7e4a681718a0127a4904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BE=E5=87=A0=E6=B5=B7?= Date: Wed, 27 May 2020 18:07:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog.sql | 8 +++----- src/main/resources/mapper/CommentMapper.xml | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/blog.sql b/blog.sql index 5e15303..325eb68 100644 --- a/blog.sql +++ b/blog.sql @@ -139,7 +139,7 @@ where article.a_id = article_tag.a_id CREATE VIEW commentView (commentId, pagePath, content, date, status, pid, toAuthorId, toAuthorEmail, toAuthorDisplayName, toAuthorAvatar, fromAuthorId, fromAuthorEmail, fromAuthorDisplayName, - fromAuthorAvatar, isDelete) + fromAuthorAvatar) as select cuT.co_id as commentId, cuT.co_page_path as pagePath, @@ -154,8 +154,7 @@ select cuT.co_id as commentId, userFrom.u_id as fromAuthorId, userFrom.u_email as fromAuthorEmail, userFrom.u_display_name as fromAuthorDisplayName, - userFrom.u_avatar as fromAuthorAvatar, - cuT.is_delete as isDelete + userFrom.u_avatar as fromAuthorAvatar from (select comment.co_id, comment.co_page_path, comment.co_content, @@ -166,8 +165,7 @@ from (select comment.co_id, comment.co_to_author_id, userTo.u_email as toEmail, userTo.u_display_name as toDisplayName, - userTo.u_avatar as toAvatar, - comment.is_delete + userTo.u_avatar as toAvatar from comment left join user userTo on (comment.co_to_author_id = userTo.u_id) ) as cuT, diff --git a/src/main/resources/mapper/CommentMapper.xml b/src/main/resources/mapper/CommentMapper.xml index 73ae58e..2405cd1 100644 --- a/src/main/resources/mapper/CommentMapper.xml +++ b/src/main/resources/mapper/CommentMapper.xml @@ -37,8 +37,8 @@ - insert into comment (co_page_path, co_content, co_date, co_pid, co_from_author_id, co_to_author_id, is_delete) - VALUES (#{pagePath}, #{content}, now(), #{pid}, #{fromUser.id}, #{toUser.id}, false) + insert into comment (co_page_path, co_content, co_date, co_pid, co_from_author_id, co_to_author_id, co_status) + VALUES (#{pagePath}, #{content}, now(), #{pid}, #{fromUser.id}, #{toUser.id}, 0) From 2106bf4d947413334a9effb7733d13cfe9702402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BE=E5=87=A0=E6=B5=B7?= Date: Wed, 27 May 2020 18:11:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?pr=20=E7=9A=84ci=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..bf3b88e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path + +name: Blog backEnd CI + +on: + push: + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + env: + APPLICATION_PROPERTIES_TEST: ${{ secrets.APPLICATION_PROPERTIES_TEST }} + APPLICATION_PROPERTIES_PROD: ${{ secrets.APPLICATION_PROPERTIES_PROD }} + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Build jar file + run: echo $APPLICATION_PROPERTIES_TEST|base64 -d > src/main/resources/application-test.properties && mvn -B test --file pom.xml + +