Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
vridge-docs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
JIRA
JIRA
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Gyeongho Park
vridge-docs
Commits
84e1ca6e
Commit
84e1ca6e
authored
Feb 21, 2023
by
shj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD] 다음 가이드, 이전 가이드 할당 함수 개편
- 개편된 Guide Model 적용 - depth와 order를 활용하여 find - 미사용 코드 삭제
parent
1ae93788
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
150 deletions
+84
-150
GuideTest.java
.../src/main/java/com/vazil/vridge/docs/model/GuideTest.java
+6
-4
GuideTestRepository.java
...com/vazil/vridge/docs/repository/GuideTestRepository.java
+5
-5
GuideTestService.java
.../java/com/vazil/vridge/docs/service/GuideTestService.java
+66
-132
index.vue
docs-front/pages/_guide/index.vue
+7
-9
No files found.
docs-back/src/main/java/com/vazil/vridge/docs/model/GuideTest.java
View file @
84e1ca6e
...
...
@@ -6,6 +6,7 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
import
nonapi.io.github.classgraph.json.Id
;
import
org.springframework.data.annotation.LastModifiedDate
;
import
org.springframework.data.annotation.Transient
;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
java.io.Serializable
;
...
...
@@ -24,13 +25,14 @@ public class GuideTest implements Serializable {
private
String
title
;
private
Integer
order
;
private
String
path
;
private
Integer
depth
;
private
Integer
view
;
private
Integer
like
;
//
@Transient
// private Guide prevContent
;
//
@Transient
// private Guide nextContent
;
@Transient
private
GuideTest
prevGuide
;
@Transient
private
GuideTest
nextGuide
;
private
LocalDateTime
createDate
;
@LastModifiedDate
...
...
docs-back/src/main/java/com/vazil/vridge/docs/repository/GuideTestRepository.java
View file @
84e1ca6e
...
...
@@ -10,10 +10,10 @@ import java.util.List;
@Repository
public
interface
GuideTestRepository
extends
CrudRepository
<
GuideTest
,
String
>
{
List
<
GuideTest
>
findAll
();
List
<
GuideTest
>
findAllByOrderByOrder
();
// List<GuideTest> findAllByParentIdOrderByOrderAsc(String parentId);
// List<GuideTest> findAllByKeywordSetContaining(String keyword);
int
countAllBy
();
// int countAllByParentId(String parentId);
List
<
GuideTest
>
findAllByPathContainingAndDepth
(
String
path
,
Integer
depth
);
List
<
GuideTest
>
findAllByPathContainingAndDepthOrderByOrderDesc
(
String
path
,
Integer
depth
);
GuideTest
findByPath
(
String
path
);
GuideTest
findByPathContainingAndDepthAndOrder
(
String
path
,
Integer
depth
,
Integer
order
);
}
docs-back/src/main/java/com/vazil/vridge/docs/service/GuideTestService.java
View file @
84e1ca6e
This diff is collapsed.
Click to expand it.
docs-front/pages/_guide/index.vue
View file @
84e1ca6e
...
...
@@ -84,7 +84,7 @@
<v-divider
class=
"my-8"
/>
<v-row
no-gutters
align=
"center"
>
<v-btn
class=
"primary--text"
:ripple=
"false"
height=
"64"
text
outlined
@
click=
"openGuide(guide.prev
Content)"
v-if=
"guide !== null && guide.prevContent
"
>
<v-btn
class=
"primary--text"
:ripple=
"false"
height=
"64"
text
outlined
@
click=
"openGuide(guide.prev
Guide)"
v-if=
"guide !== null && guide.prevGuide
"
>
<v-row
no-gutters
align=
"center"
>
<v-col
class=
"mr-8"
>
<v-icon
left
>
mdi-chevron-left
</v-icon>
...
...
@@ -92,7 +92,7 @@
<v-col
align=
"end"
justify=
"end"
>
<span
class=
"grey--text"
>
이전 페이지
</span>
<br/>
<span
style=
"font-size:1.1rem;font-weight:bold;"
>
{{
parsingContentTitle(guide.prevContent)
}}
{{
guide.prevGuide.title
}}
</span>
</v-col>
...
...
@@ -107,13 +107,13 @@
<v-spacer/>
<v-btn
class=
"primary--text"
:ripple=
"false"
height=
"64"
text
outlined
@
click=
"openGuide(guide.next
Content)"
v-if=
"guide !== null && guide.nextContent
"
>
<v-btn
class=
"primary--text"
:ripple=
"false"
height=
"64"
text
outlined
@
click=
"openGuide(guide.next
Guide)"
v-if=
"guide !== null && guide.nextGuide
"
>
<v-row
no-gutters
align=
"center"
>
<v-col
align=
"start"
justify=
"start"
>
<span
class=
"grey--text"
>
다음 페이지
</span>
<br/>
<span
style=
"font-size:1.1rem;font-weight:bold;"
>
{{
parsingContentTitle(guide.nextContent)
}}
{{
guide.nextGuide.title
}}
</span>
</v-col>
<v-col
class=
"ml-8"
>
...
...
@@ -157,7 +157,7 @@ export default {
await
this
.
getGuideContents
()
this
.
loading
=
false
// this.generateNavit
ator()
this
.
generateNavig
ator
()
},
async
getGuideContents
()
{
...
...
@@ -272,9 +272,7 @@ export default {
},
openGuide
(
guide
)
{
this
.
$router
.
push
(
'/'
+
this
.
parsingContentTitle
(
guide
))
this
.
$store
.
commit
(
'setGuide'
,
{
guideId
:
guide
.
id
,
flag
:
true
})
this
.
$store
.
state
.
guideId
=
guide
.
id
this
.
$router
.
push
(
'/'
+
guide
.
id
)
},
openGithub
(
contentKey
)
{
...
...
@@ -286,7 +284,7 @@ export default {
return
false
},
async
generateNavi
t
ator
()
{
async
generateNavi
g
ator
()
{
this
.
loading
=
true
let
newNavigator
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment