

250311 김혜민 maven->gradle 변경 Exception Handler 추가
@c29e96eb39242dcd125a5612be7c07cb2f23ca99
+++ .gradle/8.13/checksums/checksums.lock
Binary file is not shown |
+++ .gradle/8.13/checksums/md5-checksums.bin
Binary file is not shown |
+++ .gradle/8.13/checksums/sha1-checksums.bin
Binary file is not shown |
+++ .gradle/8.13/executionHistory/executionHistory.bin
Binary file is not shown |
+++ .gradle/8.13/executionHistory/executionHistory.lock
Binary file is not shown |
+++ .gradle/8.13/fileChanges/last-build.bin
Binary file is not shown |
+++ .gradle/8.13/fileHashes/fileHashes.bin
Binary file is not shown |
+++ .gradle/8.13/fileHashes/fileHashes.lock
Binary file is not shown |
+++ .gradle/8.13/fileHashes/resourceHashesCache.bin
Binary file is not shown |
+++ .gradle/8.13/gc.properties
... | ... | @@ -0,0 +1,0 @@ |
+++ .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file is not shown |
+++ .gradle/buildOutputCleanup/cache.properties
... | ... | @@ -0,0 +1,2 @@ |
1 | +#Fri Mar 07 14:08:17 KST 2025 | |
2 | +gradle.version=8.13 |
+++ .gradle/buildOutputCleanup/outputFiles.bin
Binary file is not shown |
+++ .gradle/file-system.probe
Binary file is not shown |
+++ .gradle/vcs-1/gc.properties
... | ... | @@ -0,0 +1,0 @@ |
+++ build.gradle
... | ... | @@ -0,0 +1,100 @@ |
1 | +/* | |
2 | + * This file was generated by the Gradle 'init' task. | |
3 | + */ | |
4 | + | |
5 | +plugins { | |
6 | +// id 'java-library' | |
7 | +// id 'maven-publish' | |
8 | + id 'java' | |
9 | + id 'org.springframework.boot' version '3.4.1' | |
10 | + id 'io.spring.dependency-management' version '1.1.7' | |
11 | +} | |
12 | + | |
13 | +repositories { | |
14 | +// mavenLocal() | |
15 | + mavenCentral() | |
16 | + maven { | |
17 | + url = uri('https://repo1.maven.org/maven2/') | |
18 | + } | |
19 | + | |
20 | + maven { | |
21 | + url = uri('https://maven.egovframe.go.kr/maven/') | |
22 | + mavenContent { | |
23 | + releasesOnly() | |
24 | + } | |
25 | + } | |
26 | + | |
27 | + maven { | |
28 | + url = uri('https://repo.maven.apache.org/maven2/') | |
29 | + } | |
30 | +} | |
31 | + | |
32 | +dependencies { | |
33 | + implementation 'org.springframework.boot:spring-boot-starter-web' | |
34 | + implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' | |
35 | + implementation 'org.springframework.boot:spring-boot-starter-validation' | |
36 | + implementation 'org.springframework.boot:spring-boot-starter-security' | |
37 | + implementation 'org.springframework.boot:spring-boot-starter-web-services' | |
38 | +// implementation 'org.springframework.boot:spring-boot-devtools' | |
39 | + implementation 'org.springframework.boot:spring-boot-starter-cache' | |
40 | + | |
41 | + implementation ('org.egovframe.rte:org.egovframe.rte.ptl.mvc:4.2.0'){ | |
42 | + exclude group: 'commons-logging', module: 'commons-logging' | |
43 | + } | |
44 | + implementation 'org.egovframe.rte:org.egovframe.rte.psl.dataaccess:4.2.0' | |
45 | + implementation 'org.egovframe.rte:org.egovframe.rte.fdl.idgnr:4.2.0' | |
46 | + implementation 'org.egovframe.rte:org.egovframe.rte.fdl.property:4.2.0' | |
47 | + implementation 'org.hsqldb:hsqldb:2.7.2' | |
48 | + | |
49 | + compileOnly 'org.projectlombok:lombok:1.18.34' | |
50 | + annotationProcessor 'org.projectlombok:lombok:1.18.34' | |
51 | + | |
52 | + // springdoc-openapi | |
53 | + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0' | |
54 | + implementation 'org.hibernate:hibernate-entitymanager:5.6.15.Final' | |
55 | + | |
56 | + implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.3' | |
57 | + | |
58 | + implementation 'com.github.ben-manes.caffeine:caffeine' | |
59 | + implementation 'mysql:mysql-connector-java:8.0.23' | |
60 | + implementation 'org.mariadb.jdbc:mariadb-java-client:2.6.2' | |
61 | + implementation 'org.postgresql:postgresql:42.6.0' | |
62 | + implementation 'org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4.1:1.16' | |
63 | + implementation 'org.apache.poi:poi-ooxml:4.1.2' | |
64 | + | |
65 | + implementation 'org.apache.commons:commons-lang3:3.14.0' | |
66 | + implementation 'com.oracle.database.jdbc:ojdbc10:19.16.0.0' | |
67 | + implementation 'io.jsonwebtoken:jjwt-api:0.12.5' | |
68 | + implementation 'io.jsonwebtoken:jjwt-impl:0.12.5' | |
69 | + implementation 'io.jsonwebtoken:jjwt-jackson:0.12.5' | |
70 | + | |
71 | + implementation group: 'net.rakugakibox.util', name: 'yaml-resource-bundle', version: '1.1' | |
72 | + | |
73 | + testImplementation 'org.springframework.boot:spring-boot-starter-test' | |
74 | + testImplementation 'org.springframework.security:spring-security-test' | |
75 | +} | |
76 | + | |
77 | +group = 'com.takensoft' | |
78 | +// version = '1.0.0' | |
79 | +version = '0.0.1-SNAPSHOT' | |
80 | +//description = 'cms' | |
81 | + | |
82 | +// java.sourceCompatibility = JavaVersion.VERSION_1_8 | |
83 | +java.sourceCompatibility = '17' | |
84 | +/*publishing { | |
85 | + publications { | |
86 | + maven(MavenPublication) { | |
87 | + from(components.java) | |
88 | + } | |
89 | + } | |
90 | +}*/ | |
91 | + | |
92 | + | |
93 | +tasks.withType(JavaCompile) { | |
94 | + options.encoding = 'UTF-8' | |
95 | +} | |
96 | + | |
97 | +tasks.withType(Javadoc) { | |
98 | + options.encoding = 'UTF-8' | |
99 | +} | |
100 | + |
+++ build/bootJarMainClassName
... | ... | @@ -0,0 +1,1 @@ |
1 | +com.takensoft.CmsApplication(파일 끝에 줄바꿈 문자 없음) |
+++ build/libs/cms-0.0.1-SNAPSHOT-plain.jar
Binary file is not shown |
+++ build/libs/cms-0.0.1-SNAPSHOT.jar
This file is too big to display. |
+++ build/reports/problems/problems-report.html
... | ... | @@ -0,0 +1,663 @@ |
1 | +<!DOCTYPE html> | |
2 | + | |
3 | +<html lang="en"> | |
4 | +<head> | |
5 | + <!-- Required meta tags --> | |
6 | + <meta charset="utf-8"> | |
7 | + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
8 | + | |
9 | + <style type="text/css"> | |
10 | + /*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ | |
11 | +html { | |
12 | + line-height: 1.15; | |
13 | + -ms-text-size-adjust: 100%; | |
14 | + -webkit-text-size-adjust: 100% | |
15 | +} | |
16 | + | |
17 | +body { | |
18 | + margin: 0 | |
19 | +} | |
20 | + | |
21 | +article, aside, footer, header, nav, section { | |
22 | + display: block | |
23 | +} | |
24 | + | |
25 | +h1 { | |
26 | + font-size: 2em; | |
27 | + margin: .67em 0 | |
28 | +} | |
29 | + | |
30 | +figcaption, figure, main { | |
31 | + display: block | |
32 | +} | |
33 | + | |
34 | +figure { | |
35 | + margin: 1em 40px | |
36 | +} | |
37 | + | |
38 | +hr { | |
39 | + box-sizing: content-box; | |
40 | + height: 0; | |
41 | + overflow: visible | |
42 | +} | |
43 | + | |
44 | +pre { | |
45 | + font-family: monospace, monospace; | |
46 | + font-size: 1em | |
47 | +} | |
48 | + | |
49 | +a { | |
50 | + background-color: transparent; | |
51 | + -webkit-text-decoration-skip: objects | |
52 | +} | |
53 | + | |
54 | +abbr[title] { | |
55 | + border-bottom: none; | |
56 | + text-decoration: underline; | |
57 | + text-decoration: underline dotted | |
58 | +} | |
59 | + | |
60 | +b, strong { | |
61 | + font-weight: inherit | |
62 | +} | |
63 | + | |
64 | +b, strong { | |
65 | + font-weight: bolder | |
66 | +} | |
67 | + | |
68 | +code, kbd, samp { | |
69 | + font-family: monospace, monospace; | |
70 | + font-size: 1em | |
71 | +} | |
72 | + | |
73 | +dfn { | |
74 | + font-style: italic | |
75 | +} | |
76 | + | |
77 | +mark { | |
78 | + background-color: #ff0; | |
79 | + color: #000 | |
80 | +} | |
81 | + | |
82 | +small { | |
83 | + font-size: 80% | |
84 | +} | |
85 | + | |
86 | +sub, sup { | |
87 | + font-size: 75%; | |
88 | + line-height: 0; | |
89 | + position: relative; | |
90 | + vertical-align: baseline | |
91 | +} | |
92 | + | |
93 | +sub { | |
94 | + bottom: -.25em | |
95 | +} | |
96 | + | |
97 | +sup { | |
98 | + top: -.5em | |
99 | +} | |
100 | + | |
101 | +audio, video { | |
102 | + display: inline-block | |
103 | +} | |
104 | + | |
105 | +audio:not([controls]) { | |
106 | + display: none; | |
107 | + height: 0 | |
108 | +} | |
109 | + | |
110 | +img { | |
111 | + border-style: none | |
112 | +} | |
113 | + | |
114 | +svg:not(:root) { | |
115 | + overflow: hidden | |
116 | +} | |
117 | + | |
118 | +button, input, optgroup, select, textarea { | |
119 | + font-family: sans-serif; | |
120 | + font-size: 100%; | |
121 | + line-height: 1.15; | |
122 | + margin: 0 | |
123 | +} | |
124 | + | |
125 | +button, input { | |
126 | + overflow: visible | |
127 | +} | |
128 | + | |
129 | +button, select { | |
130 | + text-transform: none | |
131 | +} | |
132 | + | |
133 | +[type=reset], [type=submit], button, html [type=button] { | |
134 | + -webkit-appearance: button | |
135 | +} | |
136 | + | |
137 | +[type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner, button::-moz-focus-inner { | |
138 | + border-style: none; | |
139 | + padding: 0 | |
140 | +} | |
141 | + | |
142 | +[type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring, button:-moz-focusring { | |
143 | + outline: 1px dotted ButtonText | |
144 | +} | |
145 | + | |
146 | +fieldset { | |
147 | + padding: .35em .75em .625em | |
148 | +} | |
149 | + | |
150 | +legend { | |
151 | + box-sizing: border-box; | |
152 | + color: inherit; | |
153 | + display: table; | |
154 | + max-width: 100%; | |
155 | + padding: 0; | |
156 | + white-space: normal | |
157 | +} | |
158 | + | |
159 | +progress { | |
160 | + display: inline-block; | |
161 | + vertical-align: baseline | |
162 | +} | |
163 | + | |
164 | +textarea { | |
165 | + overflow: auto | |
166 | +} | |
167 | + | |
168 | +[type=checkbox], [type=radio] { | |
169 | + box-sizing: border-box; | |
170 | + padding: 0 | |
171 | +} | |
172 | + | |
173 | +[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button { | |
174 | + height: auto | |
175 | +} | |
176 | + | |
177 | +[type=search] { | |
178 | + -webkit-appearance: textfield; | |
179 | + outline-offset: -2px | |
180 | +} | |
181 | + | |
182 | +[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration { | |
183 | + -webkit-appearance: none | |
184 | +} | |
185 | + | |
186 | +::-webkit-file-upload-button { | |
187 | + -webkit-appearance: button; | |
188 | + font: inherit | |
189 | +} | |
190 | + | |
191 | +details, menu { | |
192 | + display: block | |
193 | +} | |
194 | + | |
195 | +summary { | |
196 | + display: list-item | |
197 | +} | |
198 | + | |
199 | +canvas { | |
200 | + display: inline-block | |
201 | +} | |
202 | + | |
203 | +template { | |
204 | + display: none | |
205 | +} | |
206 | + | |
207 | +[hidden] { | |
208 | + display: none | |
209 | +} | |
210 | + | |
211 | +/* configuration cache styles */ | |
212 | + | |
213 | +.report-wrapper { | |
214 | + margin: 0; | |
215 | + padding: 0 24px; | |
216 | +} | |
217 | + | |
218 | +.gradle-logo { | |
219 | + width: 32px; | |
220 | + height: 24px; | |
221 | + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAYCAYAAACbU/80AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAGAAAAAA915G0AAAD5klEQVRIDbVWC0xTZxT+emmhVUEeA1/ROh/tFAFFGK7oJisIKsNVoOwBbJPowEWHzikRxeiMRpwwjDWRBHQLIzOmiRhe22BT40TitiyaMBQFfMEeLMIEaSmk+/+rvd7be4no6Elu7n++c/5zzv845/wyOyG4iGyDgzCdNOPLM9W41n4bnmNUiHo5DNsz0hGsmcV6lbkyAOOWXJjrz4qWp1C4o3z/LqzWL4VcJB1FIHmZHn/f78a6pDcxbeIEfNvQiPwTZbDZBpC24zOEaGfDpTsgtZby6u+QlrubFWUY3nh6AH39/ahr/Bn1jZfxW3ML2js60dtvgbtcQVblj8CZM7A0PBSrol6Ft+c4KZ8iTB1nwN0//8IEP9/hA2i924Gir0/iq8oa/NvbJzLiDKiUSqTE6pGVbEBY4BxnsYAPSnwXTa3tLCZ5BF3dPdAkGNHzoFcwcaRMnC4CeZkZiAgKFE252nITC1Pew9Dj5GNEGgS4Rbb5eZ1Te7UXG6FLX4cV6zeh5kIDaDpSunL9Boyf5nLOpwT4Sx+BxWrFK8QAnTAapPRQwofcj86uLoG59cbVEOzA0NAQNh38Atn5RSjY8rFAmc/I3dyQvOx1PsSNVy7Roa3ajHDePbBYLSLn1MaGd5KFAXy07xAOl59C6elK+I73hIHcbGd6wXs8qkyH8FZcjLOI5X/9/TrOnLsAldJDUu4As1NToFFPe3IEpm/M2HigwCFnU6t4Zw6Ck1JhGRhgcXq5juXloKyqFnlHirmz5CaNcEAv59kSE9wVikcB3O78A/MSU0Fznk/H9+yAetJEnPr+B8RFLsLcGS8ia28+qQuX+WrPNNZOV+Nc6VH4+3iz89g0pEaLzRUiQ3LGDWsM8Qidq2WL0PGKKlgf74ZIeQTAfFJ6a44WIsDXh9OW/dPdY58aawC9KK6kpOgolO7JxViVSuBGXnvxksudZ5F0O5yzGYxMJnBOGaau4fnPU2RNAtCFBKFoa7akczaAptY2iWmjB33+yQa4kZwfjpi2ex3Dyf43vuAljWQ/4Btmei1WPj+q45hF4U+1J4fEizCEvNf0EWHoIW244sfzoN1RipaT2kDfdjfv3MNpojdISjmfIheE8Fnp8WR9vJ2Zr+O+bYUmO+kJ9KnIUtf9bnvY2x9wcqrrvnCJvfL8Tw4V9v9LU7PdKzJaoNdy645AR4ph1JMncZHRKrVvYyYY5kmP8iO1v2T3dk6HDtYmrgJtOnwKnaPFrg8z+BBX7QSgEyOPJfX9Qd9DFs40GgTOHbrBs2ch4bXFuEG2mmFkeD9hpUMk+NMXEe0TNtsg/Ly94DVurEAuxfwHC1WiVbe0U7MAAAAASUVORK5CYII="); | |
222 | + background-size: contain; | |
223 | +} | |
224 | + | |
225 | +.header { | |
226 | + display: flex; | |
227 | + flex-wrap: wrap; | |
228 | + position: fixed; | |
229 | + top: 0; | |
230 | + left: 0; | |
231 | + width: 100%; | |
232 | + padding: 24px 24px 0 24px; | |
233 | + background-color: white; | |
234 | + z-index: 1; | |
235 | +} | |
236 | + | |
237 | +.learn-more { | |
238 | + margin-left: auto; | |
239 | + align-self: center; | |
240 | + font-size: 0.875rem; | |
241 | + font-weight: normal; | |
242 | +} | |
243 | + | |
244 | +.title { | |
245 | + display: flex; | |
246 | + align-items: center; | |
247 | + padding: 18px 0 24px 0; | |
248 | + flex: 1 0 100%; | |
249 | +} | |
250 | + | |
251 | +.content { | |
252 | + font-size: 0.875rem; | |
253 | + padding: 240px 0 48px; | |
254 | + overflow-x: auto; | |
255 | + white-space: nowrap; | |
256 | +} | |
257 | + | |
258 | +.content ol:first-of-type { | |
259 | + margin: 0; | |
260 | +} | |
261 | + | |
262 | +.tree-btn { | |
263 | + cursor: pointer; | |
264 | + display: inline-block; | |
265 | + width: 16px; | |
266 | + height: 16px; | |
267 | + background-size: contain; | |
268 | + background-repeat: no-repeat; | |
269 | + vertical-align: middle; | |
270 | + margin-top: -0.2em; | |
271 | +} | |
272 | + | |
273 | +.tree-btn.collapsed { | |
274 | + background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><path d="M166.9 264.5l-117.8 116c-4.7 4.7-12.3 4.7-17 0l-7.1-7.1c-4.7-4.7-4.7-12.3 0-17L127.3 256 25.1 155.6c-4.7-4.7-4.7-12.3 0-17l7.1-7.1c4.7-4.7 12.3-4.7 17 0l117.8 116c4.6 4.7 4.6 12.3-.1 17z" fill="%23999999" stroke="%23999999"/></svg>'); | |
275 | +} | |
276 | + | |
277 | +.tree-btn.expanded { | |
278 | + background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><path d="M119.5 326.9L3.5 209.1c-4.7-4.7-4.7-12.3 0-17l7.1-7.1c4.7-4.7 12.3-4.7 17 0L128 287.3l100.4-102.2c4.7-4.7 12.3-4.7 17 0l7.1 7.1c4.7 4.7 4.7 12.3 0 17L136.5 327c-4.7 4.6-12.3 4.6-17-.1z" fill="%23999999" stroke="%23999999"/></svg>'); | |
279 | +} | |
280 | + | |
281 | +ul .tree-btn { | |
282 | + margin-right: 3px; | |
283 | +} | |
284 | + | |
285 | +.leaf-icon { | |
286 | + display: inline-block; | |
287 | + width: 16px; | |
288 | + height: 16px; | |
289 | + background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><path d="M32 256 H224" stroke="%23999999" stroke-width="48" stroke-linecap="round"/></svg>'); | |
290 | + background-size: contain; | |
291 | + background-repeat: no-repeat; | |
292 | + vertical-align: middle; | |
293 | + margin-top: -0.2em; | |
294 | +} | |
295 | + | |
296 | +.invisible-text { | |
297 | + user-select: all; /* Allow the text to be selectable */ | |
298 | + color: transparent; /* Hide the text */ | |
299 | + text-indent: -9999px; /* Move the text out of view */ | |
300 | + position: relative; | |
301 | + white-space: pre; /* Preserve meaningful whitespace in the invisible text for copying */ | |
302 | +} | |
303 | + | |
304 | +.text-for-copy { | |
305 | + display: inline-block; | |
306 | +} | |
307 | + | |
308 | +.enum-icon { | |
309 | + display: inline-block; | |
310 | + width: 16px; | |
311 | + height: 16px; | |
312 | + background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><circle cx="512" cy="512" r="200" /></svg>'); | |
313 | + background-size: contain; | |
314 | + background-repeat: no-repeat; | |
315 | + vertical-align: middle; | |
316 | + margin-inline-start: 0.5ex; | |
317 | + margin-inline-end: 0.5ex; | |
318 | + margin-top: -0.2em; | |
319 | +} | |
320 | + | |
321 | +.error-icon { | |
322 | + display: inline-block; | |
323 | + width: 16px; | |
324 | + height: 16px; | |
325 | + background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z" fill="%23FC461E" stroke="%23FC461E"/></svg>'); | |
326 | + background-size: contain; | |
327 | + background-repeat: no-repeat; | |
328 | + vertical-align: middle; | |
329 | + margin-inline-start: 0.5ex; | |
330 | + margin-inline-end: 0.5ex; | |
331 | + margin-top: -0.2em; | |
332 | +} | |
333 | + | |
334 | +.advice-icon { | |
335 | + display: inline-block; | |
336 | + width: 16px; | |
337 | + height: 16px; | |
338 | + background-image: url('data:image/svg+xml;utf8,<svg width="800px" height="800px" viewBox="-4.93 0 122.88 122.88" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="enable-background:new 0 0 113.01 122.88" xml:space="preserve"><g><path d="M44.13,102.06c-1.14,0.03-2.14-0.81-2.3-1.96c-0.17-1.2,0.64-2.31,1.82-2.54c-1.3-7.37-4.85-11.43-8.6-15.72 c-2.92-3.34-5.95-6.81-8.34-11.92c-2.35-5.03-3.64-10.23-3.6-15.63c0.05-5.4,1.42-10.96,4.4-16.71c0.02-0.04,0.04-0.07,0.06-0.11 l0,0c3.91-6.62,9.38-11.04,15.47-13.52c5.11-2.09,10.66-2.8,16.1-2.3c5.42,0.5,10.73,2.2,15.37,4.94 c5.9,3.49,10.75,8.67,13.42,15.21c1.44,3.54,2.42,7.49,2.54,11.82c0.12,4.31-0.62,8.96-2.61,13.88 c-2.66,6.59-6.18,10.68-9.47,14.51c-3.03,3.53-5.85,6.81-7.42,11.84c0.89,0.21,1.59,0.94,1.73,1.9c0.17,1.24-0.7,2.39-1.94,2.56 l-0.77,0.11c-0.14,1.09-0.23,2.26-0.27,3.51l0.25-0.04c1.24-0.17,2.39,0.7,2.56,1.94c0.17,1.24-0.7,2.39-1.94,2.56l-0.78,0.11 c0.01,0.15,0.02,0.3,0.03,0.45l0,0c0.07,0.88,0.08,1.73,0.03,2.54l0.13-0.02c1.25-0.15,2.38,0.74,2.54,1.98 c0.15,1.25-0.74,2.38-1.98,2.54l-1.68,0.21c-1.2,3.11-3.34,5.48-5.87,6.94c-1.74,1.01-3.67,1.59-5.61,1.71 c-1.97,0.12-3.96-0.25-5.78-1.13c-2.08-1.02-3.94-2.71-5.29-5.14c-0.65-0.33-1.13-0.97-1.23-1.75c-0.04-0.31-0.01-0.61,0.07-0.89 c-0.39-1.16-0.68-2.43-0.87-3.83l-0.07,0.01c-1.24,0.17-2.39-0.7-2.56-1.94c-0.17-1.24,0.7-2.39,1.94-2.56l0.54-0.08 C44.19,104.32,44.18,103.16,44.13,102.06L44.13,102.06z M2.18,58.86C1.01,58.89,0.04,57.98,0,56.81c-0.04-1.17,0.88-2.14,2.05-2.18 l8.7-0.3c1.17-0.04,2.14,0.88,2.18,2.05c0.04,1.17-0.88,2.14-2.05,2.18L2.18,58.86L2.18,58.86z M110.68,50.25 c1.16-0.12,2.2,0.73,2.32,1.89c0.12,1.16-0.73,2.2-1.89,2.32l-8.66,0.91c-1.16,0.12-2.2-0.73-2.32-1.89 c-0.12-1.16,0.73-2.2,1.89-2.32L110.68,50.25L110.68,50.25z M94.91,14.78c0.65-0.97,1.96-1.23,2.93-0.58 c0.97,0.65,1.23,1.96,0.58,2.93l-4.84,7.24c-0.65,0.97-1.96,1.23-2.93,0.58c-0.97-0.65-1.23-1.96-0.58-2.93L94.91,14.78 L94.91,14.78z M57.63,2.06c0.03-1.17,1-2.09,2.16-2.06c1.17,0.03,2.09,1,2.06,2.16l-0.22,8.7c-0.03,1.17-1,2.09-2.16,2.06 c-1.17-0.03-2.09-1-2.06-2.16L57.63,2.06L57.63,2.06z M13.88,15.53c-0.86-0.8-0.9-2.14-0.11-2.99c0.8-0.86,2.14-0.9,2.99-0.11 l6.37,5.94c0.86,0.8,0.9,2.14,0.11,2.99c-0.8,0.86-2.14,0.9-2.99,0.11L13.88,15.53L13.88,15.53z M47.88,96.95l18.49-2.63 c1.59-6.7,5.05-10.73,8.8-15.08c3.08-3.58,6.36-7.4,8.76-13.34c1.76-4.35,2.41-8.43,2.31-12.19c-0.1-3.75-0.96-7.21-2.24-10.34 c-2.3-5.63-6.51-10.11-11.65-13.15c-4.11-2.43-8.8-3.94-13.59-4.37c-4.77-0.44-9.64,0.19-14.13,2.02 c-5.26,2.15-9.99,5.97-13.39,11.72c-2.64,5.12-3.86,10.02-3.9,14.73c-0.04,4.74,1.11,9.33,3.2,13.8c2.13,4.56,4.97,7.8,7.69,10.92 C42.47,83.9,46.48,88.49,47.88,96.95L47.88,96.95z M65.62,99.02l-17.27,2.45c0.05,1.1,0.07,2.25,0.05,3.47l17.05-2.42 C65.47,101.29,65.52,100.12,65.62,99.02L65.62,99.02z M48.49,109.52c0.12,0.92,0.3,1.76,0.53,2.54l16.55-2.04 c0.11-0.86,0.13-1.77,0.05-2.74l0,0l0-0.02l-0.01-0.17L48.49,109.52L48.49,109.52z M51.37,116.36c0.64,0.67,1.35,1.19,2.1,1.55 c1.15,0.56,2.42,0.79,3.67,0.72c1.29-0.08,2.57-0.47,3.74-1.15c1.1-0.64,2.09-1.53,2.88-2.65L51.37,116.36L51.37,116.36z"/></g></svg>'); | |
339 | + background-size: contain; | |
340 | + background-repeat: no-repeat; | |
341 | + vertical-align: middle; | |
342 | + margin-inline-start: 0.5ex; | |
343 | + margin-inline-end: 0.5ex; | |
344 | + margin-top: -0.2em; | |
345 | +} | |
346 | + | |
347 | +.warning-icon { | |
348 | + display: inline-block; | |
349 | + width: 13px; | |
350 | + height: 13px; | |
351 | + background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M270.2 160h35.5c3.4 0 6.1 2.8 6 6.2l-7.5 196c-.1 3.2-2.8 5.8-6 5.8h-20.5c-3.2 0-5.9-2.5-6-5.8l-7.5-196c-.1-3.4 2.6-6.2 6-6.2zM288 388c-15.5 0-28 12.5-28 28s12.5 28 28 28 28-12.5 28-28-12.5-28-28-28zm281.5 52L329.6 24c-18.4-32-64.7-32-83.2 0L6.5 440c-18.4 31.9 4.6 72 41.6 72H528c36.8 0 60-40 41.5-72zM528 480H48c-12.3 0-20-13.3-13.9-24l240-416c6.1-10.6 21.6-10.7 27.7 0l240 416c6.2 10.6-1.5 24-13.8 24z" fill="%23DEAD22" stroke="%23DEAD22"/></svg>'); | |
352 | + background-size: contain; | |
353 | + background-repeat: no-repeat; | |
354 | + vertical-align: middle; | |
355 | + margin-inline-start: 0.3ex; | |
356 | + margin-inline-end: 1.1ex; | |
357 | + margin-top: -0.1em; | |
358 | +} | |
359 | + | |
360 | +.documentation-button { | |
361 | + cursor: pointer; | |
362 | + display: inline-block; | |
363 | + width: 13px; | |
364 | + height: 13px; | |
365 | + background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 340c-15.464 0-28 12.536-28 28s12.536 28 28 28 28-12.536 28-28-12.536-28-28-28zm7.67-24h-16c-6.627 0-12-5.373-12-12v-.381c0-70.343 77.44-63.619 77.44-107.408 0-20.016-17.761-40.211-57.44-40.211-29.144 0-44.265 9.649-59.211 28.692-3.908 4.98-11.054 5.995-16.248 2.376l-13.134-9.15c-5.625-3.919-6.86-11.771-2.645-17.177C185.658 133.514 210.842 116 255.67 116c52.32 0 97.44 29.751 97.44 80.211 0 67.414-77.44 63.849-77.44 107.408V304c0 6.627-5.373 12-12 12zM256 40c118.621 0 216 96.075 216 216 0 119.291-96.61 216-216 216-119.244 0-216-96.562-216-216 0-119.203 96.602-216 216-216m0-32C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8z" fill="%23999999" stroke="%23999999"/></svg>'); | |
366 | + background-size: contain; | |
367 | + background-repeat: no-repeat; | |
368 | + vertical-align: middle; | |
369 | + margin-inline-start: 0.5ex; | |
370 | + margin-inline-end: 0.5ex; | |
371 | + margin-top: -0.2em; | |
372 | +} | |
373 | + | |
374 | +.documentation-button::selection { | |
375 | + color: transparent; | |
376 | +} | |
377 | + | |
378 | +.documentation-button:hover { | |
379 | + color: transparent; | |
380 | +} | |
381 | + | |
382 | +.copy-button { | |
383 | + cursor: pointer; | |
384 | + display: inline-block; | |
385 | + width: 12px; | |
386 | + height: 12px; | |
387 | + background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M433.941 193.941l-51.882-51.882A48 48 0 0 0 348.118 128H320V80c0-26.51-21.49-48-48-48h-66.752C198.643 13.377 180.858 0 160 0s-38.643 13.377-45.248 32H48C21.49 32 0 53.49 0 80v288c0 26.51 21.49 48 48 48h80v48c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48V227.882a48 48 0 0 0-14.059-33.941zm-22.627 22.627a15.888 15.888 0 0 1 4.195 7.432H352v-63.509a15.88 15.88 0 0 1 7.431 4.195l51.883 51.882zM160 30c9.941 0 18 8.059 18 18s-8.059 18-18 18-18-8.059-18-18 8.059-18 18-18zM48 384c-8.822 0-16-7.178-16-16V80c0-8.822 7.178-16 16-16h66.752c6.605 18.623 24.389 32 45.248 32s38.643-13.377 45.248-32H272c8.822 0 16 7.178 16 16v48H176c-26.51 0-48 21.49-48 48v208H48zm352 96H176c-8.822 0-16-7.178-16-16V176c0-8.822 7.178-16 16-16h144v72c0 13.2 10.8 24 24 24h72v208c0 8.822-7.178 16-16 16z" fill="%23999999" stroke="%23999999"/></svg>'); | |
388 | + background-size: contain; | |
389 | + background-repeat: no-repeat; | |
390 | + vertical-align: middle; | |
391 | + margin-inline-start: 0.5ex; | |
392 | + margin-top: -0.2em; | |
393 | +} | |
394 | + | |
395 | +.groups{ | |
396 | + display: flex; | |
397 | + border-bottom: 1px solid #EDEEEF; | |
398 | + flex: 1 0 100%; | |
399 | +} | |
400 | + | |
401 | +.uncategorized { | |
402 | + display: flex; | |
403 | + border-top: 4px solid #EDEEEF; | |
404 | + flex: 1 0 100%; | |
405 | +} | |
406 | + | |
407 | +.group-selector { | |
408 | + padding: 0 52px 24px 0; | |
409 | + font-size: 0.9rem; | |
410 | + font-weight: bold; | |
411 | + color: #999999; | |
412 | + cursor: pointer; | |
413 | +} | |
414 | + | |
415 | +.group-selector__count { | |
416 | + margin: 0 8px; | |
417 | + border-radius: 8px; | |
418 | + background-color: #999; | |
419 | + color: #fff; | |
420 | + padding: 1px 8px 2px; | |
421 | + font-size: 0.75rem; | |
422 | +} | |
423 | + | |
424 | +.group-selector--active { | |
425 | + color: #02303A; | |
426 | + cursor: auto; | |
427 | +} | |
428 | + | |
429 | +.group-selector--active .group-selector__count { | |
430 | + background-color: #686868; | |
431 | +} | |
432 | + | |
433 | +.group-selector--disabled { | |
434 | + cursor: not-allowed; | |
435 | +} | |
436 | + | |
437 | +.accordion-header { | |
438 | + cursor: pointer; | |
439 | +} | |
440 | + | |
441 | +.container { | |
442 | + padding-left: 0.5em; | |
443 | + padding-right: 0.5em; | |
444 | +} | |
445 | + | |
446 | +.stacktrace { | |
447 | + border-radius: 4px; | |
448 | + overflow-x: auto; | |
449 | + padding: 0.5rem; | |
450 | + margin-bottom: 0; | |
451 | + min-width: 1000px; | |
452 | +} | |
453 | + | |
454 | +/* Lato (bold, regular) */ | |
455 | +@font-face { | |
456 | + font-display: swap; | |
457 | + font-family: Lato; | |
458 | + font-weight: 500; | |
459 | + font-style: normal; | |
460 | + src: url("https://assets.gradle.com/lato/fonts/lato-semibold/lato-semibold.woff2") format("woff2"), | |
461 | + url("https://assets.gradle.com/lato/fonts/lato-semibold/lato-semibold.woff") format("woff"); | |
462 | +} | |
463 | + | |
464 | +@font-face { | |
465 | + font-display: swap; | |
466 | + font-family: Lato; | |
467 | + font-weight: bold; | |
468 | + font-style: normal; | |
469 | + src: url("https://assets.gradle.com/lato/fonts/lato-bold/lato-bold.woff2") format("woff2"), | |
470 | + url("https://assets.gradle.com/lato/fonts/lato-bold/lato-bold.woff") format("woff"); | |
471 | +} | |
472 | + | |
473 | +* { | |
474 | + -webkit-box-sizing: border-box; | |
475 | + -moz-box-sizing: border-box; | |
476 | + box-sizing: border-box; | |
477 | +} | |
478 | + | |
479 | +html, | |
480 | +body { | |
481 | + margin: 0; | |
482 | + padding: 0; | |
483 | +} | |
484 | + | |
485 | +html { | |
486 | + font-family: "Lato", "Helvetica Neue", Arial, sans-serif; | |
487 | + font-size: 16px; | |
488 | + font-weight: 400; | |
489 | + line-height: 1.5; | |
490 | +} | |
491 | + | |
492 | +body { | |
493 | + color: #02303A; | |
494 | + background-color: #ffffff; | |
495 | + -webkit-text-size-adjust: 100%; | |
496 | + -ms-text-size-adjust: 100%; | |
497 | + -webkit-font-smoothing: antialiased; | |
498 | +} | |
499 | + | |
500 | + | |
501 | +/* typography */ | |
502 | +h1, h2, h3, h4, h5, h6 { | |
503 | + color: #02303A; | |
504 | + text-rendering: optimizeLegibility; | |
505 | + margin: 0; | |
506 | +} | |
507 | + | |
508 | +h1 { | |
509 | + font-size: 1rem; | |
510 | +} | |
511 | + | |
512 | +h2 { | |
513 | + font-size: 0.9rem; | |
514 | +} | |
515 | + | |
516 | +h3 { | |
517 | + font-size: 1.125rem; | |
518 | +} | |
519 | + | |
520 | +h4, h5, h6 { | |
521 | + font-size: 0.875rem; | |
522 | +} | |
523 | + | |
524 | +h1 code { | |
525 | + font-weight: bold; | |
526 | +} | |
527 | + | |
528 | +ul, ol, dl { | |
529 | + list-style-position: outside; | |
530 | + line-height: 1.6; | |
531 | + padding: 0; | |
532 | + margin: 0 0 0 20px; | |
533 | + list-style-type: none; | |
534 | +} | |
535 | + | |
536 | +li { | |
537 | + line-height: 2; | |
538 | +} | |
539 | + | |
540 | +a { | |
541 | + color: #1DA2BD; | |
542 | + text-decoration: none; | |
543 | + transition: all 0.3s ease, visibility 0s; | |
544 | +} | |
545 | + | |
546 | +a:hover { | |
547 | + color: #35c1e4; | |
548 | +} | |
549 | + | |
550 | +/* code */ | |
551 | +code, pre { | |
552 | + font-family: Inconsolata, Monaco, "Courier New", monospace; | |
553 | + font-style: normal; | |
554 | + font-variant-ligatures: normal; | |
555 | + font-variant-caps: normal; | |
556 | + font-variant-numeric: normal; | |
557 | + font-variant-east-asian: normal; | |
558 | + font-weight: normal; | |
559 | + font-stretch: normal; | |
560 | + color: #686868; | |
561 | +} | |
562 | + | |
563 | +*:not(pre) > code { | |
564 | + letter-spacing: 0; | |
565 | + padding: 0.1em 0.5ex; | |
566 | + text-rendering: optimizeSpeed; | |
567 | + word-spacing: -0.15em; | |
568 | + word-wrap: break-word; | |
569 | +} | |
570 | + | |
571 | +pre { | |
572 | + font-size: 0.75rem; | |
573 | + line-height: 1.8; | |
574 | + margin-top: 0; | |
575 | + margin-bottom: 1.5em; | |
576 | + padding: 1rem; | |
577 | +} | |
578 | + | |
579 | +pre code { | |
580 | + background-color: transparent; | |
581 | + color: inherit; | |
582 | + line-height: 1.8; | |
583 | + font-size: 100%; | |
584 | + padding: 0; | |
585 | +} | |
586 | + | |
587 | +a code { | |
588 | + color: #1BA8CB; | |
589 | +} | |
590 | + | |
591 | +pre.code, pre.programlisting, pre.screen, pre.tt { | |
592 | + background-color: #f7f7f8; | |
593 | + border-radius: 4px; | |
594 | + font-size: 1em; | |
595 | + line-height: 1.45; | |
596 | + margin-bottom: 1.25em; | |
597 | + overflow-x: auto; | |
598 | + padding: 1rem; | |
599 | +} | |
600 | + | |
601 | +li em, p em { | |
602 | + padding: 0 1px; | |
603 | +} | |
604 | + | |
605 | +code em, tt em { | |
606 | + text-decoration: none; | |
607 | +} | |
608 | + | |
609 | +code + .copy-button { | |
610 | + margin-inline-start: 0.2ex; | |
611 | +} | |
612 | + | |
613 | +.java-exception { | |
614 | + font-size: 0.75rem; | |
615 | + padding-left: 24px; | |
616 | +} | |
617 | + | |
618 | +.java-exception ul { | |
619 | + margin: 0; | |
620 | + line-height: inherit; | |
621 | +} | |
622 | + | |
623 | +.java-exception code { | |
624 | + white-space: pre; | |
625 | +} | |
626 | + | |
627 | +.java-exception-part-toggle { | |
628 | + user-select: none; | |
629 | + cursor: pointer; | |
630 | + border-radius: 2px; | |
631 | + padding: 0.1em 0.2em; | |
632 | + background: azure; | |
633 | + color: #686868; | |
634 | +} | |
635 | + | |
636 | + </style> | |
637 | + <!-- Inconsolata is used as a default monospace font in the report. --> | |
638 | + <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inconsolata:400,700" /> | |
639 | + | |
640 | + <title>Gradle Configuration Cache</title> | |
641 | +</head> | |
642 | +<body> | |
643 | + | |
644 | +<div id="playground"></div> | |
645 | + | |
646 | +<div class="report" id="report"> | |
647 | + Loading... | |
648 | +</div> | |
649 | + | |
650 | +<script type="text/javascript"> | |
651 | +function configurationCacheProblems() { return ( | |
652 | +// begin-report-data | |
653 | +{"diagnostics":[{"locations":[{"path":"C:\\Users\\takensoft\\IdeaProjects\\cms_backend\\src\\main\\java\\com\\takensoft\\cms\\bbs\\web\\BbsMngController.java"},{"taskPath":":compileJava"}],"problem":[{"text":"Java compilation note"}],"severity":"ADVICE","problemDetails":[{"text":"Note: C:\\Users\\takensoft\\IdeaProjects\\cms_backend\\src\\main\\java\\com\\takensoft\\cms\\bbs\\web\\BbsMngController.java uses unchecked or unsafe operations."}],"contextualLabel":"C:\\Users\\takensoft\\IdeaProjects\\cms_backend\\src\\main\\java\\com\\takensoft\\cms\\bbs\\web\\BbsMngController.java uses unchecked or unsafe operations.","problemId":[{"name":"java","displayName":"Java compilation"},{"name":"compilation","displayName":"Compilation"},{"name":"compiler-note-unchecked-filename","displayName":"Java compilation note"}]},{"locations":[{"path":"C:\\Users\\takensoft\\IdeaProjects\\cms_backend\\src\\main\\java\\com\\takensoft\\cms\\bbs\\web\\BbsMngController.java"},{"taskPath":":compileJava"}],"problem":[{"text":"Java compilation note"}],"severity":"ADVICE","problemDetails":[{"text":"Note: Recompile with -Xlint:unchecked for details."}],"contextualLabel":"Recompile with -Xlint:unchecked for details.","problemId":[{"name":"java","displayName":"Java compilation"},{"name":"compilation","displayName":"Compilation"},{"name":"compiler-note-unchecked-recompile","displayName":"Java compilation note"}]}],"problemsReport":{"totalProblemCount":2,"buildName":"cms","requestedTasks":":classes","documentationLink":"https://docs.gradle.org/8.13/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}} | |
654 | +// end-report-data | |
655 | +);} | |
656 | +</script> | |
657 | + <script type="text/javascript"> | |
658 | + !function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["configuration-cache-report"]=t():n["configuration-cache-report"]=t()}(this,(()=>(({70:function(){void 0===ArrayBuffer.isView&&(ArrayBuffer.isView=function(n){return null!=n&&null!=n.__proto__&&n.__proto__.__proto__===Int8Array.prototype.__proto__}),void 0===Math.imul&&(Math.imul=function(n,t){return(4294901760&n)*(65535&t)+(65535&n)*(0|t)|0}),this["configuration-cache-report"]=function(n){"use strict";var t,r,i,e,u,o,f,s,c,a,h,l,_,v,d,g,w,b,p,m,k,y,q,B,C,x,j,P,I,S,z,E,T,L,N,A,M,F,D,O,R,H,$,G,U,V,Q,Z,Y,W,K,X,J,nn,tn,rn,en,un,on,fn,sn,cn,an,hn,ln,_n,vn,dn,gn,wn,bn,pn,mn,kn,yn,qn,Bn,Cn,xn,jn,Pn,In,Sn,zn=Math.imul,En=ArrayBuffer.isView;function Tn(n,t){if(!(t>=0))throw fu(ie("Requested element count "+t+" is less than zero."));return function(n,t){if(!(t>=0))throw fu(ie("Requested element count "+t+" is less than zero."));if(0===t)return pt();if(t>=n.length)return function(n){switch(n.length){case 0:return pt();case 1:return gr(n[0]);default:return function(n){return Ar(function(n){return new qt(n,!1)}(n))}(n)}}(n);if(1===t)return gr(n[0]);var r=0,i=Nr(),e=0,u=n.length;n:for(;e<u;){var o=n[e];if(e=e+1|0,i.d(o),(r=r+1|0)===t)break n}return i}(n,Wn(n.length-t|0,0))}function Ln(n,t,r,i,e,u,o){return t=t===A?", ":t,r=r===A?"":r,i=i===A?"":i,e=e===A?-1:e,u=u===A?"...":u,o=o===A?null:o,function(n,t,r,i,e,u,o,f){r=r===A?", ":r,i=i===A?"":i,e=e===A?"":e,u=u===A?-1:u,o=o===A?"...":o,f=f===A?null:f,t.e(i);var s=0,c=0,a=n.length;n:for(;c<a;){var h=n[c];if(c=c+1|0,(s=s+1|0)>1&&t.e(r),!(u<0||s<=u))break n;Qt(t,h,f)}return u>=0&&s>u&&t.e(o),t.e(e),t}(n,bi(),t,r,i,e,u,o).toString()}function Nn(n){return n.length-1|0}function An(n,t){if(null==t){var r=0,i=n.length-1|0;if(r<=i)do{var e=r;if(r=r+1|0,null==n[e])return e}while(r<=i)}else{var u=0,o=n.length-1|0;if(u<=o)do{var f=u;if(u=u+1|0,oe(t,n[f]))return f}while(u<=o)}return-1}function Mn(n,t,r,i,e,u,o){return t=t===A?", ":t,r=r===A?"":r,i=i===A?"":i,e=e===A?-1:e,u=u===A?"...":u,o=o===A?null:o,Fn(n,bi(),t,r,i,e,u,o).toString()}function Fn(n,t,r,i,e,u,o,f){r=r===A?", ":r,i=i===A?"":i,e=e===A?"":e,u=u===A?-1:u,o=o===A?"...":o,f=f===A?null:f,t.e(i);var s=0,c=n.f();n:for(;c.g();){var a=c.h();if((s=s+1|0)>1&&t.e(r),!(u<0||s<=u))break n;Qt(t,a,f)}return u>=0&&s>u&&t.e(o),t.e(e),t}function Dn(n){if(n.i())throw mu("List is empty.");return n.j(0)}function On(n){return new Yn(n)}function Rn(n){if(Ue(n,Ti)){var t;switch(n.k()){case 0:t=pt();break;case 1:t=gr(Ue(n,Ei)?n.j(0):n.f().h());break;default:t=Hn(n)}return t}return mt(Vn(n))}function Hn(n){return Ar(n)}function $n(n){if(Ue(n,Ti)&&n.k()<=1)return Rn(n);var t=Vn(n);return function(n){var t=(n.k()/2|0)-1|0;if(t<0)return lr();var r=kt(n),i=0;if(i<=t)do{var e=i;i=i+1|0;var u=n.j(e);n.f4(e,n.j(r)),n.f4(r,u),r=r-1|0}while(e!==t)}(t),t}function Gn(n,t){if(!(t>=0))throw fu(ie("Requested element count "+t+" is less than zero."));return function(n,t){if(!(t>=0))throw fu(ie("Requested element count "+t+" is less than zero."));if(0===t)return pt();if(Ue(n,Ti)){if(t>=n.k())return Rn(n);if(1===t)return gr(function(n){if(Ue(n,Ei))return Dn(n);var t=n.f();if(!t.g())throw mu("Collection is empty.");return t.h()}(n))}var r=0,i=Nr(),e=n.f();n:for(;e.g();){var u=e.h();if(i.d(u),(r=r+1|0)===t)break n}return mt(i)}(n,Wn(n.k()-t|0,0))}function Un(n,t){if(!(t>=0))throw fu(ie("Requested element count "+t+" is less than zero."));if(0===t)return pt();var r=n.k();if(t>=r)return Rn(n);if(1===t)return gr(Qn(n));var i=Nr();if(Ue(n,li)){var e=r-t|0;if(e<r)do{var u=e;e=e+1|0,i.d(n.j(u))}while(e<r)}else for(var o=n.l(r-t|0);o.g();){var f=o.h();i.d(f)}return i}function Vn(n){return Ue(n,Ti)?Hn(n):Zn(n,Lr())}function Qn(n){if(n.i())throw mu("List is empty.");return n.j(kt(n))}function Zn(n,t){for(var r=n.f();r.g();){var i=r.h();t.d(i)}return t}function Yn(n){this.n_1=n}function Wn(n,t){return n<t?t:n}function Kn(n,t){return n>t?t:n}function Xn(n,t){return Ut().q(n,t,-1)}function Jn(n,t){return new Et(n,t)}function nt(n){var t=n.f();if(!t.g())return pt();var r=t.h();if(!t.g())return gr(r);var i=Lr();for(i.d(r);t.g();)i.d(t.h());return i}function tt(n){this.r_1=n}function rt(n,t){this.s_1=n,this.t_1=t}function it(){}function et(n){this.x_1=n,this.w_1=0}function ut(n,t){this.a1_1=n,et.call(this,n),ft().b1(t,this.a1_1.k()),this.w_1=t}function ot(){t=this}function ft(){return null==t&&new ot,t}function st(){ft(),it.call(this)}function ct(n){this.h1_1=n}function at(n,t){return t===n?"(this Map)":Oi(t)}function ht(n,t){var r;n:{for(var i=n.o().f();i.g();){var e=i.h();if(oe(e.j1(),t)){r=e;break n}}r=null}return r}function lt(){r=this}function _t(){return null==r&&new lt,r}function vt(n){this.q1_1=n,it.call(this)}function dt(){_t(),this.n1_1=null,this.o1_1=null}function gt(){i=this}function wt(){return null==i&&new gt,i}function bt(n){return n.length>0?nu(n):pt()}function pt(){return null==e&&new yt,e}function mt(n){switch(n.k()){case 0:return pt();case 1:return gr(n.j(0));default:return n}}function kt(n){return n.k()-1|0}function yt(){e=this,this.z1_1=new de(-1478467534,-1720727600)}function qt(n,t){this.b2_1=n,this.c2_1=t}function Bt(){u=this}function Ct(){return null==u&&new Bt,u}function xt(n,t){return Ue(n,Ti)?n.k():t}function jt(n,t){if(Ue(t,Ti))return n.m(t);for(var r=!1,i=t.f();i.g();){var e=i.h();n.d(e)&&(r=!0)}return r}function Pt(){}function It(n,t){this.h2_1=n,this.g2_1=n.i2_1.l(function(n,t){if(!(0<=t&&t<=n.k()))throw cu("Position index "+t+" must be in range ["+Oe(0,n.k())+"].");return n.k()-t|0}(n,t))}function St(n){st.call(this),this.i2_1=n}function zt(n){this.k2_1=n,this.j2_1=n.l2_1.f()}function Et(n,t){this.l2_1=n,this.m2_1=t}function Tt(n){for(;n.n2_1.g();){var t=n.n2_1.h();if(n.q2_1.t2_1(t)===n.q2_1.s2_1)return n.p2_1=t,n.o2_1=1,lr()}n.o2_1=0}function Lt(n){this.q2_1=n,this.n2_1=n.r2_1.f(),this.o2_1=-1,this.p2_1=null}function Nt(n,t,r){t=t===A||t,this.r2_1=n,this.s2_1=t,this.t2_1=r}function At(){return null==o&&new Mt,o}function Mt(){o=this,this.u2_1=new de(1993859828,793161749)}function Ft(n,t,r){return Dt(Dt(n,r)-Dt(t,r)|0,r)}function Dt(n,t){var r=n%t|0;return r>=0?r:r+t|0}function Ot(){f=this,this.p_1=new Ht(1,0)}function Rt(){return null==f&&new Ot,f}function Ht(n,t){Rt(),Vt.call(this,n,t,1)}function $t(n,t,r){Pt.call(this),this.d3_1=r,this.e3_1=t,this.f3_1=this.d3_1>0?n<=t:n>=t,this.g3_1=this.f3_1?n:this.e3_1}function Gt(){s=this}function Ut(){return null==s&&new Gt,s}function Vt(n,t,r){if(Ut(),0===r)throw fu("Step must be non-zero.");if(r===vr().MIN_VALUE)throw fu("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");this.z2_1=n,this.a3_1=function(n,t,r){var i;if(r>0)i=n>=t?t:t-Ft(t,n,r)|0;else{if(!(r<0))throw fu("Step is zero.");i=n<=t?t:t+Ft(n,t,0|-r)|0}return i}(n,t,r),this.b3_1=r}function Qt(n,t,r){null!=r?n.e(r(t)):null==t||Ze(t)?n.e(t):t instanceof zi?n.i3(t.h3_1):n.e(Oi(t))}function Zt(n,t,r){if(n===t)return!0;if(!(r=r!==A&&r))return!1;var i=mi(n),e=mi(t);return i===e||oe(new zi(Zi(Pi(i).toLowerCase(),0)),new zi(Zi(Pi(e).toLowerCase(),0)))}function Yt(n){return Wi(n)-1|0}function Wt(n,t,r,i){return r=r===A?0:r,(i=i!==A&&i)||"string"!=typeof n?Kt(n,t,r,Wi(n),i):n.indexOf(t,r)}function Kt(n,t,r,i,e,u){var o=(u=u!==A&&u)?Xn(Kn(r,Yt(n)),Wn(i,0)):Oe(Wn(r,0),Kn(i,Wi(n)));if("string"==typeof n&&"string"==typeof t){var f=o.z2_1,s=o.a3_1,c=o.b3_1;if(c>0&&f<=s||c<0&&s<=f)do{var a=f;if(f=f+c|0,xi(t,0,n,a,Wi(t),e))return a}while(a!==s)}else{var h=o.z2_1,l=o.a3_1,_=o.b3_1;if(_>0&&h<=l||_<0&&l<=h)do{var v=h;if(h=h+_|0,tr(t,0,n,v,Wi(t),e))return v}while(v!==l)}return-1}function Xt(n){var t=0,r=Wi(n)-1|0,i=!1;n:for(;t<=r;){var e=ki(Zi(n,i?r:t));if(i){if(!e)break n;r=r-1|0}else e?t=t+1|0:i=!0}return Ki(n,t,r+1|0)}function Jt(n,t){return ie(Ki(n,t.y2(),t.c3()+1|0))}function nr(n,t,r,i,e){r=r===A?0:r,i=i!==A&&i,rr(e=e===A?0:e);var u,o,f=nu(t);return new ur(n,r,e,(u=f,o=i,function(n,t){var r=function(n,t,r,i){if(!i&&1===t.k()){var e=function(n){if(Ue(n,Ei))return function(n){var t;switch(n.k()){case 0:throw mu("List is empty.");case 1:t=n.j(0);break;default:throw fu("List has more than one element.")}return t}(n);var t=n.f();if(!t.g())throw mu("Collection is empty.");var r=t.h();if(t.g())throw fu("Collection has more than one element.");return r}(t),u=Wt(n,e,r);return u<0?null:fr(u,e)}var o=Oe(Wn(r,0),Wi(n));if("string"==typeof n){var f=o.z2_1,s=o.a3_1,c=o.b3_1;if(c>0&&f<=s||c<0&&s<=f)do{var a,h=f;f=f+c|0;n:{for(var l=t.f();l.g();){var _=l.h();if(xi(_,0,n,h,_.length,i)){a=_;break n}}a=null}if(null!=a)return fr(h,a)}while(h!==s)}else{var v=o.z2_1,d=o.a3_1,g=o.b3_1;if(g>0&&v<=d||g<0&&d<=v)do{var w,b=v;v=v+g|0;n:{for(var p=t.f();p.g();){var m=p.h();if(tr(m,0,n,b,m.length,i)){w=m;break n}}w=null}if(null!=w)return fr(b,w)}while(b!==d)}return null}(n,u,t,o);return null==r?null:fr(r.t3_1,r.u3_1.length)}))}function tr(n,t,r,i,e,u){if(i<0||t<0||t>(Wi(n)-e|0)||i>(Wi(r)-e|0))return!1;var o=0;if(o<e)do{var f=o;if(o=o+1|0,!Zt(Zi(n,t+f|0),Zi(r,i+f|0),u))return!1}while(o<e);return!0}function rr(n){if(!(n>=0))throw fu(ie("Limit must be non-negative, but was "+n))}function ir(n){if(n.l3_1<0)n.j3_1=0,n.m3_1=null;else{var t;if(n.o3_1.r3_1>0?(n.n3_1=n.n3_1+1|0,t=n.n3_1>=n.o3_1.r3_1):t=!1,t||n.l3_1>Wi(n.o3_1.p3_1))n.m3_1=Oe(n.k3_1,Yt(n.o3_1.p3_1)),n.l3_1=-1;else{var r=n.o3_1.s3_1(n.o3_1.p3_1,n.l3_1);if(null==r)n.m3_1=Oe(n.k3_1,Yt(n.o3_1.p3_1)),n.l3_1=-1;else{var i=r.v3(),e=r.w3();n.m3_1=function(n,t){return t<=vr().MIN_VALUE?Rt().p_1:Oe(n,t-1|0)}(n.k3_1,i),n.k3_1=i+e|0,n.l3_1=n.k3_1+(0===e?1:0)|0}}n.j3_1=1}}function er(n){this.o3_1=n,this.j3_1=-1,this.k3_1=function(n,t,r){if(0>r)throw fu("Cannot coerce value to an empty range: maximum "+r+" is less than minimum 0.");return n<0?0:n>r?r:n}(n.q3_1,0,Wi(n.p3_1)),this.l3_1=this.k3_1,this.m3_1=null,this.n3_1=0}function ur(n,t,r,i){this.p3_1=n,this.q3_1=t,this.r3_1=r,this.s3_1=i}function or(n,t){this.t3_1=n,this.u3_1=t}function fr(n,t){return new or(n,t)}function sr(){}function cr(){}function ar(){}function hr(){c=this}function lr(){return null==c&&new hr,c}function _r(){a=this,this.MIN_VALUE=-2147483648,this.MAX_VALUE=2147483647,this.SIZE_BYTES=4,this.SIZE_BITS=32}function vr(){return null==a&&new _r,a}function dr(n){for(var t=[],r=n.f();r.g();)t.push(r.h());return t}function gr(n){return 0===(t=[n]).length?Lr():Ar(new qt(t,!0));var t}function wr(n){return n<0&&function(){throw yu("Index overflow has happened.")}(),n}function br(n){return void 0!==n.toArray?n.toArray():dr(n)}function pr(n){return function(n,t){for(var r=0,i=n.length;r<i;){var e=n[r];r=r+1|0,t.d(e)}return t}(t=[n],(r=t.length,i=ce(se(Zr)),function(n,t,r){zr.call(r),Zr.call(r),r.y5_1=function(n){return Ur(n,0,ce(se(Vr)))}(n)}(r,0,i),i));var t,r,i}function mr(){it.call(this)}function kr(n){this.j4_1=n,this.h4_1=0,this.i4_1=-1}function yr(n,t){this.n4_1=n,kr.call(this,n),ft().b1(t,this.n4_1.k()),this.h4_1=t}function qr(){mr.call(this),this.o4_1=0}function Br(n){this.r4_1=n}function Cr(n){this.s4_1=n}function xr(n,t){this.t4_1=n,this.u4_1=t}function jr(){zr.call(this)}function Pr(n){this.x4_1=n,zr.call(this)}function Ir(n){this.e5_1=n,mr.call(this)}function Sr(){dt.call(this),this.c5_1=null,this.d5_1=null}function zr(){mr.call(this)}function Er(){h=this;var n=Nr();n.c_1=!0,this.i5_1=n}function Tr(){return null==h&&new Er,h}function Lr(){return n=ce(se(Fr)),t=[],Fr.call(n,t),n;var n,t}function Nr(n){return t=ce(se(Fr)),r=[],Fr.call(t,r),t;var t,r}function Ar(n){return function(n,t){var r;return r=br(n),Fr.call(t,r),t}(n,ce(se(Fr)))}function Mr(n,t){return ft().e1(t,n.k()),t}function Fr(n){Tr(),qr.call(this),this.b_1=n,this.c_1=!1}function Dr(n,t,r,i,e){if(r===i)return n;var u=(r+i|0)/2|0,o=Dr(n,t,r,u,e),f=Dr(n,t,u+1|0,i,e),s=o===t?n:t,c=r,a=u+1|0,h=r;if(h<=i)do{var l=h;if(h=h+1|0,c<=u&&a<=i){var _=o[c],v=f[a];e.compare(_,v)<=0?(s[l]=_,c=c+1|0):(s[l]=v,a=a+1|0)}else c<=u?(s[l]=o[c],c=c+1|0):(s[l]=f[a],a=a+1|0)}while(l!==i);return s}function Or(n,t){return(3&n)-(3&t)|0}function Rr(){_=this}function Hr(n){this.n5_1=n,jr.call(this)}function $r(n){return function(n,t){Sr.call(t),Vr.call(t),t.t5_1=n,t.u5_1=n.w5()}(new Jr((null==_&&new Rr,_)),n),n}function Gr(){return $r(ce(se(Vr)))}function Ur(n,t,r){if($r(r),!(n>=0))throw fu(ie("Negative initial capacity: "+n));if(!(t>=0))throw fu(ie("Non-positive load factor: "+t));return r}function Vr(){this.v5_1=null}function Qr(n,t){return zr.call(t),Zr.call(t),t.y5_1=n,t}function Zr(){}function Yr(n,t){var r=Kr(n,n.h6_1.m5(t));if(null==r)return null;var i=r;if(null!=i&&Ve(i))return Wr(i,n,t);var e=i;return n.h6_1.l5(e.j1(),t)?e:null}function Wr(n,t,r){var i;n:{for(var e=0,u=n.length;e<u;){var o=n[e];if(e=e+1|0,t.h6_1.l5(o.j1(),r)){i=o;break n}}i=null}return i}function Kr(n,t){var r=n.i6_1[t];return void 0===r?null:r}function Xr(n){this.g6_1=n,this.z5_1=-1,this.a6_1=Object.keys(n.i6_1),this.b6_1=-1,this.c6_1=null,this.d6_1=!1,this.e6_1=-1,this.f6_1=null}function Jr(n){this.h6_1=n,this.i6_1=this.k6(),this.j6_1=0}function ni(){}function ti(n){this.n6_1=n,this.l6_1=null,this.m6_1=null,this.m6_1=this.n6_1.y6_1.v6_1}function ri(){v=this;var n,t=(fi(0,0,n=ce(se(si))),n);t.x6_1=!0,this.e7_1=t}function ii(){return null==v&&new ri,v}function ei(n,t,r){this.d7_1=n,xr.call(this,t,r),this.b7_1=null,this.c7_1=null}function ui(n){this.y6_1=n,jr.call(this)}function oi(){return $r(n=ce(se(si))),si.call(n),n.w6_1=Gr(),n;var n}function fi(n,t,r){return Ur(n,t,r),si.call(r),r.w6_1=Gr(),r}function si(){ii(),this.v6_1=null,this.x6_1=!1}function ci(){d=this;var n=ai(0),t=n.y5_1;(t instanceof si?t:_e()).j5(),this.f7_1=n}function ai(n){return function(n,t){return function(n,t,r){Qr(function(n,t){return fi(n,t,ce(se(si)))}(n,t),r),hi.call(r)}(n,0,t),t}(n,ce(se(hi)))}function hi(){null==d&&new ci}function li(){}function _i(){}function vi(n){_i.call(this),this.k7_1=n}function di(){gi.call(this)}function gi(){_i.call(this),this.m7_1=""}function wi(){if(!w){w=!0;var n="undefined"!=typeof process&&process.versions&&!!process.versions.node;g=n?new vi(process.stdout):new di}}function bi(){return n=ce(se(pi)),pi.call(n,""),n;var n}function pi(n){this.o7_1=void 0!==n?n:""}function mi(n){var t=Pi(n).toUpperCase();return t.length>1?n:Zi(t,0)}function ki(n){return function(n){return 9<=n&&n<=13||28<=n&&n<=32||160===n||n>4096&&(5760===n||8192<=n&&n<=8202||8232===n||8233===n||8239===n||8287===n||12288===n)}(n)}function yi(){b=this,this.q7_1=new RegExp("[\\\\^$*+?.()|[\\]{}]","g"),this.r7_1=new RegExp("[\\\\$]","g"),this.s7_1=new RegExp("\\$","g")}function qi(){return null==b&&new yi,b}function Bi(n,t){qi(),this.v7_1=n,this.w7_1=function(n){if(Ue(n,Ti)){var t;switch(n.k()){case 0:t=At();break;case 1:t=pr(Ue(n,Ei)?n.j(0):n.f().h());break;default:t=Zn(n,ai(n.k()))}return t}return function(n){switch(n.k()){case 0:return At();case 1:return pr(n.f().h());default:return n}}(Zn(n,(r=ce(se(hi)),Qr(oi(),r),hi.call(r),r)));var r}(t),this.x7_1=new RegExp(n,Mn(t,"","gu",A,A,A,Ci)),this.y7_1=null,this.z7_1=null}function Ci(n){return n.d8_1}function xi(n,t,r,i,e,u){return tr(n,t,r,i,e,u=u!==A&&u)}function ji(n,t){return n-t|0}function Pi(n){return String.fromCharCode(n)}function Ii(){p=this,this.e8_1=0,this.f8_1=65535,this.g8_1=55296,this.h8_1=56319,this.i8_1=56320,this.j8_1=57343,this.k8_1=55296,this.l8_1=57343,this.m8_1=2,this.n8_1=16}function Si(){return null==p&&new Ii,p}function zi(n){Si(),this.h3_1=n}function Ei(){}function Ti(){}function Li(){}function Ni(){}function Ai(){}function Mi(){}function Fi(){m=this}function Di(n,t){null==m&&new Fi,this.p8_1=n,this.q8_1=t}function Oi(n){var t=null==n?null:ie(n);return null==t?"null":t}function Ri(n){return new Hi(n)}function Hi(n){this.t8_1=n,this.s8_1=0}function $i(){return Qi(),k}function Gi(){return Qi(),y}function Ui(){return Qi(),q}function Vi(){return Qi(),B}function Qi(){x||(x=!0,k=new ArrayBuffer(8),y=new Float64Array($i()),new Float32Array($i()),q=new Int32Array($i()),Gi()[0]=-1,B=0!==Ui()[0]?1:0,C=1-Vi()|0)}function Zi(n,t){var r;if(Yi(n)){var i,e=n.charCodeAt(t);if(Si(),e<0?i=!0:(Si(),i=e>65535),i)throw fu("Invalid Char code: "+e);r=De(e)}else r=n.y3(t);return r}function Yi(n){return"string"==typeof n}function Wi(n){return Yi(n)?n.length:n.x3()}function Ki(n,t,r){return Yi(n)?n.substring(t,r):n.z3(t,r)}function Xi(n){return ie(n)}function Ji(n,t){var r;switch(typeof n){case"number":r="number"==typeof t?ne(n,t):t instanceof de?ne(n,t.w8()):te(n,t);break;case"string":case"boolean":r=te(n,t);break;default:r=function(n,t){return n.a4(t)}(n,t)}return r}function ne(n,t){var r;if(n<t)r=-1;else if(n>t)r=1;else if(n===t){var i;if(0!==n)i=0;else{var e=1/n;i=e===1/t?0:e<0?-1:1}r=i}else r=n!=n?t!=t?0:1:-1;return r}function te(n,t){return n<t?-1:n>t?1:0}function re(n){if(!("kotlinHashCodeValue$"in n)){var t=4294967296*Math.random()|0,r=new Object;r.value=t,r.enumerable=!1,Object.defineProperty(n,"kotlinHashCodeValue$",r)}return n.kotlinHashCodeValue$}function ie(n){return null==n?"null":function(n){return!!$e(n)||En(n)}(n)?"[...]":n.toString()}function ee(n){if(null==n)return 0;var t;switch(typeof n){case"object":t="function"==typeof n.hashCode?n.hashCode():re(n);break;case"function":t=re(n);break;case"number":t=function(n){return Qi(),(0|n)===n?Fe(n):(Gi()[0]=n,zn(Ui()[(Qi(),C)],31)+Ui()[Vi()]|0)}(n);break;case"boolean":t=n?1:0;break;default:t=ue(String(n))}return t}function ue(n){var t=0,r=0,i=n.length-1|0;if(r<=i)do{var e=r;r=r+1|0;var u=n.charCodeAt(e);t=zn(t,31)+u|0}while(e!==i);return t}function oe(n,t){return null==n?null==t:null!=t&&("object"==typeof n&&"function"==typeof n.equals?n.equals(t):n!=n?t!=t:"number"==typeof n&&"number"==typeof t?n===t&&(0!==n||1/n==1/t):n===t)}function fe(n,t){null!=Error.captureStackTrace?Error.captureStackTrace(n,t):n.stack=(new Error).stack}function se(n){return n.prototype}function ce(n){return Object.create(n)}function ae(n,t,r){Error.call(n),function(n,t,r){var i=Xe(Object.getPrototypeOf(n));if(!(1&i)){var e;if(null==t){var u;if(null!==t){var o=null==r?null:r.toString();u=null==o?A:o}else u=A;e=u}else e=t;n.message=e}2&i||(n.cause=r),n.name=Object.getPrototypeOf(n).constructor.name}(n,t,r)}function he(n){var t;return null==n?function(){throw ju()}():t=n,t}function le(){throw Iu()}function _e(){throw zu()}function ve(){j=this,this.x8_1=new de(0,-2147483648),this.y8_1=new de(-1,2147483647),this.z8_1=8,this.a9_1=64}function de(n,t){null==j&&new ve,ar.call(this),this.u8_1=n,this.v8_1=t}function ge(){return Me(),P}function we(){return Me(),I}function be(){return Me(),S}function pe(){return Me(),E}function me(){return Me(),T}function ke(n,t){if(Me(),xe(n,t))return 0;var r=Ie(n),i=Ie(t);return r&&!i?-1:!r&&i?1:Ie(qe(n,t))?-1:1}function ye(n,t){Me();var r=n.v8_1>>>16|0,i=65535&n.v8_1,e=n.u8_1>>>16|0,u=65535&n.u8_1,o=t.v8_1>>>16|0,f=65535&t.v8_1,s=t.u8_1>>>16|0,c=0,a=0,h=0,l=0;return c=(c=c+((a=(a=a+((h=(h=h+((l=l+(u+(65535&t.u8_1)|0)|0)>>>16|0)|0)+(e+s|0)|0)>>>16|0)|0)+(i+f|0)|0)>>>16|0)|0)+(r+o|0)|0,new de((h&=65535)<<16|(l&=65535),(c&=65535)<<16|(a&=65535))}function qe(n,t){return Me(),ye(n,t.e9())}function Be(n,t){if(Me(),Se(n))return ge();if(Se(t))return ge();if(xe(n,pe()))return ze(t)?pe():ge();if(xe(t,pe()))return ze(n)?pe():ge();if(Ie(n))return Ie(t)?Be(Ee(n),Ee(t)):Ee(Be(Ee(n),t));if(Ie(t))return Ee(Be(n,Ee(t)));if(Te(n,me())&&Te(t,me()))return Le(Ce(n)*Ce(t));var r=n.v8_1>>>16|0,i=65535&n.v8_1,e=n.u8_1>>>16|0,u=65535&n.u8_1,o=t.v8_1>>>16|0,f=65535&t.v8_1,s=t.u8_1>>>16|0,c=65535&t.u8_1,a=0,h=0,l=0,_=0;return l=l+((_=_+zn(u,c)|0)>>>16|0)|0,_&=65535,h=(h=h+((l=l+zn(e,c)|0)>>>16|0)|0)+((l=(l&=65535)+zn(u,s)|0)>>>16|0)|0,l&=65535,a=(a=(a=a+((h=h+zn(i,c)|0)>>>16|0)|0)+((h=(h&=65535)+zn(e,s)|0)>>>16|0)|0)+((h=(h&=65535)+zn(u,f)|0)>>>16|0)|0,h&=65535,a=a+(((zn(r,c)+zn(i,s)|0)+zn(e,f)|0)+zn(u,o)|0)|0,new de(l<<16|_,(a&=65535)<<16|h)}function Ce(n){return Me(),4294967296*n.v8_1+function(n){return Me(),n.u8_1>=0?n.u8_1:4294967296+n.u8_1}(n)}function xe(n,t){return Me(),n.v8_1===t.v8_1&&n.u8_1===t.u8_1}function je(n,t){if(Me(),t<2||36<t)throw vu("radix out of range: "+t);if(Se(n))return"0";if(Ie(n)){if(xe(n,pe())){var r=Pe(t),i=n.d9(r),e=qe(Be(i,r),n).g9();return je(i,t)+e.toString(t)}return"-"+je(Ee(n),t)}for(var u=2===t?31:t<=10?9:t<=21?7:t<=35?6:5,o=Le(Math.pow(t,u)),f=n,s="";;){var c=f.d9(o),a=qe(f,Be(c,o)).g9().toString(t);if(Se(f=c))return a+s;for(;a.length<u;)a="0"+a;s=a+s}}function Pe(n){return Me(),new de(n,n<0?-1:0)}function Ie(n){return Me(),n.v8_1<0}function Se(n){return Me(),0===n.v8_1&&0===n.u8_1}function ze(n){return Me(),!(1&~n.u8_1)}function Ee(n){return Me(),n.e9()}function Te(n,t){return Me(),ke(n,t)<0}function Le(n){if(Me(),(t=n)!=t)return ge();if(n<=-0x8000000000000000)return pe();if(n+1>=0x8000000000000000)return Me(),z;if(n<0)return Ee(Le(-n));var t,r=4294967296;return new de(n%r|0,n/r|0)}function Ne(n,t){return Me(),ke(n,t)>0}function Ae(n,t){return Me(),ke(n,t)>=0}function Me(){L||(L=!0,P=Pe(0),I=Pe(1),S=Pe(-1),z=new de(-1,2147483647),E=new de(0,-2147483648),T=Pe(16777216))}function Fe(n){return n instanceof de?n.g9():function(n){return n>2147483647?2147483647:n<-2147483648?-2147483648:0|n}(n)}function De(n){var t;return t=function(n){return n<<16>>16}(Fe(n)),function(n){return 65535&n}(t)}function Oe(n,t){return new Ht(n,t)}function Re(n,t,r,i){return He("class",n,t,r,i,null)}function He(n,t,r,i,e,u){return{kind:n,simpleName:t,associatedObjectKey:r,associatedObjects:i,suspendArity:e,$kClass$:A,iid:u}}function $e(n){return Array.isArray(n)}function Ge(n,t,r,i,e,u,o,f){null!=i&&(n.prototype=Object.create(i.prototype),n.prototype.constructor=n);var s=r(t,u,o,null==f?[]:f);n.$metadata$=s,null!=e&&((null!=s.iid?n:n.prototype).$imask$=function(n){for(var t=1,r=[],i=0,e=n.length;i<e;){var u=n[i];i=i+1|0;var o=t,f=u.prototype.$imask$,s=null==f?u.$imask$:f;null!=s&&(r.push(s),o=s.length);var c=u.$metadata$.iid,a=null==c?null:(l=void 0,v=1<<(31&(h=c)),(l=new Int32Array(1+(h>>5)|0))[_=h>>5]=l[_]|v,l);null!=a&&(r.push(a),o=Math.max(o,a.length)),o>t&&(t=o)}var h,l,_,v;return function(n,t){for(var r=0,i=new Int32Array(n);r<n;){for(var e=r,u=0,o=0,f=t.length;o<f;){var s=t[o];o=o+1|0,e<s.length&&(u|=s[e])}i[e]=u,r=r+1|0}return i}(t,r)}(e))}function Ue(n,t){return function(n,t){var r=n.$imask$;return null!=r&&function(n,t){var r=t>>5;if(r>n.length)return!1;var i=1<<(31&t);return!!(n[r]&i)}(r,t)}(n,t.$metadata$.iid)}function Ve(n){return!!$e(n)&&!n.$type$}function Qe(n){var t;switch(typeof n){case"string":case"number":case"boolean":case"function":t=!0;break;default:t=n instanceof Object}return t}function Ze(n){return"string"==typeof n||Ue(n,sr)}function Ye(n,t,r,i){return He("interface",n,t,r,i,(null==N&&(N=0),N=We()+1|0,We()))}function We(){if(null!=N)return N;!function(){throw Tu("lateinit property iid has not been initialized")}()}function Ke(n,t,r,i){return He("object",n,t,r,i,null)}function Xe(n){var t=n.constructor,r=null==t?null:t.$metadata$,i=null==r?null:r.errorInfo;if(null!=i)return i;var e,u=0;if(Je(n,"message")&&(u|=1),Je(n,"cause")&&(u|=2),3!==u){var o=(e=n,Object.getPrototypeOf(e));o!=Error.prototype&&(u|=Xe(o))}return null!=r&&(r.errorInfo=u),u}function Je(n,t){return n.hasOwnProperty(t)}function nu(n){return new Fr(n)}function tu(n,t,r){for(var i=new Int32Array(r),e=0,u=0,o=0,f=0,s=n.length;f<s;){var c=Zi(n,f);f=f+1|0;var a=t[c];if(u|=(31&a)<<o,a<32){var h=e;e=h+1|0,i[h]=u,u=0,o=0}else o=o+5|0}return i}function ru(n,t){for(var r=0,i=n.length-1|0,e=-1,u=0;r<=i;)if(t>(u=n[e=(r+i|0)/2|0]))r=e+1|0;else{if(t===u)return e;i=e-1|0}return e-(t<u?1:0)|0}function iu(){M=this;var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Int32Array(128),r=0,i=Wi(n)-1|0;if(r<=i)do{var e=r;r=r+1|0,t[Zi(n,e)]=e}while(r<=i);var u=tu("hCgBpCQGYHZH5BRpBPPPPPPRMP5BPPlCPP6BkEPPPPcPXPzBvBrB3BOiDoBHwD+E3DauCnFmBmB2D6E1BlBTiBmBlBP5BhBiBrBvBjBqBnBPRtBiCmCtBlB0BmB5BiB7BmBgEmChBZgCoEoGVpBSfRhBPqKQ2BwBYoFgB4CJuTiEvBuCuDrF5DgEgFlJ1DgFmBQtBsBRGsB+BPiBlD1EIjDPRPPPQPPPPPGQSQS/DxENVNU+B9zCwBwBPPCkDPNnBPqDYY1R8B7FkFgTgwGgwUwmBgKwBuBScmEP/BPPPPPPrBP8B7F1B/ErBqC6B7BiBmBfQsBUwCw/KwqIwLwETPcPjQgJxFgBlBsD",t,222),o=new Int32Array(u.length),f=0,s=u.length-1|0;if(f<=s)do{var c=f;f=f+1|0,o[c]=0===c?u[c]:o[c-1|0]+u[c]|0}while(f<=s);this.h9_1=o,this.i9_1=tu("aaMBXHYH5BRpBPPPPPPRMP5BPPlCPPzBDOOPPcPXPzBvBjB3BOhDmBBpB7DoDYxB+EiBP1DoExBkBQhBekBPmBgBhBctBiBMWOOXhCsBpBkBUV3Ba4BkB0DlCgBXgBtD4FSdBfPhBPpKP0BvBXjEQ2CGsT8DhBtCqDpFvD1D3E0IrD2EkBJrBDOBsB+BPiBlB1EIjDPPPPPPPPPPPGPPMNLsBNPNPKCvBvBPPCkDPBmBPhDXXgD4B6FzEgDguG9vUtkB9JcuBSckEP/BPPPPPPBPf4FrBjEhBpC3B5BKaWPrBOwCk/KsCuLqDHPbPxPsFtEaaqDL",t,222),this.j9_1=tu("GFjgggUHGGFFZZZmzpz5qB6s6020B60ptltB6smt2sB60mz22B1+vv+8BZZ5s2850BW5q1ymtB506smzBF3q1q1qB1q1q1+Bgii4wDTm74g3KiggxqM60q1q1Bq1o1q1BF1qlrqrBZ2q5wprBGFZWWZGHFsjiooLowgmOowjkwCkgoiIk7ligGogiioBkwkiYkzj2oNoi+sbkwj04DghhkQ8wgiYkgoioDsgnkwC4gikQ//v+85BkwvoIsgoyI4yguI0whiwEowri4CoghsJowgqYowgm4DkwgsY/nwnzPowhmYkg6wI8yggZswikwHgxgmIoxgqYkwgk4DkxgmIkgoioBsgssoBgzgyI8g9gL8g9kI0wgwJoxgkoC0wgioFkw/wI0w53iF4gioYowjmgBHGq1qkgwBF1q1q8qBHwghuIwghyKk0goQkwgoQk3goQHGFHkyg0pBgxj6IoinkxDswno7Ikwhz9Bo0gioB8z48Rwli0xN0mpjoX8w78pDwltoqKHFGGwwgsIHFH3q1q16BFHWFZ1q10q1B2qlwq1B1q10q1B2q1yq1B6q1gq1Biq1qhxBir1qp1Bqt1q1qB1g1q1+B//3q16B///q1qBH/qlqq9Bholqq9B1i00a1q10qD1op1HkwmigEigiy6Cptogq1Bixo1kDq7/j00B2qgoBWGFm1lz50B6s5q1+BGWhggzhwBFFhgk4//Bo2jigE8wguI8wguI8wgugUog1qoB4qjmIwwi2KgkYHHH4lBgiFWkgIWoghssMmz5smrBZ3q1y50B5sm7gzBtz1smzB5smz50BqzqtmzB5sgzqzBF2/9//5BowgoIwmnkzPkwgk4C8ys65BkgoqI0wgy6FghquZo2giY0ghiIsgh24B4ghsQ8QF/v1q1OFs0O8iCHHF1qggz/B8wg6Iznv+//B08QgohsjK0QGFk7hsQ4gB",t,222)}function eu(){return null==M&&new iu,M}function uu(){F=this,this.k9_1=new Int32Array([170,186,688,704,736,837,890,7468,7544,7579,8305,8319,8336,8560,9424,11388,42652,42864,43e3,43868]),this.l9_1=new Int32Array([1,1,9,2,5,1,1,63,1,37,1,1,13,16,26,2,2,1,2,4])}function ou(){return null==F&&new uu,F}function fu(n){var t=function(n,t){return wu(n,t),su.call(t),t}(n,ce(se(su)));return fe(t,fu),t}function su(){fe(this,su)}function cu(n){var t=function(n,t){return wu(n,t),au.call(t),t}(n,ce(se(au)));return fe(t,cu),t}function au(){fe(this,au)}function hu(n){var t=function(n,t){return wu(n,t),lu.call(t),t}(n,ce(se(lu)));return fe(t,hu),t}function lu(){fe(this,lu)}function _u(n,t){return ae(t,n),du.call(t),t}function vu(n){var t=_u(n,ce(se(du)));return fe(t,vu),t}function du(){fe(this,du)}function gu(n){return function(n){ae(n),du.call(n)}(n),bu.call(n),n}function wu(n,t){return _u(n,t),bu.call(t),t}function bu(){fe(this,bu)}function pu(){var n,t=(gu(n=ce(se(ku))),ku.call(n),n);return fe(t,pu),t}function mu(n){var t=function(n,t){return wu(n,t),ku.call(t),t}(n,ce(se(ku)));return fe(t,mu),t}function ku(){fe(this,ku)}function yu(n){var t=function(n,t){return wu(n,t),qu.call(t),t}(n,ce(se(qu)));return fe(t,yu),t}function qu(){fe(this,qu)}function Bu(){var n,t=(gu(n=ce(se(xu))),xu.call(n),n);return fe(t,Bu),t}function Cu(n){var t=function(n,t){return wu(n,t),xu.call(t),t}(n,ce(se(xu)));return fe(t,Cu),t}function xu(){fe(this,xu)}function ju(){var n,t=(gu(n=ce(se(Pu))),Pu.call(n),n);return fe(t,ju),t}function Pu(){fe(this,Pu)}function Iu(){var n,t=(gu(n=ce(se(Su))),Su.call(n),n);return fe(t,Iu),t}function Su(){fe(this,Su)}function zu(){var n,t=(gu(n=ce(se(Eu))),Eu.call(n),n);return fe(t,zu),t}function Eu(){fe(this,Eu)}function Tu(n){var t=function(n,t){return wu(n,t),Lu.call(t),t}(n,ce(se(Lu)));return fe(t,Tu),t}function Lu(){fe(this,Lu)}function Nu(n,t){var r,i=n.className;return(r="(^|.*\\s+)"+t+"($|\\s+.*)",function(n,t){return Bi.call(t,n,At()),t}(r,ce(se(Bi)))).a8(i)}function Au(n,t){this.o9_1=n,this.p9_1=t}function Mu(n){this.q9_1=n}function Fu(n,t,r){var i,e=Ff(),u=Wu(),o=Mf().ga(t),f=Wu();if(0===Wi(r))i=Lf();else{var s=n.ia_1,c=null==s?null:new Mu(s).v9(r,"Copy reference to the clipboard");i=null==c?Lf():c}return e.ja([u,o,f,i])}function Du(n){n=n===A?null:n,this.ia_1=n}function Ou(n,t,r){Yu.call(this),this.ma_1=n,this.na_1=t,this.oa_1=r}function Ru(n,t){this.ra_1=n,this.sa_1=t}function Hu(n,t){Yu.call(this),this.va_1=n,this.wa_1=t}function $u(n,t){Yu.call(this),this.xa_1=n,this.ya_1=t}function Gu(n){Yu.call(this),this.za_1=n}function Uu(n){Yu.call(this),this.ab_1=n}function Vu(n){Yu.call(this),this.bb_1=n}function Qu(n,t){Yu.call(this),this.cb_1=n,this.db_1=t}function Zu(n){Yu.call(this),this.eb_1=n}function Yu(){}function Wu(){return ro(),D}function Ku(){return ro(),O}function Xu(){return ro(),R}function Ju(){return ro(),H}function no(n){return ro(),Ff().fb(Jf(to),n)}function to(n){return ro(),n.gb(["invisible-text","text-for-copy"]),lr()}function ro(){$||($=!0,D=no("`"),O=no(" "),R=no("("),H=no(")"))}function io(n,t){Yu.call(this),this.hb_1=n,this.ib_1=t}function eo(n){Yu.call(this),this.jb_1=n}function uo(n,t){Yu.call(this),this.kb_1=n,this.lb_1=t}function oo(n){Yu.call(this),this.mb_1=n}function fo(n){Yu.call(this),this.nb_1=n}function so(n){Yu.call(this),this.ob_1=n}function co(n,t,r){Yu.call(this),this.pb_1=n,this.qb_1=t,this.rb_1=r}function ao(n){Yu.call(this),this.sb_1=n}function ho(n){Yu.call(this),this.tb_1=n}function lo(n){return n.xb_1.vb_1.k()}function _o(){if(Z)return lr();Z=!0,G=new ko("Inputs",0,"Build configuration inputs"),U=new ko("ByMessage",1,"Problems grouped by message"),V=new ko("ByLocation",2,"Problems grouped by location"),Q=new ko("IncompatibleTasks",3,"Incompatible tasks")}function vo(n){yc.call(this),this.yb_1=n}function go(n){yc.call(this),this.ac_1=n}function wo(n){yc.call(this),this.bc_1=n}function bo(n){yc.call(this),this.cc_1=n}function po(n){yo.call(this),this.dc_1=n}function mo(n,t,r,i,e,u,o,f){this.ec_1=n,this.fc_1=t,this.gc_1=r,this.hc_1=i,this.ic_1=e,this.jc_1=u,this.kc_1=o,this.lc_1=f}function ko(n,t,r){Di.call(this,n,t),this.qc_1=r}function yo(){Bc.call(this)}function qo(n,t){var r=Af(),i=Jf(Lo),e=Af().y9(Jf(No),[]),u=function(n,t){var r,i=Af(),e=Jf(Oo),u=Ff().ga("Learn more about the "),o=$f();return i.y9(e,[u,o.fb(Jf((r=t,function(n){return n.bd(r.tc_1),lr()})),t.sc_1),Ff().ga(".")])}(0,t.gc_1),o=Af().y9(Jf(Ao),[Co(0,t)]),f=Af();return r.y9(i,[e,u,o,f.y9(Jf(Mo),[Io(0,Ro(),t.lc_1,lo(t.jc_1)),Io(0,Ho(),t.lc_1,lo(t.hc_1)),Io(0,$o(),t.lc_1,lo(t.ic_1)),Io(0,Go(),t.lc_1,lo(t.kc_1))])])}function Bo(n,t){var r,i,e=Af(),u=Jf(Fo);switch(t.lc_1.q8_1){case 0:r=zo(0,t.jc_1,((i=function(n){return new wo(n)}).callableName="<init>",i));break;case 3:r=zo(0,t.kc_1,function(){var n=function(n){return new bo(n)};return n.callableName="<init>",n}());break;case 1:r=zo(0,t.hc_1,function(){var n=function(n){return new go(n)};return n.callableName="<init>",n}());break;case 2:r=zo(0,t.ic_1,function(){var n=function(n){return new vo(n)};return n.callableName="<init>",n}());break;default:le()}return e.y9(u,[r])}function Co(n,t){return Af().ja([Po(0,t),xo(0,t)])}function xo(n,t){for(var r=Af(),i=t.fc_1,e=Lr(),u=0,o=i.f();o.g();){var f=o.h(),s=u;u=s+1|0,jt(e,0===wr(s)?gr(jo(Vo(),f)):bt([Gf().ja([]),jo(Vo(),f)]))}return r.ha(e)}function jo(n,t){return Df().ja([Ic(t)])}function Po(n,t){return Nf().ja([jc().ka(t.ec_1)])}function Io(n,t,r,i){var e,u,o;return Af().y9(Jf((e=i,u=t,o=r,function(n){return n.t9("group-selector"),0===e?(n.t9("group-selector--disabled"),lr()):u.equals(o)?(n.t9("group-selector--active"),lr()):(n.u9(function(n){return function(t){return new po(n)}}(u)),lr()),lr()})),[Ff().rc(t.qc_1,[So(0,i)])])}function So(n,t){return Ff().y9(Jf(Do),[Ku(),Xu(),Ff().ga(""+t),Ju()])}function zo(n,t,r){return function(n,t,r){var i,e=Af(),u=Of();return e.ja([u.ha(ys(t,(i=r,function(n){var t,r=n.cd().ub_1;return r instanceof Hu?Nc(i,(Vo(),(t=function(n){return Eo(0,n)}).callableName="viewNode",t),n,r.va_1,r.wa_1,Cc()):r instanceof $u?Nc(i,function(){var n=function(n){return Eo(0,n)};return n.callableName="viewNode",n}(Vo()),n,r.xa_1,r.ya_1,xc()):r instanceof io?Nc(i,function(){var n=function(n){return Eo(0,n)};return n.callableName="viewNode",n}(Vo()),n,r.hb_1,r.ib_1,A,So(Vo(),n.cd().vb_1.k())):r instanceof Ou?Lc(i,n,r):Nc(i,function(){var n=function(n){return Eo(0,n)};return n.callableName="viewNode",n}(Vo()),n,r)})))])}(0,t.xb_1.uc().vc(),r)}function Eo(n,t){var r;return t instanceof eo?Sc((r=t,function(n){return n.ed("project "),n.fd(r.jb_1),lr()})):t instanceof co?Sc(function(n){return function(t){return t.ed(n.pb_1+" "),t.fd(n.qb_1),t.ed(" of "),t.fd(n.rb_1),lr()}}(t)):t instanceof so?Sc(function(n){return function(t){return t.ed("system property "),t.fd(n.ob_1),lr()}}(t)):t instanceof uo?Sc(function(n){return function(t){return t.ed("task "),t.fd(n.kb_1),t.ed(" of type "),t.fd(n.lb_1),lr()}}(t)):t instanceof fo?Sc(function(n){return function(t){return t.ed("bean of type "),t.fd(n.nb_1),lr()}}(t)):t instanceof ao?Sc(function(n){return function(t){return t.ed(n.sb_1),lr()}}(t)):t instanceof ho?Sc(function(n){return function(t){return t.ed("class "),t.fd(n.tb_1),lr()}}(t)):t instanceof Zu?Sc(function(n){return function(t){return t.ed(n.eb_1),lr()}}(t)):t instanceof Gu?Ic(t.za_1):t instanceof Qu?Qo(t):Ff().ga(ie(t))}function To(n){return n.t9("report-wrapper"),lr()}function Lo(n){return n.t9("header"),lr()}function No(n){return n.t9("gradle-logo"),lr()}function Ao(n){return n.t9("title"),lr()}function Mo(n){return n.t9("groups"),lr()}function Fo(n){return n.t9("content"),lr()}function Do(n){return n.t9("group-selector__count"),lr()}function Oo(n){return n.t9("learn-more"),lr()}function Ro(){return _o(),G}function Ho(){return _o(),U}function $o(){return _o(),V}function Go(){return _o(),Q}function Uo(){Y=this}function Vo(){return null==Y&&new Uo,Y}function Qo(n){var t;return $f().fb(Jf((t=n,function(n){return n.t9("documentation-button"),n.bd(t.cb_1),lr()})),n.db_1)}function Zo(n,t,r){this.kd_1=n,this.ld_1=t,this.md_1=r}function Yo(n,t,r){this.nd_1=n,this.od_1=t,this.pd_1=r}function Wo(n,t){for(var r=vf(n),i=t.trace,e=Nr(i.length),u=0,o=i.length;u<o;){var f,s=i[u];u=u+1|0,f=Jo(s),e.d(f)}return new Zo(t,r,e)}function Ko(n,t){var r,i=null==(r=t.kd_1.error)?null:nf(r);null==i||n.d(i)}function Xo(n){return function(n,t,r){var i=null==n.error?null:new Hu(t,r);return null==i?new $u(t,r):i}(n.kd_1,new Gu(n.ld_1),ef(n.kd_1))}function Jo(n){var t;switch(n.kind){case"Project":t=new eo(n.path);break;case"Task":t=new uo(n.path,n.type);break;case"TaskPath":t=new oo(n.path);break;case"Bean":t=new fo(n.type);break;case"Field":t=new co("field",n.name,n.declaringType);break;case"InputProperty":t=new co("input property",n.name,n.task);break;case"OutputProperty":t=new co("output property",n.name,n.task);break;case"SystemProperty":t=new so(n.name);break;case"PropertyUsage":t=new co("property",n.name,n.from);break;case"BuildLogic":t=new ao(n.location);break;case"BuildLogicClass":t=new ho(n.type);break;default:t=new Zu("Gradle runtime")}return t}function nf(n){var t=n.parts;if(null==t){var r=n.summary;return null==r?null:new Gu(vf(r))}for(var i=n.summary,e=null==i?null:vf(i),u=Lr(),o=Ri(t);o.g();){var f=rf(o.h());null==f||u.d(f)}for(var s=Mn(u,"\n"),c=Lr(),a=Ri(t);a.g();){var h=tf(a.h());null==h||c.d(h)}return new Ou(e,s,c)}function tf(n){var t=rf(n);if(null==t)return null;var r,i,e=nt(new Nt(function(n,t,r,i){var e;return Jn(nr(n,["\r\n","\n","\r"],A,r=r!==A&&r,i=i===A?0:i),(e=n,function(n){return Jt(e,n)}))}(t),!0,lf));return new Ru(e,(r=!(null==n.internalText),i=e.k(),r&&i>1?ps():null))}function rf(n){var t=n.text;return null==t?n.internalText:t}function ef(n){var t=n.documentationLink;return null==t?null:new Qu(t,"")}function uf(n,t){return new cs(of(n,jf().sd(t),ps()))}function of(n,t,r){return new ks(n,function(n,t){var r,i=Jn(On(n.o()),If);return nt(Jn(new rt(i,new ff(_f)),(r=t,function(n){return of(n.v3(),n.w3().wd_1,r)})))}(t,1===Pf(t)?ms():ps()),0===Pf(t)?ps():r)}function ff(n){this.td_1=n}function sf(n){var t=Lr(),r=n.ld_1,i=Dn(r.ca_1).fa_1,e=ie(Xt(Ze(i)?i:_e())),u=r.vd(function(n,t){var r;if(!(t>=0))throw fu(ie("Requested element count "+t+" is less than zero."));if(0===t)return Rn(n);if(Ue(n,Ti)){var i=n.k()-t|0;if(i<=0)return pt();if(1===i)return gr(function(n){if(Ue(n,Ei))return Qn(n);var t=n.f();if(!t.g())throw mu("Collection is empty.");for(var r=t.h();t.g();)r=t.h();return r}(n));if(r=Nr(),Ue(n,Ei)){if(Ue(n,li)){var e=t,u=n.k();if(e<u)do{var o=e;e=e+1|0,r.d(n.j(o))}while(e<u)}else for(var f=n.l(t);f.g();){var s=f.h();r.d(s)}return r}}else r=Lr();for(var c=0,a=n.f();a.g();){var h=a.h();c>=t?r.d(h):c=c+1|0}return mt(r)}(r.ca_1,1));return t.d(new io(new Zu(e),ef(n.kd_1))),t.d(new Gu(u)),t.m(n.md_1),t.j5()}function cf(n){var t=Lr(),r=n.ld_1,i=r.vd(r.ca_1);return t.d(new $u(new Gu(i),ef(n.kd_1))),t.j5()}function af(n){var t=Lr();return t.d(Xo(n)),t.m(n.md_1),Ko(t,n),t.j5()}function hf(n){var t=Lr();return t.m(new St(n.md_1)),t.d(Xo(n)),Ko(t,n),t.j5()}function lf(n){return Wi(n)>0}function _f(n,t){return function(n,t){return n===t?0:null==n?-1:null==t?1:Ji(null!=n&&("string"==(i=typeof(r=n))||"boolean"===i||function(n){return"number"==typeof n||n instanceof de}(r)||Ue(r,cr))?n:_e(),t);var r,i}(Oi(n.v3()),Oi(t.v3()))}function vf(n){var t;return Bf().qd((t=n,function(n){for(var r=t,i=0,e=r.length;i<e;){var u=r[i];i=i+1|0;var o=u.text;null==o||n.ed(o);var f=u.name;null==f||(n.fd(f),lr())}return lr()}))}function df(n,t){return(0!==(r=n)?r.toString():"No")+" "+gf(t,n)+" "+wf(n)+" found";var r}function gf(n,t){return t<2?n:n+"s"}function wf(n){return n<=1?"was":"were"}function bf(n,t){this.sc_1=n,this.tc_1=t}function pf(n){kf.call(this),this.fa_1=n}function mf(n,t){kf.call(this),this.da_1=n,this.ea_1=t}function kf(){}function yf(){this.dd_1=Lr()}function qf(){W=this}function Bf(){return null==W&&new qf,W}function Cf(n){Bf(),this.ca_1=n}function xf(){K=this}function jf(){return null==K&&new xf,K}function Pf(n){return n.k()}function If(n){var t=n.j1(),r=n.i1();return fr(t,new Sf(Ue(r,Ni)?r:_e()))}function Sf(n){jf(),this.wd_1=n}function zf(n,t,r){var i;Tf(t,n,r),i="Component mounted at #"+n.id+".",wi(),(wi(),g).j7(i)}function Ef(n){var t=document.getElementById(n);if(null==t)throw hu("'"+n+"' element missing");return t}function Tf(n,t,r){var i,e,u;i=n.z9(r),e=t,u=function(n,t,r){return function(i){return Tf(n,r,n.ba(i,t)),lr()}}(n,r,t),fs(),e.innerHTML="",us(e,i,u)}function Lf(){return fs(),X}function Nf(){return fs(),J}function Af(){return fs(),nn}function Mf(){return fs(),tn}function Ff(){return fs(),rn}function Df(){return fs(),en}function Of(){return fs(),un}function Rf(){return fs(),on}function Hf(){return fs(),fn}function $f(){return fs(),sn}function Gf(){return fs(),cn}function Uf(n){this.x9_1=n}function Vf(){an=this}function Qf(){return null==an&&new Vf,an}function Zf(){hn=this,Xf.call(this)}function Yf(){return null==hn&&new Zf,hn}function Wf(n,t,r,i){t=t===A?pt():t,r=r===A?null:r,i=i===A?pt():i,Xf.call(this),this.be_1=n,this.ce_1=t,this.de_1=r,this.ee_1=i}function Kf(){}function Xf(){Qf()}function Jf(n){fs();var t,r=Lr();return n(new ns((t=r,function(n){return t.d(n),lr()}))),r}function ns(n){this.r9_1=n}function ts(n,t){es.call(this),this.fe_1=n,this.ge_1=t}function rs(n){es.call(this),this.he_1=n}function is(n,t){es.call(this),this.ie_1=n,this.je_1=t}function es(){}function us(n,t,r){if(fs(),t instanceof Wf)!function(n,t,r){var i=function(n,t,r){var i=n.createElement(t);return r(i),i}(he(n.ownerDocument),t,r);n.appendChild(i)}(n,t.be_1,(e=t,u=r,function(n){for(var t=e.ce_1.f();t.g();)os(n,t.h(),u);var r=e.de_1;null==r||function(n,t){n.appendChild(he(n.ownerDocument).createTextNode(t))}(n,r);for(var i=e.ee_1.f();i.g();)us(n,i.h(),u);return lr()}));else if(t instanceof Kf){var i=t instanceof Kf?t:_e();us(n,i.ke_1,function(n,t){return function(r){return n(t.le_1(r)),lr()}}(r,i))}else if(oe(t,Yf()))return lr();var e,u}function os(n,t,r){var i,e;fs(),t instanceof is?n.setAttribute(t.ie_1,t.je_1):t instanceof rs?function(n,t){for(var r=Lr(),i=0,e=t.length;i<e;){var u=t[i];i=i+1|0,Nu(n,u)||r.d(u)}var o=r;if(!o.i()){var f=n.className,s=ie(Xt(Ze(f)?f:_e())),c=bi();c.p7(s),0!==Wi(s)&&c.p7(" "),Fn(o,c," "),n.className=c.toString()}}(n,[t.he_1]):t instanceof ts&&n.addEventListener(t.fe_1,(i=r,e=t,function(n){return n.stopPropagation(),i(e.ge_1(n)),lr()}))}function fs(){ln||(ln=!0,X=Yf(),new Uf("hr"),J=new Uf("h1"),new Uf("h2"),nn=new Uf("div"),new Uf("pre"),tn=new Uf("code"),rn=new Uf("span"),en=new Uf("small"),un=new Uf("ol"),on=new Uf("ul"),fn=new Uf("li"),sn=new Uf("a"),cn=new Uf("br"),new Uf("p"))}function ss(n){as.call(this),this.ne_1=n}function cs(n){this.xb_1=n}function as(){}function hs(n){return n.me(A,A,n.wb_1.ad())}function ls(){_n=this}function _s(){return null==_n&&new ls,_n}function vs(){if(gn)return lr();gn=!0,vn=new ws("Collapsed",0),dn=new ws("Expanded",1)}function ds(n){bs.call(this),this.ve_1=n}function gs(n,t,r){bs.call(this),this.se_1=n,this.te_1=t,this.ue_1=r}function ws(n,t){Di.call(this,n,t)}function bs(){}function ps(){return vs(),vn}function ms(){return vs(),dn}function ks(n,t,r){t=t===A?pt():t,r=r===A?ps():r,this.ub_1=n,this.vb_1=t,this.wb_1=r}function ys(n,t){return nt(Jn(n,(r=t,function(n){return function(n,t){var r,i=n.cd(),e=Hf(),u=t(n),o=i.vb_1;r=null==(i.wb_1.equals(ms())&&!o.i()?o:null)?null:function(n,t){return Rf().ha(function(n,t){return ys(n.vc(),t)}(n,t))}(n,t);var f=r;return e.ja([u,null==f?Lf():f])}(n,r)})));var r}function qs(){if(kn)return lr();kn=!0,bn=new Bs("ByMessage",0,"Messages"),pn=new Bs("ByGroup",1,"Group"),mn=new Bs("ByFileLocation",2,"Locations")}function Bs(n,t,r){Di.call(this,n,t),this.cf_1=r}function Cs(n,t){this.df_1=n,this.ef_1=t}function xs(n,t){this.ff_1=n,this.gf_1=t}function js(n){return new ks(new Gu(Bf().rd(n+" more problem"+(n>1?"s have":" has")+" been skipped")))}function Ps(n,t,r,i){var e,u,o=n.v1(t);if(null==o){var f=Lr(),s=fr(new ks(new Vs(Bf().qd((u=t,function(n){return n.fd(u),lr()}))),f,ms()),f);n.h5(t,s),e=s}else e=o;e.u3_1.d(Es(r,i))}function Is(n,t,r,i){var e;if(t=t===A?Lr():t,r=r===A?oi():r,i===A){var u=wn;wn=u+1|0,e=u}else e=i;i=e,this.hf_1=n,this.if_1=t,this.jf_1=r,this.kf_1=i}function Ss(n,t){if(t.i())return null;for(var r,i=n,e=null,u=t.f();u.g();){var o=u.h();r=e;var f,s=i,c=o.ef_1+" ("+o.df_1+")",a=s.v1(c);if(null==a){var h=Lr(),l=new Is(new ks(new Vs(Bf().qd(Fs(o))),h,ms()),h);s.h5(c,l),f=l}else f=a;e=f,null==r||he(r).if_1.u(he(e).hf_1)||he(r).if_1.d(he(e).hf_1),i=he(e).jf_1}return e}function zs(n,t){if(n.k()===t.length){var r;n:{var i=function(n,t){var r=t.length,i=xt(n,10),e=Nr(Math.min(i,r)),u=0,o=n.f();t:for(;o.g();){var f,s=o.h();if(u>=r)break t;var c=u;u=c+1|0,f=fr(s,t[c]),e.d(f)}return e}(n,t);if(Ue(i,Ti)&&i.i())r=!0;else{for(var e=i.f();e.g();){var u=e.h();if(u.t3_1.df_1!==u.u3_1.name||u.t3_1.ef_1!==u.u3_1.displayName){r=!1;break n}}r=!0}}return r}return!1}function Es(n,t,r){var i=function(n,t,r){t=t===A?null:t;var i=Ns(function(n,t){return n&&null!=t.contextualLabel?he(t.contextualLabel):Ts(t)}(r=r!==A&&r,n),t).j5();return Ls(n,new Gu(i))}(n,t=t===A?null:t,r=r!==A&&r),e=function(n,t,r){r=r!==A&&r;var i,e=n.problemDetails;if(null==e)i=null;else{var u,o=e[0].text,f=null==o?null:function(n,t,r,i){if(r=r!==A&&r,i=i===A?0:i,1===t.length){var e=t[0];if(0!==Wi(e))return function(n,t,r,i){rr(i);var e=0,u=Wt(n,t,e,r);if(-1===u||1===i)return gr(ie(n));var o,f=i>0,s=Nr(f&&Kn(i,10));n:do{var c;if(c=ie(Ki(n,e,u)),s.d(c),e=u+t.length|0,f&&s.k()===(i-1|0))break n;u=Wt(n,t,e,r)}while(-1!==u);return o=ie(Ki(n,e,Wi(n))),s.d(o),s}(n,e,r,i)}for(var u=function(n){return new tt(n)}(nr(n,t,A,r,i)),o=Nr(xt(u,10)),f=u.f();f.g();){var s;s=Jt(n,f.h()),o.d(s)}return o}(o,["\n"]);if(null==f)u=null;else{for(var s=Nr(xt(f,10)),c=f.f();c.g();){var a,h=c.h();a=Ms(n)?Bf().qd(Os(h)):Bf().rd(h),s.d(a)}u=s}var l,_=u;if(null==_)l=null;else{for(var v=Nr(xt(_,10)),d=_.f();d.g();){var g;g=new ks(new Gu(d.h())),v.d(g)}l=v}var w=null==l?null:Hn(l);i=null==w?Lr():w}var b=i,p=null==b?Lr():b;r||null==n.contextualLabel||p.d(new ks(new Gu(Bf().rd(he(n.contextualLabel)))));var m=function(n){var t=n.solutions;if(null==t||0===t.length)return null;for(var r=new Vu(Bf().rd("Solutions")),i=he(n.solutions),e=Nr(i.length),u=0,o=i.length;u<o;){var f,s=i[u];u=u+1|0,f=new ks(new Uu(vf(s))),e.d(f)}return new ks(r,e)}(n);null==m||p.d(m);var k,y=n.error,q=null==y?null:nf(y);if(null==q||p.d(new ks(q)),t){var B=n.locations;k=!(null==B||0===B.length)}else k=!1;return k&&p.d(function(n){var t,r=n.locations;if(null==r)t=null;else{for(var i=Nr(r.length),e=Ri(r);e.g();){var u,o=e.h();u=new ks(new Gu(Bf().qd(Rs(o)))),i.d(u)}t=i}var f=t;return new ks(new Zu("Locations"),null==f?pt():f)}(n)),p}(n,null==t,r);return new ks(i,e)}function Ts(n){return function(n){if(0===n.length)throw mu("Array is empty.");return n[Nn(n)]}(n.problemId).displayName}function Ls(n,t){var r;switch(n.severity){case"WARNING":var i=n.documentationLink;r=new $u(t,null==i?null:new Qu(i,""));break;case"ERROR":var e=n.documentationLink;r=new Hu(t,null==e?null:new Qu(e,""));break;case"ADVICE":var u=n.documentationLink;r=new Qs(t,null==u?null:new Qu(u,""));break;default:console.error("no severity "+n.severity),r=t}return r}function Ns(n,t){t=t===A?null:t;var r,i=new yf;if(i.ed(n),null==t);else{if(null!=t.line){var e=As(t);i.xd(e+(null==(r=t).line||null==r.length?"":"-"+r.length),""+t.path+e)}var u=t.taskPath;null==u||i.fd(u);var o=t.pluginId;null!=o&&i.fd(o)}return i}function As(n){var t;if(null==n.line)t=null;else{var r,i=":"+n.line,e=n.column;t=i+(null==(r=null==e?null:":"+e)?"":r)}return null==t?"":t}function Ms(n){var t,r,i=n.problemId;n:{for(var e=0,u=i.length;e<u;){var o=i[e];if(e=e+1|0,"compilation"===o.name){r=o;break n}}r=null}if(null!=r){var f,s=n.problemId;n:{for(var c=0,a=s.length;c<a;){var h=s[c];if(c=c+1|0,"java"===h.name){f=h;break n}}f=null}t=!(null==f)}else t=!1;return t}function Fs(n){return function(t){return t.ed(n.ef_1),t.fd(n.df_1),lr()}}function Ds(n){return n.name}function Os(n){return function(t){return t.xd(function(n,t,r,i){i=i!==A&&i;var e=new RegExp(qi().t7(" "),i?"gui":"gu"),u=qi().u7(" ");return n.replace(e,u)}(n),""),lr()}}function Rs(n){return function(t){return t.ed("- "),t.fd(""+n.path+As(n)),lr()}}function Hs(){return qs(),bn}function $s(){return qs(),pn}function Gs(){return qs(),mn}function Us(n){Zs.call(this),this.lf_1=n}function Vs(n,t){t=t!==A&&t,Zs.call(this),this.mf_1=n,this.nf_1=t}function Qs(n,t){t=t===A?null:t,Yu.call(this),this.of_1=n,this.pf_1=t}function Zs(){Yu.call(this)}function Ys(n){yc.call(this),this.qf_1=n}function Ws(n){yc.call(this),this.rf_1=n}function Ks(n){yc.call(this),this.sf_1=n}function Xs(n){nc.call(this),this.tf_1=n}function Js(n,t,r,i,e,u,o,f){this.uf_1=n,this.vf_1=t,this.wf_1=r,this.xf_1=i,this.yf_1=e,this.zf_1=u,this.ag_1=o,this.bg_1=f}function nc(){Bc.call(this)}function tc(n,t){var r=Lr();lo(t.xf_1)>0&&r.d(fc(0,Hs(),t.bg_1,t.ag_1)),lo(t.yf_1)>0&&r.d(fc(0,$s(),t.bg_1,t.ag_1)),lo(t.zf_1)>0&&r.d(fc(0,Gs(),t.bg_1,t.ag_1));var i=Af(),e=Jf(hc),u=Af().y9(Jf(lc),[]),o=function(n,t){var r,i=Af(),e=Jf(wc),u=Ff().ga("Learn more about "),o=$f();return i.y9(e,[u,o.fb(Jf((r=t,function(n){return n.bd(r.tc_1),lr()})),t.sc_1),Ff().ga(".")])}(0,t.wf_1),f=Af().y9(Jf(_c),[ic(0,t)]),s=Af();return i.y9(e,[u,o,f,s.zd(Jf(vc),r)])}function rc(n,t){var r,i,e=Af(),u=Jf(dc);switch(t.bg_1.q8_1){case 0:r=sc(0,t.xf_1,((i=function(n){return new Ys(n)}).callableName="<init>",i));break;case 1:r=sc(0,t.yf_1,function(){var n=function(n){return new Ws(n)};return n.callableName="<init>",n}());break;case 2:r=sc(0,t.zf_1,function(){var n=function(n){return new Ks(n)};return n.callableName="<init>",n}());break;default:le()}return e.y9(u,[r])}function ic(n,t){return Af().ja([oc(0,t),ec(0,t)])}function ec(n,t){for(var r=Af(),i=t.vf_1,e=Lr(),u=0,o=i.f();o.g();){var f=o.h(),s=u;u=s+1|0,jt(e,0===wr(s)?gr(uc(pc(),f)):bt([Gf().ja([]),uc(pc(),f)]))}return r.ha(e)}function uc(n,t){return Df().ja([Ic(t)])}function oc(n,t){return Nf().ja([jc().ka(t.uf_1)])}function fc(n,t,r,i){var e,u,o,f;return Af().y9(Jf((e=i,u=t,o=r,function(n){return n.t9("group-selector"),0===e?(n.t9("group-selector--disabled"),lr()):u.equals(o)?(n.t9("group-selector--active"),lr()):(n.u9(function(n){return function(t){return new Xs(n)}}(u)),lr()),lr()})),[Ff().rc(t.cf_1,[(f=i,Ff().y9(Jf(gc),[Ku(),Xu(),Ff().ga(""+f),Ju()]))])])}function sc(n,t,r){return function(n,t,r){var i,e=Af(),u=Of();return e.ja([u.ha(ys(t,(i=r,function(n){return function(n,t,r,i){var e,u;return t instanceof Us?Ic(Bf().rd(t.lf_1)):t instanceof Vs?Af().y9(Jf((u=t,function(n){return u.nf_1&&(n.t9("uncategorized"),lr()),lr()})),[Af().ja([zc(r,i),Ic(t.mf_1)])]):t instanceof Ou?Lc(i,r,t):t instanceof Gu?Ic(t.za_1):t instanceof Uu?Af().ja([(Vc(),xn),Ic(t.ab_1)]):t instanceof Vu?Af().ja([zc(r,i),Ic(t.bb_1)]):t instanceof Hu?Nc(i,((e=function(n){return cc(0,n)}).callableName="viewIt",e),r,t.va_1,t.wa_1,Cc()):t instanceof Qs?Nc(i,function(){var n=function(n){return cc(0,n)};return n.callableName="viewIt",n}(),r,t.of_1,t.pf_1,(Vc(),Bn)):t instanceof $u?Nc(i,function(){var n=function(n){return cc(0,n)};return n.callableName="viewIt",n}(),r,t.xa_1,t.ya_1,xc()):t instanceof Zu?Af().ja([zc(r,i),Ic(Bf().rd(t.eb_1))]):Ff().ga("Unknown node type viewNode: "+t)}(pc(),n.cd().ub_1,n,i)})))])}(0,t.xb_1.uc().vc(),r)}function cc(n,t){var r;if(t instanceof Qu)r=Qo(t);else if(t instanceof Zu)r=Ic(Bf().rd(t.eb_1));else if(t instanceof Gu)r=Ic(t.za_1);else{var i="Unknown node type viewIt: "+t;console.error(i),r=Ff().ga(i)}return r}function ac(n){return n.t9("report-wrapper"),lr()}function hc(n){return n.t9("header"),lr()}function lc(n){return n.t9("gradle-logo"),lr()}function _c(n){return n.t9("title"),lr()}function vc(n){return n.t9("groups"),lr()}function dc(n){return n.t9("content"),lr()}function gc(n){return n.t9("group-selector__count"),lr()}function wc(n){return n.t9("learn-more"),lr()}function bc(){yn=this,document.title="Gradle - Problems Report"}function pc(){return null==yn&&new bc,yn}function mc(n,t,r){return n.pe(t.zb().oe(),r)}function kc(n){Bc.call(this),this.hd_1=n}function yc(){Bc.call(this)}function qc(n,t){Bc.call(this),this.wc_1=n,this.xc_1=t}function Bc(){}function Cc(){return Vc(),qn}function xc(){return Vc(),Cn}function jc(){return Vc(),jn}function Pc(){return Vc(),Pn}function Ic(n){return Vc(),Pc().ka(n)}function Sc(n){return Vc(),Pc().ka(Bf().qd(n))}function zc(n,t){return Vc(),n.cd().ye()?Ac(n,t):function(n){return Vc(),Ff().fb(Jf(Gc),Mc(n))}(n)}function Ec(n,t,r,i){var e,u,o;return Vc(),Ff().fb(Jf((e=r,u=t,o=i,function(n){return n.t9("java-exception-part-toggle"),n.u9(function(n,t){return function(r){return new qc(n,t())}}(u,o)),n.s9("Click to "+function(n){var t;switch(Vc(),n.q8_1){case 0:t="show";break;case 1:t="hide";break;default:le()}return t}(e)),lr()})),"("+n+" internal "+gf("line",n)+" "+function(n){var t;switch(Vc(),n.q8_1){case 0:t="hidden";break;case 1:t="shown";break;default:le()}return t}(r)+")")}function Tc(n,t){t=t===A?Lf():t,Vc();for(var r=Rf(),i=Nr(xt(n,10)),e=0,u=n.f();u.g();){var o,f=e;e=f+1|0,s=u.h(),c=(c=0===wr(f)?t:Lf())===A?Lf():c,Vc(),o=Hf().ja([Mf().ga(s),c]),i.d(o)}var s,c;return r.ha(i)}function Lc(n,t,r){Vc();var i,e,u,o=Af(),f=Ac(t,n),s=Ff().ga("Exception"),c=Ff().ja([(Vc(),In).v9(r.na_1,"Copy exception to the clipboard")]),a=null==r.ma_1?null:Ff().ga(" "),h=null==a?Lf():a,l=r.ma_1,_=null==l?null:Ic(l),v=null==_?Lf():_;switch(t.cd().wb_1.q8_1){case 0:i=Lf();break;case 1:i=function(n,t){Vc();for(var r=Af(),i=Jf(Uc),e=n.oa_1,u=Nr(xt(e,10)),o=0,f=e.f();f.g();){var s,c=f.h(),a=o;o=a+1|0;var h,l=wr(a);if(null!=c.sa_1){var _,v=Ec(c.ra_1.k(),l,c.sa_1,t),d=c.sa_1;switch(null==d?-1:d.q8_1){case 0:_=Tc(Un(c.ra_1,1),v);break;case 1:_=Tc(c.ra_1,v);break;default:le()}h=_}else h=Tc(c.ra_1);s=h,u.d(s)}return r.zd(i,u)}(r,(e=n,u=t,function(){return e(new ss(u))}));break;default:le()}return o.ja([f,s,c,h,v,i])}function Nc(n,t,r,i,e,u,o){e=e===A?null:e,u=u===A?Lf():u,o=o===A?Lf():o,Vc();var f=Af(),s=zc(r,n),c=t(i),a=null==e?null:t(e);return f.ja([s,u,c,null==a?Lf():a,o])}function Ac(n,t){var r,i;return Vc(),Ff().fb(Jf((r=n,i=t,function(n){return n.gb(["invisible-text","tree-btn"]),r.cd().wb_1===ps()&&(n.t9("collapsed"),lr()),r.cd().wb_1===ms()&&(n.t9("expanded"),lr()),n.s9("Click to "+function(n){var t;switch(Vc(),n.q8_1){case 0:t="expand";break;case 1:t="collapse";break;default:le()}return t}(r.cd().wb_1)),n.u9(function(n,t){return function(r){return n(new ss(t))}}(i,r)),lr()})),Mc(n))}function Mc(n){return Vc(),function(n,t){var r;if(!(t>=0))throw fu(ie("Count 'n' must be non-negative, but was "+t+"."));switch(t){case 0:r="";break;case 1:r=ie(n);break;default:var i="";if(0!==Wi(n))for(var e=ie(n),u=t;1&~u||(i+=e),0!=(u=u>>>1|0);)e+=e;return i}return r}(" ",n.we()-1|0)+"- "}function Fc(n){return Vc(),n.gb(["invisible-text","error-icon"]),lr()}function Dc(n){return Vc(),n.gb(["invisible-text","advice-icon"]),lr()}function Oc(n){return Vc(),n.gb(["invisible-text","warning-icon"]),lr()}function Rc(n){return Vc(),n.gb(["invisible-text","enum-icon"]),lr()}function Hc(n){return Vc(),new kc(n)}function $c(n){return Vc(),new kc(n)}function Gc(n){return Vc(),n.gb(["invisible-text","leaf-icon"]),lr()}function Uc(n){return Vc(),n.t9("java-exception"),lr()}function Vc(){if(!Sn){Sn=!0;var n=Ff();qn=n.fb(Jf(Fc),"[error] ");var t=Ff();Bn=t.fb(Jf(Dc),"[advice] ");var r=Ff();Cn=r.fb(Jf(Oc),"[warn] ");var i=Ff();xn=i.fb(Jf(Rc),"[enum] "),jn=new Du,Pn=new Du(Hc),In=new Mu($c)}}return Ge(Yn,A,Re),Ge(tt,A,Re),Ge(rt,A,Re),Ge(Ti,"Collection",Ye),Ge(it,"AbstractCollection",Re,A,[Ti]),Ge(et,"IteratorImpl",Re),Ge(ut,"ListIteratorImpl",Re,et),Ge(ot,"Companion",Ke),Ge(Ei,"List",Ye,A,[Ti]),Ge(st,"AbstractList",Re,it,[it,Ei]),Ge(ct,A,Re),Ge(lt,"Companion",Ke),Ge(vt,A,Re,it),Ge(Ni,"Map",Ye),Ge(dt,"AbstractMap",Re,A,[Ni]),Ge(gt,"Companion",Ke),Ge(li,"RandomAccess",Ye),Ge(yt,"EmptyList",Ke,A,[Ei,li]),Ge(qt,"ArrayAsCollection",Re,A,[Ti]),Ge(Bt,"EmptyIterator",Ke),Ge(Pt,"IntIterator",Re),Ge(It,A,Re),Ge(St,"ReversedListReadOnly",Re,st),Ge(zt,A,Re),Ge(Et,"TransformingSequence",Re),Ge(Lt,A,Re),Ge(Nt,"FilteringSequence",Re),Ge(Mi,"Set",Ye,A,[Ti]),Ge(Mt,"EmptySet",Ke,A,[Mi]),Ge(Ot,"Companion",Ke),Ge(Vt,"IntProgression",Re),Ge(Ht,"IntRange",Re,Vt),Ge($t,"IntProgressionIterator",Re,Pt),Ge(Gt,"Companion",Ke),Ge(er,A,Re),Ge(ur,"DelimitedRangesSequence",Re),Ge(or,"Pair",Re),Ge(sr,"CharSequence",Ye),Ge(cr,"Comparable",Ye),Ge(ar,"Number",Re),Ge(hr,"Unit",Ke),Ge(_r,"IntCompanionObject",Ke),Ge(mr,"AbstractMutableCollection",Re,it,[it,Ti]),Ge(kr,"IteratorImpl",Re),Ge(yr,"ListIteratorImpl",Re,kr),Ge(qr,"AbstractMutableList",Re,mr,[mr,Ti,Ei]),Ge(Br,A,Re),Ge(Cr,A,Re),Ge(Li,"Entry",Ye),Ge(Ai,"MutableEntry",Ye,A,[Li]),Ge(xr,"SimpleEntry",Re,A,[Ai]),Ge(zr,"AbstractMutableSet",Re,mr,[mr,Mi,Ti]),Ge(jr,"AbstractEntrySet",Re,zr),Ge(Pr,A,Re,zr),Ge(Ir,A,Re,mr),Ge(Sr,"AbstractMutableMap",Re,dt,[dt,Ni]),Ge(Er,"Companion",Ke),Ge(Fr,"ArrayList",Re,qr,[qr,Ti,Ei,li]),Ge(Rr,"HashCode",Ke),Ge(Hr,"EntrySet",Re,jr),Ge(Vr,"HashMap",Re,Sr,[Sr,Ni]),Ge(Zr,"HashSet",Re,zr,[zr,Mi,Ti]),Ge(Xr,A,Re),Ge(ni,"InternalMap",Ye),Ge(Jr,"InternalHashCodeMap",Re,A,[ni]),Ge(ti,"EntryIterator",Re),Ge(ri,"Companion",Ke),Ge(ei,"ChainEntry",Re,xr),Ge(ui,"EntrySet",Re,jr),Ge(si,"LinkedHashMap",Re,Vr,[Vr,Ni]),Ge(ci,"Companion",Ke),Ge(hi,"LinkedHashSet",Re,Zr,[Zr,Mi,Ti]),Ge(_i,"BaseOutput",Re),Ge(vi,"NodeJsOutput",Re,_i),Ge(gi,"BufferedOutput",Re,_i),Ge(di,"BufferedOutputToConsoleLog",Re,gi),Ge(pi,"StringBuilder",Re,A,[sr]),Ge(yi,"Companion",Ke),Ge(Bi,"Regex",Re),Ge(Ii,"Companion",Ke),Ge(zi,"Char",Re,A,[cr]),Ge(Fi,"Companion",Ke),Ge(Di,"Enum",Re,A,[cr]),Ge(Hi,A,Re),Ge(ve,"Companion",Ke),Ge(de,"Long",Re,ar,[ar,cr]),Ge(iu,"Letter",Ke),Ge(uu,"OtherLowercase",Ke),Ge(du,"Exception",Re,Error),Ge(bu,"RuntimeException",Re,du),Ge(su,"IllegalArgumentException",Re,bu),Ge(au,"IndexOutOfBoundsException",Re,bu),Ge(lu,"IllegalStateException",Re,bu),Ge(ku,"NoSuchElementException",Re,bu),Ge(qu,"ArithmeticException",Re,bu),Ge(xu,"UnsupportedOperationException",Re,bu),Ge(Pu,"NullPointerException",Re,bu),Ge(Su,"NoWhenBranchMatchedException",Re,bu),Ge(Eu,"ClassCastException",Re,bu),Ge(Lu,"UninitializedPropertyAccessException",Re,bu),Ge(Au,"Model",Re),Ge(Mu,"CopyButtonComponent",Re),Ge(Du,"PrettyTextComponent",Re),Ge(Yu,"ProblemNode",Re),Ge(Ou,"Exception",Re,Yu),Ge(Ru,"StackTracePart",Re),Ge(Hu,"Error",Re,Yu),Ge($u,"Warning",Re,Yu),Ge(Gu,"Message",Re,Yu),Ge(Uu,"ListElement",Re,Yu),Ge(Vu,"TreeNode",Re,Yu),Ge(Qu,"Link",Re,Yu),Ge(Zu,"Label",Re,Yu),Ge(io,"Info",Re,Yu),Ge(eo,"Project",Re,Yu),Ge(uo,"Task",Re,Yu),Ge(oo,"TaskPath",Re,Yu),Ge(fo,"Bean",Re,Yu),Ge(so,"SystemProperty",Re,Yu),Ge(co,"Property",Re,Yu),Ge(ao,"BuildLogic",Re,Yu),Ge(ho,"BuildLogicClass",Re,Yu),Ge(Bc,"BaseIntent",Re),Ge(yc,"TreeIntent",Re,Bc),Ge(vo,"TaskTreeIntent",Re,yc),Ge(go,"MessageTreeIntent",Re,yc),Ge(wo,"InputTreeIntent",Re,yc),Ge(bo,"IncompatibleTaskTreeIntent",Re,yc),Ge(yo,"Intent",Re,Bc),Ge(po,"SetTab",Re,yo),Ge(mo,"Model",Re),Ge(ko,"Tab",Re,Di),Ge(Uo,"ConfigurationCacheReportPage",Ke),Ge(Zo,"ImportedProblem",Re),Ge(Yo,"ImportedDiagnostics",Re),Ge(ff,"sam$kotlin_Comparator$0",Re),Ge(bf,"LearnMore",Re),Ge(kf,"Fragment",Re),Ge(pf,"Text",Re,kf),Ge(mf,"Reference",Re,kf),Ge(yf,"Builder",Re),Ge(qf,"Companion",Ke),Ge(Cf,"PrettyText",Re),Ge(xf,"Companion",Ke),Ge(Sf,"Trie",Re),Ge(Uf,"ViewFactory",Re),Ge(Vf,"Companion",Ke),Ge(Xf,"View",Re),Ge(Zf,"Empty",Ke,Xf),Ge(Wf,"Element",Re,Xf),Ge(Kf,"MappedView",Re,Xf),Ge(ns,"Attributes",Re),Ge(es,"Attribute",Re),Ge(ts,"OnEvent",Re,es),Ge(rs,"ClassName",Re,es),Ge(is,"Named",Re,es),Ge(as,"Intent",Re),Ge(ss,"Toggle",Re,as),Ge(cs,"Model",Re),Ge(ls,"TreeView",Ke),Ge(bs,"Focus",Re),Ge(ds,"Original",Re,bs),Ge(gs,"Child",Re,bs),Ge(ws,"ViewState",Re,Di),Ge(ks,"Tree",Re),Ge(Bs,"Tab",Re,Di),Ge(Cs,"ProblemIdElement",Re),Ge(xs,"ProblemSummary",Re),Ge(Is,"ProblemNodeGroup",Re),Ge(Zs,"ProblemApiNode",Re,Yu),Ge(Us,"Text",Re,Zs),Ge(Vs,"ProblemIdNode",Re,Zs),Ge(Qs,"Advice",Re,Yu),Ge(Ys,"MessageTreeIntent",Re,yc),Ge(Ws,"ProblemIdTreeIntent",Re,yc),Ge(Ks,"FileLocationTreeIntent",Re,yc),Ge(nc,"Intent",Re,Bc),Ge(Xs,"SetTab",Re,nc),Ge(Js,"Model",Re),Ge(bc,"ProblemsReportPage",Ke),Ge(kc,"Copy",Re,Bc),Ge(qc,"ToggleStackTracePart",Re,Bc),se(Yn).f=function(){return this.n_1.f()},se(tt).f=function(){return this.r_1.f()},se(rt).f=function(){var n,t,r=function(n,t){for(var r=n.f();r.g();){var i=r.h();t.d(i)}return t}(this.s_1,Lr());return n=r,t=this.t_1,function(n,t){if(n.k()<=1)return lr();var r=br(n);!function(n,t){if(function(){if(null!=l)return l;l=!1;var n=[],t=0;if(t<600)do{var r=t;t=t+1|0,n.push(r)}while(t<600);var i=Or;n.sort(i);var e=1,u=n.length;if(e<u)do{var o=e;e=e+1|0;var f=n[o-1|0],s=n[o];if((3&f)==(3&s)&&f>=s)return!1}while(e<u);return l=!0,!0}()){var r=(i=t,function(n,t){return i.compare(n,t)});n.sort(r)}else!function(n,t,r,i){var e=n.length,u=function(n){var t=0,r=n.length-1|0;if(t<=r)do{var i=t;t=t+1|0,n[i]=null}while(i!==r);return n}(Array(e)),o=Dr(n,u,0,r,i);if(o!==n){var f=0;if(f<=r)do{var s=f;f=f+1|0,n[s]=o[s]}while(s!==r)}}(n,0,Nn(n),t);var i}(r,t);var i=0,e=r.length;if(i<e)do{var u=i;i=i+1|0,n.f4(u,r[u])}while(i<e)}(n,t),r.f()},se(it).u=function(n){var t;n:if(Ue(this,Ti)&&this.i())t=!1;else{for(var r=this.f();r.g();)if(oe(r.h(),n)){t=!0;break n}t=!1}return t},se(it).v=function(n){var t;n:if(Ue(n,Ti)&&n.i())t=!0;else{for(var r=n.f();r.g();){var i=r.h();if(!this.u(i)){t=!1;break n}}t=!0}return t},se(it).i=function(){return 0===this.k()},se(it).toString=function(){return Mn(this,", ","[","]",A,A,(n=this,function(t){return t===n?"(this Collection)":Oi(t)}));var n},se(it).toArray=function(){return dr(this)},se(et).g=function(){return this.w_1<this.x_1.k()},se(et).h=function(){if(!this.g())throw pu();var n=this.w_1;return this.w_1=n+1|0,this.x_1.j(n)},se(ut).c1=function(){return this.w_1>0},se(ut).d1=function(){if(!this.c1())throw pu();return this.w_1=this.w_1-1|0,this.a1_1.j(this.w_1)},se(ot).e1=function(n,t){if(n<0||n>=t)throw cu("index: "+n+", size: "+t)},se(ot).b1=function(n,t){if(n<0||n>t)throw cu("index: "+n+", size: "+t)},se(ot).f1=function(n){for(var t=1,r=n.f();r.g();){var i=r.h(),e=zn(31,t),u=null==i?null:ee(i);t=e+(null==u?0:u)|0}return t},se(ot).g1=function(n,t){if(n.k()!==t.k())return!1;for(var r=t.f(),i=n.f();i.g();)if(!oe(i.h(),r.h()))return!1;return!0},se(st).f=function(){return new et(this)},se(st).l=function(n){return new ut(this,n)},se(st).equals=function(n){return n===this||!(null==n||!Ue(n,Ei))&&ft().g1(this,n)},se(st).hashCode=function(){return ft().f1(this)},se(ct).g=function(){return this.h1_1.g()},se(ct).h=function(){return this.h1_1.h().i1()},se(lt).k1=function(n){var t=n.j1(),r=null==t?null:ee(t),i=null==r?0:r,e=n.i1(),u=null==e?null:ee(e);return i^(null==u?0:u)},se(lt).l1=function(n){return Oi(n.j1())+"="+Oi(n.i1())},se(lt).m1=function(n,t){return!(null==t||!Ue(t,Li))&&!!oe(n.j1(),t.j1())&&oe(n.i1(),t.i1())},se(vt).r1=function(n){return this.q1_1.s1(n)},se(vt).u=function(n){return!(null!=n&&!Qe(n))&&this.r1(null==n||Qe(n)?n:_e())},se(vt).f=function(){return new ct(this.q1_1.o().f())},se(vt).k=function(){return this.q1_1.k()},se(dt).t1=function(n){return!(null==ht(this,n))},se(dt).s1=function(n){var t;n:{var r=this.o();if(Ue(r,Ti)&&r.i())t=!1;else{for(var i=r.f();i.g();)if(oe(i.h().i1(),n)){t=!0;break n}t=!1}}return t},se(dt).u1=function(n){if(null==n||!Ue(n,Li))return!1;var t=n.j1(),r=n.i1(),i=(Ue(this,Ni)?this:_e()).v1(t);return!(!oe(r,i)||null==i&&!(Ue(this,Ni)?this:_e()).t1(t))},se(dt).equals=function(n){if(n===this)return!0;if(null==n||!Ue(n,Ni))return!1;if(this.k()!==n.k())return!1;var t;n:{var r=n.o();if(Ue(r,Ti)&&r.i())t=!0;else{for(var i=r.f();i.g();){var e=i.h();if(!this.u1(e)){t=!1;break n}}t=!0}}return t},se(dt).v1=function(n){var t=ht(this,n);return null==t?null:t.i1()},se(dt).hashCode=function(){return ee(this.o())},se(dt).i=function(){return 0===this.k()},se(dt).k=function(){return this.o().k()},se(dt).toString=function(){var n;return Mn(this.o(),", ","{","}",A,A,(n=this,function(t){return n.p1(t)}))},se(dt).p1=function(n){return at(this,n.j1())+"="+at(this,n.i1())},se(dt).w1=function(){return null==this.o1_1&&(this.o1_1=new vt(this)),he(this.o1_1)},se(gt).x1=function(n){for(var t=0,r=n.f();r.g();){var i=r.h(),e=t,u=null==i?null:ee(i);t=e+(null==u?0:u)|0}return t},se(gt).y1=function(n,t){return n.k()===t.k()&&n.v(t)},se(yt).equals=function(n){return!(null==n||!Ue(n,Ei))&&n.i()},se(yt).hashCode=function(){return 1},se(yt).toString=function(){return"[]"},se(yt).k=function(){return 0},se(yt).i=function(){return!0},se(yt).a2=function(n){return n.i()},se(yt).v=function(n){return this.a2(n)},se(yt).j=function(n){throw cu("Empty list doesn't contain element at index "+n+".")},se(yt).f=function(){return Ct()},se(yt).l=function(n){if(0!==n)throw cu("Index: "+n);return Ct()},se(qt).k=function(){return this.b2_1.length},se(qt).i=function(){return 0===this.b2_1.length},se(qt).d2=function(n){return function(n,t){return An(n,t)>=0}(this.b2_1,n)},se(qt).e2=function(n){var t;n:if(Ue(n,Ti)&&n.i())t=!0;else{for(var r=n.f();r.g();){var i=r.h();if(!this.d2(i)){t=!1;break n}}t=!0}return t},se(qt).v=function(n){return this.e2(n)},se(qt).f=function(){return Ri(this.b2_1)},se(Bt).g=function(){return!1},se(Bt).c1=function(){return!1},se(Bt).h=function(){throw pu()},se(Bt).d1=function(){throw pu()},se(Pt).h=function(){return this.f2()},se(It).g=function(){return this.g2_1.c1()},se(It).c1=function(){return this.g2_1.g()},se(It).h=function(){return this.g2_1.d1()},se(It).d1=function(){return this.g2_1.h()},se(St).k=function(){return this.i2_1.k()},se(St).j=function(n){return this.i2_1.j(function(n,t){if(!(0<=t&&t<=kt(n)))throw cu("Element index "+t+" must be in range ["+Oe(0,kt(n))+"].");return kt(n)-t|0}(this,n))},se(St).f=function(){return this.l(0)},se(St).l=function(n){return new It(this,n)},se(zt).h=function(){return this.k2_1.m2_1(this.j2_1.h())},se(zt).g=function(){return this.j2_1.g()},se(Et).f=function(){return new zt(this)},se(Lt).h=function(){if(-1===this.o2_1&&Tt(this),0===this.o2_1)throw pu();var n=this.p2_1;return this.p2_1=null,this.o2_1=-1,null==n||Qe(n)?n:_e()},se(Lt).g=function(){return-1===this.o2_1&&Tt(this),1===this.o2_1},se(Nt).f=function(){return new Lt(this)},se(Mt).equals=function(n){return!(null==n||!Ue(n,Mi))&&n.i()},se(Mt).hashCode=function(){return 0},se(Mt).toString=function(){return"[]"},se(Mt).k=function(){return 0},se(Mt).i=function(){return!0},se(Mt).a2=function(n){return n.i()},se(Mt).v=function(n){return this.a2(n)},se(Mt).f=function(){return Ct()},se(Ht).y2=function(){return this.z2_1},se(Ht).c3=function(){return this.a3_1},se(Ht).i=function(){return this.z2_1>this.a3_1},se(Ht).equals=function(n){return n instanceof Ht&&(!(!this.i()||!n.i())||this.z2_1===n.z2_1&&this.a3_1===n.a3_1)},se(Ht).hashCode=function(){return this.i()?-1:zn(31,this.z2_1)+this.a3_1|0},se(Ht).toString=function(){return this.z2_1+".."+this.a3_1},se($t).g=function(){return this.f3_1},se($t).f2=function(){var n=this.g3_1;if(n===this.e3_1){if(!this.f3_1)throw pu();this.f3_1=!1}else this.g3_1=this.g3_1+this.d3_1|0;return n},se(Gt).q=function(n,t,r){return new Vt(n,t,r)},se(Vt).f=function(){return new $t(this.z2_1,this.a3_1,this.b3_1)},se(Vt).i=function(){return this.b3_1>0?this.z2_1>this.a3_1:this.z2_1<this.a3_1},se(Vt).equals=function(n){return n instanceof Vt&&(!(!this.i()||!n.i())||this.z2_1===n.z2_1&&this.a3_1===n.a3_1&&this.b3_1===n.b3_1)},se(Vt).hashCode=function(){return this.i()?-1:zn(31,zn(31,this.z2_1)+this.a3_1|0)+this.b3_1|0},se(Vt).toString=function(){return this.b3_1>0?this.z2_1+".."+this.a3_1+" step "+this.b3_1:this.z2_1+" downTo "+this.a3_1+" step "+(0|-this.b3_1)},se(er).h=function(){if(-1===this.j3_1&&ir(this),0===this.j3_1)throw pu();var n=this.m3_1,t=n instanceof Ht?n:_e();return this.m3_1=null,this.j3_1=-1,t},se(er).g=function(){return-1===this.j3_1&&ir(this),1===this.j3_1},se(ur).f=function(){return new er(this)},se(or).toString=function(){return"("+this.t3_1+", "+this.u3_1+")"},se(or).v3=function(){return this.t3_1},se(or).w3=function(){return this.u3_1},se(or).hashCode=function(){var n=null==this.t3_1?0:ee(this.t3_1);return zn(n,31)+(null==this.u3_1?0:ee(this.u3_1))|0},se(or).equals=function(n){if(this===n)return!0;if(!(n instanceof or))return!1;var t=n instanceof or?n:_e();return!!oe(this.t3_1,t.t3_1)&&!!oe(this.u3_1,t.u3_1)},se(hr).toString=function(){return"kotlin.Unit"},se(_r).b4=function(){return this.MIN_VALUE},se(_r).c4=function(){return this.MAX_VALUE},se(_r).d4=function(){return this.SIZE_BYTES},se(_r).e4=function(){return this.SIZE_BITS},se(mr).m=function(n){this.g4();for(var t=!1,r=n.f();r.g();){var i=r.h();this.d(i)&&(t=!0)}return t},se(mr).toJSON=function(){return this.toArray()},se(mr).g4=function(){},se(kr).g=function(){return this.h4_1<this.j4_1.k()},se(kr).h=function(){if(!this.g())throw pu();var n=this.h4_1;return this.h4_1=n+1|0,this.i4_1=n,this.j4_1.j(this.i4_1)},se(yr).c1=function(){return this.h4_1>0},se(yr).d1=function(){if(!this.c1())throw pu();return this.h4_1=this.h4_1-1|0,this.i4_1=this.h4_1,this.n4_1.j(this.i4_1)},se(qr).d=function(n){return this.g4(),this.p4(this.k(),n),!0},se(qr).f=function(){return new kr(this)},se(qr).u=function(n){return this.q4(n)>=0},se(qr).q4=function(n){var t=0,r=kt(this);if(t<=r)do{var i=t;if(t=t+1|0,oe(this.j(i),n))return i}while(i!==r);return-1},se(qr).l=function(n){return new yr(this,n)},se(qr).equals=function(n){return n===this||!(null==n||!Ue(n,Ei))&&ft().g1(this,n)},se(qr).hashCode=function(){return ft().f1(this)},se(Br).g=function(){return this.r4_1.g()},se(Br).h=function(){return this.r4_1.h().j1()},se(Cr).g=function(){return this.s4_1.g()},se(Cr).h=function(){return this.s4_1.h().i1()},se(xr).j1=function(){return this.t4_1},se(xr).i1=function(){return this.u4_1},se(xr).v4=function(n){var t=this.u4_1;return this.u4_1=n,t},se(xr).hashCode=function(){return _t().k1(this)},se(xr).toString=function(){return _t().l1(this)},se(xr).equals=function(n){return _t().m1(this,n)},se(jr).u=function(n){return this.w4(n)},se(Pr).y4=function(n){throw Cu("Add is not supported on keys")},se(Pr).d=function(n){return this.y4(null==n||Qe(n)?n:_e())},se(Pr).z4=function(n){return this.x4_1.t1(n)},se(Pr).u=function(n){return!(null!=n&&!Qe(n))&&this.z4(null==n||Qe(n)?n:_e())},se(Pr).f=function(){return new Br(this.x4_1.o().f())},se(Pr).k=function(){return this.x4_1.k()},se(Pr).g4=function(){return this.x4_1.g4()},se(Ir).f5=function(n){throw Cu("Add is not supported on values")},se(Ir).d=function(n){return this.f5(null==n||Qe(n)?n:_e())},se(Ir).r1=function(n){return this.e5_1.s1(n)},se(Ir).u=function(n){return!(null!=n&&!Qe(n))&&this.r1(null==n||Qe(n)?n:_e())},se(Ir).f=function(){return new Cr(this.e5_1.o().f())},se(Ir).k=function(){return this.e5_1.k()},se(Ir).g4=function(){return this.e5_1.g4()},se(Sr).g5=function(){return null==this.c5_1&&(this.c5_1=new Pr(this)),he(this.c5_1)},se(Sr).w1=function(){return null==this.d5_1&&(this.d5_1=new Ir(this)),he(this.d5_1)},se(Sr).g4=function(){},se(zr).equals=function(n){return n===this||!(null==n||!Ue(n,Mi))&&wt().y1(this,n)},se(zr).hashCode=function(){return wt().x1(this)},se(Fr).j5=function(){return this.g4(),this.c_1=!0,this.k()>0?this:Tr().i5_1},se(Fr).k=function(){return this.b_1.length},se(Fr).j=function(n){var t=this.b_1[Mr(this,n)];return null==t||Qe(t)?t:_e()},se(Fr).f4=function(n,t){this.g4(),Mr(this,n);var r=this.b_1[n];this.b_1[n]=t;var i=r;return null==i||Qe(i)?i:_e()},se(Fr).d=function(n){return this.g4(),this.b_1.push(n),this.o4_1=this.o4_1+1|0,!0},se(Fr).p4=function(n,t){this.g4(),this.b_1.splice(function(n,t){return ft().b1(t,n.k()),t}(this,n),0,t),this.o4_1=this.o4_1+1|0},se(Fr).m=function(n){if(this.g4(),n.i())return!1;for(var t,r,i,e=(t=this,r=n.k(),i=t.k(),t.b_1.length=t.k()+r|0,i),u=0,o=n.f();o.g();){var f=o.h(),s=u;u=s+1|0;var c=wr(s);this.b_1[e+c|0]=f}return this.o4_1=this.o4_1+1|0,!0},se(Fr).q4=function(n){return An(this.b_1,n)},se(Fr).toString=function(){return Ln(this.b_1,", ","[","]",A,A,Xi)},se(Fr).k5=function(){return[].slice.call(this.b_1)},se(Fr).toArray=function(){return this.k5()},se(Fr).g4=function(){if(this.c_1)throw Bu()},se(Rr).l5=function(n,t){return oe(n,t)},se(Rr).m5=function(n){var t=null==n?null:ee(n);return null==t?0:t},se(Hr).o5=function(n){throw Cu("Add is not supported on entries")},se(Hr).d=function(n){return this.o5(null!=n&&Ue(n,Ai)?n:_e())},se(Hr).w4=function(n){return this.n5_1.u1(n)},se(Hr).f=function(){return this.n5_1.t5_1.f()},se(Hr).k=function(){return this.n5_1.k()},se(Vr).t1=function(n){return this.t5_1.z4(n)},se(Vr).s1=function(n){var t;n:{var r=this.t5_1;if(Ue(r,Ti)&&r.i())t=!1;else{for(var i=r.f();i.g();){var e=i.h();if(this.u5_1.l5(e.i1(),n)){t=!0;break n}}t=!1}}return t},se(Vr).o=function(){return null==this.v5_1&&(this.v5_1=this.x5()),he(this.v5_1)},se(Vr).x5=function(){return new Hr(this)},se(Vr).v1=function(n){return this.t5_1.v1(n)},se(Vr).h5=function(n,t){return this.t5_1.h5(n,t)},se(Vr).k=function(){return this.t5_1.k()},se(Zr).d=function(n){return null==this.y5_1.h5(n,this)},se(Zr).u=function(n){return this.y5_1.t1(n)},se(Zr).i=function(){return this.y5_1.i()},se(Zr).f=function(){return this.y5_1.g5().f()},se(Zr).k=function(){return this.y5_1.k()},se(Xr).g=function(){return-1===this.z5_1&&(this.z5_1=function(n){if(null!=n.c6_1&&n.d6_1){var t=n.c6_1.length;if(n.e6_1=n.e6_1+1|0,n.e6_1<t)return 0}if(n.b6_1=n.b6_1+1|0,n.b6_1<n.a6_1.length){n.c6_1=n.g6_1.i6_1[n.a6_1[n.b6_1]];var r=n,i=n.c6_1;return r.d6_1=null!=i&&Ve(i),n.e6_1=0,0}return n.c6_1=null,1}(this)),0===this.z5_1},se(Xr).h=function(){if(!this.g())throw pu();var n=this.d6_1?this.c6_1[this.e6_1]:this.c6_1;return this.f6_1=n,this.z5_1=-1,n},se(Jr).w5=function(){return this.h6_1},se(Jr).k=function(){return this.j6_1},se(Jr).h5=function(n,t){var r=this.h6_1.m5(n),i=Kr(this,r);if(null==i)this.i6_1[r]=new xr(n,t);else{if(null==i||!Ve(i)){var e,u=i;return this.h6_1.l5(u.j1(),n)?u.v4(t):(e=[u,new xr(n,t)],this.i6_1[r]=e,this.j6_1=this.j6_1+1|0,null)}var o=i,f=Wr(o,this,n);if(null!=f)return f.v4(t);o.push(new xr(n,t))}return this.j6_1=this.j6_1+1|0,null},se(Jr).z4=function(n){return!(null==Yr(this,n))},se(Jr).v1=function(n){var t=Yr(this,n);return null==t?null:t.i1()},se(Jr).f=function(){return new Xr(this)},se(ti).g=function(){return!(null===this.m6_1)},se(ti).h=function(){if(!this.g())throw pu();var n=he(this.m6_1);this.l6_1=n;var t,r=n.b7_1;return t=r!==this.n6_1.y6_1.v6_1?r:null,this.m6_1=t,n},se(ei).v4=function(n){return this.d7_1.g4(),se(xr).v4.call(this,n)},se(ui).o5=function(n){throw Cu("Add is not supported on entries")},se(ui).d=function(n){return this.o5(null!=n&&Ue(n,Ai)?n:_e())},se(ui).w4=function(n){return this.y6_1.u1(n)},se(ui).f=function(){return new ti(this)},se(ui).k=function(){return this.y6_1.k()},se(ui).g4=function(){return this.y6_1.g4()},se(si).j5=function(){var n;if(this.g4(),this.x6_1=!0,this.k()>0)n=this;else{var t=ii().e7_1;n=Ue(t,Ni)?t:_e()}return n},se(si).t1=function(n){return this.w6_1.t1(n)},se(si).s1=function(n){var t=this.v6_1;if(null==t)return!1;var r=t;do{if(oe(r.i1(),n))return!0;r=he(r.b7_1)}while(r!==this.v6_1);return!1},se(si).x5=function(){return new ui(this)},se(si).v1=function(n){var t=this.w6_1.v1(n);return null==t?null:t.i1()},se(si).h5=function(n,t){this.g4();var r=this.w6_1.v1(n);if(null==r){var i=new ei(this,n,t);return this.w6_1.h5(n,i),function(n,t){if(null!=n.b7_1||null!=n.c7_1)throw hu(ie("Check failed."));var r=t.v6_1;if(null==r)t.v6_1=n,n.b7_1=n,n.c7_1=n;else{var i=r.c7_1;if(null==i)throw hu(ie("Required value was null."));var e=i;n.c7_1=e,n.b7_1=r,r.c7_1=n,e.b7_1=n}}(i,this),null}return r.v4(t)},se(si).k=function(){return this.w6_1.k()},se(si).g4=function(){if(this.x6_1)throw Bu()},se(hi).g4=function(){return this.y5_1.g4()},se(_i).h7=function(){this.i7("\n")},se(_i).j7=function(n){this.i7(n),this.h7()},se(vi).i7=function(n){var t=String(n);this.k7_1.write(t)},se(di).i7=function(n){var t=String(n),r=t.lastIndexOf("\n",0);if(r>=0){var i=this.m7_1;this.m7_1=i+t.substring(0,r),this.n7();var e=r+1|0;t=t.substring(e)}this.m7_1=this.m7_1+t},se(di).n7=function(){console.log(this.m7_1),this.m7_1=""},se(gi).i7=function(n){var t=this.m7_1;this.m7_1=t+String(n)},se(pi).x3=function(){return this.o7_1.length},se(pi).y3=function(n){var t=this.o7_1;if(!(n>=0&&n<=Yt(t)))throw cu("index: "+n+", length: "+this.x3()+"}");return Zi(t,n)},se(pi).z3=function(n,t){return this.o7_1.substring(n,t)},se(pi).i3=function(n){return this.o7_1=this.o7_1+new zi(n),this},se(pi).e=function(n){return this.o7_1=this.o7_1+Oi(n),this},se(pi).p7=function(n){var t=this.o7_1;return this.o7_1=t+(null==n?"null":n),this},se(pi).toString=function(){return this.o7_1},se(yi).t7=function(n){var t=this.q7_1;return n.replace(t,"\\$&")},se(yi).u7=function(n){var t=this.s7_1;return n.replace(t,"$$$$")},se(Bi).a8=function(n){this.x7_1.lastIndex=0;var t=this.x7_1.exec(ie(n));return null!=t&&0===t.index&&this.x7_1.lastIndex===Wi(n)},se(Bi).toString=function(){return this.x7_1.toString()},se(zi).o8=function(n){return ji(this.h3_1,n)},se(zi).a4=function(n){return function(n,t){return ji(n.h3_1,t instanceof zi?t.h3_1:_e())}(this,n)},se(zi).equals=function(n){return function(n,t){return t instanceof zi&&n===t.h3_1}(this.h3_1,n)},se(zi).hashCode=function(){return this.h3_1},se(zi).toString=function(){return Pi(this.h3_1)},se(Di).r8=function(n){return Ji(this.q8_1,n.q8_1)},se(Di).a4=function(n){return this.r8(n instanceof Di?n:_e())},se(Di).equals=function(n){return this===n},se(Di).hashCode=function(){return re(this)},se(Di).toString=function(){return this.p8_1},se(Hi).g=function(){return!(this.s8_1===this.t8_1.length)},se(Hi).h=function(){if(this.s8_1===this.t8_1.length)throw mu(""+this.s8_1);var n=this.s8_1;return this.s8_1=n+1|0,this.t8_1[n]},se(de).b9=function(n){return ke(this,n)},se(de).a4=function(n){return this.b9(n instanceof de?n:_e())},se(de).c9=function(n){return ye(this,n)},se(de).d9=function(n){return function(n,t){if(Me(),Se(t))throw vu("division by zero");if(Se(n))return ge();if(xe(n,pe())){if(xe(t,we())||xe(t,be()))return pe();if(xe(t,pe()))return we();var r=function(n){Me();return new de(n.u8_1>>>1|n.v8_1<<31,n.v8_1>>1)}(n),i=function(n){Me();return new de(n.u8_1<<1,n.v8_1<<1|n.u8_1>>>31)}(r.d9(t));return xe(i,ge())?Ie(t)?we():be():ye(i,qe(n,Be(t,i)).d9(t))}if(xe(t,pe()))return ge();if(Ie(n))return Ie(t)?Ee(n).d9(Ee(t)):Ee(Ee(n).d9(t));if(Ie(t))return Ee(n.d9(Ee(t)));for(var e=ge(),u=n;Ae(u,t);){for(var o=Ce(u)/Ce(t),f=Math.max(1,Math.floor(o)),s=Math.ceil(Math.log(f)/Math.LN2),c=s<=48?1:Math.pow(2,s-48),a=Le(f),h=Be(a,t);Ie(h)||Ne(h,u);)h=Be(a=Le(f-=c),t);Se(a)&&(a=we()),e=ye(e,a),u=qe(u,h)}return e}(this,n)},se(de).e9=function(){return this.f9().c9(new de(1,0))},se(de).f9=function(){return new de(~this.u8_1,~this.v8_1)},se(de).g9=function(){return this.u8_1},se(de).w8=function(){return Ce(this)},se(de).valueOf=function(){return this.w8()},se(de).equals=function(n){return n instanceof de&&xe(this,n)},se(de).hashCode=function(){return Me(),this.u8_1^this.v8_1},se(de).toString=function(){return je(this,10)},se(Au).toString=function(){return"Model(text="+this.o9_1+", tooltip="+this.p9_1+")"},se(Au).hashCode=function(){var n=ue(this.o9_1);return zn(n,31)+ue(this.p9_1)|0},se(Au).equals=function(n){if(this===n)return!0;if(!(n instanceof Au))return!1;var t=n instanceof Au?n:_e();return this.o9_1===t.o9_1&&this.p9_1===t.p9_1},se(Mu).v9=function(n,t){return this.w9(new Au(n,t))},se(Mu).w9=function(n){var t,r;return Df().y9(Jf((t=n,r=this,function(n){return n.s9(t.p9_1),n.t9("copy-button"),n.u9(function(n,t){return function(r){return n.q9_1(t.o9_1)}}(r,t)),lr()})),[])},se(Mu).z9=function(n){return this.w9(n instanceof Au?n:_e())},se(Mu).aa=function(n,t){return t},se(Mu).ba=function(n,t){var r=null==n||Qe(n)?n:_e();return this.aa(r,t instanceof Au?t:_e())},se(Du).ka=function(n){return function(n,t){for(var r=Ff(),i=t.ca_1,e=Nr(xt(i,10)),u=i.f();u.g();){var o,f,s=u.h();s instanceof pf?f=Ff().ga(s.fa_1):s instanceof mf?f=Fu(n,s.da_1,s.ea_1):le(),o=f,e.d(o)}return r.ha(e)}(this,n)},se(Du).z9=function(n){return this.ka(n instanceof Cf?n:_e())},se(Du).la=function(n,t){return t},se(Du).ba=function(n,t){var r=null==n||Qe(n)?n:_e();return this.la(r,t instanceof Cf?t:_e())},se(Ou).pa=function(n,t,r){return new Ou(n,t,r)},se(Ou).qa=function(n,t,r,i){return n=n===A?this.ma_1:n,t=t===A?this.na_1:t,r=r===A?this.oa_1:r,i===A?this.pa(n,t,r):i.pa.call(this,n,t,r)},se(Ou).toString=function(){return"Exception(summary="+this.ma_1+", fullText="+this.na_1+", parts="+this.oa_1+")"},se(Ou).hashCode=function(){var n=null==this.ma_1?0:this.ma_1.hashCode();return n=zn(n,31)+ue(this.na_1)|0,zn(n,31)+ee(this.oa_1)|0},se(Ou).equals=function(n){if(this===n)return!0;if(!(n instanceof Ou))return!1;var t=n instanceof Ou?n:_e();return!!oe(this.ma_1,t.ma_1)&&this.na_1===t.na_1&&!!oe(this.oa_1,t.oa_1)},se(Ru).ta=function(n,t){return new Ru(n,t)},se(Ru).ua=function(n,t,r){return n=n===A?this.ra_1:n,t=t===A?this.sa_1:t,r===A?this.ta(n,t):r.ta.call(this,n,t)},se(Ru).toString=function(){return"StackTracePart(lines="+this.ra_1+", state="+this.sa_1+")"},se(Ru).hashCode=function(){var n=ee(this.ra_1);return zn(n,31)+(null==this.sa_1?0:this.sa_1.hashCode())|0},se(Ru).equals=function(n){if(this===n)return!0;if(!(n instanceof Ru))return!1;var t=n instanceof Ru?n:_e();return!!oe(this.ra_1,t.ra_1)&&!!oe(this.sa_1,t.sa_1)},se(Hu).toString=function(){return"Error(label="+this.va_1+", docLink="+this.wa_1+")"},se(Hu).hashCode=function(){var n=ee(this.va_1);return zn(n,31)+(null==this.wa_1?0:ee(this.wa_1))|0},se(Hu).equals=function(n){if(this===n)return!0;if(!(n instanceof Hu))return!1;var t=n instanceof Hu?n:_e();return!!oe(this.va_1,t.va_1)&&!!oe(this.wa_1,t.wa_1)},se($u).toString=function(){return"Warning(label="+this.xa_1+", docLink="+this.ya_1+")"},se($u).hashCode=function(){var n=ee(this.xa_1);return zn(n,31)+(null==this.ya_1?0:ee(this.ya_1))|0},se($u).equals=function(n){if(this===n)return!0;if(!(n instanceof $u))return!1;var t=n instanceof $u?n:_e();return!!oe(this.xa_1,t.xa_1)&&!!oe(this.ya_1,t.ya_1)},se(Gu).toString=function(){return"Message(prettyText="+this.za_1+")"},se(Gu).hashCode=function(){return this.za_1.hashCode()},se(Gu).equals=function(n){if(this===n)return!0;if(!(n instanceof Gu))return!1;var t=n instanceof Gu?n:_e();return!!this.za_1.equals(t.za_1)},se(Uu).toString=function(){return"ListElement(prettyText="+this.ab_1+")"},se(Uu).hashCode=function(){return this.ab_1.hashCode()},se(Uu).equals=function(n){if(this===n)return!0;if(!(n instanceof Uu))return!1;var t=n instanceof Uu?n:_e();return!!this.ab_1.equals(t.ab_1)},se(Vu).toString=function(){return"TreeNode(prettyText="+this.bb_1+")"},se(Vu).hashCode=function(){return this.bb_1.hashCode()},se(Vu).equals=function(n){if(this===n)return!0;if(!(n instanceof Vu))return!1;var t=n instanceof Vu?n:_e();return!!this.bb_1.equals(t.bb_1)},se(Qu).toString=function(){return"Link(href="+this.cb_1+", label="+this.db_1+")"},se(Qu).hashCode=function(){var n=ue(this.cb_1);return zn(n,31)+ue(this.db_1)|0},se(Qu).equals=function(n){if(this===n)return!0;if(!(n instanceof Qu))return!1;var t=n instanceof Qu?n:_e();return this.cb_1===t.cb_1&&this.db_1===t.db_1},se(Zu).toString=function(){return"Label(text="+this.eb_1+")"},se(Zu).hashCode=function(){return ue(this.eb_1)},se(Zu).equals=function(n){if(this===n)return!0;if(!(n instanceof Zu))return!1;var t=n instanceof Zu?n:_e();return this.eb_1===t.eb_1},se(io).toString=function(){return"Info(label="+this.hb_1+", docLink="+this.ib_1+")"},se(io).hashCode=function(){var n=ee(this.hb_1);return zn(n,31)+(null==this.ib_1?0:ee(this.ib_1))|0},se(io).equals=function(n){if(this===n)return!0;if(!(n instanceof io))return!1;var t=n instanceof io?n:_e();return!!oe(this.hb_1,t.hb_1)&&!!oe(this.ib_1,t.ib_1)},se(eo).toString=function(){return"Project(path="+this.jb_1+")"},se(eo).hashCode=function(){return ue(this.jb_1)},se(eo).equals=function(n){if(this===n)return!0;if(!(n instanceof eo))return!1;var t=n instanceof eo?n:_e();return this.jb_1===t.jb_1},se(uo).toString=function(){return"Task(path="+this.kb_1+", type="+this.lb_1+")"},se(uo).hashCode=function(){var n=ue(this.kb_1);return zn(n,31)+ue(this.lb_1)|0},se(uo).equals=function(n){if(this===n)return!0;if(!(n instanceof uo))return!1;var t=n instanceof uo?n:_e();return this.kb_1===t.kb_1&&this.lb_1===t.lb_1},se(oo).toString=function(){return"TaskPath(path="+this.mb_1+")"},se(oo).hashCode=function(){return ue(this.mb_1)},se(oo).equals=function(n){if(this===n)return!0;if(!(n instanceof oo))return!1;var t=n instanceof oo?n:_e();return this.mb_1===t.mb_1},se(fo).toString=function(){return"Bean(type="+this.nb_1+")"},se(fo).hashCode=function(){return ue(this.nb_1)},se(fo).equals=function(n){if(this===n)return!0;if(!(n instanceof fo))return!1;var t=n instanceof fo?n:_e();return this.nb_1===t.nb_1},se(so).toString=function(){return"SystemProperty(name="+this.ob_1+")"},se(so).hashCode=function(){return ue(this.ob_1)},se(so).equals=function(n){if(this===n)return!0;if(!(n instanceof so))return!1;var t=n instanceof so?n:_e();return this.ob_1===t.ob_1},se(co).toString=function(){return"Property(kind="+this.pb_1+", name="+this.qb_1+", owner="+this.rb_1+")"},se(co).hashCode=function(){var n=ue(this.pb_1);return n=zn(n,31)+ue(this.qb_1)|0,zn(n,31)+ue(this.rb_1)|0},se(co).equals=function(n){if(this===n)return!0;if(!(n instanceof co))return!1;var t=n instanceof co?n:_e();return this.pb_1===t.pb_1&&this.qb_1===t.qb_1&&this.rb_1===t.rb_1},se(ao).toString=function(){return"BuildLogic(location="+this.sb_1+")"},se(ao).hashCode=function(){return ue(this.sb_1)},se(ao).equals=function(n){if(this===n)return!0;if(!(n instanceof ao))return!1;var t=n instanceof ao?n:_e();return this.sb_1===t.sb_1},se(ho).toString=function(){return"BuildLogicClass(type="+this.tb_1+")"},se(ho).hashCode=function(){return ue(this.tb_1)},se(ho).equals=function(n){if(this===n)return!0;if(!(n instanceof ho))return!1;var t=n instanceof ho?n:_e();return this.tb_1===t.tb_1},se(vo).zb=function(){return this.yb_1},se(vo).toString=function(){return"TaskTreeIntent(delegate="+this.yb_1+")"},se(vo).hashCode=function(){return ee(this.yb_1)},se(vo).equals=function(n){if(this===n)return!0;if(!(n instanceof vo))return!1;var t=n instanceof vo?n:_e();return!!oe(this.yb_1,t.yb_1)},se(go).zb=function(){return this.ac_1},se(go).toString=function(){return"MessageTreeIntent(delegate="+this.ac_1+")"},se(go).hashCode=function(){return ee(this.ac_1)},se(go).equals=function(n){if(this===n)return!0;if(!(n instanceof go))return!1;var t=n instanceof go?n:_e();return!!oe(this.ac_1,t.ac_1)},se(wo).zb=function(){return this.bc_1},se(wo).toString=function(){return"InputTreeIntent(delegate="+this.bc_1+")"},se(wo).hashCode=function(){return ee(this.bc_1)},se(wo).equals=function(n){if(this===n)return!0;if(!(n instanceof wo))return!1;var t=n instanceof wo?n:_e();return!!oe(this.bc_1,t.bc_1)},se(bo).zb=function(){return this.cc_1},se(bo).toString=function(){return"IncompatibleTaskTreeIntent(delegate="+this.cc_1+")"},se(bo).hashCode=function(){return ee(this.cc_1)},se(bo).equals=function(n){if(this===n)return!0;if(!(n instanceof bo))return!1;var t=n instanceof bo?n:_e();return!!oe(this.cc_1,t.cc_1)},se(po).toString=function(){return"SetTab(tab="+this.dc_1+")"},se(po).hashCode=function(){return this.dc_1.hashCode()},se(po).equals=function(n){if(this===n)return!0;if(!(n instanceof po))return!1;var t=n instanceof po?n:_e();return!!this.dc_1.equals(t.dc_1)},se(mo).mc=function(n,t,r,i,e,u,o,f){return new mo(n,t,r,i,e,u,o,f)},se(mo).nc=function(n,t,r,i,e,u,o,f,s){return n=n===A?this.ec_1:n,t=t===A?this.fc_1:t,r=r===A?this.gc_1:r,i=i===A?this.hc_1:i,e=e===A?this.ic_1:e,u=u===A?this.jc_1:u,o=o===A?this.kc_1:o,f=f===A?this.lc_1:f,s===A?this.mc(n,t,r,i,e,u,o,f):s.mc.call(this,n,t,r,i,e,u,o,f)},se(mo).toString=function(){return"Model(heading="+this.ec_1+", summary="+this.fc_1+", learnMore="+this.gc_1+", messageTree="+this.hc_1+", locationTree="+this.ic_1+", inputTree="+this.jc_1+", incompatibleTaskTree="+this.kc_1+", tab="+this.lc_1+")"},se(mo).hashCode=function(){var n=this.ec_1.hashCode();return n=zn(n,31)+ee(this.fc_1)|0,n=zn(n,31)+this.gc_1.hashCode()|0,n=zn(n,31)+this.hc_1.hashCode()|0,n=zn(n,31)+this.ic_1.hashCode()|0,n=zn(n,31)+this.jc_1.hashCode()|0,n=zn(n,31)+this.kc_1.hashCode()|0,zn(n,31)+this.lc_1.hashCode()|0},se(mo).equals=function(n){if(this===n)return!0;if(!(n instanceof mo))return!1;var t=n instanceof mo?n:_e();return!!(this.ec_1.equals(t.ec_1)&&oe(this.fc_1,t.fc_1)&&this.gc_1.equals(t.gc_1)&&this.hc_1.equals(t.hc_1)&&this.ic_1.equals(t.ic_1)&&this.jc_1.equals(t.jc_1)&&this.kc_1.equals(t.kc_1)&&this.lc_1.equals(t.lc_1))},se(Uo).gd=function(n,t){var r,i;return n instanceof vo?r=t.nc(A,A,A,A,_s().id(n.yb_1,t.ic_1)):n instanceof go?r=t.nc(A,A,A,_s().id(n.ac_1,t.hc_1)):n instanceof wo?r=t.nc(A,A,A,A,A,_s().id(n.bc_1,t.jc_1)):n instanceof bo?r=t.nc(A,A,A,A,A,A,_s().id(n.cc_1,t.kc_1)):n instanceof qc?r=function(n,t,r,i){var e;return r instanceof go?e=n.nc(A,A,A,mc(n.hc_1,r,i)):r instanceof vo?e=n.nc(A,A,A,A,mc(n.ic_1,r,i)):r instanceof wo?e=n.nc(A,A,A,A,A,mc(n.jc_1,r,i)):r instanceof bo?e=n.nc(A,A,A,A,A,A,mc(n.kc_1,r,i)):(console.error("Unhandled tree intent: "+r),e=n),e}(t,0,n.xc_1,(i=n,function(n){var t;if(!(n instanceof Ou))throw fu(ie("Failed requirement."));for(var r=n.oa_1,e=i.wc_1,u=Nr(xt(r,10)),o=0,f=r.f();f.g();){var s,c,a=f.h(),h=o;if(o=h+1|0,e===wr(h)){var l=a.sa_1;c=a.ua(A,null==l?null:l.ad())}else c=a;s=c,u.d(s)}return t=u,n.qa(A,A,t)})):n instanceof kc?(window.navigator.clipboard.writeText(n.hd_1),r=t):n instanceof po?r=t.nc(A,A,A,A,A,A,A,n.dc_1):(console.error("Unhandled intent: "+n),r=t),r},se(Uo).ba=function(n,t){var r=n instanceof Bc?n:_e();return this.gd(r,t instanceof mo?t:_e())},se(Uo).jd=function(n){return Af().y9(Jf(To),[qo(0,n),Bo(0,n)])},se(Uo).z9=function(n){return this.jd(n instanceof mo?n:_e())},se(Zo).toString=function(){return"ImportedProblem(problem="+this.kd_1+", message="+this.ld_1+", trace="+this.md_1+")"},se(Zo).hashCode=function(){var n=ee(this.kd_1);return n=zn(n,31)+this.ld_1.hashCode()|0,zn(n,31)+ee(this.md_1)|0},se(Zo).equals=function(n){if(this===n)return!0;if(!(n instanceof Zo))return!1;var t=n instanceof Zo?n:_e();return!!oe(this.kd_1,t.kd_1)&&!!this.ld_1.equals(t.ld_1)&&!!oe(this.md_1,t.md_1)},se(ff).ud=function(n,t){return this.td_1(n,t)},se(ff).compare=function(n,t){return this.ud(n,t)},se(bf).toString=function(){return"LearnMore(text="+this.sc_1+", documentationLink="+this.tc_1+")"},se(bf).hashCode=function(){var n=ue(this.sc_1);return zn(n,31)+ue(this.tc_1)|0},se(bf).equals=function(n){if(this===n)return!0;if(!(n instanceof bf))return!1;var t=n instanceof bf?n:_e();return this.sc_1===t.sc_1&&this.tc_1===t.tc_1},se(pf).toString=function(){return"Text(text="+this.fa_1+")"},se(pf).hashCode=function(){return ue(this.fa_1)},se(pf).equals=function(n){if(this===n)return!0;if(!(n instanceof pf))return!1;var t=n instanceof pf?n:_e();return this.fa_1===t.fa_1},se(mf).toString=function(){return"Reference(name="+this.da_1+", clipboardString="+this.ea_1+")"},se(mf).hashCode=function(){var n=ue(this.da_1);return zn(n,31)+ue(this.ea_1)|0},se(mf).equals=function(n){if(this===n)return!0;if(!(n instanceof mf))return!1;var t=n instanceof mf?n:_e();return this.da_1===t.da_1&&this.ea_1===t.ea_1},se(yf).ed=function(n){return this.dd_1.d(new pf(n)),this},se(yf).xd=function(n,t){return this.dd_1.d(new mf(n,t)),this},se(yf).fd=function(n,t,r){return t=t===A?n:t,r===A?this.xd(n,t):r.xd.call(this,n,t)},se(yf).j5=function(){return new Cf(Rn(this.dd_1))},se(qf).rd=function(n){return new Cf(gr(new pf(n)))},se(qf).qd=function(n){var t=new yf;return n(t),t.j5()},se(Cf).vd=function(n){return new Cf(n)},se(Cf).toString=function(){return"PrettyText(fragments="+this.ca_1+")"},se(Cf).hashCode=function(){return ee(this.ca_1)},se(Cf).equals=function(n){if(this===n)return!0;if(!(n instanceof Cf))return!1;var t=n instanceof Cf?n:_e();return!!oe(this.ca_1,t.ca_1)},se(xf).sd=function(n){return function(n){for(var t=Gr(),r=n.f();r.g();)for(var i=t,e=r.h().f();e.g();){var u,o=e.h(),f=i,s=f.v1(o);if(null==s){var c=Gr();f.h5(o,c),u=c}else u=s;i=u instanceof Vr?u:_e()}return t}(n)},se(Sf).toString=function(){return"Trie(nestedMaps="+this.wd_1+")"},se(Sf).hashCode=function(){return ee(this.wd_1)},se(Sf).equals=function(n){return function(n,t){return t instanceof Sf&&!!oe(n,t instanceof Sf?t.wd_1:_e())}(this.wd_1,n)},se(Uf).ga=function(n){return Qf().yd(this.x9_1,A,n)},se(Uf).ha=function(n){return Qf().yd(this.x9_1,A,A,n)},se(Uf).ja=function(n){return Qf().yd(this.x9_1,A,A,nu(n))},se(Uf).y9=function(n,t){return Qf().yd(this.x9_1,n,A,nu(t))},se(Uf).zd=function(n,t){return Qf().yd(this.x9_1,n,A,t)},se(Uf).fb=function(n,t){return Qf().yd(this.x9_1,n,t)},se(Uf).rc=function(n,t){return Qf().yd(this.x9_1,A,n,nu(t))},se(Uf).toString=function(){return"ViewFactory(elementName="+this.x9_1+")"},se(Uf).hashCode=function(){return ue(this.x9_1)},se(Uf).equals=function(n){if(this===n)return!0;if(!(n instanceof Uf))return!1;var t=n instanceof Uf?n:_e();return this.x9_1===t.x9_1},se(Vf).ae=function(n,t,r,i){return new Wf(n,t,r,i)},se(Vf).yd=function(n,t,r,i,e){return t=t===A?pt():t,r=r===A?null:r,i=i===A?pt():i,e===A?this.ae(n,t,r,i):e.ae.call(this,n,t,r,i)},se(Wf).toString=function(){return"Element(elementName="+this.be_1+", attributes="+this.ce_1+", innerText="+this.de_1+", children="+this.ee_1+")"},se(Wf).hashCode=function(){var n=ue(this.be_1);return n=zn(n,31)+ee(this.ce_1)|0,n=zn(n,31)+(null==this.de_1?0:ue(this.de_1))|0,zn(n,31)+ee(this.ee_1)|0},se(Wf).equals=function(n){if(this===n)return!0;if(!(n instanceof Wf))return!1;var t=n instanceof Wf?n:_e();return this.be_1===t.be_1&&!!oe(this.ce_1,t.ce_1)&&this.de_1==t.de_1&&!!oe(this.ee_1,t.ee_1)},se(ns).u9=function(n){return this.r9_1(new ts("click",n))},se(ns).t9=function(n){return this.r9_1(new rs(n))},se(ns).gb=function(n){for(var t=0,r=n.length;t<r;){var i=n[t];t=t+1|0,this.r9_1(new rs(i))}return lr()},se(ns).s9=function(n){return this.r9_1(new is("title",n))},se(ns).bd=function(n){return this.r9_1(new is("href",n))},se(ss).oe=function(){return this.ne_1},se(ss).toString=function(){return"Toggle(focus="+this.ne_1+")"},se(ss).hashCode=function(){return ee(this.ne_1)},se(ss).equals=function(n){if(this===n)return!0;if(!(n instanceof ss))return!1;var t=n instanceof ss?n:_e();return!!oe(this.ne_1,t.ne_1)},se(cs).pe=function(n,t){return this.re(n.qe((r=t,function(n){return n.me(r(n.ub_1))})));var r},se(cs).re=function(n){return new cs(n)},se(cs).toString=function(){return"Model(tree="+this.xb_1+")"},se(cs).hashCode=function(){return this.xb_1.hashCode()},se(cs).equals=function(n){if(this===n)return!0;if(!(n instanceof cs))return!1;var t=n instanceof cs?n:_e();return!!this.xb_1.equals(t.xb_1)},se(ls).id=function(n,t){var r;if(n instanceof ss){var i=n.oe();r=t.re(i.qe(hs))}else le();return r},se(ds).cd=function(){return this.ve_1},se(ds).we=function(){return 0},se(ds).qe=function(n){return n(this.ve_1)},se(ds).toString=function(){return"Original(tree="+this.ve_1+")"},se(ds).hashCode=function(){return this.ve_1.hashCode()},se(ds).equals=function(n){if(this===n)return!0;if(!(n instanceof ds))return!1;var t=n instanceof ds?n:_e();return!!this.ve_1.equals(t.ve_1)},se(gs).cd=function(){return this.ue_1},se(gs).we=function(){return this.se_1.we()+1|0},se(gs).qe=function(n){return this.se_1.qe((t=this,r=n,function(n){for(var i,e=n.vb_1,u=t.te_1,o=Nr(xt(e,10)),f=0,s=e.f();s.g();){var c,a=s.h(),h=f;f=h+1|0,c=u===wr(h)?r(a):a,o.d(c)}return i=o,n.me(A,i)}));var t,r},se(gs).toString=function(){return"Child(parent="+this.se_1+", index="+this.te_1+", tree="+this.ue_1+")"},se(gs).hashCode=function(){var n=ee(this.se_1);return n=zn(n,31)+this.te_1|0,zn(n,31)+this.ue_1.hashCode()|0},se(gs).equals=function(n){if(this===n)return!0;if(!(n instanceof gs))return!1;var t=n instanceof gs?n:_e();return!!oe(this.se_1,t.se_1)&&this.te_1===t.te_1&&!!this.ue_1.equals(t.ue_1)},se(ws).ad=function(){var n;switch(this.q8_1){case 0:n=ms();break;case 1:n=ps();break;default:le()}return n},se(bs).vc=function(){var n,t;return Jn(On(Oe(0,this.cd().vb_1.k()-1|0)),(n=this,(t=function(t){return n.xe(t)}).callableName="child",t))},se(bs).xe=function(n){return new gs(this,n,this.cd().vb_1.j(n))},se(ks).uc=function(){return new ds(this)},se(ks).ye=function(){return!this.vb_1.i()},se(ks).ze=function(n,t,r){return new ks(n,t,r)},se(ks).me=function(n,t,r,i){return n=n===A?this.ub_1:n,t=t===A?this.vb_1:t,r=r===A?this.wb_1:r,i===A?this.ze(n,t,r):i.ze.call(this,n,t,r)},se(ks).toString=function(){return"Tree(label="+this.ub_1+", children="+this.vb_1+", state="+this.wb_1+")"},se(ks).hashCode=function(){var n=null==this.ub_1?0:ee(this.ub_1);return n=zn(n,31)+ee(this.vb_1)|0,zn(n,31)+this.wb_1.hashCode()|0},se(ks).equals=function(n){if(this===n)return!0;if(!(n instanceof ks))return!1;var t=n instanceof ks?n:_e();return!!oe(this.ub_1,t.ub_1)&&!!oe(this.vb_1,t.vb_1)&&!!this.wb_1.equals(t.wb_1)},se(Cs).toString=function(){return"ProblemIdElement(name="+this.df_1+", displayName="+this.ef_1+")"},se(Cs).hashCode=function(){var n=ue(this.df_1);return zn(n,31)+ue(this.ef_1)|0},se(Cs).equals=function(n){if(this===n)return!0;if(!(n instanceof Cs))return!1;var t=n instanceof Cs?n:_e();return this.df_1===t.df_1&&this.ef_1===t.ef_1},se(xs).toString=function(){return"ProblemSummary(problemId="+this.ff_1+", count="+this.gf_1+")"},se(xs).hashCode=function(){var n=ee(this.ff_1);return zn(n,31)+this.gf_1|0},se(xs).equals=function(n){if(this===n)return!0;if(!(n instanceof xs))return!1;var t=n instanceof xs?n:_e();return!!oe(this.ff_1,t.ff_1)&&this.gf_1===t.gf_1},se(Is).toString=function(){return"ProblemNodeGroup(tree="+this.hf_1+", children="+this.if_1+", childGroups="+this.jf_1+", id="+this.kf_1+")"},se(Is).hashCode=function(){var n=this.hf_1.hashCode();return n=zn(n,31)+ee(this.if_1)|0,n=zn(n,31)+ee(this.jf_1)|0,zn(n,31)+this.kf_1|0},se(Is).equals=function(n){if(this===n)return!0;if(!(n instanceof Is))return!1;var t=n instanceof Is?n:_e();return!!this.hf_1.equals(t.hf_1)&&!!oe(this.if_1,t.if_1)&&!!oe(this.jf_1,t.jf_1)&&this.kf_1===t.kf_1},se(Us).toString=function(){return"Text(text="+this.lf_1+")"},se(Us).hashCode=function(){return ue(this.lf_1)},se(Us).equals=function(n){if(this===n)return!0;if(!(n instanceof Us))return!1;var t=n instanceof Us?n:_e();return this.lf_1===t.lf_1},se(Vs).toString=function(){return"ProblemIdNode(prettyText="+this.mf_1+", separator="+this.nf_1+")"},se(Vs).hashCode=function(){var n=this.mf_1.hashCode();return zn(n,31)+(0|this.nf_1)|0},se(Vs).equals=function(n){if(this===n)return!0;if(!(n instanceof Vs))return!1;var t=n instanceof Vs?n:_e();return!!this.mf_1.equals(t.mf_1)&&this.nf_1===t.nf_1},se(Qs).toString=function(){return"Advice(label="+this.of_1+", docLink="+this.pf_1+")"},se(Qs).hashCode=function(){var n=ee(this.of_1);return zn(n,31)+(null==this.pf_1?0:ee(this.pf_1))|0},se(Qs).equals=function(n){if(this===n)return!0;if(!(n instanceof Qs))return!1;var t=n instanceof Qs?n:_e();return!!oe(this.of_1,t.of_1)&&!!oe(this.pf_1,t.pf_1)},se(Ys).zb=function(){return this.qf_1},se(Ys).toString=function(){return"MessageTreeIntent(delegate="+this.qf_1+")"},se(Ys).hashCode=function(){return ee(this.qf_1)},se(Ys).equals=function(n){if(this===n)return!0;if(!(n instanceof Ys))return!1;var t=n instanceof Ys?n:_e();return!!oe(this.qf_1,t.qf_1)},se(Ws).zb=function(){return this.rf_1},se(Ws).toString=function(){return"ProblemIdTreeIntent(delegate="+this.rf_1+")"},se(Ws).hashCode=function(){return ee(this.rf_1)},se(Ws).equals=function(n){if(this===n)return!0;if(!(n instanceof Ws))return!1;var t=n instanceof Ws?n:_e();return!!oe(this.rf_1,t.rf_1)},se(Ks).zb=function(){return this.sf_1},se(Ks).toString=function(){return"FileLocationTreeIntent(delegate="+this.sf_1+")"},se(Ks).hashCode=function(){return ee(this.sf_1)},se(Ks).equals=function(n){if(this===n)return!0;if(!(n instanceof Ks))return!1;var t=n instanceof Ks?n:_e();return!!oe(this.sf_1,t.sf_1)},se(Xs).toString=function(){return"SetTab(tab="+this.tf_1+")"},se(Xs).hashCode=function(){return this.tf_1.hashCode()},se(Xs).equals=function(n){if(this===n)return!0;if(!(n instanceof Xs))return!1;var t=n instanceof Xs?n:_e();return!!this.tf_1.equals(t.tf_1)},se(Js).cg=function(n,t,r,i,e,u,o,f){return new Js(n,t,r,i,e,u,o,f)},se(Js).dg=function(n,t,r,i,e,u,o,f,s){return n=n===A?this.uf_1:n,t=t===A?this.vf_1:t,r=r===A?this.wf_1:r,i=i===A?this.xf_1:i,e=e===A?this.yf_1:e,u=u===A?this.zf_1:u,o=o===A?this.ag_1:o,f=f===A?this.bg_1:f,s===A?this.cg(n,t,r,i,e,u,o,f):s.cg.call(this,n,t,r,i,e,u,o,f)},se(Js).toString=function(){return"Model(heading="+this.uf_1+", summary="+this.vf_1+", learnMore="+this.wf_1+", messageTree="+this.xf_1+", problemIdTree="+this.yf_1+", fileLocationTree="+this.zf_1+", problemCount="+this.ag_1+", tab="+this.bg_1+")"},se(Js).hashCode=function(){var n=this.uf_1.hashCode();return n=zn(n,31)+ee(this.vf_1)|0,n=zn(n,31)+this.wf_1.hashCode()|0,n=zn(n,31)+this.xf_1.hashCode()|0,n=zn(n,31)+this.yf_1.hashCode()|0,n=zn(n,31)+this.zf_1.hashCode()|0,n=zn(n,31)+this.ag_1|0,zn(n,31)+this.bg_1.hashCode()|0},se(Js).equals=function(n){if(this===n)return!0;if(!(n instanceof Js))return!1;var t=n instanceof Js?n:_e();return!!(this.uf_1.equals(t.uf_1)&&oe(this.vf_1,t.vf_1)&&this.wf_1.equals(t.wf_1)&&this.xf_1.equals(t.xf_1)&&this.yf_1.equals(t.yf_1)&&this.zf_1.equals(t.zf_1)&&this.ag_1===t.ag_1&&this.bg_1.equals(t.bg_1))},se(bc).eg=function(n,t){var r,i;return n instanceof Ks?r=t.dg(A,A,A,A,A,_s().id(n.sf_1,t.zf_1)):n instanceof Ws?r=t.dg(A,A,A,A,_s().id(n.rf_1,t.yf_1)):n instanceof Ys?r=t.dg(A,A,A,_s().id(n.qf_1,t.xf_1)):n instanceof qc?r=function(n,t,r,i){var e;return r instanceof Ys?e=n.dg(A,A,A,mc(n.xf_1,r,i)):r instanceof Ws?e=n.dg(A,A,A,A,mc(n.yf_1,r,i)):r instanceof Ks?e=n.dg(A,A,A,A,A,mc(n.zf_1,r,i)):(console.error("Unhandled tree intent: "+r),e=n),e}(t,0,n.xc_1,(i=n,function(n){var t;if(!(n instanceof Ou))throw fu(ie("Failed requirement."));for(var r=n.oa_1,e=i.wc_1,u=Nr(xt(r,10)),o=0,f=r.f();f.g();){var s,c,a=f.h(),h=o;if(o=h+1|0,e===wr(h)){var l=a.sa_1;c=a.ua(A,null==l?null:l.ad())}else c=a;s=c,u.d(s)}return t=u,n.qa(A,A,t)})):n instanceof kc?(window.navigator.clipboard.writeText(n.hd_1),r=t):n instanceof Xs?r=t.dg(A,A,A,A,A,A,A,n.tf_1):(console.error("Unhandled intent: "+n),r=t),r},se(bc).ba=function(n,t){var r=n instanceof Bc?n:_e();return this.eg(r,t instanceof Js?t:_e())},se(bc).fg=function(n){return Af().y9(Jf(ac),[tc(0,n),rc(0,n)])},se(bc).z9=function(n){return this.fg(n instanceof Js?n:_e())},se(kc).toString=function(){return"Copy(text="+this.hd_1+")"},se(kc).hashCode=function(){return ue(this.hd_1)},se(kc).equals=function(n){if(this===n)return!0;if(!(n instanceof kc))return!1;var t=n instanceof kc?n:_e();return this.hd_1===t.hd_1},se(qc).toString=function(){return"ToggleStackTracePart(partIndex="+this.wc_1+", location="+this.xc_1+")"},se(qc).hashCode=function(){var n=this.wc_1;return zn(n,31)+ee(this.xc_1)|0},se(qc).equals=function(n){if(this===n)return!0;if(!(n instanceof qc))return!1;var t=n instanceof qc?n:_e();return this.wc_1===t.wc_1&&!!oe(this.xc_1,t.xc_1)},se(Jr).k6=function(){var n=Object.create(null);return n.foo=1,delete n.foo,lr(),n},l=null,wn=0,function(){var n=configurationCacheProblems();if(null==n.problemsReport)zf(Ef("report"),Vo(),function(n){var t,r,i,e,u,o,f,s,c,a,h=function(n){for(var t=Lr(),r=Lr(),i=Lr(),e=0,u=n.length;e<u;){var o=n[e];e=e+1|0;var f,s=o.input,c=null==s?null:r.d(Wo(s,o));if(null==c){var a=o.incompatibleTask;f=null==a?null:i.d(Wo(a,o))}else f=c;if(null==f){var h=he(o.problem);t.d(Wo(h,o))}}return new Yo(t,r,i)}(n.diagnostics),l=n.totalProblemCount;return new mo((f=(t=n).buildName,s=t.requestedTasks,c=null==s?null:Wt(s," ",A,r=r!==A&&r)>=0,a=null==c||c,Bf().qd((i=t,e=f,u=s,o=a,function(n){n.ed(function(n){var t;if(Wi(n)>0){var r,i=Zi(n,0);r=function(n){return 97<=n&&n<=122||!(ji(n,128)<0)&&function(n){var t;return t=1===function(n){var t=n,r=ru(eu().h9_1,t),i=eu().h9_1[r],e=(i+eu().i9_1[r]|0)-1|0,u=eu().j9_1[r];if(t>e)return 0;var o=3&u;if(0===o){var f=2,s=i,c=0;if(c<=1)do{if(c=c+1|0,(s=s+(u>>f&127)|0)>t)return 3;if((s=s+(u>>(f=f+7|0)&127)|0)>t)return 0;f=f+7|0}while(c<=1);return 3}if(u<=7)return o;var a=t-i|0;return u>>zn(2,u<=31?a%2|0:a)&3}(n)||function(n){var t=ru(ou().k9_1,n);return t>=0&&n<(ou().k9_1[t]+ou().l9_1[t]|0)}(n),t}(n)}(i)?function(n){return function(n){var t=Pi(n).toUpperCase();if(t.length>1){var r;if(329===n)r=t;else{var i=Zi(t,0),e=t.substring(1).toLowerCase();r=Pi(i)+e}return r}return Pi(function(n){return function(n){var t=n;return 452<=t&&t<=460||497<=t&&t<=499?De(zn(3,(t+1|0)/3|0)):4304<=t&&t<=4346||4349<=t&&t<=4351?n:mi(n)}(n)}(n))}(n)}(i):Pi(i),t=ie(r)+n.substring(1)}else t=n;return t}(i.cacheAction)+" the configuration cache for ");var t=e;null==t||n.fd(t),null==e||n.ed(" build and ");var r=u;return null==(null==r?null:n.fd(r))&&n.ed("default"),n.ed(o?" tasks":" task"),lr()}))),function(n,t){var r=n.cacheActionDescription,i=null==r?null:vf(r),e=Bf().rd(function(n){var t=n.od_1.k(),r=df(t,"build configuration input");return t>0?r+" and will cause the cache to be discarded when "+(t<=1?"its":"their")+" value change":r}(t)),u=Bf().rd(function(n,t){var r=n.totalProblemCount,i=t.nd_1.k(),e=df(r,"problem");return r>i?e+", only the first "+i+" "+wf(i)+" included in this report":e}(n,t));return function(n,t){for(var r=0,i=n.length;r<i;){var e=n[r];r=r+1|0,null!=e&&t.d(e)}return t}([i,e,u],Lr())}(n,h),new bf("Gradle Configuration Cache",n.documentationLink),uf(new Zu(Ho().qc_1),Jn(On(h.nd_1),af)),uf(new Zu($o().qc_1),function(n){return Jn(On(n),hf)}(h.nd_1)),uf(new Zu(Ro().qc_1),Jn(On(h.od_1),sf)),uf(new Zu(Go().qc_1),Jn(On(h.pd_1),cf)),0===l?Ro():Ho())}(n));else{var t=n.problemsReport;zf(Ef("report"),pc(),function(n,t){for(var r=n.summaries,i=Nr(r.length),e=0,u=r.length;e<u;){var o,f=r[e];e=e+1|0;for(var s=f.problemId,c=Nr(s.length),a=0,h=s.length;a<h;){var l,_=s[a];a=a+1|0,l=new Cs(_.name,_.displayName),c.d(l)}o=new xs(c,f.count),i.d(o)}for(var v=i,d=function(n,t){for(var r=oi(),i=0,e=n.length;i<e;){var u=n[i];i=i+1|0;var o,f=Ln(u.problemId,":",A,A,A,A,Ds),s=r.v1(f);if(null==s){var c=Lr();r.h5(f,c),o=c}else o=s;o.d(u)}for(var a=r.o(),h=Nr(xt(a,10)),l=a.f();l.g();){for(var _,v=l.h(),d=v.i1(),g=Nr(xt(d,10)),w=d.f();w.g();){var b;b=Es(w.h(),null,!0),g.d(b)}var p,m=Hn(g),k=Dn(v.i1()),y=Ls(k,new Gu(Ns(Ts(k)).ed(" ("+v.i1().k()+")").j5()));n:{for(var q=t.f();q.g();){var B=q.h();if(zs(B.ff_1,k.problemId)){p=B;break n}}p=null}var C=p;null==C||m.d(js(C.gf_1)),_=new ks(y,m),h.d(_)}var x=h;return new cs(new ks(new Us("message tree root"),x))}(t,v),g=function(n,t){for(var r=function(){var n=Lr();return new Is(new ks(new Vs(Bf().rd("Ungrouped"),!0),n),n,oi())}(),i=oi(),e=0,u=n.length;e<u;){var o=n[e];e=e+1|0;for(var f=$n(Tn(o.problemId,1)),s=Nr(xt(f,10)),c=f.f();c.g();){var a,h=c.h();a=new Cs(h.name,h.displayName),s.d(a)}var l=Ss(i,s),_=Es(o);null==l?r.if_1.d(_):l.if_1.d(_)}for(var v=Nr(xt(t,10)),d=t.f();d.g();){var g,w=d.h();g=new xs($n(Gn(w.ff_1,1)),w.gf_1),v.d(g)}for(var b=oi(),p=v.f();p.g();){var m,k=p.h(),y=k.ff_1,q=b.v1(y);if(null==q){var B=Lr();b.h5(y,B),m=B}else m=q;m.d(k)}for(var C=b.o(),x=Nr(xt(C,10)),j=C.f();j.g();){for(var P,I=j.h(),S=I.j1(),z=0,E=I.i1().f();E.g();)z=z+E.h().gf_1|0;P=new xs(S,z),x.d(P)}for(var T=x.f();T.g();){var L=T.h(),N=Ss(i,L.ff_1),A=null==N?null:N.if_1;null==A||A.d(js(L.gf_1))}for(var M=i.w1(),F=Nr(xt(M,10)),D=M.f();D.g();){var O;O=D.h().hf_1,F.d(O)}var R=function(n,t){var r=Nr(n.k());return r.m(n),r.d(t),r}(F,r.hf_1);return new cs(new ks(new Us("group tree root"),R))}(t,v),w=0,b=v.f();b.g();)w=w+b.h().gf_1|0;var p=function(n,t){for(var r=Lr(),i=oi(),e=0,u=n.length;e<u;){var o=n[e];e=e+1|0;var f=o.locations;if(null==f||0===f.length)r.d(Es(o));else{var s,c=o.locations;if(null==c)s=null;else{for(var a=Lr(),h=Ri(c);h.g();){var l=h.h();null!=l.path&&a.d(l)}s=a}if(null==s);else for(var _=s.f();_.g();){var v=_.h();Ps(i,he(v.path),o,v)}var d,g=o.locations;if(null==g)d=null;else{for(var w=Lr(),b=Ri(g);b.g();){var p=b.h();null!=p.pluginId&&w.d(p)}d=w}if(null==d);else for(var m=d.f();m.g();){var k=m.h();Ps(i,he(k.pluginId),o,k)}var y,q=o.locations;if(null==q)y=null;else{for(var B=Lr(),C=Ri(q);C.g();){var x=C.h();null!=x.taskPath&&B.d(x)}y=B}if(null==y);else for(var j=y.f();j.g();){var P=j.h();Ps(i,he(P.taskPath),o,P)}}}var I=function(n,t,r){for(var i=n.w1(),e=Nr(xt(i,10)),u=i.f();u.g();){var o;o=u.h().t3_1,e.d(o)}var f=Hn(e);return t.i()||f.d(new ks(new Vs(Bf().rd("no location"),!0),t)),r>0&&f.d(js(r)),f}(i,r,t);return new cs(new ks(new Us("text"),I))}(t,w);return new Js(Bf().rd("Problems Report"),function(n,t){var r,i,e,u=n.description,o=null==u?null:gr(vf(u));return r=null==o?gr(Bf().qd((i=t,e=n,function(n){n.ed(i.length+" problems have been reported during the execution");var t=e.buildName;null==t||(n.ed(" of build "),n.fd(t));var r=e.requestedTasks;return null==r||(n.ed(" for the following tasks:"),n.fd(r),lr()),lr()}))):o,r}(n,t),new bf("reporting problems",n.documentationLink),d,g,p,t.length,function(n,t,r){return lo(r)>0?Gs():lo(n)>0?Hs():lo(t)>0?$s():Hs()}(d,g,p))}(t,n.diagnostics))}}(),n}(void 0===this["configuration-cache-report"]?{}:this["configuration-cache-report"])}}[70](),{})))); | |
659 | +//# sourceMappingURL=configuration-cache-report.js.map | |
660 | + </script> | |
661 | + | |
662 | +</body> | |
663 | +</html> |
+++ build/resources/main/application.yml
... | ... | @@ -0,0 +1,89 @@ |
1 | +server: | |
2 | + port: 9090 | |
3 | + servlet: | |
4 | + context-path: '/' | |
5 | + | |
6 | +spring: | |
7 | + # \uc218\ub3d9 Bean\uc774 \uc790\ub3d9 Bean\uc744 \uc624\ubc84\ub77c\uc774\ub529\ud558\uac8c \uc124\uc815 | |
8 | + main: | |
9 | + allow-bean-definition-overriding: true | |
10 | + # open-in-view(\ud639\uc740 Open-Session-In-View(OSIV)) | |
11 | + # true(\uae30\ubcf8\uac12) : \uc0ac\uc6a9\uc790\uc5d0\uac8c \uc751\ub2f5 \ub610\ub294 view\uac00 \ub80c\ub354\ub9c1\ub420 \ub54c\uae4c\uc9c0 \uc601\uc18d\uc131 \ucee8\ud14d\uc2a4\ud2b8 \uc720\uc9c0 | |
12 | + # false : \ud2b8\ub79c\uc81d\uc158\uc774 \uc885\ub8cc\ub420 \ub54c \uc601\uc18d\uc131 \ucee8\ud14d\uc2a4\ud2b8 \uc885\ub8cc | |
13 | + jpa: | |
14 | + open-in-view: false | |
15 | + #Datasource Configuration | |
16 | + cms: | |
17 | + datasource: | |
18 | + driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy | |
19 | + jdbc-url: jdbc:log4jdbc:postgresql://210.180.118.83:5432/cms_portal?currentSchema=cms | |
20 | + username: takensoft | |
21 | + password: tts96314728!@ | |
22 | + | |
23 | + # 오라클 설정 | |
24 | +# ums: | |
25 | +# datasource: | |
26 | +# driver-class-name: oracle.jdbc.OracleDriver | |
27 | +# jdbc-url: jdbc:oracle:thin:@localhost:1521:xe | |
28 | +# username: c##test1 | |
29 | +# password: 1234 | |
30 | + | |
31 | + sql: | |
32 | + init: | |
33 | + platform: postgres | |
34 | + | |
35 | + servlet: | |
36 | + multipart: | |
37 | + max-file-size: 500MB | |
38 | + max-request-size: 500MB | |
39 | + | |
40 | + # 캐시 설정 | |
41 | + cache: | |
42 | + type: caffeine | |
43 | + caffeine: | |
44 | + spec: maximumSize=100, expireAfterAccess=1h | |
45 | + web: | |
46 | + resources: | |
47 | + # static-locations: file:///C:/uploadFiles/, classpath:/static/ | |
48 | + static-locations: /home/cloud-user/uploadFiles | |
49 | + | |
50 | +# Mybatis settings | |
51 | +#mybatis: | |
52 | +# type-aliases-package: com.takensoft.**.**.vo, com.takensoft.**.**.dto, com.takensoft.common | |
53 | +# mapper-locations: classpath:mybatis/mapper/**/*-SQL.xml | |
54 | +# configuration: | |
55 | +# cache-enabled: true # mapper 캐시 전역 사용여부 | |
56 | +# lazy-loading-enabled: false # MyBatis 지연 로딩 사용여부 | |
57 | +# multiple-result-sets-enabled: true # 한 개의 구문에서 여러 개의 ResultSet 허용 여부 | |
58 | +# use-column-label: true # 컬럼명 대신 컬럼 라벨 사용 여부 | |
59 | +# use-generated-keys: false # 키 자동 생성 | |
60 | +# default-executor-type: SIMPLE | |
61 | +# default-statement-timeout: 25000 | |
62 | +# call-setters-on-nulls: true | |
63 | +# map-underscore-to-camel-case: true # 카멜케이스 사용 | |
64 | + | |
65 | +# jwt | |
66 | +jwt: | |
67 | + secret: akdnciepwlmdkcngpqktmektakensoftepckdbnskqmdkfsdflksdfoasjkdfbasdfasdfwerhjjhkgdfgdfseasdfef | |
68 | + accessTime: 600000 # 10분 600000 | |
69 | + refreshTime: 86400000 # 24시간 86400000 | |
70 | + | |
71 | +# cookie 유지 시간 -> jwt refreshToken과 동일하게 지정 | |
72 | +cookie: | |
73 | + time: 86400 # 24시간 | |
74 | + | |
75 | +# frontUrl | |
76 | +front: | |
77 | + url: http://localhost:8080 | |
78 | + | |
79 | +# 암복호화 | |
80 | +crypto: | |
81 | + secret: takensoftcms2024!@# | |
82 | + vector: takensoft2024cms!@# | |
83 | + | |
84 | +password: | |
85 | + reset: 1234 | |
86 | + | |
87 | +file: | |
88 | + file-upload-path: /fileUpload/ | |
89 | + edit-file-upload-path: /editFileUpload/(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/message/messages_en.yml
... | ... | @@ -0,0 +1,55 @@ |
1 | +# 공통 에러 | |
2 | +common: | |
3 | + success: "Successfully processed." | |
4 | + unknown: "An error has occurred." | |
5 | + bad_request: "Bad request." | |
6 | + null_point: "A null value occurred." | |
7 | + illegal_argument: "Invalid argument provided." | |
8 | + method_not_allowed: "Unsupported HTTP method." | |
9 | + not_found: "No information found." | |
10 | + insert_fail: "Registration failed." | |
11 | + update_fail: "Edit failed." | |
12 | + delete_fail: "Deletion failed." | |
13 | + payload_too_large : "File size limit exceeded." | |
14 | + duplication_code: "This code already exists." | |
15 | + duplication_data: "This data already exists." | |
16 | + | |
17 | + | |
18 | +# 네트워크 관련 | |
19 | +network: | |
20 | + unknown_host: "Request to an unknown host." | |
21 | + | |
22 | +# SQL 관련 | |
23 | +sql: | |
24 | + null_value: "Null value violation in SQL query." | |
25 | + duplicate_key: "Duplicate key violation in SQL query." | |
26 | + data_integrity: "Data integrity violation in SQL query." | |
27 | + unknown: "An unknown SQL error occurred." | |
28 | + | |
29 | +# jwt 인증 관련 | |
30 | +jwt: | |
31 | + expired: "Login session has expired." | |
32 | + signature_invalid: "Invalid token type." | |
33 | + insufficient_authentication: "Insufficient authentication information." | |
34 | + | |
35 | +# 접근 관련 | |
36 | +access: | |
37 | + denied: "Access is denied." | |
38 | + unauthorized: "Unauthorized access." | |
39 | + | |
40 | +# 사용자 관련 | |
41 | +user: | |
42 | + signup: | |
43 | + id_taken: "The userid is already in use." | |
44 | + email_taken: "The email is already in use." | |
45 | + success: "Registration completed successfully." | |
46 | + login: | |
47 | + user_not_found: "User information does not exist." | |
48 | + invalid_credentials: "Incorrect password." | |
49 | + authentication_required: "Authentication request was denied." | |
50 | + account_locked: "Account is locked." | |
51 | + account_disabled: "Account is disabled." | |
52 | + account_expired: "Account has expired." | |
53 | + credentials_expired: "Password has expired." | |
54 | + logout: | |
55 | + success: "You have been logged out."(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/message/messages_ko.yml
... | ... | @@ -0,0 +1,55 @@ |
1 | +# 공통 | |
2 | +common: | |
3 | + success: "정상 처리되었습니다." | |
4 | + unknown: "오류가 발생했습니다." | |
5 | + bad_request: "잘못된 요청입니다." | |
6 | + null_point: "Null 값이 발생했습니다." | |
7 | + illegal_argument: "잘못된 인자가 전달되었습니다." | |
8 | + method_not_allowed: "지원하지 않는 HTTP 메서드입니다." | |
9 | + not_found: "정보를 찾을 수 없습니다." | |
10 | + insert_fail: "등록에 실패했습니다." | |
11 | + update_fail: "수정에 실패했습니다." | |
12 | + delete_fail: "삭제에 실패했습니다." | |
13 | + payload_too_large: "파일 용량 제한을 초과했습니다." | |
14 | + duplication_code: "이미 존재하는 코드입니다." | |
15 | + duplication_data: "이미 존재하는 정보입니다." | |
16 | + | |
17 | +# 네트워크 관련 | |
18 | +network: | |
19 | + unknown_host: "알 수 없는 호스트에 대한 요청입니다." | |
20 | + | |
21 | + | |
22 | +# SQL 관련 | |
23 | +sql: | |
24 | + null_value: "SQL Query에서 NULL 값이 발생했습니다." | |
25 | + duplicate_key: "SQL Query에서 중복 키가 발생했습니다." | |
26 | + data_integrity: "SQL Query에서 데이터 무결성을 위반했습니다." | |
27 | + unknown: "SQL Query 오류가 발생했습니다." | |
28 | + | |
29 | +# jwt 인증 관련 | |
30 | +jwt: | |
31 | + expired: "로그인 시간이 만료되었습니다." | |
32 | + signature_invalid: "잘못된 토큰 유형입니다." | |
33 | + insufficient_authentication: "인증 정보가 부족합니다." | |
34 | + | |
35 | +# 접근 관련 | |
36 | +access: | |
37 | + denied: "접근 권한이 없습니다." | |
38 | + unauthorized: "잘못된 접근입니다." | |
39 | + | |
40 | +# 사용자 관련 | |
41 | +user: | |
42 | + signup: | |
43 | + id_taken: "이미 사용중인 아이디입니다." | |
44 | + email_taken: "이미 사용중인 이메일입니다." | |
45 | + success: "회원가입이 정상처리 되었습니다." | |
46 | + login: | |
47 | + user_not_found: "회원정보가 존재하지 않습니다." | |
48 | + invalid_credentials: "비밀번호가 일치하지 않습니다." | |
49 | + authentication_required: "인증 요구가 거부되었습니다." | |
50 | + account_locked: "계정이 잠겼습니다." | |
51 | + account_disabled: "계정이 비활성화 되어있습니다." | |
52 | + account_expired: "계정 유효기간이 만료되었습니다." | |
53 | + credentials_expired: "계정 비밀번호 유효기간이 만료되었습니다." | |
54 | + logout: | |
55 | + success: "로그아웃 되었습니다." |
+++ build/resources/main/mybatis/mapper-ora/ums/ums-SQL.xml
... | ... | @@ -0,0 +1,29 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.takensoft.ums.dao.UmsDAO"> | |
4 | + <insert id="save" parameterType="UmsVO"> | |
5 | + INSERT INTO CUSTOMER_SMS_SEND ( | |
6 | + USER_ID | |
7 | + , SCHEDULE_TYPE | |
8 | + , TITLE | |
9 | + ,MSG_CONTENT | |
10 | + , CALLING_NUM | |
11 | + ,PHONE_NUM | |
12 | + , RESERV_DTTM | |
13 | + , REG_DTTM | |
14 | + ) VALUES ( | |
15 | + #{userId}, | |
16 | + #{scheduleType}, | |
17 | + #{title}, | |
18 | + #{msgContent}, | |
19 | + #{callingNum}, | |
20 | + #{phoneNum}, | |
21 | + NULL, | |
22 | + TO_CHAR(SYSDATE, 'YYYYMMDDHH24MISS') | |
23 | + ) | |
24 | + </insert> | |
25 | + | |
26 | + <select id="findAll" resultType="UmsVO"> | |
27 | + SELECT * FROM CUSTOMER_SMS_SEND | |
28 | + </select> | |
29 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/accesCtrl/accesCtrl-SQL.xml
... | ... | @@ -0,0 +1,133 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : takensoft | |
5 | + 작성일 : 2024.04.09 | |
6 | + 내 용 : 접근 제어 관리 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.accesCtrl.dao.AccesCtrlDAO"> | |
9 | + | |
10 | + <!-- | |
11 | + 작성자 : takensoft | |
12 | + 작성일 : 2024.04.09 | |
13 | + 내 용 : 접근 제어 등록 | |
14 | + --> | |
15 | + <insert id="save" parameterType="AccesCtrlVO" useGeneratedKeys="true" keyProperty="acsCntrlId"> | |
16 | + INSERT INTO acs_cntrl_mng ( | |
17 | + cntrl_type | |
18 | + , cntrl_ip | |
19 | + , cntrl_crs | |
20 | + , use_yn | |
21 | + , rgtr | |
22 | + , reg_dt | |
23 | + ) VALUES ( | |
24 | + #{cntrlType} | |
25 | + , #{cntrlIp} | |
26 | + , #{cntrlCrs} | |
27 | + , 'Y' | |
28 | + , #{rgtr} | |
29 | + , NOW() | |
30 | + ) | |
31 | + </insert> | |
32 | + | |
33 | + <!-- | |
34 | + 작성자 : takensoft | |
35 | + 작성일 : 2024.04.15 | |
36 | + 내 용 : 접근 제어 수정 | |
37 | + --> | |
38 | + <update id="update" parameterType="AccesCtrlVO"> | |
39 | + UPDATE acs_cntrl_mng | |
40 | + SET cntrl_type = #{cntrlType} | |
41 | + , cntrl_ip = #{cntrlIp} | |
42 | + , cntrl_crs = #{cntrlCrs} | |
43 | + , use_yn = #{useYn} | |
44 | + , mdfr = #{mdfr} | |
45 | + , mdfcn_dt = NOW() | |
46 | + WHERE acs_cntrl_id = #{acsCntrlId} | |
47 | + </update> | |
48 | + | |
49 | + <sql id="selectAccesCtrl"> | |
50 | + SELECT acm.acs_cntrl_id | |
51 | + , acm.cntrl_type | |
52 | + , cm.cd_nm AS cntrl_type_nm | |
53 | + , acm.cntrl_ip | |
54 | + , acm.cntrl_crs | |
55 | + , acm.use_yn | |
56 | + , acm.rgtr | |
57 | + , TO_CHAR(acm.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
58 | + , acm.mdfr | |
59 | + , TO_CHAR(acm.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
60 | + FROM acs_cntrl_mng acm | |
61 | + LEFT JOIN cd_mng cm | |
62 | + ON acm.cntrl_type = cm.cd | |
63 | + </sql> | |
64 | + | |
65 | + <sql id="selectRequirement"> | |
66 | + <if test="searchText != null and searchText != ''"> | |
67 | + <choose> | |
68 | + <when test="searchType != null and searchType != ''"> | |
69 | + <if test="searchType == 'ip'"> | |
70 | + AND acm.cntrl_ip LIKE '%' || #{searchText} || '%' | |
71 | + </if> | |
72 | + <if test="searchType == 'crs'"> | |
73 | + AND acm.cntrl_crs LIKE '%' || #{searchText} || '%' | |
74 | + </if> | |
75 | + </when> | |
76 | + <otherwise> | |
77 | + AND ( | |
78 | + acm.cntrl_ip LIKE '%' || #{searchText} || '%' | |
79 | + OR | |
80 | + acm.cntrl_crs LIKE '%' || #{searchText} || '%' | |
81 | + ) | |
82 | + </otherwise> | |
83 | + </choose> | |
84 | + </if> | |
85 | + </sql> | |
86 | + <!-- | |
87 | + 작성자 : takensoft | |
88 | + 작성일 : 2024.04.12 | |
89 | + 내 용 : 접근 제어 조회(관리자 페이지용) | |
90 | + --> | |
91 | + <select id="findAll" parameterType="Pagination" resultType="AccesCtrlVO"> | |
92 | + <include refid="selectAccesCtrl" /> | |
93 | + WHERE acm.use_yn = 'Y' | |
94 | + <include refid="selectRequirement" /> | |
95 | + ORDER BY COALESCE(acm.mdfcn_dt, acm.reg_dt) DESC | |
96 | + LIMIT #{recordSize} OFFSET #{limitStart} | |
97 | + </select> | |
98 | + | |
99 | + <!-- | |
100 | + 작성자 : takensoft | |
101 | + 작성일 : 2024.04.18 | |
102 | + 내 용 : 접근제어 목록 갯수(관리자 페이지용) | |
103 | + --> | |
104 | + <select id="findAllCnt" parameterType="Pagination" resultType="Integer"> | |
105 | + SELECT COUNT(acm.acs_cntrl_id) | |
106 | + FROM acs_cntrl_mng acm | |
107 | + WHERE acm.use_yn = 'Y' | |
108 | + <include refid="selectRequirement" /> | |
109 | + </select> | |
110 | + | |
111 | + <!-- | |
112 | + 작성자 : takensoft | |
113 | + 작성일 : 2024.04.12 | |
114 | + 내 용 : 접근 제어 조회(시스템용 - 시큐리티 접근 제어) | |
115 | + --> | |
116 | + <select id="findAllAccesCtrlSecurity" parameterType="String" resultType="AccesCtrlVO"> | |
117 | + <include refid="selectAccesCtrl" /> | |
118 | + WHERE acm.use_yn = 'Y' | |
119 | + AND acm.cntrl_ip = #{ip} | |
120 | + </select> | |
121 | + | |
122 | + <!-- | |
123 | + 작성자 : takensoft | |
124 | + 작성일 : 2024.04.12 | |
125 | + 내 용 : 접근 제어 상세 조회 | |
126 | + --> | |
127 | + <select id="findByAccesCtrl" parameterType="Integer" resultType="AccesCtrlVO"> | |
128 | + <include refid="selectAccesCtrl" /> | |
129 | + WHERE acm.acs_cntrl_id = #{acsCntrlId} | |
130 | + AND acm.use_yn = 'Y' | |
131 | + </select> | |
132 | + | |
133 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/bbs/bbsCn-SQL.xml
... | ... | @@ -0,0 +1,515 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작 성 자 : 하석형 | |
5 | + 작 성 일 : 2024.05.09 | |
6 | + 내 용 : 게시판 내용 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.bbs.dao.BbsCnDAO"> | |
9 | + | |
10 | + <!-- | |
11 | + 작 성 자 : 하석형 | |
12 | + 작 성 일 : 2024.05.09 | |
13 | + 내 용 : (미사용)게시판 내용 아이디 중복 확인 | |
14 | + --> | |
15 | + <select id="bbsCnIdCheck" resultType="boolean"> | |
16 | + SELECT COUNT(bbs_id) | |
17 | + FROM bbs_cn | |
18 | + WHERE bbs_id = #{bbsId} | |
19 | + </select> | |
20 | + | |
21 | + <!-- | |
22 | + 작 성 자 : 하석형 | |
23 | + 작 성 일 : 2024.05.09 | |
24 | + 내 용 : 게시판 내용 등록 | |
25 | + --> | |
26 | + <insert id="save" parameterType="BbsCnVO"> | |
27 | + INSERT INTO bbs_cn ( | |
28 | + bbs_id | |
29 | + , bbs_mng_id | |
30 | + , bbs_nm | |
31 | + , bbs_cn | |
32 | + , inq_cnt | |
33 | + , atch_file_mng_id | |
34 | + , img_file_mng_id | |
35 | + , ntc_pst_yn | |
36 | + , ntc_bgng_dt | |
37 | + , ntc_end_dt | |
38 | + , prvt_pst_yn | |
39 | + , ans_bbs_id | |
40 | + , ans_cn | |
41 | + , ans_grd | |
42 | + , ans_sn | |
43 | + , ans_stts | |
44 | + , vdo_url | |
45 | + , use_yn | |
46 | + , rgtr | |
47 | + , reg_dt | |
48 | + ) VALUES ( | |
49 | + #{bbsId} | |
50 | + , #{bbsMngId} | |
51 | + , #{bbsNm} | |
52 | + , #{bbsCn} | |
53 | + , #{inqCnt} | |
54 | + , #{atchFileMngId} | |
55 | + , #{imgFileMngId} | |
56 | + , #{ntcPstYn} | |
57 | + , #{ntcBgngDt}::TIMESTAMP | |
58 | + , #{ntcEndDt}::TIMESTAMP | |
59 | + , #{prvtPstYn} | |
60 | + , #{ansBbsId} | |
61 | + , #{ansCn} | |
62 | + , #{ansGrd} | |
63 | + , #{ansSn} | |
64 | + , #{ansStts} | |
65 | + , #{vdoUrl} | |
66 | + , 'Y' | |
67 | + , #{rgtr} | |
68 | + , NOW() | |
69 | + ) | |
70 | + </insert> | |
71 | + | |
72 | + <!-- | |
73 | + 작 성 자 : 하석형 | |
74 | + 작 성 일 : 2024.05.09 | |
75 | + 내 용 : 게시판 내용 SQL | |
76 | + --> | |
77 | + <sql id="selectBbsCn"> | |
78 | + SELECT | |
79 | + bbs_id | |
80 | + , bbs_mng_id | |
81 | + , bbs_nm | |
82 | + , bbs_cn | |
83 | + , inq_cnt | |
84 | + , atch_file_mng_id | |
85 | + , img_file_mng_id | |
86 | + , ntc_pst_yn | |
87 | + , ntc_bgng_dt | |
88 | + , ntc_end_dt | |
89 | + , prvt_pst_yn | |
90 | + , ans_bbs_id | |
91 | + , ans_cn | |
92 | + , ans_grd | |
93 | + , ans_sn | |
94 | + , ans_stts | |
95 | + , answer | |
96 | + , mi3.mbr_nm AS answer_nm | |
97 | + , to_char(bc.ans_dt, 'YYYY-MM-DD HH24:MI') AS ans_dt | |
98 | + , vdo_url | |
99 | + , bc.use_yn | |
100 | + , bc.rgtr | |
101 | + , to_char(bc.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
102 | + , mi.mbr_nm AS rgtr_nm | |
103 | + , bc.mdfr | |
104 | + , to_char(bc.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
105 | + , mi2.mbr_nm AS mdfr_nm | |
106 | + FROM bbs_cn bc | |
107 | + LEFT JOIN | |
108 | + mbr_info mi | |
109 | + ON | |
110 | + bc.rgtr = mi.mbr_id | |
111 | + LEFT JOIN | |
112 | + mbr_info mi2 | |
113 | + ON | |
114 | + bc.mdfr = mi2.mbr_id | |
115 | + LEFT JOIN | |
116 | + mbr_info mi3 | |
117 | + ON | |
118 | + bc.mdfr = mi3.mbr_id | |
119 | + </sql> | |
120 | + | |
121 | + <!-- | |
122 | + 작 성 자 : 하석형 | |
123 | + 작 성 일 : 2024.05.09 | |
124 | + 내 용 : 게시판 내용 SQL | |
125 | + --> | |
126 | + <sql id="selectBbsCnDetail"> | |
127 | + SELECT | |
128 | + bbs_id | |
129 | + , bbs_mng_id | |
130 | + , bbs_nm | |
131 | + , bbs_cn | |
132 | + , inq_cnt | |
133 | + , atch_file_mng_id | |
134 | + , img_file_mng_id | |
135 | + , ntc_pst_yn | |
136 | + , ntc_bgng_dt | |
137 | + , ntc_end_dt | |
138 | + , prvt_pst_yn | |
139 | + , ans_bbs_id | |
140 | + , ans_cn | |
141 | + , ans_grd | |
142 | + , ans_sn | |
143 | + , ans_stts | |
144 | + , answer | |
145 | + , ans_dt | |
146 | + , vdo_url | |
147 | + , use_yn | |
148 | + , rgtr | |
149 | + , reg_dt | |
150 | + , mdfr | |
151 | + , mdfcn_dt | |
152 | + </sql> | |
153 | + | |
154 | + <!-- | |
155 | + 작 성 자 : 하석형 | |
156 | + 작 성 일 : 2024.05.09 | |
157 | + 내 용 : 게시판 내용 목록 조회 검색 조건 SQL | |
158 | + --> | |
159 | + <sql id="selectRequirement"> | |
160 | + <if test="searchText != null and searchText != ''"> | |
161 | + <choose> | |
162 | + <when test="searchType != null and searchType != ''"> | |
163 | + <if test="searchType == 'bbsNm'"> | |
164 | + AND bbs_nm LIKE '%' || #{searchText} || '%' | |
165 | + </if> | |
166 | + <if test="searchType == 'mbrNm'"> | |
167 | + AND mi.mbr_nm LIKE '%' || #{searchText} || '%' | |
168 | + </if> | |
169 | + <if test="searchType == 'bbsCn'"> | |
170 | + AND bbs_cn LIKE '%' || #{searchText} || '%' | |
171 | + </if> | |
172 | + <if test="searchType == 'ansCn'"> | |
173 | + AND ans_cn LIKE '%' || #{searchText} || '%' | |
174 | + </if> | |
175 | + </when> | |
176 | + <otherwise> | |
177 | + AND ( | |
178 | + bbs_nm LIKE '%' || #{searchText} || '%' | |
179 | + OR mi.mbr_nm LIKE '%' || #{searchText} || '%' | |
180 | + OR bbs_cn LIKE '%' || #{searchText} || '%' | |
181 | + OR ans_cn LIKE '%' || #{searchText} || '%' | |
182 | + ) | |
183 | + | |
184 | + </otherwise> | |
185 | + </choose> | |
186 | + </if> | |
187 | + </sql> | |
188 | + | |
189 | + <!-- | |
190 | + 작 성 자 : 하석형 | |
191 | + 작 성 일 : 2024.05.09 | |
192 | + 내 용 : 게시판 내용 목록 조회 개수 | |
193 | + --> | |
194 | + <select id="findAllCnt" parameterType="Pagination" resultType="Integer"> | |
195 | + SELECT COUNT(bbs_id) | |
196 | + FROM bbs_cn bc | |
197 | + LEFT JOIN | |
198 | + mbr_info mi | |
199 | + ON | |
200 | + bc.rgtr = mi.mbr_id | |
201 | + LEFT JOIN | |
202 | + mbr_info mi2 | |
203 | + ON | |
204 | + bc.mdfr = mi2.mbr_id | |
205 | + WHERE bc.use_yn = 'Y' | |
206 | + AND bc.bbs_mng_id = #{id} | |
207 | + <include refid="selectRequirement" /> | |
208 | + </select> | |
209 | + | |
210 | + <!-- | |
211 | + 작 성 자 : 하석형 | |
212 | + 작 성 일 : 2024.05.09 | |
213 | + 내 용 : 게시판 내용 목록 조회 | |
214 | + --> | |
215 | + <select id="findAllsub" parameterType="Pagination" resultType="BbsCnVO"> | |
216 | + <include refid="selectBbsCn" /> | |
217 | + WHERE bc.use_yn = 'Y' | |
218 | + AND bc.bbs_mng_id = #{id} | |
219 | + <include refid="selectRequirement" /> | |
220 | + ORDER BY bbs_id DESC | |
221 | + OFFSET #{limitStart} LIMIT #{recordSize} | |
222 | + </select> | |
223 | + | |
224 | + <select id="findAll" parameterType="Pagination" resultType="BbsCnVO"> | |
225 | + select bbs_id | |
226 | + , bbs_mng_id | |
227 | + , bbs_nm | |
228 | + , bbs_cn | |
229 | + , inq_cnt | |
230 | + , atch_file_mng_id | |
231 | + , img_file_mng_id | |
232 | + , ntc_pst_yn | |
233 | + , ntc_bgng_dt | |
234 | + , ntc_end_dt | |
235 | + , prvt_pst_yn | |
236 | + , ans_bbs_id | |
237 | + , ans_cn | |
238 | + , ans_grd | |
239 | + , ans_sn | |
240 | + , ans_stts | |
241 | + , answer | |
242 | + , mi3.mbr_nm AS answer_nm | |
243 | + , to_char(bc.ans_dt, 'YYYY-MM-DD HH24:MI') AS ans_dt | |
244 | + , vdo_url | |
245 | + , bc.use_yn | |
246 | + , bc.rgtr | |
247 | + , to_char(bc.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
248 | + , bc.mdfr | |
249 | + , to_char(bc.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
250 | + , bc.now_ntc_yn | |
251 | + , mi.mbr_nm AS rgtr_nm | |
252 | + , mi2.mbr_nm AS mdfr_nm | |
253 | + , cf.abslt_path AS abslt_path | |
254 | + from( SELECT bbs_id | |
255 | + , bbs_mng_id | |
256 | + , bbs_nm | |
257 | + , bbs_cn | |
258 | + , inq_cnt | |
259 | + , atch_file_mng_id | |
260 | + , img_file_mng_id | |
261 | + , ntc_pst_yn | |
262 | + , ntc_bgng_dt | |
263 | + , ntc_end_dt | |
264 | + , prvt_pst_yn | |
265 | + , ans_bbs_id | |
266 | + , ans_cn | |
267 | + , ans_grd | |
268 | + , ans_sn | |
269 | + , ans_stts | |
270 | + , answer | |
271 | + , ans_dt | |
272 | + , vdo_url | |
273 | + , use_yn | |
274 | + , rgtr | |
275 | + , reg_dt | |
276 | + , mdfr | |
277 | + , mdfcn_dt | |
278 | + , 'Y' as now_ntc_yn | |
279 | + from bbs_cn bc | |
280 | + WHERE use_yn = 'Y' | |
281 | + AND ntc_pst_yn = 'Y' | |
282 | + <![CDATA[ AND ntc_bgng_dt <= CURRENT_TIMESTAMP AND ntc_end_dt >= CURRENT_TIMESTAMP ]]> | |
283 | + union all | |
284 | + SELECT bbs_id | |
285 | + , bbs_mng_id | |
286 | + , bbs_nm | |
287 | + , bbs_cn | |
288 | + , inq_cnt | |
289 | + , atch_file_mng_id | |
290 | + , img_file_mng_id | |
291 | + , ntc_pst_yn | |
292 | + , ntc_bgng_dt | |
293 | + , ntc_end_dt | |
294 | + , prvt_pst_yn | |
295 | + , ans_bbs_id | |
296 | + , ans_cn | |
297 | + , ans_grd | |
298 | + , ans_sn | |
299 | + , ans_stts | |
300 | + , answer | |
301 | + , ans_dt | |
302 | + , vdo_url | |
303 | + , use_yn | |
304 | + , rgtr | |
305 | + , reg_dt | |
306 | + , mdfr | |
307 | + , mdfcn_dt | |
308 | + , 'N' as now_ntc_yn | |
309 | + from bbs_cn bc | |
310 | + WHERE use_yn = 'Y' | |
311 | + <![CDATA[ and (ntc_pst_yn ='N' or ntc_bgng_dt > CURRENT_TIMESTAMP or ntc_end_dt < CURRENT_TIMESTAMP) ]]> | |
312 | + )as bc | |
313 | + LEFT JOIN mbr_info mi | |
314 | + ON bc.rgtr = mi.mbr_id | |
315 | + LEFT JOIN mbr_info mi2 | |
316 | + ON bc.mdfr = mi2.mbr_id | |
317 | + LEFT JOIN mbr_info mi3 | |
318 | + ON bc.answer = mi3.mbr_id | |
319 | + LEFT JOIN ( | |
320 | + SELECT cf2.file_id | |
321 | + , cf2.file_mng_id | |
322 | + , cf2.abslt_path | |
323 | + FROM cmmn_file cf2 | |
324 | + INNER JOIN ( | |
325 | + SELECT file_mng_id | |
326 | + , MIN(file_id) AS min_id | |
327 | + FROM cmmn_file | |
328 | + GROUP BY file_mng_id | |
329 | + ) AS cf_min | |
330 | + ON cf2.file_id = cf_min.min_id | |
331 | + ) AS cf | |
332 | + ON bc.img_file_mng_id = cf.file_mng_id | |
333 | + WHERE bbs_mng_id = #{id} | |
334 | + <include refid="selectRequirement" /> | |
335 | + ORDER BY bc.now_ntc_yn DESC, bc.reg_dt DESC | |
336 | + OFFSET #{limitStart} LIMIT #{recordSize} | |
337 | + </select> | |
338 | + | |
339 | + <!-- | |
340 | + 작 성 자 : 하석형 | |
341 | + 작 성 일 : 2024.05.09 | |
342 | + 내 용 : 게시판 내용 상세 조회 | |
343 | + --> | |
344 | + <select id="findByBbsId" parameterType="String" resultType="BbsCnVO"> | |
345 | + <include refid="selectBbsCn" /> | |
346 | + WHERE bc.bbs_id = #{bbsId} | |
347 | + AND bc.use_yn = 'Y' | |
348 | + </select> | |
349 | + | |
350 | + <!-- | |
351 | + 작 성 자 : 하석형 | |
352 | + 작 성 일 : 2024.05.09 | |
353 | + 내 용 : 게시판 내용 수정 | |
354 | + --> | |
355 | + <update id="update" parameterType="HashMap"> | |
356 | + UPDATE | |
357 | + bbs_cn | |
358 | + SET | |
359 | + bbs_nm = #{bbsNm} | |
360 | + , bbs_cn = #{bbsCn} | |
361 | + , inq_cnt = #{inqCnt} | |
362 | + , atch_file_mng_id = #{atchFileMngId} | |
363 | + , img_file_mng_id = #{imgFileMngId} | |
364 | + , ntc_pst_yn = #{ntcPstYn} | |
365 | + , ntc_bgng_dt = #{ntcBgngDt}::TIMESTAMP | |
366 | + , ntc_end_dt = #{ntcEndDt}::TIMESTAMP | |
367 | + , prvt_pst_yn = #{prvtPstYn} | |
368 | + , ans_bbs_id = #{ansBbsId} | |
369 | + , ans_cn = #{ansCn} | |
370 | + , ans_grd = #{ansGrd} | |
371 | + , ans_sn = #{ansSn} | |
372 | + , ans_stts = #{ansStts} | |
373 | + , vdo_url = #{vdoUrl} | |
374 | + , use_yn = #{useYn} | |
375 | + , mdfr = #{mdfr} | |
376 | + , mdfcn_dt = NOW() | |
377 | + WHERE bbs_id = #{bbsId} | |
378 | + </update> | |
379 | + | |
380 | + <!-- | |
381 | + 작 성 자 : 하석형 | |
382 | + 작 성 일 : 2024.05.09 | |
383 | + 내 용 : 게시판 내용 삭제 | |
384 | + --> | |
385 | + <update id="delete" parameterType="BbsCnVO"> | |
386 | + UPDATE | |
387 | + bbs_cn | |
388 | + SET | |
389 | + use_yn = 'N' | |
390 | + , mdfr = #{mdfr} | |
391 | + , mdfcn_dt = NOW() | |
392 | + WHERE bbs_id = #{bbsId} | |
393 | + </update> | |
394 | + <!-- | |
395 | + 작 성 자 : 방선주 | |
396 | + 작 성 일 : 2024.05.22 | |
397 | + 내 용 : 조회수 증가 로직 | |
398 | + --> | |
399 | + <update id="updateVwCnt" parameterType="String"> | |
400 | + UPDATE | |
401 | + bbs_cn | |
402 | + SET | |
403 | + inq_cnt = inq_cnt + 1 | |
404 | + WHERE bbs_id = #{bbsId} | |
405 | + </update> | |
406 | + | |
407 | + <!-- | |
408 | + 작 성 자 : 방선주 | |
409 | + 작 성 일 : 2024.05.23 | |
410 | + 내 용 : 이전글 | |
411 | + --> | |
412 | + <select id="findPrevBbsCn" parameterType="BbsCnVO" resultType="BbsCnVO"> | |
413 | + <include refid="selectBbsCnDetail"/> | |
414 | + FROM bbs_cn | |
415 | + WHERE use_yn = 'Y' | |
416 | + AND bbs_mng_id = #{bbsMngId} | |
417 | + <![CDATA[ AND bbs_id < #{bbsId} ]]> | |
418 | + ORDER BY bbs_id DESC | |
419 | + LIMIT 1 | |
420 | + </select> | |
421 | + | |
422 | + <!-- | |
423 | + 작 성 자 : 방선주 | |
424 | + 작 성 일 : 2024.05.23 | |
425 | + 내 용 : 다음글 | |
426 | + --> | |
427 | + <select id="findNextBbsCn" parameterType="BbsCnVO" resultType="BbsCnVO"> | |
428 | + <include refid="selectBbsCnDetail"/> | |
429 | + FROM bbs_cn | |
430 | + WHERE use_yn = 'Y' | |
431 | + AND bbs_mng_id = #{bbsMngId} | |
432 | + <![CDATA[ AND bbs_id > #{bbsId} ]]> | |
433 | + ORDER BY bbs_id ASC | |
434 | + LIMIT 1 | |
435 | + </select> | |
436 | + | |
437 | + <!-- | |
438 | + 작 성 자 : 박정하 | |
439 | + 작 성 일 : 2024.05.28 | |
440 | + 내 용 : 게시글 최신 목록 조회 (최신글 5건 출력) | |
441 | + --> | |
442 | + <select id="selectBbsCnListByNew" resultType="HashMap"> | |
443 | + SELECT bc.bbs_mng_id as mng_id | |
444 | + , bc.bbs_id as id | |
445 | + , btm.bbs_type AS type | |
446 | + , bm.bbs_nm AS nm | |
447 | + , bc.bbs_nm AS ttl | |
448 | + , bc.bbs_cn AS cn | |
449 | + , bc.ans_cn AS ans | |
450 | + , (SELECT mi.mbr_nm FROM mbr_info AS mi WHERE mi.mbr_id = bc.rgtr) AS writer | |
451 | + , TO_CHAR(bc.reg_dt, 'YYYY-MM-DD HH24:MI') AS dt | |
452 | + FROM bbs_cn AS bc | |
453 | + LEFT JOIN bbs_mng AS bm | |
454 | + ON bc.bbs_mng_id = bm.bbs_mng_id | |
455 | + AND bm.use_yn = 'Y' | |
456 | + LEFT JOIN bbs_type_mng AS btm | |
457 | + ON bm.bbs_type_id = btm.bbs_type_id | |
458 | + AND btm.use_yn = 'Y' | |
459 | + WHERE bc.use_yn = 'Y' | |
460 | + ORDER BY bc.reg_dt DESC | |
461 | + LIMIT 5 | |
462 | + </select> | |
463 | + | |
464 | + <!-- | |
465 | + 작 성 자 : 방선주 | |
466 | + 작 성 일 : 2024.06.04 | |
467 | + 내 용 : 질의형 게시판 답변 | |
468 | + --> | |
469 | + <update id="saveAnswer" parameterType="BbsCnVO"> | |
470 | + UPDATE | |
471 | + bbs_cn | |
472 | + SET ans_cn = #{ansCn} | |
473 | + , ans_stts = #{ansStts} | |
474 | + , answer = #{answer} | |
475 | + , ans_dt = now() | |
476 | + WHERE bbs_id = #{bbsId}; | |
477 | + </update> | |
478 | + | |
479 | + <!-- | |
480 | + 작 성 자 : 방선주 | |
481 | + 작 성 일 : 2024.06.13 | |
482 | + 내 용 : 최근공지 5개 조회 | |
483 | + --> | |
484 | + <select id="findFiveNotice" resultType="BbsCnVO"> | |
485 | + SELECT bbs_id | |
486 | + , bbs_mng_id | |
487 | + , bbs_nm | |
488 | + , bbs_cn | |
489 | + , inq_cnt | |
490 | + , atch_file_mng_id | |
491 | + , img_file_mng_id | |
492 | + , ntc_pst_yn | |
493 | + , ntc_bgng_dt | |
494 | + , ntc_end_dt | |
495 | + , prvt_pst_yn | |
496 | + , ans_bbs_id | |
497 | + , ans_cn | |
498 | + , ans_grd | |
499 | + , ans_sn | |
500 | + , ans_stts | |
501 | + , answer | |
502 | + , ans_dt | |
503 | + , vdo_url | |
504 | + , use_yn | |
505 | + , rgtr | |
506 | + , TO_CHAR(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
507 | + , mdfr | |
508 | + , TO_CHAR(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
509 | + FROM bbs_cn | |
510 | + WHERE use_yn = 'Y' | |
511 | + AND bbs_mng_id = #{bbsMngId} | |
512 | + ORDER BY bbs_id DESC | |
513 | + LIMIT 5 | |
514 | + </select> | |
515 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/bbs/bbsMng-SQL.xml
... | ... | @@ -0,0 +1,336 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : 박정하 | |
5 | + 작성일 : 2024.05.08 | |
6 | + 내 용 : 게시판 관리 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.bbs.dao.BbsMngDAO"> | |
9 | + <!-- 게시판 관리 resultMap --> | |
10 | + <resultMap id="bbsMngMap" type="BbsMngVO"> | |
11 | + <result property="bbsMngId" column="bbs_mng_id" /> | |
12 | + <result property="bbsTypeId" column="bbs_type_id" /> | |
13 | + <result property="bbsNm" column="bbs_nm" /> | |
14 | + <result property="bbsUpInfo" column="bbs_up_info" /> | |
15 | + <result property="bbsExpln" column="bbs_expln" /> | |
16 | + <result property="artclCnt" column="artcl_cnt" /> | |
17 | + <result property="atchFileUseYn" column="atch_file_use_yn" /> | |
18 | + <result property="ntcUseYn" column="ntc_use_yn" /> | |
19 | + <result property="fileExtnNm" column="file_extn_nm" /> | |
20 | + <result property="fileSzLmt" column="file_sz_lmt" /> | |
21 | + <result property="prvtPstUseYn" column="prvt_pst_use_yn" /> | |
22 | + <result property="bfrAftrPstUseYn" column="bfr_aftr_pst_use_yn" /> | |
23 | + <result property="useYn" column="use_yn" /> | |
24 | + <result property="rgtr" column="rgtr" /> | |
25 | + <result property="regDt" column="reg_dt" /> | |
26 | + <result property="mdfr" column="mdfr" /> | |
27 | + <result property="mdfcnDt" column="mdfcn_dt" /> | |
28 | + <result property="cd" column="cd" /> | |
29 | + </resultMap> | |
30 | + | |
31 | + <!-- | |
32 | + 작 성 자 : 박정하 | |
33 | + 작 성 일 : 2024.05.08 | |
34 | + 내 용 : 게시판 관리 아이디 중복 확인 | |
35 | + --> | |
36 | + <select id="bbsMngIdCheck" resultType="boolean"> | |
37 | + SELECT COUNT(bbs_mng_id) | |
38 | + FROM bbs_mng | |
39 | + WHERE bbs_mng_id = #{bbsMngId} | |
40 | + </select> | |
41 | + | |
42 | + <!-- | |
43 | + 작 성 자 : 하석형 | |
44 | + 작 성 일 : 2024.05.10 | |
45 | + 내 용 : 게시판 관리 등록 | |
46 | + --> | |
47 | + <insert id="save" parameterType="BbsMngVO"> | |
48 | + INSERT INTO bbs_mng ( | |
49 | + bbs_mng_id | |
50 | + , bbs_type_id | |
51 | + , bbs_nm | |
52 | + , bbs_up_info | |
53 | + , bbs_expln | |
54 | + , artcl_cnt | |
55 | + , atch_file_use_yn | |
56 | + , ntc_use_yn | |
57 | + , file_extn_nm | |
58 | + , file_sz_lmt | |
59 | + , prvt_pst_use_yn | |
60 | + , bfr_aftr_pst_use_yn | |
61 | + , cmnt_use_yn | |
62 | + , use_yn | |
63 | + , rgtr | |
64 | + , reg_dt | |
65 | + , cd | |
66 | + ) VALUES ( | |
67 | + #{bbsMngId} | |
68 | + , #{bbsTypeId} | |
69 | + , #{bbsNm} | |
70 | + , #{bbsUpInfo} | |
71 | + , #{bbsExpln} | |
72 | + , #{artclCnt} | |
73 | + , #{atchFileUseYn} | |
74 | + , #{ntcUseYn} | |
75 | + , #{fileExtnNm} | |
76 | + , #{fileSzLmt} | |
77 | + , #{prvtPstUseYn} | |
78 | + , #{bfrAftrPstUseYn} | |
79 | + , #{cmntUseYn} | |
80 | + , 'Y' | |
81 | + , #{rgtr} | |
82 | + , NOW() | |
83 | + , #{cd} | |
84 | + ) | |
85 | + </insert> | |
86 | + | |
87 | + <sql id="selectBbsMng"> | |
88 | + SELECT | |
89 | + bm.bbs_mng_id | |
90 | + , bm.bbs_type_id | |
91 | + , bbs_nm | |
92 | + , bbs_up_info | |
93 | + , bbs_expln | |
94 | + , artcl_cnt | |
95 | + , atch_file_use_yn | |
96 | + , ntc_use_yn | |
97 | + , file_extn_nm | |
98 | + , file_sz_lmt | |
99 | + , prvt_pst_use_yn | |
100 | + , bfr_aftr_pst_use_yn | |
101 | + , cmnt_use_yn | |
102 | + , bm.use_yn | |
103 | + , bm.rgtr | |
104 | + , to_char(bm.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
105 | + , bm.mdfr | |
106 | + , to_char(bm.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
107 | + , cd | |
108 | + | |
109 | + </sql> | |
110 | + | |
111 | + <sql id="selectRequirement"> | |
112 | + <if test="searchText != null and searchText != ''"> | |
113 | + <choose> | |
114 | + <when test="searchType != null and searchType != ''"> | |
115 | + <if test="searchType == 'bbsTypeId'"> | |
116 | + AND bbs_type_id LIKE '%' || #{searchText} || '%' | |
117 | + </if> | |
118 | + <if test="searchType == 'bbsNm'"> | |
119 | + AND bbs_nm LIKE '%' || #{searchText} || '%' | |
120 | + </if> | |
121 | + </when> | |
122 | + <otherwise> | |
123 | + AND ( | |
124 | + bbs_type_id LIKE '%' || #{searchText} || '%' | |
125 | + OR | |
126 | + bbs_nm LIKE '%' || #{searchText} || '%' | |
127 | + ) | |
128 | + </otherwise> | |
129 | + </choose> | |
130 | + </if> | |
131 | + </sql> | |
132 | + | |
133 | + <!-- | |
134 | + 작 성 자 : 하석형 | |
135 | + 작 성 일 : 2024.05.10 | |
136 | + 내 용 : 게시판 관리 목록 조회 개수 | |
137 | + --> | |
138 | + <select id="findAllCnt" parameterType="Pagination" resultType="int"> | |
139 | + SELECT COUNT(bbs_mng_id) | |
140 | + FROM bbs_mng | |
141 | + WHERE use_yn = 'Y' | |
142 | + <include refid="selectRequirement" /> | |
143 | + </select> | |
144 | + | |
145 | + <!-- | |
146 | + 작 성 자 : 하석형 | |
147 | + 작 성 일 : 2024.05.10 | |
148 | + 내 용 : 게시판 관리 목록 조회 | |
149 | + --> | |
150 | + <select id="findAll" parameterType="Pagination" resultType="BbsMngVO"> | |
151 | + <include refid="selectBbsMng" /> | |
152 | + , bc.bbs_cn_cnt | |
153 | + FROM bbs_mng bm | |
154 | + LEFT JOIN ( | |
155 | + SELECT bbs_mng_id, count(bbs_mng_id) as bbs_cn_cnt | |
156 | + FROM bbs_cn | |
157 | + WHERE use_yn = 'Y' | |
158 | + GROUP BY bbs_mng_id | |
159 | + ) bc | |
160 | + ON bm.bbs_mng_id = bc.bbs_mng_id | |
161 | + WHERE bm.use_yn = 'Y' | |
162 | + <include refid="selectRequirement" /> | |
163 | + ORDER BY bbs_mng_id DESC | |
164 | + OFFSET #{limitStart} LIMIT #{recordSize} | |
165 | + </select> | |
166 | + | |
167 | + <!-- | |
168 | + 작 성 자 : 박정하 | |
169 | + 작 성 일 : 2024.05.16 | |
170 | + 내 용 : 게시판 관리 목록 조회 (메뉴 관리용) | |
171 | + --> | |
172 | + <select id="findAllByMenuMng" resultType="BbsMngVO"> | |
173 | + <include refid="selectBbsMng" /> | |
174 | + FROM bbs_mng bm | |
175 | + WHERE bm.use_yn = 'Y' | |
176 | + ORDER BY bbs_mng_id DESC | |
177 | + </select> | |
178 | + | |
179 | + <!-- | |
180 | + 작 성 자 : 하석형 | |
181 | + 작 성 일 : 2024.05.08 | |
182 | + 내 용 : 게시판 관리 상세 조회 | |
183 | + --> | |
184 | + <select id="findByBbsMngId" parameterType="String" resultType="BbsMngVO"> | |
185 | + <include refid="selectBbsMng" /> | |
186 | + FROM bbs_mng bm | |
187 | + WHERE bm.bbs_mng_id = #{bbsMngId} | |
188 | + AND bm.use_yn = 'Y' | |
189 | + </select> | |
190 | + | |
191 | + <!-- | |
192 | + 작 성 자 : 하석형 | |
193 | + 작 성 일 : 2024.05.09 | |
194 | + 내 용 : 게시판 관리 수정 | |
195 | + --> | |
196 | + <update id="update" parameterType="BbsMngVO"> | |
197 | + UPDATE | |
198 | + bbs_mng | |
199 | + SET | |
200 | + bbs_type_id = #{bbsTypeId} | |
201 | + , bbs_nm = #{bbsNm} | |
202 | + , bbs_up_info = #{bbsUpInfo} | |
203 | + , bbs_expln = #{bbsExpln} | |
204 | + , artcl_cnt = #{artclCnt} | |
205 | + , atch_file_use_yn = #{atchFileUseYn} | |
206 | + , ntc_use_yn = #{ntcUseYn} | |
207 | + , file_extn_nm = #{fileExtnNm} | |
208 | + , file_sz_lmt = #{fileSzLmt} | |
209 | + , prvt_pst_use_yn = #{prvtPstUseYn} | |
210 | + , bfr_aftr_pst_use_yn = #{bfrAftrPstUseYn} | |
211 | + , cmnt_use_yn = #{cmntUseYn} | |
212 | + , use_yn = #{useYn} | |
213 | + , mdfr = #{mdfr} | |
214 | + , mdfcn_dt = NOW() | |
215 | + , cd = #{cd} | |
216 | + WHERE bbs_mng_id = #{bbsMngId} | |
217 | + </update> | |
218 | + | |
219 | + <!-- | |
220 | + 작 성 자 : 하석형 | |
221 | + 작 성 일 : 2024.05.09 | |
222 | + 내 용 : 게시판 관리 삭제 | |
223 | + --> | |
224 | + <update id="delete" parameterType="BbsMngVO"> | |
225 | + UPDATE | |
226 | + bbs_mng | |
227 | + SET | |
228 | + use_yn = 'N' | |
229 | + , mdfr = #{mdfr} | |
230 | + , mdfcn_dt = NOW() | |
231 | + WHERE bbs_mng_id = #{bbsMngId} | |
232 | + </update> | |
233 | + | |
234 | + | |
235 | + | |
236 | + <!-- ********************************* 게시판 라우터 (시작) ********************************* --> | |
237 | + <!-- | |
238 | + 작 성 자 : 하석형 | |
239 | + 작 성 일 : 2024.05.13 | |
240 | + 내 용 : 게시판 라우터 등록 | |
241 | + --> | |
242 | + <insert id="saveBbsRouter" parameterType="BbsRouterVO"> | |
243 | + INSERT INTO bbs_router ( | |
244 | + bbs_router_id | |
245 | + , bbs_mng_id | |
246 | + , bbs_korn_nm | |
247 | + , bbs_eng_nm | |
248 | + , page_crs | |
249 | + , mngr_page_crs | |
250 | + , compn_crs | |
251 | + , expsr_yn | |
252 | + , use_yn | |
253 | + , reg_dt | |
254 | + ) VALUES ( | |
255 | + #{bbsRouterId} | |
256 | + , #{bbsMngId} | |
257 | + , #{bbsKornNm} | |
258 | + , #{bbsEngNm} | |
259 | + , #{pageCrs} | |
260 | + , #{mngrPageCrs} | |
261 | + , #{compnCrs} | |
262 | + , #{expsrYn} | |
263 | + , 'Y' | |
264 | + , NOW() | |
265 | + ) | |
266 | + </insert> | |
267 | + | |
268 | + <!-- | |
269 | + 작 성 자 : 하석형 | |
270 | + 작 성 일 : 2024.05.13 | |
271 | + 내 용 : 게시판 라우터 수정 | |
272 | + --> | |
273 | + <update id="updateBbsRouter" parameterType="BbsRouterVO"> | |
274 | + UPDATE | |
275 | + bbs_router | |
276 | + SET | |
277 | + use_yn = 'N' | |
278 | + WHERE bbs_mng_id = #{bbsMngId} | |
279 | + </update> | |
280 | + | |
281 | + <!-- | |
282 | + 작 성 자 : 하석형 | |
283 | + 작 성 일 : 2024.05.13 | |
284 | + 내 용 : 게시판 라우터 삭제 | |
285 | + --> | |
286 | + <delete id="deleteBbsRouter" parameterType="String"> | |
287 | + DELETE | |
288 | + FROM bbs_router | |
289 | + WHERE bbs_mng_id = #{bbsMngId} | |
290 | + </delete> | |
291 | + | |
292 | + <!-- | |
293 | + 작 성 자 : 방선주 | |
294 | + 작 성 일 : 2024.06.04 | |
295 | + 내 용 : 게시판 라우터 목록 조회 | |
296 | + --> | |
297 | + <select id="findAllBbsRouter" parameterType="String" resultType="BbsRouterVO"> | |
298 | + SELECT bbs_router_id | |
299 | + , bbs_mng_id | |
300 | + , bbs_korn_nm | |
301 | + , bbs_eng_nm | |
302 | + , page_crs | |
303 | + , compn_crs | |
304 | + , expsr_yn | |
305 | + , use_yn | |
306 | + , reg_dt | |
307 | + , mngr_page_crs | |
308 | + FROM bbs_router | |
309 | + WHERE bbs_mng_id = #{bbsMngId} | |
310 | + </select> | |
311 | + | |
312 | + <!-- | |
313 | + 작 성 자 : 방선주 | |
314 | + 작 성 일 : 2024.06.05 | |
315 | + 내 용 : 게시판 라우터 crs 수정 | |
316 | + --> | |
317 | + <update id="updateCrs" parameterType="BbsRouterVO"> | |
318 | + UPDATE | |
319 | + bbs_router | |
320 | + SET | |
321 | + page_crs = #{pageCrs} | |
322 | + WHERE bbs_router_id = #{bbsRouterId} | |
323 | + </update> | |
324 | + <!-- ********************************* 게시판 라우터 (종료) ********************************* --> | |
325 | + | |
326 | + <!-- | |
327 | + 작 성 자 : 박정하 | |
328 | + 작 성 일 : 2024.07.18 | |
329 | + 내 용 : 게시판 관리 목록 조회 개수 (접속 통계용) | |
330 | + --> | |
331 | + <select id="findAllCntNotPagination" resultType="int"> | |
332 | + SELECT COUNT(bbs_mng_id) | |
333 | + FROM bbs_mng | |
334 | + WHERE use_yn = 'Y' | |
335 | + </select> | |
336 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/bbs/bbsRouter-SQL.xml
... | ... | @@ -0,0 +1,79 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작 성 자 : 하석형 | |
5 | + 작 성 일 : 2024.05.09 | |
6 | + 내 용 : 게시판 내용 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.bbs.dao.BbsRouterDAO"> | |
9 | + | |
10 | + <!-- 콘텐츠 조회(라우터 조회용 - 권한포함) --> | |
11 | + <resultMap id="bbsRouterAuthrtMap" type="ContsAuthrtVO"> | |
12 | +<!-- <result property="contsId" column="bbs_router_id" />--> | |
13 | + <result property="contsId" column="bbs_mng_id" /> | |
14 | +<!-- <result property="menuId" column="menu_id" />--> | |
15 | + <result property="contsKornNm" column="bbs_korn_nm" /> | |
16 | + <result property="contsEngNm" column="bbs_eng_nm" /> | |
17 | + <result property="pageCrs" column="page_crs" /> | |
18 | + <result property="compnCrs" column="compn_crs" /> | |
19 | + <collection property="authrtList" ofType="MenuAuthorVO"> | |
20 | + <result property="authrtCd" column="authrt_cd" /> | |
21 | + <result property="menuId" column="menu_id" /> | |
22 | + <result property="inqAuthrt" column="inq_authrt" /> | |
23 | + <result property="regAuthrt" column="reg_authrt" /> | |
24 | + <result property="mdfcnAuthrt" column="mdfcn_authrt" /> | |
25 | + <result property="delAuthrt" column="del_authrt" /> | |
26 | + <result property="fileDwnldAuthrt" column="file_dwnld_authrt" /> | |
27 | + </collection> | |
28 | + </resultMap> | |
29 | + | |
30 | + <!-- | |
31 | + 작 성 자 : takensoft | |
32 | + 작 성 일 : 2024.05.16 | |
33 | + 내 용 : 게시판 라우터 조회(권한 포함) | |
34 | + --> | |
35 | + <select id="findByBbsRouterAuthrt" resultMap="bbsRouterAuthrtMap"> | |
36 | + SELECT A.bbs_mng_id | |
37 | + , A.bbs_korn_nm | |
38 | + , A.bbs_eng_nm | |
39 | + , A.page_crs | |
40 | + , A.compn_crs | |
41 | + , mi.menu_id | |
42 | + , mai.authrt_cd | |
43 | + , mai.inq_authrt | |
44 | + , mai.reg_authrt | |
45 | + , mai.mdfcn_authrt | |
46 | + , mai.del_authrt | |
47 | + , mai.file_dwnld_authrt | |
48 | + FROM ( SELECT br.bbs_router_id | |
49 | + , br.bbs_mng_id | |
50 | + , br.bbs_korn_nm | |
51 | + , br.bbs_eng_nm | |
52 | + , br.page_crs | |
53 | + , br.compn_crs | |
54 | + , br.use_yn | |
55 | + FROM bbs_router br | |
56 | + LEFT JOIN bbs_mng bm | |
57 | + ON br.bbs_mng_id = bm.bbs_mng_id | |
58 | + WHERE bm.use_yn = 'Y' | |
59 | + | |
60 | + UNION ALL | |
61 | + | |
62 | + SELECT br.bbs_router_id | |
63 | + , br.bbs_mng_id | |
64 | + , br.bbs_korn_nm | |
65 | + , concat('adm', br.bbs_eng_nm) AS bbs_eng_nm | |
66 | + , br.mngr_page_crs AS page_crs | |
67 | + , br.compn_crs | |
68 | + , br.use_yn | |
69 | + FROM bbs_router br | |
70 | + LEFT JOIN bbs_mng bm | |
71 | + ON br.bbs_mng_id = bm.bbs_mng_id | |
72 | + WHERE bm.use_yn = 'Y' | |
73 | + ) A | |
74 | + LEFT JOIN menu_info mi | |
75 | + ON A.bbs_mng_id = mi.menu_type_ctgry | |
76 | + LEFT JOIN menu_authrt_info mai | |
77 | + ON mi.menu_id = mai.menu_id | |
78 | + </select> | |
79 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/bbs/bbsTypeMng-SQL.xml
... | ... | @@ -0,0 +1,97 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : 박정하 | |
5 | + 작성일 : 2024.05.08 | |
6 | + 내 용 : 게시판 관리 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.bbs.dao.BbsTypeMngDAO"> | |
9 | + <!-- | |
10 | + 작 성 자 : 박정하 | |
11 | + 작 성 일 : 2024.05.08 | |
12 | + 내 용 : 게시판 유형 관리 등록 | |
13 | + --> | |
14 | + <insert id="insertBbsTypeMng" parameterType="BbsTypeMngVO"> | |
15 | + INSERT INTO bbs_type_mng ( | |
16 | + bbs_type_id | |
17 | + , bbs_type_korn_nm | |
18 | + , bbs_type_eng_nm | |
19 | + , bbs_type | |
20 | + , page_crs | |
21 | + , compn_crs | |
22 | + , expsr_yn | |
23 | + , use_yn | |
24 | + , rgtr | |
25 | + , reg_dt | |
26 | + ) VALUES ( | |
27 | + #{bbsTypeId} | |
28 | + , #{bbsTypeKornNm} | |
29 | + , #{bbsTypeEngNm} | |
30 | + , #{bbsType} | |
31 | + , #{pageCrs} | |
32 | + , #{compnCrs} | |
33 | + , #{expsrYn} | |
34 | + , 'Y' | |
35 | + , #{rgtr} | |
36 | + , NOW() | |
37 | + ) | |
38 | + </insert> | |
39 | + | |
40 | + <sql id="findBbsTypeMng"> | |
41 | + SELECT bbs_type_id | |
42 | + , bbs_type_korn_nm | |
43 | + , bbs_type_eng_nm | |
44 | + , bbs_type | |
45 | + , page_crs | |
46 | + , compn_crs | |
47 | + , expsr_yn | |
48 | + , use_yn | |
49 | + , rgtr | |
50 | + , TO_CHAR(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
51 | + , mdfr | |
52 | + , TO_CHAR(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
53 | + FROM bbs_type_mng | |
54 | + </sql> | |
55 | + | |
56 | + <!-- | |
57 | + 작 성 자 : 하석형 | |
58 | + 작 성 일 : 2024.05.13 | |
59 | + 내 용 : 게시판 유형 관리 목록 조회 | |
60 | + --> | |
61 | + <select id="findAll" parameterType="BbsTypeMngVO" resultType="BbsTypeMngVO"> | |
62 | + <include refid="findBbsTypeMng" /> | |
63 | + WHERE use_yn = 'Y' | |
64 | + <choose> | |
65 | + <when test="bbsType != null and bbsType != ''"> | |
66 | + AND | |
67 | + bbs_type = #{bbsType} | |
68 | + </when> | |
69 | + <otherwise> | |
70 | + AND | |
71 | + expsr_yn = #{expsrYn} | |
72 | + </otherwise> | |
73 | + </choose> | |
74 | + </select> | |
75 | + | |
76 | + <!-- | |
77 | + 작 성 자 : 하석형 | |
78 | + 작 성 일 : 2024.05.13 | |
79 | + 내 용 : 게시판 유형 관리 상세 조회 | |
80 | + --> | |
81 | + <select id="findByBbsTypeId" parameterType="String" resultType="BbsTypeMngVO"> | |
82 | + SELECT bbs_type_id | |
83 | + , bbs_type_korn_nm | |
84 | + , bbs_type_eng_nm | |
85 | + , bbs_type | |
86 | + , page_crs | |
87 | + , compn_crs | |
88 | + , expsr_yn | |
89 | + , use_yn | |
90 | + , rgtr | |
91 | + , TO_CHAR(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
92 | + , mdfr | |
93 | + , TO_CHAR(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
94 | + FROM bbs_type_mng | |
95 | + WHERE bbs_type_id = #{bbsTypeId} | |
96 | + </select> | |
97 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/bbs/cmnt-SQL.xml
... | ... | @@ -0,0 +1,158 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : 방선주 | |
5 | + 작성일 : 2024.05.27 | |
6 | + 내 용 : 게시판 댓글 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.bbs.dao.CmntDAO"> | |
9 | + <resultMap id="CmntMap" type="CmntVO"> | |
10 | + <result property="cmntId" column="cmnt_id"/> | |
11 | + <result property="bbsId" column="bbs_id"/> | |
12 | + <result property="upCmntId" column="up_cmnt_id"/> | |
13 | + <result property="cmntCn" column="cmnt_cn"/> | |
14 | + <result property="cmntGrd" column="cmnt_grd"/> | |
15 | + <result property="cmntSn" column="cmnt_sn"/> | |
16 | + <result property="useYn" column="use_yn"/> | |
17 | + <result property="rgtr" column="rgtr"/> | |
18 | + <result property="regDt" column="reg_dt"/> | |
19 | + <result property="mdfr" column="mdfr"/> | |
20 | + <result property="mdfcnDt" column="mdfcn_dt"/> | |
21 | + </resultMap> | |
22 | + | |
23 | + <!-- | |
24 | + 작성자 : 방선주 | |
25 | + 작성일 : 2024.05.27 | |
26 | + 내 용 : 게시판 댓글 등록 | |
27 | + --> | |
28 | + <insert id="saveCmnt" parameterType="CmntVO"> | |
29 | + INSERT INTO cmnt( | |
30 | + bbs_id | |
31 | + , up_cmnt_id | |
32 | + , cmnt_cn | |
33 | + , cmnt_grd | |
34 | + , cmnt_sn | |
35 | + , use_yn | |
36 | + , rgtr | |
37 | + , reg_dt | |
38 | + ) VALUES ( | |
39 | + #{bbsId} | |
40 | + , #{upCmntId} | |
41 | + , #{cmntCn} | |
42 | + , #{cmntGrd} | |
43 | + , #{cmntSn} | |
44 | + , 'Y' | |
45 | + , #{rgtr} | |
46 | + , now() | |
47 | + ); | |
48 | + </insert> | |
49 | + | |
50 | + <!-- | |
51 | + 작성자 : 방선주 | |
52 | + 작성일 : 2024.05.27 | |
53 | + 내 용 : 부모가 같은 댓글 개수 조회 | |
54 | + --> | |
55 | + <select id="getCmntCount" parameterType="CmntVO" resultType="Integer"> | |
56 | + SELECT COUNT(*) | |
57 | + FROM cmnt | |
58 | + WHERE bbs_id = #{bbsId} | |
59 | + <if test="upCmntId != null"> | |
60 | + AND up_cmnt_id = #{upCmntId} | |
61 | + </if> | |
62 | + AND use_yn = 'Y' | |
63 | + </select> | |
64 | + <!-- | |
65 | + 작성자 : 방선주 | |
66 | + 작성일 : 2024.05.27 | |
67 | + 내 용 : 부모의 정보 조회 | |
68 | + --> | |
69 | + <select id="findParentCmnt" parameterType="int" resultMap="CmntMap"> | |
70 | + SELECT cmnt_id | |
71 | + , bbs_id | |
72 | + , up_cmnt_id | |
73 | + , cmnt_cn | |
74 | + , cmnt_grd | |
75 | + , cmnt_sn | |
76 | + , use_yn | |
77 | + , rgtr | |
78 | + , TO_CHAR(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
79 | + , mdfr | |
80 | + , TO_CHAR(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
81 | + FROM cmnt | |
82 | + WHERE cmnt_id = #{upCmntId} | |
83 | + </select> | |
84 | + | |
85 | + <!-- | |
86 | + 작성자 : 방선주 | |
87 | + 작성일 : 2024.05.27 | |
88 | + 내 용 : 댓글 조회 | |
89 | + --> | |
90 | + <select id="findCmntList" parameterType="String" resultMap="CmntMap"> | |
91 | + WITH RECURSIVE CommentHierarchy AS ( | |
92 | + SELECT cm1.cmnt_id | |
93 | + , cm1.bbs_id | |
94 | + , cm1.up_cmnt_id | |
95 | + , cm1.cmnt_cn | |
96 | + , cm1.cmnt_grd | |
97 | + , cm1.cmnt_sn | |
98 | + , cm1.use_yn | |
99 | + , cm1.rgtr | |
100 | + , TO_CHAR(cm1.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
101 | + , rgtrInfo.mbr_nm AS rgtrNm | |
102 | + , cm1.mdfr | |
103 | + , TO_CHAR(cm1.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
104 | + , mdfrInfo.mbr_nm AS mdfrNm | |
105 | + FROM cmnt cm1 | |
106 | + LEFT JOIN mbr_info rgtrInfo ON cm1.rgtr = rgtrInfo.mbr_id | |
107 | + LEFT JOIN mbr_info mdfrInfo ON cm1.mdfr = mdfrInfo.mbr_id | |
108 | + WHERE cm1.bbs_id = #{bbsId} | |
109 | + AND cm1.up_cmnt_id = 0 | |
110 | + UNION ALL | |
111 | + SELECT cm.cmnt_id | |
112 | + , cm.bbs_id | |
113 | + , cm.up_cmnt_id | |
114 | + , cm.cmnt_cn | |
115 | + , cm.cmnt_grd | |
116 | + , cm.cmnt_sn | |
117 | + , cm.use_yn | |
118 | + , cm.rgtr | |
119 | + , TO_CHAR(cm.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
120 | + , rgtrInfo.mbr_nm AS rgtrNm | |
121 | + , cm.mdfr | |
122 | + , TO_CHAR(cm.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
123 | + , mdfrInfo.mbr_nm AS mdfrNm | |
124 | + FROM cmnt cm | |
125 | + INNER JOIN CommentHierarchy ch ON cm.up_cmnt_id = ch.cmnt_id | |
126 | + LEFT JOIN mbr_info rgtrInfo ON cm.rgtr = rgtrInfo.mbr_id | |
127 | + LEFT JOIN mbr_info mdfrInfo ON cm.mdfr = mdfrInfo.mbr_id | |
128 | + ) | |
129 | + SELECT * FROM CommentHierarchy | |
130 | + ORDER BY cmnt_sn, cmnt_id | |
131 | + </select> | |
132 | + | |
133 | + <!-- | |
134 | + 작성자 : 방선주 | |
135 | + 작성일 : 2024.05.27 | |
136 | + 내 용 : 댓글 업데이트 | |
137 | + --> | |
138 | + <update id="updateCmnt" parameterType="CmntVO"> | |
139 | + UPDATE cmnt | |
140 | + SET cmnt_cn = #{cmntCn} | |
141 | + , mdfr = #{mdfr} | |
142 | + , mdfcn_dt = now() | |
143 | + WHERE cmnt_id = #{cmntId} | |
144 | + </update> | |
145 | + | |
146 | + <!-- | |
147 | + 작성자 : 방선주 | |
148 | + 작성일 : 2024.05.27 | |
149 | + 내 용 : 댓글 삭제 | |
150 | + --> | |
151 | + <update id="deleteCmnt" parameterType="CmntVO"> | |
152 | + UPDATE cmnt | |
153 | + SET use_yn = #{useYn} | |
154 | + , mdfr = #{mdfr} | |
155 | + , mdfcn_dt = now() | |
156 | + WHERE cmnt_id = #{cmntId} | |
157 | + </update> | |
158 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/bbs/search-SQL.xml
... | ... | @@ -0,0 +1,524 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : 하석형 | |
5 | + 작성일 : 2024.06.12 | |
6 | + 내 용 : 통합 검색 관리 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.search.dao.SearchDAO"> | |
9 | + | |
10 | + <!-- | |
11 | + 작 성 자 : 하석형 | |
12 | + 작 성 일 : 2024.06.12 | |
13 | + 내 용 : 검색 조건 SQL | |
14 | + --> | |
15 | + <sql id="searchSQL"> | |
16 | + <!-- 검색 조건 및 검색어 --> | |
17 | + <choose> | |
18 | + <when test="searchType != null and searchType != ''"> | |
19 | + <if test="searchType == 'title'"> | |
20 | + AND bbs_nm LIKE '%' || #{searchText} || '%' | |
21 | + </if> | |
22 | + <if test="searchType == 'content'"> | |
23 | + AND bbs_cn LIKE '%' || #{searchText} || '%' | |
24 | + </if> | |
25 | + </when> | |
26 | + <otherwise> | |
27 | + AND ( | |
28 | + bbs_nm LIKE '%' || #{searchText} || '%' | |
29 | + OR | |
30 | + bbs_cn LIKE '%' || #{searchText} || '%' | |
31 | + ) | |
32 | + </otherwise> | |
33 | + </choose> | |
34 | + | |
35 | + <!-- 검색 기간 --> | |
36 | + <if test="startDt != null and startDt != ''"> | |
37 | + <![CDATA[ | |
38 | + AND reg_dt::DATE >= #{startDt}::DATE | |
39 | + ]]> | |
40 | + </if> | |
41 | + <if test="endDt != null and endDt != ''"> | |
42 | + <![CDATA[ | |
43 | + AND reg_dt::DATE <= #{endDt}::DATE | |
44 | + ]]> | |
45 | + </if> | |
46 | + </sql> | |
47 | + | |
48 | + <!-- | |
49 | + 작 성 자 : 하석형 | |
50 | + 작 성 일 : 2024.06.12 | |
51 | + 내 용 : 검색 조건 Order By SQL | |
52 | + --> | |
53 | + <sql id="searchOrderBySQL"> | |
54 | + <!-- 검색 정렬 --> | |
55 | + <choose> | |
56 | + <when test="sort != null and sort != ''"> | |
57 | + <!-- (미구현)정확도 조건 --> | |
58 | + <if test="sort == 'A'"> | |
59 | + </if> | |
60 | + </when> | |
61 | + <otherwise> | |
62 | + reg_dt DESC | |
63 | + </otherwise> | |
64 | + </choose> | |
65 | + </sql> | |
66 | + | |
67 | + <!-- | |
68 | + 작 성 자 : 하석형 | |
69 | + 작 성 일 : 2024.06.12 | |
70 | + 내 용 : 게시판 검색 목록 조회 개수 | |
71 | + --> | |
72 | + <select id="findAllCountByBbs" parameterType="SearchVO" resultType="int"> | |
73 | + SELECT | |
74 | + COUNT(*) | |
75 | + FROM | |
76 | + bbs_cn bc | |
77 | + WHERE | |
78 | + bc.bbs_mng_id = #{bbsMngId} | |
79 | + AND | |
80 | + bc.use_yn = 'Y' | |
81 | + <include refid="searchSQL" /> | |
82 | + <if test="roles != null and roles.size() > 0"> | |
83 | + <choose> | |
84 | + <!-- ROLE_ADMIN일 때는 모든 데이터를 보여줍니다. --> | |
85 | + <when test="roles.contains('ROLE_ADMIN')"> | |
86 | + </when> | |
87 | + <!-- ROLE_USER일 때는 작성자가 일치하는 데이터는 보여줍니다. --> | |
88 | + <when test="roles.contains('ROLE_USER')"> | |
89 | + AND (bc.prvt_pst_yn = 'N' OR bc.rgtr = #{mbrId}) | |
90 | + </when> | |
91 | + <!-- 그 외는 비밀글을 조회할 수 없습니다. --> | |
92 | + <otherwise> | |
93 | + AND bc.prvt_pst_yn = 'N' | |
94 | + </otherwise> | |
95 | + </choose> | |
96 | + </if> | |
97 | + </select> | |
98 | + | |
99 | + <!-- | |
100 | + 작 성 자 : 하석형 | |
101 | + 작 성 일 : 2024.06.12 | |
102 | + 내 용 : 게시판 검색 목록 조회 | |
103 | + --> | |
104 | + <select id="findAllByBbs" parameterType="SearchVO" resultType="SearchContentVO"> | |
105 | + SELECT | |
106 | + bbs_mng_id AS menuTypeCtgry | |
107 | + , bbs_id AS pageId | |
108 | + , bbs_nm AS title | |
109 | + , bbs_cn AS content | |
110 | + , reg_dt::DATE | |
111 | + FROM | |
112 | + bbs_cn bc | |
113 | + WHERE | |
114 | + bc.bbs_mng_id = #{bbsMngId} | |
115 | + AND | |
116 | + bc.use_yn = 'Y' | |
117 | + <include refid="searchSQL" /> | |
118 | + <if test="roles != null and roles.size() > 0"> | |
119 | + <choose> | |
120 | + <!-- ROLE_ADMIN일 때는 모든 데이터를 보여줍니다. --> | |
121 | + <when test="roles.contains('ROLE_ADMIN')"> | |
122 | + </when> | |
123 | + <!-- ROLE_USER일 때는 작성자가 일치하는 데이터는 보여줍니다. --> | |
124 | + <when test="roles.contains('ROLE_USER')"> | |
125 | + AND (bc.prvt_pst_yn = 'N' OR bc.rgtr = #{mbrId}) | |
126 | + </when> | |
127 | + <!-- 그 외는 비밀글을 조회할 수 없습니다. --> | |
128 | + <otherwise> | |
129 | + AND bc.prvt_pst_yn = 'N' | |
130 | + </otherwise> | |
131 | + </choose> | |
132 | + </if> | |
133 | + ORDER BY | |
134 | + <include refid="searchOrderBySQL" /> | |
135 | + LIMIT #{typePreCnt} | |
136 | + <!--<if test="bbsMngIdList != null and bbsMngIdList.size() > 0"> | |
137 | + AND bc.bbs_mng_id IN | |
138 | + <foreach item="bbsMngId" collection="bbsMngIdList" open="(" separator="," close=")"> | |
139 | + #{bbsMngId} | |
140 | + </foreach> | |
141 | + </if>--> | |
142 | + </select> | |
143 | + | |
144 | + | |
145 | + | |
146 | + <!-- ********************************* 컨텐츠 검색 - 기업 정보 (시작) ********************************* --> | |
147 | + <!-- | |
148 | + 작 성 자 : 하석형 | |
149 | + 작 성 일 : 2024.06.14 | |
150 | + 내 용 : 기업 정보 검색 목록 조회 개수 | |
151 | + --> | |
152 | + <select id="findAllCountByEntInfo" parameterType="SearchVO" resultType="int"> | |
153 | + SELECT | |
154 | + COUNT(*) | |
155 | + FROM | |
156 | + ent_info ei | |
157 | + WHERE | |
158 | + ei.use_yn = 'Y' | |
159 | + <!-- 검색어 --> | |
160 | + AND ( | |
161 | + ent_nm LIKE '%' || #{searchText} || '%' | |
162 | + OR | |
163 | + rmrk LIKE '%' || #{searchText} || '%' | |
164 | + ) | |
165 | + <!-- 검색 기간 --> | |
166 | + <if test="startDt != null and startDt != ''"> | |
167 | + <![CDATA[ | |
168 | + AND reg_dt::DATE >= #{startDt}::DATE | |
169 | + ]]> | |
170 | + </if> | |
171 | + <if test="endDt != null and endDt != ''"> | |
172 | + <![CDATA[ | |
173 | + AND reg_dt::DATE <= #{endDt}::DATE | |
174 | + ]]> | |
175 | + </if> | |
176 | + </select> | |
177 | + | |
178 | + <!-- | |
179 | + 작 성 자 : 하석형 | |
180 | + 작 성 일 : 2024.06.14 | |
181 | + 내 용 : 기업 정보 검색 목록 조회 | |
182 | + --> | |
183 | + <select id="findAllByEntInfo" parameterType="SearchVO" resultType="HashMap"> | |
184 | + SELECT | |
185 | + ei.ent_id AS page_id | |
186 | + , ei.ent_nm | |
187 | + , ei.rprsv_nm | |
188 | + , ei.rmrk | |
189 | + , ei.reg_dt::DATE | |
190 | + FROM | |
191 | + ent_info ei | |
192 | + WHERE | |
193 | + ei.use_yn = 'Y' | |
194 | + <!-- 검색어 --> | |
195 | + AND ( | |
196 | + ei.ent_nm LIKE '%' || #{searchText} || '%' | |
197 | + OR | |
198 | + ei.rmrk LIKE '%' || #{searchText} || '%' | |
199 | + ) | |
200 | + <!-- 검색 기간 --> | |
201 | + <if test="startDt != null and startDt != ''"> | |
202 | + <![CDATA[ | |
203 | + AND ei.reg_dt::DATE >= #{startDt}::DATE | |
204 | + ]]> | |
205 | + </if> | |
206 | + <if test="endDt != null and endDt != ''"> | |
207 | + <![CDATA[ | |
208 | + AND ei.reg_dt::DATE <= #{endDt}::DATE | |
209 | + ]]> | |
210 | + </if> | |
211 | + <!-- 검색 정렬 --> | |
212 | + ORDER BY | |
213 | + ei.reg_dt DESC | |
214 | + LIMIT #{typePreCnt} | |
215 | + </select> | |
216 | + | |
217 | + <!-- | |
218 | + 작 성 자 : 하석형 | |
219 | + 작 성 일 : 2024.06.14 | |
220 | + 내 용 : 기업 상담 신청 검색 목록 조회 개수 | |
221 | + --> | |
222 | + <select id="findAllCountByEntDscsnAply" parameterType="SearchVO" resultType="int"> | |
223 | + SELECT | |
224 | + COUNT(*) | |
225 | + FROM | |
226 | + ent_dscsn_aply eda | |
227 | + WHERE | |
228 | + eda.use_yn = 'Y' | |
229 | + <if test="roles != null and roles.size() > 0"> | |
230 | + <choose> | |
231 | + <!-- ROLE_ADMIN일 때는 모든 데이터를 보여줍니다. --> | |
232 | + <when test="roles.contains('ROLE_ADMIN')"> | |
233 | + </when> | |
234 | + <!-- ROLE_USER일 때는 작성자가 일치하는 데이터는 보여줍니다. --> | |
235 | + <when test="roles.contains('ROLE_USER')"> | |
236 | + AND ((prcs_stts = 'C' OR prcs_stts IS NULL) OR eda.actn_pic = #{mbrId}) | |
237 | + </when> | |
238 | + <!-- 그 외는 변경요청(C)과 미배정(null)만 조회할 수 있습니다. --> | |
239 | + <otherwise> | |
240 | + AND (prcs_stts = 'C' OR prcs_stts IS NULL) | |
241 | + </otherwise> | |
242 | + </choose> | |
243 | + </if> | |
244 | + <!-- 검색어 --> | |
245 | + AND eda.ent_nm LIKE '%' || #{searchText} || '%' | |
246 | + <!-- 검색 기간 --> | |
247 | + <if test="startDt != null and startDt != ''"> | |
248 | + <![CDATA[ | |
249 | + AND eda.reg_dt::DATE >= #{startDt}::DATE | |
250 | + ]]> | |
251 | + </if> | |
252 | + <if test="endDt != null and endDt != ''"> | |
253 | + <![CDATA[ | |
254 | + AND eda.reg_dt::DATE <= #{endDt}::DATE | |
255 | + ]]> | |
256 | + </if> | |
257 | + </select> | |
258 | + | |
259 | + <!-- | |
260 | + 작 성 자 : 하석형 | |
261 | + 작 성 일 : 2024.06.14 | |
262 | + 내 용 : 기업 상담 신청 검색 목록 조회 | |
263 | + --> | |
264 | + <select id="findAllByEntDscsnAply" parameterType="SearchVO" resultType="HashMap"> | |
265 | + SELECT | |
266 | + eda.ent_dscsn_aply_id AS page_id | |
267 | + , eda.ent_nm | |
268 | + , eda.rmrk | |
269 | + , CASE | |
270 | + WHEN prcs_stts = 'N' THEN '접수전' | |
271 | + WHEN prcs_stts = 'I' THEN '처리중' | |
272 | + WHEN prcs_stts = 'E' THEN '완료' | |
273 | + WHEN prcs_stts = 'C' THEN '변경요청' | |
274 | + ELSE '미배정' | |
275 | + END AS prcs_stts | |
276 | + , eda.reg_dt::DATE | |
277 | + FROM | |
278 | + ent_dscsn_aply eda | |
279 | + WHERE | |
280 | + eda.use_yn = 'Y' | |
281 | + <if test="roles != null and roles.size() > 0"> | |
282 | + <choose> | |
283 | + <!-- ROLE_ADMIN일 때는 모든 데이터를 보여줍니다. --> | |
284 | + <when test="roles.contains('ROLE_ADMIN')"> | |
285 | + </when> | |
286 | + <!-- ROLE_USER일 때는 작성자가 일치하는 데이터는 보여줍니다. --> | |
287 | + <when test="roles.contains('ROLE_USER')"> | |
288 | + AND ((prcs_stts = 'C' OR prcs_stts IS NULL) OR eda.actn_pic = #{mbrId}) | |
289 | + </when> | |
290 | + <!-- 그 외는 변경요청(C)과 미배정(null)만 조회할 수 있습니다. --> | |
291 | + <otherwise> | |
292 | + AND (prcs_stts = 'C' OR prcs_stts IS NULL) | |
293 | + </otherwise> | |
294 | + </choose> | |
295 | + </if> | |
296 | + <!-- 검색어 --> | |
297 | + AND eda.ent_nm LIKE '%' || #{searchText} || '%' | |
298 | + <!-- 검색 기간 --> | |
299 | + <if test="startDt != null and startDt != ''"> | |
300 | + <![CDATA[ | |
301 | + AND eda.reg_dt::DATE >= #{startDt}::DATE | |
302 | + ]]> | |
303 | + </if> | |
304 | + <if test="endDt != null and endDt != ''"> | |
305 | + <![CDATA[ | |
306 | + AND eda.reg_dt::DATE <= #{endDt}::DATE | |
307 | + ]]> | |
308 | + </if> | |
309 | + <!-- 검색 정렬 --> | |
310 | + ORDER BY | |
311 | + eda.reg_dt DESC | |
312 | + LIMIT #{typePreCnt} | |
313 | + </select> | |
314 | + | |
315 | + <!-- | |
316 | + 작 성 자 : 하석형 | |
317 | + 작 성 일 : 2024.06.14 | |
318 | + 내 용 : 투자 상담 검색 목록 조회 개수 | |
319 | + --> | |
320 | + <select id="findAllCountByIvstDscsn" parameterType="SearchVO" resultType="int"> | |
321 | + SELECT | |
322 | + COUNT(*) | |
323 | + FROM | |
324 | + ivst_dscsn id | |
325 | + LEFT JOIN | |
326 | + ent_info ei | |
327 | + ON | |
328 | + id.ent_id = ei.ent_id | |
329 | + WHERE | |
330 | + id.use_yn = 'Y' | |
331 | + <!-- 검색어 --> | |
332 | + AND ( | |
333 | + ei.ent_nm LIKE '%' || #{searchText} || '%' | |
334 | + OR | |
335 | + id.main_cn LIKE '%' || #{searchText} || '%' | |
336 | + ) | |
337 | + <!-- 검색 기간 --> | |
338 | + <if test="startDt != null and startDt != ''"> | |
339 | + <![CDATA[ | |
340 | + AND id.reg_dt::DATE >= #{startDt}::DATE | |
341 | + ]]> | |
342 | + </if> | |
343 | + <if test="endDt != null and endDt != ''"> | |
344 | + <![CDATA[ | |
345 | + AND id.reg_dt::DATE <= #{endDt}::DATE | |
346 | + ]]> | |
347 | + </if> | |
348 | + </select> | |
349 | + | |
350 | + <!-- | |
351 | + 작 성 자 : 하석형 | |
352 | + 작 성 일 : 2024.06.14 | |
353 | + 내 용 : 투자 상담 검색 목록 조회 | |
354 | + --> | |
355 | + <select id="findAllByIvstDscsn" parameterType="SearchVO" resultType="HashMap"> | |
356 | + SELECT | |
357 | + id.ivst_dscsn_id AS page_id | |
358 | + , ei.ent_nm | |
359 | + , id.ttl | |
360 | + , id.main_cn | |
361 | + , id.reg_dt::DATE | |
362 | + FROM | |
363 | + ivst_dscsn id | |
364 | + LEFT JOIN | |
365 | + ent_info ei | |
366 | + ON | |
367 | + id.ent_id = ei.ent_id | |
368 | + WHERE | |
369 | + id.use_yn = 'Y' | |
370 | + <!-- 검색어 --> | |
371 | + AND ( | |
372 | + ei.ent_nm LIKE '%' || #{searchText} || '%' | |
373 | + OR | |
374 | + id.main_cn LIKE '%' || #{searchText} || '%' | |
375 | + ) | |
376 | + <!-- 검색 기간 --> | |
377 | + <if test="startDt != null and startDt != ''"> | |
378 | + <![CDATA[ | |
379 | + AND id.reg_dt::DATE >= #{startDt}::DATE | |
380 | + ]]> | |
381 | + </if> | |
382 | + <if test="endDt != null and endDt != ''"> | |
383 | + <![CDATA[ | |
384 | + AND id.reg_dt::DATE <= #{endDt}::DATE | |
385 | + ]]> | |
386 | + </if> | |
387 | + <!-- 검색 정렬 --> | |
388 | + ORDER BY | |
389 | + id.reg_dt DESC | |
390 | + LIMIT #{typePreCnt} | |
391 | + </select> | |
392 | + | |
393 | + <!-- | |
394 | + 작 성 자 : 하석형 | |
395 | + 작 성 일 : 2024.06.14 | |
396 | + 내 용 : 검토 사항 검색 목록 조회 개수 | |
397 | + --> | |
398 | + <select id="findAllCountByRvwMttr" parameterType="SearchVO" resultType="int"> | |
399 | + SELECT | |
400 | + COUNT(*) | |
401 | + FROM | |
402 | + rvw_mttr rm | |
403 | + LEFT JOIN | |
404 | + (SELECT | |
405 | + ei.ent_nm | |
406 | + , id.ivst_dscsn_id | |
407 | + , id.ttl | |
408 | + FROM | |
409 | + ent_info ei | |
410 | + LEFT JOIN | |
411 | + (SELECT DISTINCT ON (ent_id) | |
412 | + ent_id | |
413 | + , ivst_dscsn_id | |
414 | + , ttl | |
415 | + FROM | |
416 | + ivst_dscsn | |
417 | + WHERE | |
418 | + use_yn = 'Y' | |
419 | + ORDER BY | |
420 | + ent_id, reg_dt DESC | |
421 | + ) AS id | |
422 | + ON | |
423 | + ei.ent_id = id.ent_id | |
424 | + WHERE | |
425 | + ei.use_yn = 'Y' | |
426 | + ) AS ei_id | |
427 | + ON | |
428 | + rm.ivst_dscsn_id = ei_id.ivst_dscsn_id | |
429 | + LEFT JOIN | |
430 | + cd_mng cm | |
431 | + ON | |
432 | + rm."type" = cm.cd | |
433 | + WHERE | |
434 | + rm.use_yn = 'Y' | |
435 | + <!-- 검색어 --> | |
436 | + AND ( | |
437 | + ei_id.ent_nm LIKE '%' || #{searchText} || '%' | |
438 | + OR | |
439 | + ei_id.ttl LIKE '%' || #{searchText} || '%' | |
440 | + ) | |
441 | + <!-- 검색 기간 --> | |
442 | + <if test="startDt != null and startDt != ''"> | |
443 | + <![CDATA[ | |
444 | + AND rm.reg_dt::DATE >= #{startDt}::DATE | |
445 | + ]]> | |
446 | + </if> | |
447 | + <if test="endDt != null and endDt != ''"> | |
448 | + <![CDATA[ | |
449 | + AND rm.reg_dt::DATE <= #{endDt}::DATE | |
450 | + ]]> | |
451 | + </if> | |
452 | + </select> | |
453 | + | |
454 | + <!-- | |
455 | + 작 성 자 : 하석형 | |
456 | + 작 성 일 : 2024.06.14 | |
457 | + 내 용 : 검토 사항 검색 목록 조회 | |
458 | + --> | |
459 | + <select id="findAllByRvwMttr" parameterType="SearchVO" resultType="HashMap"> | |
460 | + SELECT | |
461 | + rm.rvw_mttr_id AS page_id | |
462 | + , ei_id.ent_nm | |
463 | + , ei_id.ttl | |
464 | + , cm.cd_nm AS "type" | |
465 | + , rm.rcpt_cn | |
466 | + , rm.reg_dt::DATE | |
467 | + FROM | |
468 | + rvw_mttr rm | |
469 | + LEFT JOIN | |
470 | + (SELECT | |
471 | + ei.ent_nm | |
472 | + , id.ivst_dscsn_id | |
473 | + , id.ttl | |
474 | + FROM | |
475 | + ent_info ei | |
476 | + LEFT JOIN | |
477 | + (SELECT DISTINCT ON (ent_id) | |
478 | + ent_id | |
479 | + , ivst_dscsn_id | |
480 | + , ttl | |
481 | + FROM | |
482 | + ivst_dscsn | |
483 | + WHERE | |
484 | + use_yn = 'Y' | |
485 | + ORDER BY | |
486 | + ent_id, reg_dt DESC | |
487 | + ) AS id | |
488 | + ON | |
489 | + ei.ent_id = id.ent_id | |
490 | + WHERE | |
491 | + ei.use_yn = 'Y' | |
492 | + ) AS ei_id | |
493 | + ON | |
494 | + rm.ivst_dscsn_id = ei_id.ivst_dscsn_id | |
495 | + LEFT JOIN | |
496 | + cd_mng cm | |
497 | + ON | |
498 | + rm."type" = cm.cd | |
499 | + WHERE | |
500 | + rm.use_yn = 'Y' | |
501 | + <!-- 검색어 --> | |
502 | + AND ( | |
503 | + ei_id.ent_nm LIKE '%' || #{searchText} || '%' | |
504 | + OR | |
505 | + ei_id.ttl LIKE '%' || #{searchText} || '%' | |
506 | + ) | |
507 | + <!-- 검색 기간 --> | |
508 | + <if test="startDt != null and startDt != ''"> | |
509 | + <![CDATA[ | |
510 | + AND rm.reg_dt::DATE >= #{startDt}::DATE | |
511 | + ]]> | |
512 | + </if> | |
513 | + <if test="endDt != null and endDt != ''"> | |
514 | + <![CDATA[ | |
515 | + AND rm.reg_dt::DATE <= #{endDt}::DATE | |
516 | + ]]> | |
517 | + </if> | |
518 | + <!-- 검색 정렬 --> | |
519 | + ORDER BY | |
520 | + rm.reg_dt DESC | |
521 | + LIMIT #{typePreCnt} | |
522 | + </select> | |
523 | + <!-- ********************************* 컨텐츠 검색 - 기업 정보 (종료) ********************************* --> | |
524 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/bbs/wordMng-SQL.xml
... | ... | @@ -0,0 +1,115 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : 방선주 | |
5 | + 작성일 : 2024.05.31 | |
6 | + 내 용 : 금지어 등록 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.bbs.dao.WordMngDAO"> | |
9 | + | |
10 | + <!-- | |
11 | + 작성자 : 방선주 | |
12 | + 작성일 : 2024.05.31 | |
13 | + 내 용 : 금지어 등록 | |
14 | + --> | |
15 | + <insert id="saveWords" parameterType="WordMngVO"> | |
16 | + INSERT INTO cntrl_nm_mng( | |
17 | + cntrl_nm | |
18 | + , rgtr | |
19 | + , reg_dt | |
20 | + ) VALUES ( | |
21 | + #{cntrlNm} | |
22 | + , #{rgtr} | |
23 | + , now() | |
24 | + ) | |
25 | + </insert> | |
26 | + | |
27 | + <!-- | |
28 | + 작성자 : 방선주 | |
29 | + 작성일 : 2024.05.31 | |
30 | + 내 용 : 금지어 목록 조회 | |
31 | + --> | |
32 | + <select id="findAllWord" parameterType="Pagination" resultType="WordMngVO"> | |
33 | + SELECT cntrl_nm_id | |
34 | + , cntrl_nm | |
35 | + , cnm.rgtr | |
36 | + , mi.mbr_nm AS rgtr_nm | |
37 | + , to_char(cnm.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
38 | + FROM cntrl_nm_mng cnm | |
39 | + LEFT JOIN mbr_info mi | |
40 | + ON cnm.rgtr = mi.mbr_id | |
41 | + <where> | |
42 | + <if test="searchText != null and searchText != ''"> | |
43 | + <choose> | |
44 | + <when test="searchType == 'cntrlNm'"> | |
45 | + AND cntrl_nm LIKE '%' || #{searchText} || '%' | |
46 | + </when> | |
47 | + <when test="searchType == 'rgtrNm'"> | |
48 | + AND mi.mbr_nm LIKE '%' || #{searchText} || '%' | |
49 | + </when> | |
50 | + <otherwise> | |
51 | + AND ( | |
52 | + cntrl_nm LIKE '%' || #{searchText} || '%' | |
53 | + OR | |
54 | + mi.mbr_nm LIKE '%' || #{searchText} || '%' | |
55 | + ) | |
56 | + </otherwise> | |
57 | + </choose> | |
58 | + </if> | |
59 | + </where> | |
60 | + ORDER BY cntrl_nm_id DESC | |
61 | + OFFSET #{limitStart} LIMIT #{recordSize} | |
62 | + </select> | |
63 | + | |
64 | + <!-- | |
65 | + 작성자 : 방선주 | |
66 | + 작성일 : 2024.05.31 | |
67 | + 내 용 : 금지어 목록 count | |
68 | + --> | |
69 | + <select id="findAllCnt" parameterType="Pagination" resultType="Integer"> | |
70 | + SELECT COUNT(cntrl_nm_id) | |
71 | + FROM cntrl_nm_mng | |
72 | + LEFT JOIN mbr_info mi | |
73 | + ON cntrl_nm_mng.rgtr = mi.mbr_id | |
74 | + <where> | |
75 | + <if test="searchText != null and searchText != ''"> | |
76 | + <choose> | |
77 | + <when test="searchType == 'cntrlNm'"> | |
78 | + AND cntrl_nm LIKE '%' || #{searchText} || '%' | |
79 | + </when> | |
80 | + <when test="searchType == 'rgtrNm'"> | |
81 | + AND mi.mbr_nm LIKE '%' || #{searchText} || '%' | |
82 | + </when> | |
83 | + <otherwise> | |
84 | + AND ( | |
85 | + cntrl_nm LIKE '%' || #{searchText} || '%' | |
86 | + OR | |
87 | + mi.mbr_nm LIKE '%' || #{searchText} || '%' | |
88 | + ) | |
89 | + </otherwise> | |
90 | + </choose> | |
91 | + </if> | |
92 | + </where> | |
93 | + </select> | |
94 | + <!-- | |
95 | + 작성자 : 방선주 | |
96 | + 작성일 : 2024.05.31 | |
97 | + 내 용 : 금지어 삭제 | |
98 | + --> | |
99 | + <delete id="deleteWords" parameterType="Integer"> | |
100 | + DELETE FROM cntrl_nm_mng | |
101 | + WHERE cntrl_nm_id = #{cntrlNmId} | |
102 | + </delete> | |
103 | + | |
104 | + <!-- | |
105 | + 작성자 : 방선주 | |
106 | + 작성일 : 2024.05.31 | |
107 | + 내 용 : 금지어 string 목록 | |
108 | + --> | |
109 | + <select id="findWordList" resultType="String"> | |
110 | + SELECT cntrl_nm | |
111 | + FROM cntrl_nm_mng cnm | |
112 | + | |
113 | + </select> | |
114 | + | |
115 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/cntnStats/cntnStats-SQL.xml
... | ... | @@ -0,0 +1,414 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작 성 자 : takensoft | |
5 | + 작 성 일 : 2024.05.23 | |
6 | + 내 용 : 접속 통계 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.cntnStats.dao.CntnStatsDAO"> | |
9 | + | |
10 | + <!-- 사용자 접속 통계 관련 --> | |
11 | + <!-- | |
12 | + 작성자 : takensoft | |
13 | + 작성일 : 2024.05.24 | |
14 | + 내 용 : 사용자 접속 통계 등록 검증 | |
15 | + --> | |
16 | + <select id="userCntnStatsSaveChck" parameterType="CntnStatsVO" resultType="boolean"> | |
17 | + SELECT COUNT(user_cntn_id) | |
18 | + FROM user_cntn_stats | |
19 | + WHERE authrt_cd = #{authrtCd} | |
20 | + AND cntn_yr = #{cntnYr} | |
21 | + AND cntn_mm = #{cntnMm} | |
22 | + AND cntn_day = #{cntnDay} | |
23 | + </select> | |
24 | + <!-- | |
25 | + 작성자 : takensoft | |
26 | + 작성일 : 2024.05.23 | |
27 | + 내 용 : 사용자 접속 통계 등록 | |
28 | + --> | |
29 | + <insert id="userCntnStatsSave" parameterType="CntnStatsVO"> | |
30 | + INSERT INTO user_cntn_stats ( | |
31 | + authrt_cd | |
32 | + , cntn_yr | |
33 | + , cntn_mm | |
34 | + , cntn_day | |
35 | + , cntn_nope | |
36 | + ) VALUES ( | |
37 | + #{authrtCd} | |
38 | + , #{cntnYr} | |
39 | + , #{cntnMm} | |
40 | + , #{cntnDay} | |
41 | + , 1 | |
42 | + ) | |
43 | + </insert> | |
44 | + <!-- | |
45 | + 작성자 : takensoft | |
46 | + 작성일 : 2024.05.23 | |
47 | + 내 용 : 사용자 접속 통계 카운트 증가 | |
48 | + --> | |
49 | + <update id="userCntnStatsUpdate" parameterType="CntnStatsVO"> | |
50 | + UPDATE user_cntn_stats | |
51 | + SET cntn_nope = cntn_nope + 1 | |
52 | + WHERE authrt_cd = #{authrtCd} | |
53 | + AND cntn_yr = #{cntnYr} | |
54 | + AND cntn_mm = #{cntnMm} | |
55 | + AND cntn_day = #{cntnDay} | |
56 | + </update> | |
57 | + <!-- 사용자 접속 통계 관련 --> | |
58 | + | |
59 | + | |
60 | + <!-- 콘텐츠 접속 통계 관련 --> | |
61 | + <!-- | |
62 | + 작성자 : takensoft | |
63 | + 작성일 : 2024.05.24 | |
64 | + 내 용 : 콘텐츠 접속 통계 등록 검증 | |
65 | + --> | |
66 | + <select id="contsCntnStatsSaveChck" parameterType="CntnStatsVO" resultType="boolean"> | |
67 | + SELECT COUNT(conts_cntn_id) | |
68 | + FROM conts_cntn_stats | |
69 | + WHERE conts_id = #{typeId} | |
70 | + AND authrt_cd = #{authrtCd} | |
71 | + AND cntn_yr = #{cntnYr} | |
72 | + AND cntn_mm = #{cntnMm} | |
73 | + AND cntn_day = #{cntnDay} | |
74 | + </select> | |
75 | + <!-- | |
76 | + 작성자 : takensoft | |
77 | + 작성일 : 2024.05.23 | |
78 | + 내 용 : 컨텐츠 접속 통계 등록 | |
79 | + --> | |
80 | + <insert id="contsCntnStatsSave" parameterType="CntnStatsVO"> | |
81 | + INSERT INTO conts_cntn_stats ( | |
82 | + conts_id | |
83 | + , authrt_cd | |
84 | + , cntn_yr | |
85 | + , cntn_mm | |
86 | + , cntn_day | |
87 | + , cntn_nope | |
88 | + ) VALUES ( | |
89 | + #{typeId} | |
90 | + , #{authrtCd} | |
91 | + , #{cntnYr} | |
92 | + , #{cntnMm} | |
93 | + , #{cntnDay} | |
94 | + , 1 | |
95 | + ) | |
96 | + </insert> | |
97 | + <!-- | |
98 | + 작성자 : takensoft | |
99 | + 작성일 : 2024.05.24 | |
100 | + 내 용 : 콘텐츠 접속 통계 수정 | |
101 | + --> | |
102 | + <update id="contsCntnStatsUpdate" parameterType="CntnStatsVO"> | |
103 | + UPDATE conts_cntn_stats | |
104 | + SET cntn_nope = cntn_nope + 1 | |
105 | + WHERE conts_id = #{typeId} | |
106 | + AND authrt_cd = #{authrtCd} | |
107 | + AND cntn_yr = #{cntnYr} | |
108 | + AND cntn_mm = #{cntnMm} | |
109 | + AND cntn_day = #{cntnDay} | |
110 | + </update> | |
111 | + | |
112 | + <!-- 콘텐츠 접속 통계 관련 --> | |
113 | + | |
114 | + | |
115 | + <!-- 게시판 접속 통계 관련 --> | |
116 | + <!-- | |
117 | + 작성자 : takensoft | |
118 | + 작성일 : 2024.05.24 | |
119 | + 내 용 : 게시판 접속 통계 등록 검증 | |
120 | + --> | |
121 | + <select id="bbsCntnStatsSaveChck" parameterType="CntnStatsVO" resultType="boolean"> | |
122 | + SELECT COUNT(bbs_cntn_id) | |
123 | + FROM bbs_cntn_stats | |
124 | + WHERE bbs_id = #{typeId} | |
125 | + AND authrt_cd = #{authrtCd} | |
126 | + AND cntn_yr = #{cntnYr} | |
127 | + AND cntn_mm = #{cntnMm} | |
128 | + AND cntn_day = #{cntnDay} | |
129 | + </select> | |
130 | + <!-- | |
131 | + 작성자 : takensoft | |
132 | + 작성일 : 2024.05.23 | |
133 | + 내 용 : 게시판 접속 통계 등록 | |
134 | + --> | |
135 | + <insert id="bbsCntnStatsSave" parameterType="CntnStatsVO"> | |
136 | + INSERT INTO bbs_cntn_stats ( | |
137 | + bbs_id | |
138 | + , authrt_cd | |
139 | + , cntn_yr | |
140 | + , cntn_mm | |
141 | + , cntn_day | |
142 | + , cntn_nope | |
143 | + ) VALUES ( | |
144 | + #{typeId} | |
145 | + , #{authrtCd} | |
146 | + , #{cntnYr} | |
147 | + , #{cntnMm} | |
148 | + , #{cntnDay} | |
149 | + , 1 | |
150 | + ) | |
151 | + </insert> | |
152 | + <!-- | |
153 | + 작성자 : takensoft | |
154 | + 작성일 : 2024.05.24 | |
155 | + 내 용 : 게시판 접속 통계 수정 | |
156 | + --> | |
157 | + <update id="bbsCntnStatsUpdate" parameterType="CntnStatsVO"> | |
158 | + UPDATE bbs_cntn_stats | |
159 | + SET cntn_nope = cntn_nope + 1 | |
160 | + WHERE bbs_id = #{typeId} | |
161 | + AND authrt_cd = #{authrtCd} | |
162 | + AND cntn_yr = #{cntnYr} | |
163 | + AND cntn_mm = #{cntnMm} | |
164 | + AND cntn_day = #{cntnDay} | |
165 | + </update> | |
166 | + <!-- 게시판 접속 통계 관련 --> | |
167 | + | |
168 | + | |
169 | + <!-- 메뉴 접속 통계 관련 --> | |
170 | + <!-- | |
171 | + 작성자 : takensoft | |
172 | + 작성일 : 2024.05.24 | |
173 | + 내 용 : 메뉴 접속 통계 등록 검증 | |
174 | + --> | |
175 | + <select id="menuCntnStatsSaveChck" parameterType="CntnStatsVO" resultType="boolean"> | |
176 | + SELECT COUNT(menu_cntn_id) | |
177 | + FROM menu_cntn_stats | |
178 | + WHERE menu_id = #{typeId} | |
179 | + AND authrt_cd = #{authrtCd} | |
180 | + AND cntn_yr = #{cntnYr} | |
181 | + AND cntn_mm = #{cntnMm} | |
182 | + AND cntn_day = #{cntnDay} | |
183 | + </select> | |
184 | + <!-- | |
185 | + 작성자 : takensoft | |
186 | + 작성일 : 2024.05.23 | |
187 | + 내 용 : 메뉴 접속 통계 등록 | |
188 | + --> | |
189 | + | |
190 | + <insert id="menuCntnStatsSave" parameterType="CntnStatsVO"> | |
191 | + INSERT INTO menu_cntn_stats ( | |
192 | + menu_id | |
193 | + , authrt_cd | |
194 | + , cntn_yr | |
195 | + , cntn_mm | |
196 | + , cntn_day | |
197 | + , cntn_nope | |
198 | + ) VALUES ( | |
199 | + #{typeId} | |
200 | + , #{authrtCd} | |
201 | + , #{cntnYr} | |
202 | + , #{cntnMm} | |
203 | + , #{cntnDay} | |
204 | + , 1 | |
205 | + ) | |
206 | + </insert> | |
207 | + <!-- | |
208 | + 작성자 : takensoft | |
209 | + 작성일 : 2024.05.24 | |
210 | + 내 용 : 메뉴 접속 통계 수정 | |
211 | + --> | |
212 | + <update id="menuCntnStatsUpdate" parameterType="CntnStatsVO"> | |
213 | + UPDATE menu_cntn_stats | |
214 | + SET cntn_nope = cntn_nope + 1 | |
215 | + WHERE menu_id = #{typeId} | |
216 | + AND authrt_cd = #{authrtCd} | |
217 | + AND cntn_yr = #{cntnYr} | |
218 | + AND cntn_mm = #{cntnMm} | |
219 | + AND cntn_day = #{cntnDay} | |
220 | + </update> | |
221 | + <!-- 메뉴 접속 통계 관련 --> | |
222 | + | |
223 | + <!-- 통계관리 관련 통계 정보 --> | |
224 | + <!-- | |
225 | + 작성자 : takensoft | |
226 | + 작성일 : 2024.05.28 | |
227 | + 내 용 : 사용자 접속 통계 | |
228 | + --> | |
229 | + | |
230 | + <!-- 통계관리 관련 통계 정보 --> | |
231 | + <!-- | |
232 | + 작 성 자 : 박정하 | |
233 | + 작 성 일 : 2024.05.30 | |
234 | + 내 용 : 사용자 접속 통계 목록 조회 | |
235 | + --> | |
236 | + <select id="selectUserCntnStats" parameterType="HashMap" resultType="HashMap"> | |
237 | + SELECT ai.dates | |
238 | + , array_agg(authrt_nm) AS authrt_nm | |
239 | + , array_agg(COALESCE(ucs.cntn_nope, 0)) AS cntn_nope | |
240 | + FROM (SELECT generate_series(to_date(#{startDt}, 'YYYY-MM-DD'), to_date(#{endDt}, 'YYYY-MM-DD'), '1 day'::interval)::date AS dates , authrt_cd , authrt_nm FROM authrt_info WHERE use_yn = 'Y') AS ai | |
241 | + LEFT JOIN (SELECT authrt_cd, to_date(concat(cntn_yr, cntn_mm, cntn_day), 'YYYYMMDD') AS cntn_date, cntn_nope FROM user_cntn_stats) AS ucs | |
242 | + ON dates = ucs.cntn_date | |
243 | + AND ai.authrt_cd = ucs.authrt_cd | |
244 | + GROUP BY ai.dates | |
245 | + ORDER BY dates DESC | |
246 | + </select> | |
247 | + | |
248 | + <!-- | |
249 | + 작 성 자 : 박정하 | |
250 | + 작 성 일 : 2024.05.30 | |
251 | + 내 용 : 사용자 접속 통계 목록 개수 조회 | |
252 | + --> | |
253 | + <select id="selectUserCntnStatsCnt" parameterType="HashMap"> | |
254 | + SELECT COALESCE(SUM(cntn_nope), 0) | |
255 | + FROM user_cntn_stats | |
256 | + WHERE to_date(concat(cntn_yr, cntn_mm, cntn_day), 'YYYYMMDD') >= to_date(#{startDt}, 'YYYY-MM-DD') | |
257 | + AND to_date(#{endDt}, 'YYYY-MM-DD') >= to_date(concat(cntn_yr, cntn_mm, cntn_day), 'YYYYMMDD') | |
258 | + </select> | |
259 | + | |
260 | + <!-- | |
261 | + 작 성 자 : 박정하 | |
262 | + 작 성 일 : 2024.05.30 | |
263 | + 내 용 : 메뉴별 접속 통계 목록 조회 | |
264 | + --> | |
265 | + <select id="selectMenuCntnStats" parameterType="HashMap" resultType="HashMap"> | |
266 | + WITH RECURSIVE menu_tree AS ( | |
267 | + SELECT '' || mi.menu_nm AS menu_name | |
268 | + , mi.menu_id | |
269 | + FROM menu_info AS mi | |
270 | + WHERE mi.use_yn = 'Y' | |
271 | + AND mi.menu_nm != '메인' | |
272 | + AND up_menu_id = #{menuMainDepth} | |
273 | + UNION ALL | |
274 | + SELECT mt.menu_name || ' > ' || mi.menu_nm AS menu_name | |
275 | + , mi.menu_id | |
276 | + FROM menu_tree AS mt | |
277 | + INNER JOIN menu_info AS mi | |
278 | + ON mt.menu_id = mi.up_menu_id | |
279 | + WHERE mi.use_yn = 'Y' | |
280 | + AND mi.menu_nm != '메인' | |
281 | + ) | |
282 | + select (SELECT menu_name FROM menu_tree WHERE menu_tree.menu_id = menus.menu_id) AS menu_name | |
283 | + , array_agg((SELECT authrt_nm FROM authrt_info WHERE authrt_info.authrt_cd = menus.authrt_cd AND authrt_info.use_yn = 'Y')) AS authrt_nm | |
284 | + , array_agg(cntn_nope) AS cntn_nope | |
285 | + from (select mt.menu_id, mai.authrt_cd, SUM(COALESCE(mcs.cntn_nope, 0)) AS cntn_nope | |
286 | + from menu_tree AS mt | |
287 | + LEFT JOIN menu_authrt_info AS mai | |
288 | + ON mt.menu_id = mai.menu_id | |
289 | + LEFT JOIN authrt_info AS ai | |
290 | + ON mai.authrt_cd = ai.authrt_cd | |
291 | + LEFT JOIN menu_cntn_stats AS mcs | |
292 | + ON mt.menu_id = mcs.menu_id | |
293 | + AND mai.authrt_cd = mcs.authrt_cd | |
294 | + AND TO_DATE(CONCAT(cntn_yr, cntn_mm, cntn_day), 'YYYYMMDD') >= TO_DATE(#{startDt}, 'YYYY-MM-DD') | |
295 | + AND TO_DATE(#{endDt}, 'YYYY-MM-DD') >= TO_DATE(CONCAT(cntn_yr, cntn_mm, cntn_day), 'YYYYMMDD') | |
296 | + WHERE ai.use_yn='Y' | |
297 | + group by mt.menu_id, mai.authrt_cd) as menus | |
298 | + group by menu_id | |
299 | + order by menu_name | |
300 | + </select> | |
301 | + | |
302 | + <!-- | |
303 | + 작 성 자 : 박정하 | |
304 | + 작 성 일 : 2024.05.30 | |
305 | + 내 용 : 메뉴별 접속 통계 목록 개수 조회 | |
306 | + --> | |
307 | + <select id="selectMenuCntnStatsCnt" parameterType="HashMap"> | |
308 | + WITH RECURSIVE menu_tree AS ( | |
309 | + SELECT mi.* | |
310 | + , '' || mi.menu_nm AS name | |
311 | + FROM menu_info mi | |
312 | + WHERE up_menu_id = #{menuMainDepth} | |
313 | + UNION ALL | |
314 | + SELECT mi.* | |
315 | + , mt.name || ' > ' || mi.menu_nm AS name | |
316 | + FROM menu_tree mt | |
317 | + INNER JOIN menu_info mi | |
318 | + ON mt.menu_id = mi.up_menu_id | |
319 | + ) | |
320 | + SELECT SUM(COALESCE(menu.cntn_nope, 0)) | |
321 | + FROM menu_tree | |
322 | + LEFT JOIN ( | |
323 | + SELECT menu_id, cntn_nope | |
324 | + FROM menu_cntn_stats | |
325 | + WHERE to_date(concat(cntn_yr, cntn_mm, cntn_day), 'YYYYMMDD') >= to_date(#{startDt}, 'YYYY-MM-DD') | |
326 | + AND to_date(#{endDt}, 'YYYY-MM-DD') >= to_date(concat(cntn_yr, cntn_mm, cntn_day), 'YYYYMMDD') | |
327 | + ) as menu | |
328 | + on menu_tree.menu_id = menu.menu_id | |
329 | + WHERE menu_tree.use_yn = 'Y' | |
330 | + AND menu_tree.menu_grd != '0' | |
331 | + AND menu_tree.menu_nm != '메인' | |
332 | + </select> | |
333 | + | |
334 | + <!-- | |
335 | + 작 성 자 : 박정하 | |
336 | + 작 성 일 : 2024.05.30 | |
337 | + 내 용 : 게시판 접속 통계 목록 조회 | |
338 | + --> | |
339 | + <select id="selectBbsCntnStats" parameterType="HashMap" resultType="HashMap"> | |
340 | + SELECT (SELECT bbs_nm from bbs_mng where bbs_mng_id = bbs.bbs_mng_id) AS bbs_nm | |
341 | + , array_agg((SELECT authrt_nm FROM authrt_info WHERE authrt_info.authrt_cd = bbs.authrt_cd AND authrt_info.use_yn = 'Y')) AS authrt_nm | |
342 | + , array_agg(coalesce(cntn_nope, 0)) AS cntn_nope | |
343 | + from ( | |
344 | + SELECT bm.bbs_mng_id | |
345 | + , ad.authrt_cd | |
346 | + from bbs_mng as bm | |
347 | + left join ( | |
348 | + SELECT mai.authrt_cd | |
349 | + , menu_type_ctgry | |
350 | + from menu_info as mi | |
351 | + LEFT JOIN menu_authrt_info as mai | |
352 | + on mi.menu_id = mai.menu_id | |
353 | + LEFT JOIN authrt_info AS ai | |
354 | + ON mai.authrt_cd = ai.authrt_cd | |
355 | + WHERE mi.use_yn = 'Y' | |
356 | + AND ai.use_yn='Y' | |
357 | + order by mi.menu_id | |
358 | + ) as ad | |
359 | + on bm.bbs_mng_id = ad.menu_type_ctgry | |
360 | + where bm.use_yn = 'Y' | |
361 | + ) as bbs | |
362 | + left join ( | |
363 | + select bbs_id | |
364 | + , authrt_cd | |
365 | + , sum(cntn_nope) as cntn_nope | |
366 | + from bbs_cntn_stats | |
367 | + where to_date(concat(cntn_yr, cntn_mm, cntn_day), 'YYYYMMDD') >= to_date(#{startDt}, 'YYYY-MM-DD') | |
368 | + AND to_date(#{endDt}, 'YYYY-MM-DD') >= to_date(concat(cntn_yr, cntn_mm, cntn_day), 'YYYYMMDD') | |
369 | + group by bbs_id, authrt_cd | |
370 | + ) as bcs | |
371 | + on bbs.bbs_mng_id = bcs.bbs_id | |
372 | + and bbs.authrt_cd = bcs.authrt_cd | |
373 | + group by bbs_mng_id | |
374 | + </select> | |
375 | + | |
376 | + <!-- | |
377 | + 작 성 자 : 박정하 | |
378 | + 작 성 일 : 2024.05.30 | |
379 | + 내 용 : 게시판 접속 통계 목록 개수 조회 | |
380 | + --> | |
381 | + <select id="selectBbsCntnStatsCnt" parameterType="HashMap"> | |
382 | + SELECT SUM(COALESCE(cntn_nope, 0)) | |
383 | + FROM ( | |
384 | + SELECT bm.bbs_mng_id | |
385 | + , ad.authrt_cd | |
386 | + FROM bbs_mng AS bm | |
387 | + LEFT JOIN ( | |
388 | + SELECT mai.authrt_cd | |
389 | + , menu_type_ctgry | |
390 | + FROM menu_info AS mi | |
391 | + LEFT JOIN menu_authrt_info AS mai | |
392 | + ON mi.menu_id = mai.menu_id | |
393 | + LEFT JOIN authrt_info AS ai | |
394 | + ON mai.authrt_cd = ai.authrt_cd | |
395 | + WHERE mi.use_yn = 'Y' | |
396 | + AND ai.use_yn='Y' | |
397 | + ORDER BY mi.menu_id | |
398 | + ) AS ad | |
399 | + ON bm.bbs_mng_id = ad.menu_type_ctgry | |
400 | + WHERE bm.use_yn = 'Y' | |
401 | + ) AS bbs | |
402 | + LEFT JOIN ( | |
403 | + SELECT bbs_id | |
404 | + , authrt_cd | |
405 | + , SUM(COALESCE(cntn_nope, 0)) as cntn_nope | |
406 | + FROM bbs_cntn_stats | |
407 | + WHERE to_date(concat(cntn_yr, cntn_mm, cntn_day), 'YYYYMMDD') >= to_date(#{startDt}, 'YYYY-MM-DD') | |
408 | + AND to_date(#{endDt}, 'YYYY-MM-DD') >= to_date(concat(cntn_yr, cntn_mm, cntn_day), 'YYYYMMDD') | |
409 | + GROUP BY bbs_id, authrt_cd | |
410 | + ) AS bcs | |
411 | + ON bbs.bbs_mng_id = bcs.bbs_id | |
412 | + AND bbs.authrt_cd = bcs.authrt_cd | |
413 | + </select> | |
414 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/codeManage/codeManage-SQL.xml
... | ... | @@ -0,0 +1,247 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : takensoft | |
5 | + 작성일 : 2024.04.09 | |
6 | + 내 용 : 공통코드 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.codeManage.dao.CodeManageDAO"> | |
9 | + | |
10 | + <!-- | |
11 | + 작성자 : takensoft | |
12 | + 작성일 : 2024.04.09 | |
13 | + 내 용 : 공통코드 중복 확인 | |
14 | + --> | |
15 | + <select id="findByCheckCd" resultType="boolean"> | |
16 | + SELECT COUNT(cd) | |
17 | + FROM cd_mng | |
18 | + WHERE cd = #{cd} | |
19 | + <if test="originCd != null and originCd != ''"> | |
20 | + AND cd != #{originCd} | |
21 | + </if> | |
22 | + </select> | |
23 | + | |
24 | + <!-- | |
25 | + 작성자 : takensoft | |
26 | + 작성일 : 2024.04.09 | |
27 | + 내 용 : 코드 등록 | |
28 | + --> | |
29 | + <insert id="save" parameterType="CodeManageVO"> | |
30 | + INSERT INTO cd_mng ( | |
31 | + cd | |
32 | + , up_cd | |
33 | + , cd_nm | |
34 | + , cd_vl | |
35 | + , cd_expln | |
36 | + , cd_grd | |
37 | + , cd_sn | |
38 | + , use_yn | |
39 | + , sys_pvsn_yn | |
40 | + , rgtr | |
41 | + , reg_dt | |
42 | + ) VALUES ( | |
43 | + #{cd} | |
44 | + , #{upCd} | |
45 | + , #{cdNm} | |
46 | + , #{cdVl} | |
47 | + , #{cdExpln} | |
48 | + , #{cdGrd} | |
49 | + , #{cdSn} | |
50 | + , 'Y' | |
51 | + , 1 | |
52 | + , #{rgtr} | |
53 | + , NOW() | |
54 | + ) | |
55 | + </insert> | |
56 | + | |
57 | + <!-- | |
58 | + 작성자 : takensoft | |
59 | + 작성일 : 2024.04.09 | |
60 | + 내 용 : 코드 깊이 조회 | |
61 | + --> | |
62 | + <select id="findByCdGrd" parameterType="String" resultType="Integer"> | |
63 | + SELECT cd_grd | |
64 | + FROM cd_mng | |
65 | + WHERE cd = #{upCd} | |
66 | + </select> | |
67 | + | |
68 | + <!-- | |
69 | + 작성자 : takensoft | |
70 | + 작성일 : 2024.04.09 | |
71 | + 내 용 : 코드 순서 조회 | |
72 | + --> | |
73 | + <select id="findByCdSn" parameterType="String" resultType="Integer"> | |
74 | + SELECT COALESCE(MAX(cd_sn), 0) | |
75 | + FROM cd_mng | |
76 | + WHERE use_yn = 'Y' | |
77 | + <choose> | |
78 | + <when test="upCd != null and upCd != ''"> | |
79 | + AND up_cd = #{upCd} | |
80 | + </when> | |
81 | + <otherwise> | |
82 | + AND up_cd IS NULL | |
83 | + </otherwise> | |
84 | + </choose> | |
85 | + </select> | |
86 | + | |
87 | + <sql id="selectCd"> | |
88 | + SELECT cd | |
89 | + , up_cd | |
90 | + , cd_nm | |
91 | + , cd_vl | |
92 | + , cd_expln | |
93 | + , cd_grd | |
94 | + , cd_sn | |
95 | + , use_yn | |
96 | + , sys_pvsn_yn | |
97 | + , rgtr | |
98 | + , TO_CHAR(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
99 | + , mdfr | |
100 | + , TO_CHAR(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
101 | + FROM cd_mng | |
102 | + </sql> | |
103 | + <!-- | |
104 | + 작성자 : takensoft | |
105 | + 작성일 : 2024.04.09 | |
106 | + 내 용 : 최상위 코드 조회 [관리자용] | |
107 | + --> | |
108 | + <select id="findTopCd" resultType="CodeManageVO"> | |
109 | + <include refid="selectCd" /> | |
110 | + WHERE up_cd IS NULL | |
111 | + ORDER BY cd_sn | |
112 | + </select> | |
113 | + | |
114 | + <!-- | |
115 | + 작성자 : takensoft | |
116 | + 작성일 : 2024.04.09 | |
117 | + 내 용 : 하위 코드 조회 [관리자용] | |
118 | + --> | |
119 | + <select id="findChildCd" parameterType="String" resultType="CodeManageVO"> | |
120 | + <include refid="selectCd" /> | |
121 | + WHERE up_cd = #{cd} | |
122 | + ORDER BY cd_sn | |
123 | + </select> | |
124 | + | |
125 | + <!-- | |
126 | + 작성자 : takensoft | |
127 | + 작성일 : 2024.04.09 | |
128 | + 내 용 : 하위 코드 조회 [사용자용] | |
129 | + --> | |
130 | + <select id="findChildCdUser" parameterType="String" resultType="CodeManageVO"> | |
131 | + <include refid="selectCd" /> | |
132 | + WHERE up_cd = #{cd} | |
133 | + AND use_yn = 'Y' | |
134 | + ORDER BY cd_sn | |
135 | + </select> | |
136 | + | |
137 | + <!-- | |
138 | + 작성자 : takensoft | |
139 | + 작성일 : 2024.04.09 | |
140 | + 내 용 : 코드 상세 조회 | |
141 | + --> | |
142 | + <select id="findByCd" parameterType="String" resultType="CodeManageVO"> | |
143 | + SELECT cm.cd | |
144 | + , cm.up_cd | |
145 | + , cm2.cd_nm AS up_cd_nm | |
146 | + , cm.cd_nm | |
147 | + , cm.cd_vl | |
148 | + , cm.cd_expln | |
149 | + , cm.cd_grd | |
150 | + , cm.cd_sn | |
151 | + , cm.use_yn | |
152 | + , cm.sys_pvsn_yn | |
153 | + , cm.rgtr | |
154 | + , TO_CHAR(cm.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
155 | + , cm.mdfr | |
156 | + , TO_CHAR(cm.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
157 | + FROM cd_mng cm | |
158 | + LEFT JOIN cd_mng cm2 | |
159 | + ON cm.up_cd = cm2.cd | |
160 | + WHERE cm.cd = #{cd} | |
161 | + </select> | |
162 | + | |
163 | + <!-- | |
164 | + 작성자 : takensoft | |
165 | + 작성일 : 2024.04.15 | |
166 | + 내 용 : 코드 수정 | |
167 | + --> | |
168 | + <update id="update" parameterType="CodeManageVO"> | |
169 | + UPDATE cd_mng | |
170 | + SET cd = #{cd} | |
171 | + , up_cd = #{upCd} | |
172 | + , cd_nm = #{cdNm} | |
173 | + , cd_vl = #{cdVl} | |
174 | + , cd_expln = #{cdExpln} | |
175 | + , cd_grd = #{cdGrd} | |
176 | + , cd_sn = #{cdSn} | |
177 | + , use_yn = #{useYn} | |
178 | + , mdfr = #{mdfr} | |
179 | + , mdfcn_dt = NOW() | |
180 | + WHERE cd = #{originCd} | |
181 | + </update> | |
182 | + | |
183 | + <!-- | |
184 | + 작성자 : takensoft | |
185 | + 작성일 : 2024.04.26 | |
186 | + 내 용 : 상위코드가 수정됨에 따라 하위코드의 상위코드값 변경 | |
187 | + --> | |
188 | + <update id="updateUpCd" parameterType="CodeManageVO"> | |
189 | + UPDATE cd_mng | |
190 | + SET up_cd = #{cd} | |
191 | + WHERE up_cd = #{originCd} | |
192 | + </update> | |
193 | + | |
194 | + <!-- | |
195 | + 작성자 : takensoft | |
196 | + 작성일 : 2024.04.23 | |
197 | + 내 용 : 코드 삭제 | |
198 | + --> | |
199 | + <delete id="deleteCd" parameterType="String"> | |
200 | + WITH RECURSIVE CodeHierarchy AS ( | |
201 | + SELECT cd | |
202 | + , up_cd | |
203 | + FROM cd_mng | |
204 | + WHERE cd = #{cd} | |
205 | + UNION ALL | |
206 | + SELECT cm.cd | |
207 | + , cm.up_cd | |
208 | + FROM cd_mng cm | |
209 | + JOIN CodeHierarchy ch | |
210 | + ON cm.up_cd = ch.cd | |
211 | + ) | |
212 | + DELETE FROM cd_mng WHERE cd IN (SELECT cd FROM CodeHierarchy) | |
213 | + </delete> | |
214 | + | |
215 | + <!-- 공통코드 관리(관리자 페이지 Tree 호출 전용) --> | |
216 | + <sql id="selectNode"> | |
217 | + SELECT cd AS id | |
218 | + , up_cd AS up_id | |
219 | + , cd_nm AS nm | |
220 | + FROM cd_mng | |
221 | + </sql> | |
222 | + <select id="findByTopNode" resultType="HierachyVO"> | |
223 | + <include refid="selectNode" /> | |
224 | + WHERE up_cd IS NULL | |
225 | + ORDER BY cd_sn | |
226 | + </select> | |
227 | + <select id="findChildNode" parameterType="String" resultType="HierachyVO"> | |
228 | + <include refid="selectNode" /> | |
229 | + WHERE up_cd = #{id} | |
230 | + ORDER BY cd_sn | |
231 | + </select> | |
232 | + | |
233 | + <!-- | |
234 | + 작성자 : 박정하 | |
235 | + 작성일 : 2024.05.10 | |
236 | + 내 용 : 공통 코드 정보 수정 (hierachyVO 사용) | |
237 | + --> | |
238 | + <update id="codeUpdateByHierachy" parameterType="CodeManageVO"> | |
239 | + UPDATE cd_mng | |
240 | + SET up_cd = #{upCd} | |
241 | + , cd_grd = #{cdGrd} | |
242 | + , cd_sn = #{cdSn} | |
243 | + , mdfr = #{mdfr} | |
244 | + , mdfcn_dt = NOW() | |
245 | + WHERE cd = #{cd} | |
246 | + </update> | |
247 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/common/Idgen-SQL.xml
... | ... | @@ -0,0 +1,39 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : takensoft | |
5 | + 작성일 : 2024.01.01 | |
6 | + 내 용 : idgen 관련 mapper | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.common.idgen.dao.IdgenMapper"> | |
9 | + | |
10 | + <!-- | |
11 | + 작 성 자 : takensoft | |
12 | + 작 성 일 : 2024.01.01 | |
13 | + 내 용 : 테이블명으로 시퀀스 조회 | |
14 | + --> | |
15 | + <select id="selectNextId" parameterType="String" resultType="IdgenVO"> | |
16 | + SELECT aftr_id | |
17 | + FROM cmmn_idgn | |
18 | + WHERE tbl_nm = #{tblNm} | |
19 | + </select> | |
20 | + | |
21 | + <!-- | |
22 | + 작 성 자 : takensoft | |
23 | + 작 성 일 : 2024.04.01 | |
24 | + 내 용 : 시퀀스 등록 및 수정 | |
25 | + --> | |
26 | + <insert id="upsertSeqNmg" parameterType="IdgenVO"> | |
27 | + INSERT INTO cmmn_idgn ( | |
28 | + tbl_nm | |
29 | + , aftr_id | |
30 | + ) VALUES ( | |
31 | + #{tblNm} | |
32 | + , #{aftrId} | |
33 | + ) | |
34 | + ON CONFLICT (tbl_nm) | |
35 | + DO UPDATE | |
36 | + SET aftr_id = #{aftrId} | |
37 | + </insert> | |
38 | + | |
39 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/common/file-SQL.xml
... | ... | @@ -0,0 +1,103 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.takensoft.common.file.dao.FileDAO"> | |
4 | + <!-- 파일 resultMap --> | |
5 | + <resultMap id="fileMap" type="HashMap"> | |
6 | + <result property="fileId" column="file_id" /> | |
7 | + <result property="fileMngId" column="file_mng_id" /> | |
8 | + <result property="fileNm" column="file_nm" /> | |
9 | + <result property="maskNm" column="mask_nm" /> | |
10 | + <result property="fileType" column="file_type" /> | |
11 | + <result property="absltPath" column="abslt_path" /> | |
12 | + <result property="partPath" column="part_path" /> | |
13 | + <result property="extnNm" column="extn_nm" /> | |
14 | + <result property="fileSz" column="file_sz" /> | |
15 | + <result property="rgtr" column="rgtr" /> | |
16 | + <result property="regDt" column="reg_dt" /> | |
17 | + </resultMap> | |
18 | + | |
19 | + <!-- | |
20 | + 작 성 자 : 박정하 | |
21 | + 작 성 일 : 2024.03.26 | |
22 | + 내 용 : 파일 등록 | |
23 | + --> | |
24 | + <insert id="fileInsert" parameterType="HashMap"> | |
25 | + INSERT INTO cmmn_file ( | |
26 | + file_mng_id | |
27 | + , file_nm | |
28 | + , mask_nm | |
29 | + , file_type | |
30 | + , abslt_path | |
31 | + , part_path | |
32 | + , extn_nm | |
33 | + , file_sz | |
34 | + , rgtr | |
35 | + , reg_dt | |
36 | + ) VALUES ( | |
37 | + #{fileMngId} | |
38 | + , #{fileNm} | |
39 | + , #{maskNm} | |
40 | + , #{fileType} | |
41 | + , #{absltPath} | |
42 | + , #{partPath} | |
43 | + , #{extnNm} | |
44 | + , #{fileSz} | |
45 | + , #{rgtr} | |
46 | + , now() | |
47 | + ) | |
48 | + </insert> | |
49 | + | |
50 | + <!-- | |
51 | + 작 성 자 : 박정하 | |
52 | + 작 성 일 : 2024.03.26 | |
53 | + 내 용 : 파일 목록 조회 | |
54 | + --> | |
55 | + <select id="fileSelectList" parameterType="String" resultMap="fileMap"> | |
56 | + SELECT file_id | |
57 | + , file_mng_id | |
58 | + , file_nm | |
59 | + , mask_nm | |
60 | + , file_type | |
61 | + , abslt_path | |
62 | + , part_path | |
63 | + , extn_nm | |
64 | + , file_sz | |
65 | + , rgtr | |
66 | + , reg_dt | |
67 | + FROM cmmn_file | |
68 | + WHERE file_mng_id = #{fileMngId} | |
69 | + ORDER BY file_id ASC | |
70 | + </select> | |
71 | + | |
72 | + <!-- | |
73 | + 작 성 자 : 박정하 | |
74 | + 작 성 일 : 2024.03.27 | |
75 | + 내 용 : 파일 삭제 | |
76 | + --> | |
77 | + <delete id="fileDelete" parameterType="HashMap"> | |
78 | + DELETE | |
79 | + FROM cmmn_file | |
80 | + WHERE file_id = #{fileId} | |
81 | + </delete> | |
82 | + | |
83 | + <!-- | |
84 | + 작 성 자 : 방선주 | |
85 | + 작 성 일 : 2024.05.21 | |
86 | + 내 용 : 파일 단일 조회 | |
87 | + --> | |
88 | + <select id="fileSelectOne" parameterType="Integer" resultType="FileVO"> | |
89 | + SELECT file_id | |
90 | + , file_mng_id | |
91 | + , file_nm | |
92 | + , mask_nm | |
93 | + , file_type | |
94 | + , abslt_path | |
95 | + , part_path | |
96 | + , extn_nm | |
97 | + , file_sz | |
98 | + , rgtr | |
99 | + , reg_dt | |
100 | + FROM cmmn_file | |
101 | + WHERE file_id = #{fileId} | |
102 | + </select> | |
103 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/common/fileManage-SQL.xml
... | ... | @@ -0,0 +1,43 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.takensoft.common.file.dao.FileMngDAO"> | |
4 | + <!-- | |
5 | + 작 성 자 : 박정하 | |
6 | + 작 성 일 : 2024.03.26 | |
7 | + 내 용 : 파일매니저 등록 | |
8 | + --> | |
9 | + <insert id="fileMngInsert" parameterType="HashMap"> | |
10 | + INSERT INTO cmmn_file_mng ( | |
11 | + file_mng_id | |
12 | + , rgtr | |
13 | + , reg_dt | |
14 | + ) VALUES ( | |
15 | + #{fileMngId} | |
16 | + , #{rgtr} | |
17 | + , now() | |
18 | + ) | |
19 | + </insert> | |
20 | + | |
21 | + <!-- | |
22 | + 작 성 자 : 박정하 | |
23 | + 작 성 일 : 2024.03.27 | |
24 | + 내 용 : 파일매니저 수정 | |
25 | + --> | |
26 | + <update id="fileMngUpadate" parameterType="HashMap"> | |
27 | + UPDATE cmmn_file_mng | |
28 | + SET mdfr = #{mdfr} | |
29 | + , mdfcn_dt = now() | |
30 | + WHERE file_mng_id = #{fileMngId} | |
31 | + </update> | |
32 | + | |
33 | + <!-- | |
34 | + 작 성 자 : 박정하 | |
35 | + 작 성 일 : 2024.03.27 | |
36 | + 내 용 : 파일매니저 삭제 | |
37 | + --> | |
38 | + <delete id="fileMngDelete" parameterType="HashMap"> | |
39 | + DELETE | |
40 | + FROM cmmn_file_mng | |
41 | + WHERE file_mng_id = #{fileMngId} | |
42 | + </delete> | |
43 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/contsType/contsType-SQL.xml
... | ... | @@ -0,0 +1,219 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : takensoft | |
5 | + 작성일 : 2024.04.17 | |
6 | + 내 용 : 콘텐츠 유형 관리 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.contsType.dao.ContsTypeDAO"> | |
9 | + | |
10 | + <!-- 콘텐츠 조회(라우터 조회용 - 권한포함) --> | |
11 | + <resultMap id="contsAuthrtMap" type="ContsAuthrtVO"> | |
12 | + <result property="contsId" column="conts_id" /> | |
13 | +<!-- <result property="menuId" column="menu_id" />--> | |
14 | + <result property="contsKornNm" column="conts_korn_nm" /> | |
15 | + <result property="contsEngNm" column="conts_eng_nm" /> | |
16 | + <result property="pageCrs" column="page_crs" /> | |
17 | + <result property="mngrPageCrs" column="mngr_page_crs" /> | |
18 | + <result property="compnCrs" column="compn_crs" /> | |
19 | + <collection property="authrtList" ofType="MenuAuthorVO"> | |
20 | + <result property="authrtCd" column="authrt_cd" /> | |
21 | + <result property="menuId" column="menu_id" /> | |
22 | + <result property="inqAuthrt" column="inq_authrt" /> | |
23 | + <result property="regAuthrt" column="reg_authrt" /> | |
24 | + <result property="mdfcnAuthrt" column="mdfcn_authrt" /> | |
25 | + <result property="delAuthrt" column="del_authrt" /> | |
26 | + <result property="fileDwnldAuthrt" column="file_dwnld_authrt" /> | |
27 | + </collection> | |
28 | + </resultMap> | |
29 | + | |
30 | + <!-- | |
31 | + 작성자 : takensoft | |
32 | + 작성일 : 2024.04.17 | |
33 | + 내 용 : 콘텐츠 유형 등록 | |
34 | + --> | |
35 | + <insert id="save" parameterType="ContsTypeVO"> | |
36 | + INSERT INTO conts_type_mng ( | |
37 | + conts_id | |
38 | + , conts_korn_nm | |
39 | + , conts_eng_nm | |
40 | + , page_crs | |
41 | + , mngr_page_crs | |
42 | + , compn_crs | |
43 | + , expsr_yn | |
44 | + , use_yn | |
45 | + , sys_pvsn_yn | |
46 | + , rgtr | |
47 | + , reg_dt | |
48 | + ) VALUES ( | |
49 | + #{contsId} | |
50 | + , #{contsKornNm} | |
51 | + , #{contsEngNm} | |
52 | + , #{pageCrs} | |
53 | + , #{mngrPageCrs} | |
54 | + , #{compnCrs} | |
55 | + , #{expsrYn} | |
56 | + , 'Y' | |
57 | + , '1' | |
58 | + , #{rgtr} | |
59 | + , NOW() | |
60 | + ) | |
61 | + </insert> | |
62 | + | |
63 | + <!-- | |
64 | + 작성자 : takensoft | |
65 | + 작성일 : 2024.04.17 | |
66 | + 내 용 : 콘텐츠 유형 수정 | |
67 | + --> | |
68 | + <update id="update" parameterType="ContsTypeVO"> | |
69 | + UPDATE conts_type_mng | |
70 | + SET conts_korn_nm = #{contsKornNm} | |
71 | + , conts_eng_nm = #{contsEngNm} | |
72 | + , page_crs = #{pageCrs} | |
73 | + , mngr_page_crs = #{mngrPageCrs} | |
74 | + , compn_crs = #{compnCrs} | |
75 | + , expsr_yn = #{expsrYn} | |
76 | + , use_yn = #{useYn} | |
77 | + , mdfr = #{mdfr} | |
78 | + , mdfcn_dt = NOW() | |
79 | + WHERE conts_id = #{contsId} | |
80 | + </update> | |
81 | + | |
82 | + <sql id="selectContsType"> | |
83 | + SELECT conts_id | |
84 | + , conts_korn_nm | |
85 | + , conts_eng_nm | |
86 | + , page_crs | |
87 | + , mngr_page_crs | |
88 | + , compn_crs | |
89 | + , expsr_yn | |
90 | + , use_yn | |
91 | + , sys_pvsn_yn | |
92 | + , rgtr | |
93 | + , to_char(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
94 | + , mdfr | |
95 | + , to_char(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
96 | + FROM conts_type_mng | |
97 | + </sql> | |
98 | + | |
99 | + <!-- 검색 조건 --> | |
100 | + <sql id="selectRequirement"> | |
101 | + <if test="searchText != null and searchText != ''"> | |
102 | + AND conts_korn_nm LIKE '%' || #{searchText} || '%' | |
103 | + </if> | |
104 | + </sql> | |
105 | + | |
106 | + <!-- | |
107 | + 작성자 : takensoft | |
108 | + 작성일 : 2024.04.17 | |
109 | + 내 용 : 콘텐츠 유형 목록 조회 | |
110 | + --> | |
111 | + <select id="findAll" parameterType="Pagination" resultType="ContsTypeVO"> | |
112 | + <include refid="selectContsType" /> | |
113 | + WHERE use_yn = 'Y' | |
114 | + <include refid="selectRequirement" /> | |
115 | + ORDER BY conts_id DESC | |
116 | + OFFSET #{limitStart} LIMIT #{recordSize} | |
117 | + </select> | |
118 | + | |
119 | + <!-- | |
120 | + 작성자 : takensoft | |
121 | + 작성일 : 2024.04.17 | |
122 | + 내 용 : 콘텐츠 유형 목록 조회(사용자 등록 항목[sys_pvsn_yn = 0]) | |
123 | + --> | |
124 | + <select id="findByContsTypeSys" parameterType="ContsTypeVO" resultType="ContsTypeVO"> | |
125 | + <include refid="selectContsType" /> | |
126 | + WHERE use_yn = 'Y' | |
127 | +-- AND sys_pvsn_yn = '0' | |
128 | + </select> | |
129 | + | |
130 | + <!-- | |
131 | + 작성자 : takensoft | |
132 | + 작성일 : 2024.04.17 | |
133 | + 내 용 : 콘텐츠 유형 상세 조회 | |
134 | + --> | |
135 | + <select id="findByContsType" parameterType="String" resultType="ContsTypeVO"> | |
136 | + <include refid="selectContsType" /> | |
137 | + WHERE conts_id = #{contsId} | |
138 | + </select> | |
139 | + | |
140 | + <!-- | |
141 | + 작성자 : 박정하 | |
142 | + 작성일 : 2024.04.23 | |
143 | + 내 용 : 콘텐츠 유형 목록 갯수(관리자 페이지용) | |
144 | + --> | |
145 | + <select id="findAllCnt" parameterType="Pagination" resultType="Integer"> | |
146 | + SELECT COUNT(conts_id) | |
147 | + FROM conts_type_mng | |
148 | + WHERE use_yn = 'Y' | |
149 | + <include refid="selectRequirement" /> | |
150 | + </select> | |
151 | + | |
152 | + <!-- | |
153 | + 작성자 : 박정하 | |
154 | + 작성일 : 2024.04.29 | |
155 | + 내 용 : 콘텐츠 유형 목록 조회 (메뉴 노출 건만 - 사용자 등록 항목[sys_pvsn_yn = 1]) | |
156 | + --> | |
157 | + <select id="findAllByExpsr" parameterType="ContsTypeVO" resultType="ContsTypeVO"> | |
158 | + <include refid="selectContsType" /> | |
159 | + WHERE use_yn = 'Y' | |
160 | + AND expsr_yn = 'Y' | |
161 | +<!-- <if test="sysPvsnYn != null and sysPvsnYn != ''">--> | |
162 | +<!-- AND sys_pvsn_yn = #{sysPvsnYn}--> | |
163 | +<!-- </if>--> | |
164 | + <choose> | |
165 | + <when test="sysPvsnYn != null and sysPvsnYn != ''"> | |
166 | + ORDER BY conts_id ASC | |
167 | + </when> | |
168 | + <otherwise> | |
169 | + ORDER BY conts_id DESC | |
170 | + </otherwise> | |
171 | + </choose> | |
172 | + </select> | |
173 | + | |
174 | + <!-- | |
175 | + 작성자 : takensoft | |
176 | + 작성일 : 2024.05.02 | |
177 | + 내 용 : 콘텐츠 조회(권한 포함) | |
178 | + --> | |
179 | + <select id="findByContsAuthrt" resultMap="contsAuthrtMap"> | |
180 | + SELECT ctm.conts_id | |
181 | + , ctm.conts_korn_nm | |
182 | + , ctm.conts_eng_nm | |
183 | + , ctm.page_crs | |
184 | + , ctm.compn_crs | |
185 | + , mi.menu_id | |
186 | + , mai.authrt_cd | |
187 | + , mai.inq_authrt | |
188 | + , mai.reg_authrt | |
189 | + , mai.mdfcn_authrt | |
190 | + , mai.del_authrt | |
191 | + , mai.file_dwnld_authrt | |
192 | + FROM ( SELECT conts_id | |
193 | + , conts_korn_nm | |
194 | + , conts_eng_nm | |
195 | + , page_crs | |
196 | + , compn_crs | |
197 | + FROM conts_type_mng | |
198 | + WHERE use_yn = 'Y' | |
199 | + AND page_crs IS NOT NULL | |
200 | + AND page_crs != '' | |
201 | + | |
202 | + UNION ALL | |
203 | + | |
204 | + SELECT conts_id | |
205 | + , conts_korn_nm | |
206 | + , concat('adm', conts_eng_nm) AS conts_eng_nm | |
207 | + , mngr_page_crs AS page_crs | |
208 | + , compn_crs | |
209 | + FROM conts_type_mng | |
210 | + WHERE use_yn = 'Y' | |
211 | + AND mngr_page_crs IS NOT NULL | |
212 | + AND mngr_page_crs != '' | |
213 | + ) ctm | |
214 | + LEFT JOIN menu_info mi | |
215 | + ON ctm.conts_id = mi.menu_type_ctgry | |
216 | + LEFT JOIN menu_authrt_info mai | |
217 | + ON mi.menu_id = mai.menu_id | |
218 | + </select> | |
219 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/dept/dept-SQL.xml
... | ... | @@ -0,0 +1,343 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : takensoft | |
5 | + 작성일 : 2024.04.24 | |
6 | + 내 용 : 부서 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.dept.dao.DeptDAO"> | |
9 | + <!-- 부서 정보 resultMap(권한포함) --> | |
10 | + <resultMap id="deptMap" type="DeptVO"> | |
11 | + <result property="deptId" column="dept_id" /> | |
12 | + <result property="upDeptId" column="up_dept_id" /> | |
13 | + <result property="deptNm" column="dept_nm" /> | |
14 | + <result property="upDeptNm" column="up_dept_nm" /> | |
15 | + <result property="deptExpln" column="dept_expln" /> | |
16 | + <result property="deptGrd" column="dept_grd" /> | |
17 | + <result property="deptSn" column="dept_sn" /> | |
18 | + <result property="useYn" column="use_yn" /> | |
19 | + <result property="rgtr" column="rgtr" /> | |
20 | + <result property="regDt" column="reg_dt" /> | |
21 | + <result property="mdfr" column="mdfr" /> | |
22 | + <result property="mdfcnDt" column="mdfcn_dt" /> | |
23 | + <collection property="authrtList" column="{deptId = dept_id}" javaType="java.util.ArrayList" ofType="DeptAuthrtVO" select="findByDeptAuthrt" /> | |
24 | + </resultMap> | |
25 | + | |
26 | + <!-- 부서, 권한 매핑 --> | |
27 | + <resultMap id="authMap" type="DeptAuthrtVO"> | |
28 | + <result property="deptId" column="dept_id" /> | |
29 | + <result property="authrtCd" column="authrt_cd" /> | |
30 | + <result property="rgtr" column="rgtr" /> | |
31 | + <result property="regDt" column="reg_dt" /> | |
32 | + </resultMap> | |
33 | + | |
34 | + <!-- | |
35 | + 작성자 : takensoft | |
36 | + 작성일 : 2024.04.25 | |
37 | + 내 용 : 부서 등록 | |
38 | + --> | |
39 | + <insert id="save" parameterType="DeptVO"> | |
40 | + INSERT INTO dept_info ( | |
41 | + dept_id | |
42 | + , up_dept_id | |
43 | + , dept_nm | |
44 | + , dept_expln | |
45 | + , dept_grd | |
46 | + , dept_sn | |
47 | + , use_yn | |
48 | + , rgtr | |
49 | + , reg_dt | |
50 | + ) VALUES ( | |
51 | + #{deptId} | |
52 | + , #{upDeptId} | |
53 | + , #{deptNm} | |
54 | + , #{deptExpln} | |
55 | + , #{deptGrd} | |
56 | + , #{deptSn} | |
57 | + , 'Y' | |
58 | + , #{rgtr} | |
59 | + , NOW() | |
60 | + ) | |
61 | + </insert> | |
62 | + | |
63 | + <!-- | |
64 | + 작성자 : takensoft | |
65 | + 작성일 : 2024.04.25 | |
66 | + 내 용 : 부서 권한 등록 | |
67 | + --> | |
68 | + <insert id="authrtSave" parameterType="DeptAuthrtVO"> | |
69 | + INSERT INTO dept_authrt_info ( | |
70 | + authrt_cd | |
71 | + , dept_id | |
72 | + , rgtr | |
73 | + , reg_dt | |
74 | + ) VALUES ( | |
75 | + #{authrtCd} | |
76 | + , #{deptId} | |
77 | + , #{rgtr} | |
78 | + , NOW() | |
79 | + ) | |
80 | + </insert> | |
81 | + | |
82 | + <!-- | |
83 | + 작성자 : takensoft | |
84 | + 작성일 : 2024.04.29 | |
85 | + 내 용 : 부서 사용자 등록 | |
86 | + --> | |
87 | + <insert id="deptMbrSave" parameterType="DeptMbrVO"> | |
88 | + INSERT INTO dept_mbr_info ( | |
89 | + dept_id | |
90 | + , mbr_id | |
91 | + , rgtr | |
92 | + , reg_dt | |
93 | + ) VALUES ( | |
94 | + #{deptId} | |
95 | + , #{mbrId} | |
96 | + , #{rgtr} | |
97 | + , NOW() | |
98 | + ) | |
99 | + </insert> | |
100 | + | |
101 | + <!-- | |
102 | + 작성자 : takensoft | |
103 | + 작성일 : 2024.04.25 | |
104 | + 내 용 : 부서 깊이(레벨) 조회 | |
105 | + --> | |
106 | + <select id="findByDeptGrd" parameterType="String" resultType="Integer"> | |
107 | + SELECT dept_grd | |
108 | + FROM dept_info | |
109 | + WHERE dept_id = #{upDeptId} | |
110 | + </select> | |
111 | + | |
112 | + <!-- | |
113 | + 작성자 : takensoft | |
114 | + 작성일 : 2024.04.25 | |
115 | + 내 용 : 부서 순서 조회 | |
116 | + --> | |
117 | + <select id="findByDeptSn" parameterType="String" resultType="Integer"> | |
118 | + SELECT COALESCE(MAX(dept_sn), 0) | |
119 | + FROM dept_info | |
120 | + WHERE use_yn = 'Y' | |
121 | + <choose> | |
122 | + <when test="upDeptId != null and upDeptId != ''"> | |
123 | + AND up_dept_id = #{upDeptId} | |
124 | + </when> | |
125 | + <otherwise> | |
126 | + AND up_dept_id IS NULL | |
127 | + </otherwise> | |
128 | + </choose> | |
129 | + </select> | |
130 | + | |
131 | + <!-- 부서 관리(관리자 페이지 Tree 호출용) --> | |
132 | + <sql id="selecteNode"> | |
133 | + SELECT dept_id AS id | |
134 | + , up_dept_id AS up_id | |
135 | + , dept_nm AS nm | |
136 | + FROM dept_info | |
137 | + </sql> | |
138 | + <!-- | |
139 | + 작성자 : takensoft | |
140 | + 작성일 : 2024.04.25 | |
141 | + 내 용 : 상위 부서 조회 | |
142 | + --> | |
143 | + <select id="findByTopNode" resultType="HierachyVO"> | |
144 | + <include refid="selecteNode" /> | |
145 | + WHERE up_dept_id IS NULL | |
146 | + AND use_yn = 'Y' | |
147 | + ORDER BY dept_sn | |
148 | + </select> | |
149 | + <!-- | |
150 | + 작성자 : takensoft | |
151 | + 작성일 : 2024.04.25 | |
152 | + 내 용 : 하위 부서 조회 | |
153 | + --> | |
154 | + <select id="findChildNode" parameterType="String" resultType="HierachyVO"> | |
155 | + <include refid="selecteNode" /> | |
156 | + WHERE up_dept_id = #{id} | |
157 | + AND use_yn = 'Y' | |
158 | + ORDER BY dept_sn | |
159 | + </select> | |
160 | + <!-- 부서 관리(관리자 페이지 Tree 호출용) --> | |
161 | + | |
162 | + <!-- | |
163 | + 작성자 : takensoft | |
164 | + 작성일 : 2024.04.26 | |
165 | + 내 용 : 부서정보 조회 | |
166 | + --> | |
167 | + <select id="findByDept" parameterType="String" resultMap="deptMap"> | |
168 | + SELECT di.dept_id | |
169 | + , di.up_dept_id | |
170 | + , di.dept_nm | |
171 | + , di2.dept_nm AS up_dept_nm | |
172 | + , di.dept_expln | |
173 | + , di.dept_grd | |
174 | + , di.dept_sn | |
175 | + , di.use_yn | |
176 | + , di.rgtr | |
177 | + , TO_CHAR(di.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
178 | + , di.mdfr | |
179 | + , TO_CHAR(di.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
180 | + FROM dept_info di | |
181 | + LEFT JOIN dept_info di2 | |
182 | + ON di.up_dept_id = di2.dept_id | |
183 | + WHERE di.dept_id = #{deptId} | |
184 | + </select> | |
185 | + | |
186 | + <!-- | |
187 | + 작성자 : takensoft | |
188 | + 작성일 : 2024.04.26 | |
189 | + 내 용 : 부서 권한 정보 조회 | |
190 | + --> | |
191 | + <select id="findByDeptAuthrt" parameterType="DeptVO" resultMap="authMap"> | |
192 | + SELECT dai.authrt_cd | |
193 | + , dai.dept_id | |
194 | + , dai.rgtr | |
195 | + , TO_CHAR(dai.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
196 | + FROM dept_authrt_info dai | |
197 | + WHERE dai.dept_id = #{deptId} | |
198 | + </select> | |
199 | + | |
200 | + <!-- | |
201 | + 작성자 : takensoft | |
202 | + 작성일 : 2024.04.26 | |
203 | + 내 용 : 부서정보 수정 | |
204 | + --> | |
205 | + <update id="update" parameterType="DeptVO"> | |
206 | + UPDATE dept_info | |
207 | + SET up_dept_id = #{upDeptId} | |
208 | + , dept_nm = #{deptNm} | |
209 | + , dept_expln = #{deptExpln} | |
210 | + , dept_grd = #{deptGrd} | |
211 | + , dept_sn = #{deptSn} | |
212 | + , use_yn = #{useYn} | |
213 | + , mdfr = #{mdfr} | |
214 | + , mdfcn_dt = NOW() | |
215 | + WHERE dept_id = #{deptId} | |
216 | + </update> | |
217 | + | |
218 | + <!-- | |
219 | + 작성자 : takensoft | |
220 | + 작성일 : 2024.04.26 | |
221 | + 내 용 : 부서권한 삭제 | |
222 | + --> | |
223 | + <delete id="deleteAuth" parameterType="String"> | |
224 | + DELETE | |
225 | + FROM dept_authrt_info | |
226 | + WHERE dept_id = #{deptId} | |
227 | + </delete> | |
228 | + | |
229 | + <!-- | |
230 | + 작성자 : takensoft | |
231 | + 작성일 : 2024.04.26 | |
232 | + 내 용 : 부서 사용자 등록을 위한 사용자 정보 목록 조회 (부서에 등록되지 않은 사용자 목록) | |
233 | + --> | |
234 | + <select id="findByMber" parameterType="Map" resultType="DeptMbrVO"> | |
235 | + SELECT mi.mbr_id | |
236 | + , mi.lgn_id | |
237 | + , mi.mbr_nm | |
238 | + , mi.ncnm | |
239 | + , mi.eml | |
240 | + , mi.mbl_telno | |
241 | + FROM mbr_info mi | |
242 | + WHERE NOT EXISTS ( | |
243 | + SELECT 1 | |
244 | + FROM dept_mbr_info dmi | |
245 | + WHERE dmi.mbr_id = mi.mbr_id | |
246 | + ) | |
247 | + AND mi.use_yn = 'Y' | |
248 | + AND mi.mbr_stts = '1' | |
249 | + <if test="searchText != null and searchText != ''"> | |
250 | + AND mi.mbr_nm LIKE '%' || #{searchText} || '%' | |
251 | + </if> | |
252 | + </select> | |
253 | + | |
254 | + <!-- | |
255 | + 작성자 : takensoft | |
256 | + 작성일 : 2024.04.26 | |
257 | + 내 용 : 부서에 등록된 사용자 목록 조회 | |
258 | + --> | |
259 | + <select id="findByDeptMber" parameterType="String" resultType="DeptMbrVO"> | |
260 | + SELECT dmi.dept_id | |
261 | + , mi.mbr_id | |
262 | + , mi.lgn_id | |
263 | + , mi.mbr_nm | |
264 | + , mi.ncnm | |
265 | + , mi.eml | |
266 | + , mi.mbl_telno | |
267 | + , dmi.rgtr | |
268 | + , TO_CHAR(dmi.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
269 | + FROM dept_mbr_info dmi | |
270 | + LEFT JOIN mbr_info mi | |
271 | + ON dmi.mbr_id = mi.mbr_id | |
272 | + WHERE dmi.dept_id = #{deptId} | |
273 | + </select> | |
274 | + | |
275 | + <!-- | |
276 | + 작성자 : takensoft | |
277 | + 작성일 : 2024.04.26 | |
278 | + 내 용 : 상위,하위 부서 삭제 | |
279 | + --> | |
280 | + <update id="deleteDept" parameterType="String"> | |
281 | + WITH RECURSIVE DeptHierarchy AS ( | |
282 | + SELECT dept_id | |
283 | + , up_dept_id | |
284 | + FROM dept_info | |
285 | + WHERE dept_id = #{deptId} | |
286 | + UNION ALL | |
287 | + SELECT di.dept_id | |
288 | + , di.up_dept_id | |
289 | + FROM dept_info di | |
290 | + JOIN DeptHierarchy dh | |
291 | + ON di.up_dept_id = dh.dept_id | |
292 | + ) | |
293 | + UPDATE dept_info SET use_yn = 'N' WHERE dept_id IN (SELECT dept_id FROM DeptHierarchy); | |
294 | + </update> | |
295 | + | |
296 | + <!-- | |
297 | + 작성자 : takensoft | |
298 | + 작성일 : 2024.04.26 | |
299 | + 내 용 : 상위, 하위 부서 삭제에 따른 부서의 사용자 삭제 | |
300 | + --> | |
301 | + <delete id="deleteDeptInDeptMbr" parameterType="String"> | |
302 | + WITH RECURSIVE DeptHierarchy AS ( | |
303 | + SELECT dept_id | |
304 | + , up_dept_id | |
305 | + FROM dept_info | |
306 | + WHERE dept_id = #{deptId} | |
307 | + UNION ALL | |
308 | + SELECT di.dept_id | |
309 | + , di.up_dept_id | |
310 | + FROM dept_info di | |
311 | + JOIN DeptHierarchy dh | |
312 | + ON di.up_dept_id = dh.dept_id | |
313 | + ) | |
314 | + DELETE FROM dept_mbr_info WHERE dept_id IN (SELECT dept_id FROM DeptHierarchy); | |
315 | + </delete> | |
316 | + | |
317 | + <!-- | |
318 | + 작성자 : takensoft | |
319 | + 작성일 : 2024.04.26 | |
320 | + 내 용 : 부서에 등록된 사용자 제거 | |
321 | + --> | |
322 | + <delete id="deleteDeptMbr" parameterType="Map"> | |
323 | + DELETE | |
324 | + FROM dept_mbr_info | |
325 | + WHERE 1 = 1 | |
326 | + AND mbr_id = #{mbrId} | |
327 | + </delete> | |
328 | + | |
329 | + <!-- | |
330 | + 작성자 : 박정하 | |
331 | + 작성일 : 2024.05.10 | |
332 | + 내 용 : 부서 정보 수정 (hierachyVO 사용) | |
333 | + --> | |
334 | + <update id="deptUpdateByHierachy" parameterType="DeptVO"> | |
335 | + UPDATE dept_info | |
336 | + SET up_dept_id = #{upDeptId} | |
337 | + , dept_grd = #{deptGrd} | |
338 | + , dept_sn = #{deptSn} | |
339 | + , mdfr = #{mdfr} | |
340 | + , mdfcn_dt = NOW() | |
341 | + WHERE dept_id = #{deptId} | |
342 | + </update> | |
343 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/entDscsnAply/entDscsnAply-SQL.xml
... | ... | @@ -0,0 +1,188 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.takensoft.portal.entDscsnAply.dao.EntDscsnAplyDAO"> | |
4 | + <!-- 기업상담신청 resultMap --> | |
5 | + <resultMap id="entDscsnAplyMap" type="EntDscsnAplyVO"> | |
6 | + <result property="entDscsnAplyId" column="ent_dscsn_aply_id" /> | |
7 | + <result property="entNm" column="ent_nm" /> | |
8 | + <result property="aplcntNm" column="aplcnt_nm" /> | |
9 | + <result property="telno" column="telno" /> | |
10 | + <result property="eml" column="eml" /> | |
11 | + <result property="aplyCn" column="aply_cn" /> | |
12 | + <result property="fileMngId" column="file_mng_id" /> | |
13 | + <result property="actnPic" column="actn_pic" /> | |
14 | + <result property="actnDt" column="actn_dt" /> | |
15 | + <result property="rmrk" column="rmrk" /> | |
16 | + <result property="prcsStts" column="prcs_stts" /> | |
17 | + <result property="useYn" column="use_yn" /> | |
18 | + <result property="aplcntIp" column="aplcnt_ip" /> | |
19 | + <result property="regDt" column="reg_dt" /> | |
20 | + <result property="mbrNm" column="mbr_nm" /> | |
21 | + </resultMap> | |
22 | + | |
23 | + <!-- | |
24 | + 작 성 자 : 박정하 | |
25 | + 작 성 일 : 2024.04.02 | |
26 | + 내 용 : 기업상담신청 등록 | |
27 | + --> | |
28 | + <insert id="entDscsnAplyInsert" parameterType="HashMap"> | |
29 | + INSERT INTO ent_dscsn_aply ( | |
30 | + ent_dscsn_aply_id | |
31 | + , ent_nm | |
32 | + , aplcnt_nm | |
33 | + , telno | |
34 | + , eml | |
35 | + , aply_cn | |
36 | + , file_mng_id | |
37 | + , actn_pic | |
38 | + , actn_dt | |
39 | + , rmrk | |
40 | + , prcs_stts | |
41 | + , use_yn | |
42 | + , aplcnt_ip | |
43 | + , reg_dt | |
44 | + ) VALUES ( | |
45 | + #{entDscsnAplyId} | |
46 | + , #{entNm} | |
47 | + , #{aplcntNm} | |
48 | + , #{telno} | |
49 | + , #{eml} | |
50 | + , #{aplyCn} | |
51 | + , #{fileMngId} | |
52 | + , #{actnPic} | |
53 | + , #{actnDt}::timestamp | |
54 | + , #{rmrk} | |
55 | + , null | |
56 | + , 'Y' | |
57 | + , #{aplcntIp} | |
58 | + , now() | |
59 | + ) | |
60 | + </insert> | |
61 | + | |
62 | + <!-- SELECT SQL --> | |
63 | + <sql id="selectItem"> | |
64 | + SELECT eda.ent_dscsn_aply_id | |
65 | + , eda.ent_nm | |
66 | + , eda.aplcnt_nm | |
67 | + , eda.telno | |
68 | + , eda.eml | |
69 | + , eda.aply_cn | |
70 | + , eda.file_mng_id | |
71 | + , eda.actn_pic | |
72 | + , to_char(eda.actn_dt, 'YYYY-MM-DD HH24:MI') AS actn_dt | |
73 | + , eda.rmrk | |
74 | + , eda.prcs_stts | |
75 | + , eda.use_yn | |
76 | + , eda.aplcnt_ip | |
77 | + , to_char(eda.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
78 | + , mi.mbr_nm | |
79 | + FROM ent_dscsn_aply AS eda | |
80 | + LEFT JOIN mbr_info AS mi | |
81 | + ON eda.actn_pic = mi.mbr_id | |
82 | + AND mi.use_yn = 'Y' | |
83 | + WHERE eda.use_yn = 'Y' | |
84 | + </sql> | |
85 | + | |
86 | + <sql id="selectRequirement"> | |
87 | + <if test="searchText != null and searchText != ''"> | |
88 | + AND ent_nm LIKE '%' || #{searchText} || '%' | |
89 | + </if> | |
90 | + <if test="cateValue != null and cateValue != ''"> | |
91 | + <choose> | |
92 | + <when test='cateValue == "S"'> | |
93 | + AND prcs_stts IS NULL | |
94 | + </when> | |
95 | + <otherwise> | |
96 | + AND prcs_stts = #{cateValue} | |
97 | + </otherwise> | |
98 | + </choose> | |
99 | + </if> | |
100 | + </sql> | |
101 | + | |
102 | + <!-- | |
103 | + 작 성 자 : 박정하 | |
104 | + 작 성 일 : 2024.04.02 | |
105 | + 내 용 : 기업상담신청 목록 조회 | |
106 | + --> | |
107 | + <select id="entDscsnAplyList" parameterType="Pagination" resultMap="entDscsnAplyMap"> | |
108 | + SELECT ent_dscsn_aply_id | |
109 | + , ent_nm | |
110 | + , aplcnt_nm | |
111 | + , telno | |
112 | + , eml | |
113 | + , aply_cn | |
114 | + , file_mng_id | |
115 | + , actn_pic | |
116 | + , actn_dt | |
117 | + , rmrk | |
118 | + , prcs_stts | |
119 | + , use_yn | |
120 | + , aplcnt_ip | |
121 | + , reg_dt | |
122 | + , mbr_nm | |
123 | + FROM ( | |
124 | + <include refid="selectItem" /> | |
125 | + <if test='isAdmin != "Y"'> | |
126 | + AND actn_pic = #{mbrId} | |
127 | + </if> | |
128 | + ) AS datas | |
129 | + WHERE TRUE | |
130 | + <include refid="selectRequirement" /> | |
131 | + ORDER BY reg_dt DESC | |
132 | + OFFSET #{limitStart} LIMIT #{recordSize} | |
133 | + </select> | |
134 | + | |
135 | + <!-- | |
136 | + 작 성 자 : 박정하 | |
137 | + 작 성 일 : 2024.04.02 | |
138 | + 내 용 : 기업상담신청 목록 총 개수 조회 | |
139 | + --> | |
140 | + <select id="entDscsnAplyListCount" parameterType="Pagination" resultType="int"> | |
141 | + SELECT COUNT(ent_dscsn_aply_id) | |
142 | + FROM ( | |
143 | + <include refid="selectItem" /> | |
144 | + <if test='isAdmin != "Y"'> | |
145 | + AND actn_pic = #{mbrId} | |
146 | + </if> | |
147 | + ) AS datas | |
148 | + WHERE TRUE | |
149 | + <include refid="selectRequirement" /> | |
150 | + </select> | |
151 | + | |
152 | + <!-- | |
153 | + 작 성 자 : 박정하 | |
154 | + 작 성 일 : 2024.04.02 | |
155 | + 내 용 : 기업상담신청 상세 조회 | |
156 | + --> | |
157 | + <select id="entDscsnAplyDetail" parameterType="String" resultMap="entDscsnAplyMap"> | |
158 | + <include refid="selectItem" /> | |
159 | + AND ent_dscsn_aply_id = #{entDscsnAplyId} | |
160 | + </select> | |
161 | + | |
162 | + <!-- | |
163 | + 작성자 : 박정하 | |
164 | + 작성일자 : 2024-04-02 | |
165 | + 내용 : 기업상담신청 수정 | |
166 | + --> | |
167 | + <update id="entDscsnAplyUpdate" parameterType="HashMap"> | |
168 | + UPDATE ent_dscsn_aply | |
169 | + SET actn_pic = #{actnPic}, | |
170 | + actn_dt = now(), | |
171 | + rmrk = #{rmrk}, | |
172 | + prcs_stts = #{prcsStts} | |
173 | + WHERE ent_dscsn_aply_id = #{entDscsnAplyId} | |
174 | + </update> | |
175 | + | |
176 | + <!-- | |
177 | + 작 성 자 : 박정하 | |
178 | + 작 성 일 : 2024.04.04 | |
179 | + 내 용 : 기업상담신청 1시간 이내 동일 아이피 등록 개수 | |
180 | + --> | |
181 | + <select id="entDscsnAplyCountByOneHourWriteSameIp" parameterType="string" resultType="HashMap"> | |
182 | + SELECT COALESCE(count(0), 0) AS writecount, | |
183 | + '1 HOUR'::interval - (now() - MIN(reg_dt)) AS lastdatetime | |
184 | + FROM ent_dscsn_aply | |
185 | + WHERE aplcnt_ip = #{aplcntIp} | |
186 | + AND reg_dt > now() - '1 HOUR'::interval | |
187 | + </select> | |
188 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/entInfo/bplc-SQL.xml
... | ... | @@ -0,0 +1,91 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.takensoft.portal.entInfo.dao.BplcDAO"> | |
4 | + <!-- 기업주요사업장 resultMap --> | |
5 | + <resultMap id="bplcMap" type="HashMap"> | |
6 | + <result property="bplcId" column="bplc_id" /> | |
7 | + <result property="entId" column="ent_id" /> | |
8 | + <result property="wrkrCnt" column="wrkr_cnt" /> | |
9 | + <result property="bplcAddr" column="bplc_addr" /> | |
10 | + <result property="useYn" column="use_yn" /> | |
11 | + <result property="rgtr" column="rgtr" /> | |
12 | + <result property="regDt" column="reg_dt" /> | |
13 | + <result property="mdfr" column="mdfr" /> | |
14 | + <result property="mdfcnDt" column="mdfcn_dt" /> | |
15 | + <result property="bplcNm" column="bplc_nm" /> | |
16 | + <result property="mainPrdt" column="main_prdt" /> | |
17 | + <result property="bplcSiar" column="bplc_siar" /> | |
18 | + <result property="fctryArea" column="fctry_area" /> | |
19 | + <result property="bplcSiarUnit" column="bplc_siar_unit" /> | |
20 | + <result property="fctryAreaUnit" column="fctry_area_unit" /> | |
21 | + </resultMap> | |
22 | + | |
23 | + <!-- | |
24 | + 작 성 자 : 박정하 | |
25 | + 작 성 일 : 2024.06.10 | |
26 | + 내 용 : 기업주요사업장 등록 | |
27 | + --> | |
28 | + <insert id="bplcInsert" parameterType="BplcVO"> | |
29 | + INSERT INTO ent_main_bplc ( | |
30 | + ent_id | |
31 | + , wrkr_cnt | |
32 | + , bplc_addr | |
33 | + , use_yn | |
34 | + , rgtr | |
35 | + , reg_dt | |
36 | + , bplc_nm | |
37 | + , main_prdt | |
38 | + , bplc_siar | |
39 | + , fctry_area | |
40 | + , bplc_siar_unit | |
41 | + , fctry_area_unit | |
42 | + ) VALUES ( | |
43 | + #{entId} | |
44 | + , #{wrkrCnt} | |
45 | + , #{bplcAddr} | |
46 | + , 'Y' | |
47 | + , #{rgtr} | |
48 | + , now() | |
49 | + , #{bplcNm} | |
50 | + , #{mainPrdt} | |
51 | + , #{bplcSiar} | |
52 | + , #{fctryArea} | |
53 | + , #{bplcSiarUnit} | |
54 | + , #{fctryAreaUnit} | |
55 | + ) | |
56 | + </insert> | |
57 | + | |
58 | + <!-- | |
59 | + 작 성 자 : 박정하 | |
60 | + 작 성 일 : 2024.06.10 | |
61 | + 내 용 : 기업주요사업장 수정 | |
62 | + --> | |
63 | + <update id="bplcUpdate" parameterType="BplcVO"> | |
64 | + UPDATE ent_main_bplc | |
65 | + SET wrkr_cnt = #{wrkrCnt} | |
66 | + , bplc_addr = #{bplcAddr} | |
67 | + , use_yn = #{useYn} | |
68 | + , mdfr = #{mdfr} | |
69 | + , mdfcn_dt = now() | |
70 | + , bplc_nm = #{bplcNm} | |
71 | + , main_prdt = #{mainPrdt} | |
72 | + , bplc_siar = #{bplcSiar} | |
73 | + , fctry_area = #{fctryArea} | |
74 | + , bplc_siar_unit = #{bplcSiarUnit} | |
75 | + , fctry_area_unit = #{fctryAreaUnit} | |
76 | + WHERE bplc_id = #{bplcId} | |
77 | + </update> | |
78 | + | |
79 | + <!-- | |
80 | + 작 성 자 : 박정하 | |
81 | + 작 성 일 : 2024.06.10 | |
82 | + 내 용 : 기업주요사업장 삭제 | |
83 | + --> | |
84 | + <update id="bplcUpdateByEntInfoId" parameterType="EntInfoVO"> | |
85 | + UPDATE ent_main_bplc | |
86 | + SET use_yn = 'N', | |
87 | + mdfr = #{mdfr}, | |
88 | + mdfcn_dt = now() | |
89 | + WHERE ent_id = #{entId} | |
90 | + </update> | |
91 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/entInfo/entInfo-SQL.xml
... | ... | @@ -0,0 +1,417 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.takensoft.portal.entInfo.dao.EntInfoDAO"> | |
4 | + <!-- 기업정보 resultMap --> | |
5 | + <resultMap id="entInfoMap" type="EntInfoVO"> | |
6 | + <result property="entId" column="ent_id" /> | |
7 | + <result property="entNm" column="ent_nm" /> | |
8 | + <result property="brno" column="brno" /> | |
9 | + <result property="rprsvNm" column="rprsv_nm" /> | |
10 | + <result property="lctnAdmdsp" column="lctn_admdsp" /> | |
11 | + <result property="lctnSsg" column="lctn_ssg" /> | |
12 | + <result property="bplcSiar" column="bplc_siar" /> | |
13 | + <result property="bplcSiarUnit" column="bplc_siar_unit" /> | |
14 | + <result property="fctryArea" column="fctry_area" /> | |
15 | + <result property="fctryAreaUnit" column="fctry_area_unit" /> | |
16 | + <result property="ksicUpCd" column="ksic_up_cd" /> | |
17 | + <result property="ksicCd" column="ksic_cd" /> | |
18 | + <result property="ksicNm" column="ksic_nm" /> | |
19 | + <result property="mainPrdct" column="main_prdct" /> | |
20 | + <result property="entCrdt" column="ent_crdt" /> | |
21 | + <result property="fndnDt" column="fndn_dt" /> | |
22 | + <result property="wrkrCnt" column="wrkr_cnt" /> | |
23 | + <result property="rmrk" column="rmrk" /> | |
24 | + <result property="useYn" column="use_yn" /> | |
25 | + <result property="rgtr" column="rgtr" /> | |
26 | + <result property="regDt" column="reg_dt" /> | |
27 | + <result property="mdfr" column="mdfr" /> | |
28 | + <result property="mdfcnDt" column="mdfcn_dt" /> | |
29 | + <result property="mvnInten" column="mvn_inten" /> | |
30 | + <result property="mouInten" column="mou_inten" /> | |
31 | + <result property="fileMngId" column="file_mng_id" /> | |
32 | + <collection property="bplcList" column="{entId = ent_id}" javaType="java.util.ArrayList" ofType="BplcVO" select="selectBplcList" /> | |
33 | + </resultMap> | |
34 | + | |
35 | + <!-- 기업주요사업장 resultMap --> | |
36 | + <resultMap id="bplcMap" type="BplcVO"> | |
37 | + <result property="bplcId" column="bplc_id" /> | |
38 | + <result property="entId" column="ent_id" /> | |
39 | + <result property="wrkrCnt" column="wrkr_cnt" /> | |
40 | + <result property="bplcAddr" column="bplc_addr" /> | |
41 | + <result property="useYn" column="use_yn" /> | |
42 | + <result property="rgtr" column="rgtr" /> | |
43 | + <result property="regDt" column="reg_dt" /> | |
44 | + <result property="mdfr" column="mdfr" /> | |
45 | + <result property="mdfcnDt" column="mdfcn_dt" /> | |
46 | + <result property="bplcSiarUnit" column="bplc_siar_unit" /> | |
47 | + <result property="fctryAreaUnit" column="fctry_area_unit" /> | |
48 | + </resultMap> | |
49 | + | |
50 | + <!-- | |
51 | + 작 성 자 : 박정하 | |
52 | + 작 성 일 : 2024.03.20 | |
53 | + 내 용 : 기업정보 등록 | |
54 | + --> | |
55 | + <insert id="entInfoInsert" parameterType="EntInfoVO"> | |
56 | + INSERT INTO ent_info ( | |
57 | + ent_id | |
58 | + , ent_nm | |
59 | + , brno | |
60 | + , rprsv_nm | |
61 | + , lctn_admdsp | |
62 | + , lctn_ssg | |
63 | + , bplc_siar | |
64 | + , bplc_siar_unit | |
65 | + , fctry_area | |
66 | + , fctry_area_unit | |
67 | + , ksic_up_cd | |
68 | + , ksic_cd | |
69 | + , ksic_nm | |
70 | + , main_prdct | |
71 | + , ent_crdt | |
72 | + , fndn_dt | |
73 | + , wrkr_cnt | |
74 | + , rmrk | |
75 | + , file_mng_id | |
76 | + , use_yn | |
77 | + , rgtr | |
78 | + , reg_dt | |
79 | + ) VALUES ( | |
80 | + #{entId} | |
81 | + , #{entNm} | |
82 | + , #{brno} | |
83 | + , #{rprsvNm} | |
84 | + , #{lctnAdmdsp} | |
85 | + , #{lctnSsg} | |
86 | + , #{bplcSiar} | |
87 | + , #{bplcSiarUnit} | |
88 | + , #{fctryArea} | |
89 | + , #{fctryAreaUnit} | |
90 | + , #{ksicUpCd} | |
91 | + , #{ksicCd} | |
92 | + , #{ksicNm} | |
93 | + , #{mainPrdct} | |
94 | + , #{entCrdt} | |
95 | + , #{fndnDt}::timestamp | |
96 | + , #{wrkrCnt} | |
97 | + , #{rmrk} | |
98 | + , #{fileMngId} | |
99 | + , 'Y' | |
100 | + , #{rgtr} | |
101 | + , now() | |
102 | + ) | |
103 | + </insert> | |
104 | + | |
105 | + <!-- | |
106 | + 작 성 자 : 박정하 | |
107 | + 작 성 일 : 2024.03.21 | |
108 | + 내 용 : 사업자등록번호 중복 검사 | |
109 | + --> | |
110 | + <select id="selectCntByCheckBrno" resultType="int"> | |
111 | + SELECT count(brno) | |
112 | + FROM ent_info | |
113 | + WHERE use_yn = 'Y' | |
114 | + AND brno = #{brno} | |
115 | + </select> | |
116 | + | |
117 | + <!-- SELECT SQL --> | |
118 | + <sql id="selectItem"> | |
119 | + SELECT ei.ent_id | |
120 | + , ei.ent_nm | |
121 | + , ei.brno | |
122 | + , ei.rprsv_nm | |
123 | + , ei.lctn_admdsp | |
124 | + , ei.lctn_ssg | |
125 | + , ei.bplc_siar | |
126 | + , ei.bplc_siar_unit | |
127 | + , ei.fctry_area | |
128 | + , ei.fctry_area_unit | |
129 | + , ei.ksic_up_cd | |
130 | + , ei.ksic_cd | |
131 | + , ei.ksic_nm | |
132 | + , ei.main_prdct | |
133 | + , ei.ent_crdt | |
134 | + , to_char(ei.fndn_dt, 'YYYY-MM-DD') AS fndn_dt | |
135 | + , ei.wrkr_cnt | |
136 | + , ei.rmrk | |
137 | + , ei.file_mng_id | |
138 | + , ei.use_yn | |
139 | + , ei.rgtr | |
140 | + , to_char(ei.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
141 | + , ei.mdfr | |
142 | + , to_char(ei.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
143 | + , (SELECT mvn_inten <include refid="searchIvstDscsn" />) AS mvn_inten | |
144 | + , (SELECT mou_inten <include refid="searchIvstDscsn" />) AS mou_inten | |
145 | + FROM ent_info AS ei | |
146 | + </sql> | |
147 | + | |
148 | + <sql id="selectRequirement"> | |
149 | + <if test="searchText != null and searchText != ''"> | |
150 | + <choose> | |
151 | + <when test="searchType != null and searchType != ''"> | |
152 | + <if test="searchType == 'ent_nm'"> | |
153 | + AND ent_nm LIKE '%' || #{searchText} || '%' | |
154 | + </if> | |
155 | + <if test="searchType == 'rprsv_nm'"> | |
156 | + AND rprsv_nm LIKE '%' || #{searchText} || '%' | |
157 | + </if> | |
158 | + <if test="searchType == 'brno'"> | |
159 | + AND brno LIKE '%' || #{searchText} || '%' | |
160 | + </if> | |
161 | + </when> | |
162 | + <otherwise> | |
163 | + AND ( ent_nm LIKE '%' || #{searchText} || '%' | |
164 | + OR rprsv_nm LIKE '%' || #{searchText} || '%' | |
165 | + OR brno LIKE '%' || #{searchText} || '%') | |
166 | + </otherwise> | |
167 | + </choose> | |
168 | + </if> | |
169 | + </sql> | |
170 | + <sql id="searchCate"> | |
171 | + <if test="mvnInten != null and mvnInten != ''"> | |
172 | + AND mvn_inten = #{mvnInten} | |
173 | + </if> | |
174 | + <if test="mouInten != null and mouInten != ''"> | |
175 | + AND mou_inten = #{mouInten} | |
176 | + </if> | |
177 | + </sql> | |
178 | + | |
179 | + <sql id="searchIvstDscsn"> | |
180 | + FROM ivst_dscsn AS id | |
181 | + WHERE id.use_yn = 'Y' | |
182 | + AND id.ent_id = ei.ent_id | |
183 | + ORDER BY id.reg_dt DESC | |
184 | + LIMIT 1 | |
185 | + </sql> | |
186 | + | |
187 | + <sql id="selectListInner"> | |
188 | + SELECT ei.ent_id | |
189 | + , ei.ent_nm | |
190 | + , ei.brno | |
191 | + , ei.rprsv_nm | |
192 | + , ei.lctn_admdsp | |
193 | + , ei.lctn_ssg | |
194 | + , ei.bplc_siar | |
195 | + , ei.bplc_siar_unit | |
196 | + , ei.fctry_area | |
197 | + , ei.fctry_area_unit | |
198 | + , ei.ksic_up_cd | |
199 | + , ei.ksic_cd | |
200 | + , ei.ksic_nm | |
201 | + , ei.main_prdct | |
202 | + , ei.ent_crdt | |
203 | + , ei.fndn_dt | |
204 | + , ei.wrkr_cnt | |
205 | + , ei.rmrk | |
206 | + , ei.file_mng_id | |
207 | + , ei.use_yn | |
208 | + , ei.rgtr | |
209 | + , ei.reg_dt | |
210 | + , ei.mdfr | |
211 | + , ei.mdfcn_dt | |
212 | + , (SELECT mvn_inten <include refid="searchIvstDscsn" />) AS mvn_inten | |
213 | + , (SELECT mou_inten <include refid="searchIvstDscsn" />) AS mou_inten | |
214 | + FROM ent_info AS ei | |
215 | + WHERE ei.use_yn = 'Y' | |
216 | + </sql> | |
217 | + | |
218 | + <!-- | |
219 | + 작 성 자 : 박정하 | |
220 | + 작 성 일 : 2024.03.21 | |
221 | + 내 용 : 기업정보 목록 조회 | |
222 | + --> | |
223 | + <select id="entInfoSelectList" parameterType="HashMap" resultMap="entInfoMap"> | |
224 | + SELECT ent_id | |
225 | + , ent_nm | |
226 | + , brno | |
227 | + , rprsv_nm | |
228 | + , lctn_admdsp | |
229 | + , lctn_ssg | |
230 | + , bplc_siar | |
231 | + , bplc_siar_unit | |
232 | + , fctry_area | |
233 | + , fctry_area_unit | |
234 | + , ksic_up_cd | |
235 | + , ksic_cd | |
236 | + , ksic_nm | |
237 | + , main_prdct | |
238 | + , ent_crdt | |
239 | + , to_char(fndn_dt, 'YYYY-MM-DD') AS fndn_dt | |
240 | + , wrkr_cnt | |
241 | + , rmrk | |
242 | + , file_mng_id | |
243 | + , use_yn | |
244 | + , to_char(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
245 | + , mdfr | |
246 | + , to_char(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
247 | + , mvn_inten | |
248 | + , mou_inten | |
249 | + FROM ( | |
250 | + <include refid="selectListInner" /> | |
251 | + <include refid="selectRequirement" /> | |
252 | + ) AS datas | |
253 | + WHERE TRUE | |
254 | + <include refid="searchCate" /> | |
255 | + ORDER BY ent_id DESC | |
256 | + OFFSET #{limitStart} LIMIT #{recordSize} | |
257 | + </select> | |
258 | + | |
259 | + <!-- | |
260 | + 작 성 자 : 박정하 | |
261 | + 작 성 일 : 2024.03.21 | |
262 | + 내 용 : 기업정보 목록 총 개수 조회 | |
263 | + --> | |
264 | + <select id="entInfoSelectListCount" parameterType="HashMap" resultType="int"> | |
265 | + SELECT count(ent_id) | |
266 | + FROM ( | |
267 | + SELECT ent_id | |
268 | + , (SELECT mvn_inten <include refid="searchIvstDscsn" />) | |
269 | + , (SELECT mou_inten <include refid="searchIvstDscsn" />) | |
270 | + FROM ent_info AS ei | |
271 | + WHERE ei.use_yn = 'Y' | |
272 | + <include refid="selectRequirement" /> | |
273 | + ) AS datas | |
274 | + WHERE TRUE | |
275 | + <include refid="searchCate" /> | |
276 | + </select> | |
277 | + | |
278 | + <!-- | |
279 | + 작 성 자 : 박정하 | |
280 | + 작 성 일 : 2024.03.21 | |
281 | + 내 용 : 기업정보 상세 조회 | |
282 | + --> | |
283 | + <select id="selectEntInfoDetail" parameterType="String" resultMap="entInfoMap"> | |
284 | + <include refid="selectItem" /> | |
285 | + WHERE ei.use_yn = 'Y' | |
286 | + AND ei.ent_id = #{entId} | |
287 | + </select> | |
288 | + | |
289 | + <!-- | |
290 | + 작 성 자 : 박정하 | |
291 | + 작 성 일 : 2024-06-10 | |
292 | + 내 용 : 기업주요사업장 목록 조회 | |
293 | + --> | |
294 | + <select id="selectBplcList" parameterType="BplcVO" resultMap="bplcMap"> | |
295 | + SELECT bplc_id | |
296 | + , ent_id | |
297 | + , wrkr_cnt | |
298 | + , bplc_addr | |
299 | + , use_yn | |
300 | + , rgtr | |
301 | + , to_char(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
302 | + , mdfr | |
303 | + , to_char(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
304 | + , bplc_nm | |
305 | + , main_prdt | |
306 | + , bplc_siar | |
307 | + , fctry_area | |
308 | + , bplc_siar_unit | |
309 | + , fctry_area_unit | |
310 | + FROM ent_main_bplc | |
311 | + WHERE use_yn = #{useYn} | |
312 | + AND ent_id = #{entId} | |
313 | + ORDER BY bplc_id | |
314 | + </select> | |
315 | + | |
316 | + <!-- | |
317 | + 작 성 자 : 박정하 | |
318 | + 작 성 일 : 2024.03.22 | |
319 | + 내 용 : 기업정보 수정 | |
320 | + --> | |
321 | + <update id="entInfoUpdate" parameterType="EntInfoVO"> | |
322 | + UPDATE ent_info | |
323 | + SET ent_nm = #{entNm} | |
324 | + , brno = #{brno} | |
325 | + , rprsv_nm = #{rprsvNm} | |
326 | + , lctn_admdsp = #{lctnAdmdsp} | |
327 | + , lctn_ssg = #{lctnSsg} | |
328 | + , bplc_siar = #{bplcSiar} | |
329 | + , bplc_siar_unit = #{bplcSiarUnit} | |
330 | + , fctry_area = #{fctryArea} | |
331 | + , fctry_area_unit = #{fctryAreaUnit} | |
332 | + , ksic_up_cd = #{ksicUpCd} | |
333 | + , ksic_cd = #{ksicCd} | |
334 | + , ksic_nm = #{ksicNm} | |
335 | + , main_prdct = #{mainPrdct} | |
336 | + , ent_crdt = #{entCrdt} | |
337 | + , fndn_dt = #{fndnDt}::timestamp | |
338 | + , wrkr_cnt = #{wrkrCnt} | |
339 | + , rmrk = #{rmrk} | |
340 | + , file_mng_id = #{fileMngId} | |
341 | + , mdfr = #{mdfr} | |
342 | + , mdfcn_dt = now() | |
343 | + WHERE ent_id = #{entId} | |
344 | + </update> | |
345 | + | |
346 | + <!-- | |
347 | + 작 성 자 : 박정하 | |
348 | + 작 성 일 : 2024.03.22 | |
349 | + 내 용 : 기업정보 삭제 | |
350 | + --> | |
351 | + <update id="entInfoDelete" parameterType="EntInfoVO"> | |
352 | + UPDATE ent_info | |
353 | + SET use_yn = 'N', | |
354 | + mdfr = #{mdfr}, | |
355 | + mdfcn_dt = now() | |
356 | + WHERE ent_id = #{entId} | |
357 | + </update> | |
358 | + | |
359 | + <!-- | |
360 | + 작 성 자 : 박정하 | |
361 | + 작 성 일 : 2024.05.13 | |
362 | + 내 용 : 팝업 목록 조회 | |
363 | + --> | |
364 | + <select id="selectCompanyInfoListByNew" resultMap="entInfoMap"> | |
365 | + <include refid="selectItem" /> | |
366 | + WHERE ei.use_yn = 'Y' | |
367 | + ORDER BY ei.reg_dt DESC | |
368 | + LIMIT 5 | |
369 | + </select> | |
370 | + | |
371 | + <!-- | |
372 | + 작 성 자 : 박정하 | |
373 | + 작 성 일 : 2024.06.26 | |
374 | + 내 용 : 기업정보 목록 조회 (엑셀 다운로드 용) | |
375 | + --> | |
376 | + <select id="entInfoSelectListAll" parameterType="HashMap" resultType="HashMap"> | |
377 | + SELECT ent_nm | |
378 | + , brno | |
379 | + , rprsv_nm | |
380 | + , (SELECT cd_nm FROM cd_mng WHERE cd = lctn_admdsp) || ' ' || lctn_ssg AS lctn | |
381 | + , bplc_siar || (SELECT cd_nm FROM cd_mng WHERE cd = bplc_siar_unit) AS bplc_siar | |
382 | + , fctry_area || (SELECT cd_nm FROM cd_mng WHERE cd = fctry_area_unit) AS fctry_area | |
383 | + , '(' || ksic_up_cd || ksic_cd || ') ' || ksic_nm AS ksic | |
384 | + , main_prdct | |
385 | + , ent_crdt | |
386 | + , to_char(fndn_dt, 'YYYY-MM-DD') AS fndn_dt | |
387 | + , wrkr_cnt || '' AS wrkr_cnt | |
388 | + , mvn_inten | |
389 | + , mou_inten | |
390 | + , rmrk | |
391 | + FROM (<include refid="selectListInner" />) AS datas | |
392 | + WHERE TRUE | |
393 | + <if test="mvnInten != null and mvnInten != ''"> | |
394 | + AND mvn_inten = #{mvnInten} | |
395 | + </if> | |
396 | + <if test="mouInten != null and mouInten != ''"> | |
397 | + AND mou_inten = #{mouInten} | |
398 | + </if> | |
399 | + <if test="ksicUpCd != null and ksicUpCd != ''"> | |
400 | + AND ksic_up_cd = #{ksicUpCd} | |
401 | + </if> | |
402 | + ORDER BY ent_nm | |
403 | + </select> | |
404 | + | |
405 | + <!-- | |
406 | + 작 성 자 : 박정하 | |
407 | + 작 성 일 : 2024.06.26 | |
408 | + 내 용 : 상위업종코드 목록 조회 (엑셀 다운로드 용) | |
409 | + --> | |
410 | + <select id="ksicUpCdList" parameterType="String" resultType="String"> | |
411 | + SELECT ksic_up_cd | |
412 | + FROM ent_info | |
413 | + WHERE use_yn = 'Y' | |
414 | + GROUP BY ksic_up_cd | |
415 | + ORDER BY ksic_up_cd | |
416 | + </select> | |
417 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/invtDscsn/invtDscsn-SQL.xml
... | ... | @@ -0,0 +1,246 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.takensoft.portal.ivstDscsn.dao.IvstDscsnDAO"> | |
4 | + <!-- 투자상담 resultMap --> | |
5 | + <resultMap id="ivstDscsnMap" type="IvstDscsnVO"> | |
6 | + <result property="ivstDscsnId" column="ivst_dscsn_id" /> | |
7 | + <result property="entId" column="ent_id" /> | |
8 | + <result property="ttl" column="ttl" /> | |
9 | + <result property="dt" column="dt" /> | |
10 | + <result property="plc" column="plc" /> | |
11 | + <result property="prtpnt" column="prtpnt" /> | |
12 | + <result property="dscsnPbofc" column="dscsn_pbofc" /> | |
13 | + <result property="mainCn" column="main_cn" /> | |
14 | + <result property="fileMngId" column="file_mng_id" /> | |
15 | + <result property="mvnInten" column="mvn_inten" /> | |
16 | + <result property="mouInten" column="mou_inten" /> | |
17 | + <result property="dscsnOtln" column="dscsn_otln" /> | |
18 | + <result property="useYn" column="use_yn" /> | |
19 | + <result property="rgtr" column="rgtr" /> | |
20 | + <result property="regDt" column="reg_dt" /> | |
21 | + <result property="mdfr" column="mdfr" /> | |
22 | + <result property="mdfcnDt" column="mdfcn_dt" /> | |
23 | + <result property="entNm" column="ent_nm" /> | |
24 | + </resultMap> | |
25 | + | |
26 | + <!-- | |
27 | + 작성자 : 박정하 | |
28 | + 작성일자 : 2024-03-20 | |
29 | + 내용 : 투자상담 등록 | |
30 | + --> | |
31 | + <insert id="ivstDscsnInsert" parameterType="IvstDscsnVO"> | |
32 | + INSERT INTO ivst_dscsn ( | |
33 | + ivst_dscsn_id | |
34 | + , ent_id | |
35 | + , ttl | |
36 | + , dt | |
37 | + , plc | |
38 | + , prtpnt | |
39 | + , dscsn_pbofc | |
40 | + , main_cn | |
41 | + , file_mng_id | |
42 | + , mvn_inten | |
43 | + , mou_inten | |
44 | + , dscsn_otln | |
45 | + , use_yn | |
46 | + , rgtr | |
47 | + , reg_dt | |
48 | + ) VALUES ( | |
49 | + #{ivstDscsnId} | |
50 | + , #{entId} | |
51 | + , #{ttl} | |
52 | + , #{dt}::timestamp | |
53 | + , #{plc} | |
54 | + , #{prtpnt} | |
55 | + , #{dscsnPbofc} | |
56 | + , #{mainCn} | |
57 | + , #{fileMngId} | |
58 | + , #{mvnInten} | |
59 | + , #{mouInten} | |
60 | + , #{dscsnOtln} | |
61 | + , 'Y' | |
62 | + , #{rgtr} | |
63 | + , now() | |
64 | + ) | |
65 | + </insert> | |
66 | + | |
67 | + <!-- SELECT SQL --> | |
68 | + <sql id="selectItem"> | |
69 | + SELECT id.ivst_dscsn_id | |
70 | + , id.ent_id | |
71 | + , id.ttl | |
72 | + , to_char(id.dt, 'YYYY-MM-DD') AS dt | |
73 | + , id.plc | |
74 | + , id.prtpnt | |
75 | + , id.dscsn_pbofc | |
76 | + , id.main_cn | |
77 | + , id.file_mng_id | |
78 | + , id.mvn_inten | |
79 | + , id.mou_inten | |
80 | + , id.dscsn_otln | |
81 | + , id.use_yn | |
82 | + , id.rgtr | |
83 | + , to_char(id.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
84 | + , id.mdfr | |
85 | + , to_char(id.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
86 | + , ei.ent_nm | |
87 | + from ivst_dscsn AS id | |
88 | + LEFT JOIN ent_info AS ei | |
89 | + ON id.ent_id = ei.ent_id | |
90 | + </sql> | |
91 | + | |
92 | + <sql id="selectRequirement"> | |
93 | + <if test="searchText != null and searchText != ''"> | |
94 | + <choose> | |
95 | + <when test="searchType != null and searchType != ''"> | |
96 | + <if test="searchType == 'ent_nm'"> | |
97 | + AND ei.ent_nm LIKE '%' || #{searchText} || '%' | |
98 | + </if> | |
99 | + <if test="searchType == 'ttl'"> | |
100 | + AND id.ttl LIKE '%' || #{searchText} || '%' | |
101 | + </if> | |
102 | + </when> | |
103 | + <otherwise> | |
104 | + AND ( | |
105 | + ei.ent_nm LIKE '%' || #{searchText} || '%' | |
106 | + OR | |
107 | + id.ttl LIKE '%' || #{searchText} || '%' | |
108 | + ) | |
109 | + </otherwise> | |
110 | + </choose> | |
111 | + </if> | |
112 | + <if test="cateId == 'ent_id' and cateValue != null and cateValue != ''"> | |
113 | + AND ei.ent_id = #{cateValue} | |
114 | + </if> | |
115 | + <if test="mvnInten != null and mvnInten != ''"> | |
116 | + AND id.mvn_inten = #{mvnInten} | |
117 | + </if> | |
118 | + <if test="mouInten != null and mouInten != ''"> | |
119 | + AND id.mou_inten = #{mouInten} | |
120 | + </if> | |
121 | + </sql> | |
122 | + | |
123 | + <!-- | |
124 | + 작성자 : 박정하 | |
125 | + 작성일자 : 2024-03-26 | |
126 | + 내용 : 투자상담 목록 조회 | |
127 | + --> | |
128 | + <select id="ivstDscsnList" resultMap="ivstDscsnMap"> | |
129 | + SELECT id.ivst_dscsn_id | |
130 | + , ei.ent_nm | |
131 | + , id.ent_id | |
132 | + , id.ttl | |
133 | + , id.dt | |
134 | + , id.plc | |
135 | + , id.prtpnt | |
136 | + , id.dscsn_pbofc | |
137 | + , id.main_cn | |
138 | + , id.file_mng_id | |
139 | + , id.mvn_inten | |
140 | + , id.mou_inten | |
141 | + , id.dscsn_otln | |
142 | + , id.use_yn | |
143 | + , id.rgtr | |
144 | + , to_char(id.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
145 | + , id.mdfr | |
146 | + , to_char(id.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
147 | + FROM ivst_dscsn AS id | |
148 | + LEFT JOIN ent_info AS ei | |
149 | + ON id.ent_id = ei.ent_id | |
150 | + WHERE id.use_yn = 'Y' | |
151 | + <include refid="selectRequirement" /> | |
152 | + ORDER BY id.reg_dt DESC | |
153 | + OFFSET #{limitStart} LIMIT #{recordSize} | |
154 | + </select> | |
155 | + | |
156 | + <!-- | |
157 | + 작성자 : 박정하 | |
158 | + 작성일자 : 2024-03-26 | |
159 | + 내용 : 투자상담 목록 총 개수 조회 | |
160 | + --> | |
161 | + <select id="ivstDscsnListCount" resultType="int"> | |
162 | + SELECT count(*) | |
163 | + FROM ivst_dscsn AS id | |
164 | + LEFT JOIN ent_info AS ei | |
165 | + ON id.ent_id = ei.ent_id | |
166 | + WHERE id.use_yn = 'Y' | |
167 | + <include refid="selectRequirement" /> | |
168 | + </select> | |
169 | + | |
170 | + <!-- | |
171 | + 작 성 자 : 박정하 | |
172 | + 작 성 일 : 2024.03.26 | |
173 | + 내 용 : 투자상담 상세 조회 | |
174 | + --> | |
175 | + <select id="selectIvstDscsnDetail" parameterType="String" resultMap="ivstDscsnMap"> | |
176 | + <include refid="selectItem" /> | |
177 | + WHERE id.use_yn = 'Y' | |
178 | + AND id.ivst_dscsn_id = #{ivstDscsnId} | |
179 | + </select> | |
180 | + | |
181 | + <!-- | |
182 | + 작성자 : 박정하 | |
183 | + 작성일자 : 2024-03-27 | |
184 | + 내용 : 투자상담 수정 | |
185 | + --> | |
186 | + <update id="ivstDscsnUpdate" parameterType="IvstDscsnVO"> | |
187 | + UPDATE ivst_dscsn | |
188 | + SET ent_id = #{entId} | |
189 | + , ttl = #{ttl} | |
190 | + , dt = #{dt}::timestamp | |
191 | + , plc = #{plc} | |
192 | + , prtpnt = #{prtpnt} | |
193 | + , dscsn_pbofc = #{dscsnPbofc} | |
194 | + , main_cn = #{mainCn} | |
195 | + , file_mng_id = #{fileMngId} | |
196 | + , mvn_inten = #{mvnInten} | |
197 | + , mou_inten = #{mouInten} | |
198 | + , dscsn_otln = #{dscsnOtln} | |
199 | + , use_yn = #{useYn} | |
200 | + , mdfr = #{mdfr} | |
201 | + , mdfcn_dt = now() | |
202 | + WHERE ivst_dscsn_id = #{ivstDscsnId} | |
203 | + </update> | |
204 | + | |
205 | + <!-- | |
206 | + 작성자 : 박정하 | |
207 | + 작성일자 : 2024-03-28 | |
208 | + 내용 : 투자상담 최근 1건 조회 | |
209 | + --> | |
210 | + <select id="ivstDscsnByNewOne" parameterType="IvstDscsnVO" resultMap="ivstDscsnMap"> | |
211 | + <include refid="selectItem" /> | |
212 | + where id.use_yn = 'Y' | |
213 | + AND id.ent_id = #{entId} | |
214 | + order by id.reg_dt DESC | |
215 | + LIMIT 1; | |
216 | + </select> | |
217 | + | |
218 | + <!-- | |
219 | + 작성자 : 박정하 | |
220 | + 작성일자 : 2024-06-12 | |
221 | + 내용 : 투자상담 목록 조회 (기업정보 삭제용) | |
222 | + --> | |
223 | + <select id="ivstDscsnListByIvstDscsnId" resultMap="ivstDscsnMap"> | |
224 | + SELECT ivst_dscsn_id | |
225 | + , ent_id | |
226 | + , ttl | |
227 | + , dt | |
228 | + , plc | |
229 | + , prtpnt | |
230 | + , dscsn_pbofc | |
231 | + , main_cn | |
232 | + , file_mng_id | |
233 | + , mvn_inten | |
234 | + , mou_inten | |
235 | + , dscsn_otln | |
236 | + , use_yn | |
237 | + , rgtr | |
238 | + , to_char(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
239 | + , mdfr | |
240 | + , to_char(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
241 | + FROM ivst_dscsn | |
242 | + WHERE use_yn = 'Y' | |
243 | + AND ent_id = #{ent_Id} | |
244 | + ORDER BY reg_dt DESC | |
245 | + </select> | |
246 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/main/adminMain-SQL.xml
... | ... | @@ -0,0 +1,93 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | + | |
4 | +<!-- | |
5 | + 작 성 자 : 박정하 | |
6 | + 작 성 일 : 2024.05.29 | |
7 | + 내 용 : 메인 통계 관련 | |
8 | +--> | |
9 | +<mapper namespace="com.takensoft.cms.main.dao.MainDAO"> | |
10 | + <!-- 관리자 메인페이지 통계정보 관련 --> | |
11 | + <!-- | |
12 | + 작 성 자 : 박정하 | |
13 | + 작 성 일 : 2024.05.28 | |
14 | + 내 용 : 신규회원 가입자 수 | |
15 | + --> | |
16 | + <select id="selectCntnNewCnt"> | |
17 | + SELECT count(mbr_id) | |
18 | + FROM mbr_info | |
19 | + WHERE to_char(reg_dt, 'YYYY-MM-DD') > to_char((now() + '-7 days'), 'YYYY-MM-DD') | |
20 | + </select> | |
21 | + | |
22 | + <!-- | |
23 | + 작 성 자 : 박정하 | |
24 | + 작 성 일 : 2024.05.28 | |
25 | + 내 용 : 오늘 방문자 수 | |
26 | + --> | |
27 | + <select id="selectCntnDayCnt"> | |
28 | + SELECT SUM(COALESCE(cntn_nope, 0)) | |
29 | + FROM user_cntn_stats | |
30 | + WHERE cntn_yr = to_char(now(), 'YYYY') | |
31 | + AND cntn_mm = to_char(now(), 'MM') | |
32 | + AND cntn_day = to_char(now(), 'DD') | |
33 | + </select> | |
34 | + | |
35 | + <!-- | |
36 | + 작 성 자 : 박정하 | |
37 | + 작 성 일 : 2024.05.28 | |
38 | + 내 용 : 이번달 방문자 수 | |
39 | + --> | |
40 | + <select id="selectCntnMmCnt"> | |
41 | + SELECT SUM(COALESCE(cntn_nope, 0)) | |
42 | + FROM user_cntn_stats | |
43 | + WHERE cntn_yr = to_char(now(), 'YYYY') | |
44 | + AND cntn_mm = to_char(now(), 'MM') | |
45 | + </select> | |
46 | + | |
47 | + <!-- | |
48 | + 작 성 자 : 박정하 | |
49 | + 작 성 일 : 2024.05.28 | |
50 | + 내 용 : 총 방문자 수 | |
51 | + --> | |
52 | + <select id="selectCntnTotalCnt"> | |
53 | + SELECT SUM(COALESCE(cntn_nope, 0)) | |
54 | + FROM user_cntn_stats | |
55 | + </select> | |
56 | + | |
57 | + <!-- | |
58 | + 작 성 자 : 박정하 | |
59 | + 작 성 일 : 2024.05.28 | |
60 | + 내 용 : 방문자 접속 통계 | |
61 | + --> | |
62 | + <select id="findByMonthCntnStats" parameterType="HashMap"> | |
63 | + SELECT ai.dates | |
64 | + , array_agg(authrt_nm) AS authrt_nm | |
65 | + , array_agg(COALESCE(ucs.cntn_nope, 0)) AS cntn_nope | |
66 | + FROM (SELECT generate_series((now() + '-10 days') , now(), '1 day'::interval)::date AS dates, authrt_cd, authrt_nm FROM authrt_info WHERE use_yn = 'Y') AS ai | |
67 | + LEFT JOIN (SELECT authrt_cd, to_date(concat(cntn_yr,cntn_mm,cntn_day), 'YYYYMMDD') AS cntn_date, cntn_nope FROM user_cntn_stats) AS ucs | |
68 | + ON dates = ucs.cntn_date | |
69 | + AND ai.authrt_cd = ucs.authrt_cd | |
70 | + GROUP BY ai.dates | |
71 | + ORDER BY dates | |
72 | + </select> | |
73 | + <!-- // 관리자 메인페이지 통계정보 관련 --> | |
74 | + | |
75 | + <!-- | |
76 | + 작 성 자 : 박정하 | |
77 | + 작 성 일 : 2024.06.14 | |
78 | + 내 용 : 기업상담신청 알림 | |
79 | + --> | |
80 | + <select id="findAplyToasts" parameterType="HashMap"> | |
81 | + SELECT '신규등록' AS name | |
82 | + , COALESCE(count(ent_dscsn_aply_id), 0) AS count | |
83 | + FROM ent_dscsn_aply AS eda | |
84 | + WHERE use_yn = 'Y' | |
85 | + AND prcs_stts IS NULL | |
86 | + UNION ALL | |
87 | + SELECT '변경요청' AS name | |
88 | + , COALESCE(count(ent_dscsn_aply_id), 0) AS count | |
89 | + FROM ent_dscsn_aply AS eda | |
90 | + WHERE use_yn = 'Y' | |
91 | + AND prcs_stts = 'C' | |
92 | + </select> | |
93 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/main/governmentMain-SQL.xml
... | ... | @@ -0,0 +1,166 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | + | |
4 | +<!-- | |
5 | + 작 성 자 : 박정하 | |
6 | + 작 성 일 : 2024.05.29 | |
7 | + 내 용 : 메인 통계 관련 | |
8 | +--> | |
9 | +<mapper namespace="com.takensoft.portal.main.dao.GovernmentMainDAO"> | |
10 | + <!-- 공무원 메인페이지 통계정보 관련 --> | |
11 | + <!-- SELECT SQL --> | |
12 | + <sql id="selectItem"> | |
13 | + <if test="searchKeyword != null and searchText != ''"> | |
14 | + <if test="searchKeyword == 'day'"> | |
15 | + , stats_date::DATE AS stats_date | |
16 | + </if> | |
17 | + <if test="searchKeyword == 'month'"> | |
18 | + , to_char(DATE_TRUNC('month', stats_date), 'YYYY-MM') AS stats_date | |
19 | + </if> | |
20 | + <if test="searchKeyword == 'year'"> | |
21 | + , to_char(DATE_TRUNC('year', stats_date), 'YYYY') AS stats_date | |
22 | + </if> | |
23 | + </if> | |
24 | + </sql> | |
25 | + <sql id="groupItem"> | |
26 | + <if test="searchKeyword != null and searchText != ''"> | |
27 | + GROUP BY true::boolean | |
28 | + <if test="searchKeyword == 'day'"> | |
29 | + , stats_date::DATE | |
30 | + </if> | |
31 | + <if test="searchKeyword == 'month'"> | |
32 | + , to_char(DATE_TRUNC('month', stats_date), 'YYYY-MM') | |
33 | + </if> | |
34 | + <if test="searchKeyword == 'year'"> | |
35 | + , to_char(DATE_TRUNC('year', stats_date), 'YYYY') | |
36 | + </if> | |
37 | + </if> | |
38 | + </sql> | |
39 | + <!-- | |
40 | + 작 성 자 : 박정하 | |
41 | + 작 성 일 : 2024.06.03 | |
42 | + 내 용 : 공무원 메인페이지 통계정보 조회 : 분류별 통계 | |
43 | + --> | |
44 | + <select id="selectCategoryStats" parameterType="HashMap"> | |
45 | + SELECT sum(ei_cnt) AS "새 기업정보 수" | |
46 | + , sum(eda_cnt) AS "새 기업상담신청 수" | |
47 | + , sum(rm_cnt) AS "새 검토사항 수" | |
48 | + , sum(id_cnt) AS "새 투자상담 수" | |
49 | + <include refid="selectItem" /> | |
50 | + FROM ( | |
51 | + SELECT generate_series AS stats_date | |
52 | + , COALESCE(ei.count, 0) AS ei_cnt | |
53 | + , COALESCE(eda.count, 0) AS eda_cnt | |
54 | + , COALESCE(rm.count, 0) AS rm_cnt | |
55 | + , COALESCE(id.count, 0) AS id_cnt | |
56 | + FROM (SELECT GENERATE_SERIES( | |
57 | + <if test="searchKeyword != null and searchText != ''"> | |
58 | + <if test="searchKeyword == 'day'"> | |
59 | + (now() + '-30 days')::DATE | |
60 | + </if> | |
61 | + <if test="searchKeyword == 'month'"> | |
62 | + (now() + '-1 year')::DATE | |
63 | + </if> | |
64 | + <if test="searchKeyword == 'year'">( | |
65 | + select MIN(min) | |
66 | + from ( | |
67 | + (select MIN(reg_dt)::DATE FROM ent_info WHERE use_yn = 'Y') union all | |
68 | + (select MIN(reg_dt)::DATE FROM ent_dscsn_aply WHERE use_yn = 'Y') union all | |
69 | + (select MIN(reg_dt)::DATE FROM rvw_mttr WHERE use_yn = 'Y') union all | |
70 | + (select MIN(reg_dt)::DATE FROM ivst_dscsn WHERE use_yn = 'Y') | |
71 | + ) as since | |
72 | + ) | |
73 | + </if> | |
74 | + </if> | |
75 | + , NOW(), '1 day'::INTERVAL)::date) AS date | |
76 | + LEFT JOIN (SELECT reg_dt::DATE, COUNT(ent_id) FROM ent_info WHERE use_yn = 'Y' GROUP BY reg_dt::DATE) AS ei | |
77 | + ON date.generate_series = ei.reg_dt | |
78 | + LEFT JOIN (SELECT reg_dt::DATE, COUNT(ent_dscsn_aply_id) FROM ent_dscsn_aply WHERE use_yn = 'Y' GROUP BY reg_dt::DATE) AS eda | |
79 | + ON date.generate_series = eda.reg_dt | |
80 | + LEFT JOIN (SELECT reg_dt::DATE, COUNT(rvw_mttr_id) FROM rvw_mttr WHERE use_yn = 'Y' GROUP BY reg_dt::DATE) AS rm | |
81 | + ON date.generate_series = rm.reg_dt | |
82 | + LEFT JOIN (SELECT reg_dt::DATE, COUNT(ivst_dscsn_id) FROM ivst_dscsn WHERE use_yn = 'Y' GROUP BY reg_dt::DATE) AS id | |
83 | + ON date.generate_series = id.reg_dt | |
84 | + ORDER BY date.generate_series | |
85 | + ) AS datas | |
86 | + <include refid="groupItem" /> | |
87 | + ORDER BY stats_date | |
88 | + </select> | |
89 | + | |
90 | + <!-- | |
91 | + 작 성 자 : 박정하 | |
92 | + 작 성 일 : 2024.06.03 | |
93 | + 내 용 : 공무원 메인페이지 통계정보 조회 : 상담신청 통계 | |
94 | + --> | |
95 | + <select id="selectEntDscsnAplyStats" parameterType="HashMap"> | |
96 | + SELECT SUM(coalesce) AS "새 상담신청 수" | |
97 | + <include refid="selectItem" /> | |
98 | + FROM ( | |
99 | + SELECT stats_date | |
100 | + , COALESCE(eda.count, 0) | |
101 | + FROM (SELECT GENERATE_SERIES::DATE AS stats_date | |
102 | + FROM GENERATE_SERIES( | |
103 | + <if test="searchKeyword != null and searchText != ''"> | |
104 | + <if test="searchKeyword == 'day'"> | |
105 | + (now() + '-30 days')::DATE | |
106 | + </if> | |
107 | + <if test="searchKeyword == 'month'"> | |
108 | + (now() + '-1 year')::DATE | |
109 | + </if> | |
110 | + <if test="searchKeyword == 'year'"> | |
111 | + (select MIN(reg_dt) FROM ent_dscsn_aply WHERE use_yn = 'Y') | |
112 | + </if> | |
113 | + </if> | |
114 | + , NOW()::DATE, '1 day'::INTERVAL)) as date | |
115 | + LEFT JOIN ( | |
116 | + SELECT COUNT(ent_dscsn_aply_id) | |
117 | + , reg_dt::DATE AS reg_dt | |
118 | + FROM ent_dscsn_aply | |
119 | + WHERE use_yn = 'Y' | |
120 | + GROUP BY reg_dt::DATE | |
121 | + ) AS eda | |
122 | + ON date.stats_date = eda.reg_dt | |
123 | + ORDER BY stats_date) AS datas | |
124 | + <include refid="groupItem" /> | |
125 | + ORDER BY stats_date | |
126 | + </select> | |
127 | + | |
128 | + <!-- | |
129 | + 작 성 자 : 박정하 | |
130 | + 작 성 일 : 2024.06.03 | |
131 | + 내 용 : 공무원 메인페이지 통계정보 조회 : 검토사항 통계 | |
132 | + --> | |
133 | + <select id="selectRvwMttrStats" parameterType="HashMap"> | |
134 | + SELECT SUM(coalesce) AS "새 검토사항 수" | |
135 | + <include refid="selectItem" /> | |
136 | + FROM ( | |
137 | + SELECT stats_date | |
138 | + , COALESCE(eda.count, 0) | |
139 | + FROM (SELECT GENERATE_SERIES::DATE AS stats_date | |
140 | + FROM GENERATE_SERIES( | |
141 | + <if test="searchKeyword != null and searchText != ''"> | |
142 | + <if test="searchKeyword == 'day'"> | |
143 | + (now() + '-30 days')::DATE | |
144 | + </if> | |
145 | + <if test="searchKeyword == 'month'"> | |
146 | + (now() + '-1 year')::DATE | |
147 | + </if> | |
148 | + <if test="searchKeyword == 'year'"> | |
149 | + (select MIN(reg_dt) FROM ent_dscsn_aply WHERE use_yn = 'Y') | |
150 | + </if> | |
151 | + </if> | |
152 | + , NOW()::DATE, '1 day'::INTERVAL)) as date | |
153 | + LEFT JOIN ( | |
154 | + SELECT COUNT(rvw_mttr_id) | |
155 | + , reg_dt::DATE AS reg_dt | |
156 | + FROM rvw_mttr | |
157 | + WHERE use_yn = 'Y' | |
158 | + GROUP BY reg_dt::DATE | |
159 | + ) AS eda | |
160 | + ON date.stats_date = eda.reg_dt | |
161 | + ORDER BY stats_date) AS datas | |
162 | + <include refid="groupItem" /> | |
163 | + ORDER BY stats_date | |
164 | + </select> | |
165 | + <!-- // 공무원 메인페이지 통계정보 관련 --> | |
166 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/mber/admMbr-SQL.xml
... | ... | @@ -0,0 +1,309 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작 성 자 : 박정하 | |
5 | + 작 성 일 : 2024.06.21 | |
6 | + 내 용 : 회원정보 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.mber.dao.AdmMbrDAO"> | |
9 | + <!-- 회원정보 resultMap(권한 포함) --> | |
10 | + <resultMap id="mbrMap" type="AdmMbrDTO"> | |
11 | + <result property="mbrId" column="mbr_id" /> | |
12 | + <result property="lgnId" column="lgn_id" /> | |
13 | + <result property="mbrNm" column="mbr_nm" /> | |
14 | + <result property="ncnm" column="ncnm" /> | |
15 | + <result property="pswd" column="pswd" /> | |
16 | + <result property="mblTelno" column="mbl_telno" /> | |
17 | + <result property="telno" column="telno" /> | |
18 | + <result property="eml" column="eml" /> | |
19 | + <result property="zip" column="zip" /> | |
20 | + <result property="addr" column="addr" /> | |
21 | + <result property="daddr" column="daddr" /> | |
22 | + <result property="mbrStts" column="mbr_stts" /> | |
23 | + <result property="useYn" column="use_yn" /> | |
24 | + <result property="cntrlDt" column="cntrl_dt" /> | |
25 | + <result property="cntrlRsn" column="cntrl_rsn" /> | |
26 | + <result property="smsRcptnAgreYn" column="sms_rcptn_agre_yn" /> | |
27 | + <result property="emlRcptnAgreYn" column="eml_rcptn_agre_yn" /> | |
28 | + <result property="prvcRlsYn" column="prvc_rls_yn" /> | |
29 | + <result property="mbrType" column="mbr_type" /> | |
30 | + <result property="pswdChgDt" column="pswd_chg_dt" /> | |
31 | + <result property="frstRegIp" column="frst_reg_ip" /> | |
32 | + <result property="sysPvsnYn" column="sys_pvsn_yn" /> | |
33 | + <result property="rgtr" column="rgtr" /> | |
34 | + <result property="regDt" column="reg_dt" /> | |
35 | + <result property="mdfr" column="mdfr" /> | |
36 | + <result property="mdfcnDt" column="mdfcn_dt" /> | |
37 | + <collection property="authorList" column="{mbrId = mbr_id}" javaType="java.util.ArrayList" ofType="MberAuthorVO" select="mbrAuthorList" /> | |
38 | + </resultMap> | |
39 | + | |
40 | + <!-- 회원 권한 매핑 --> | |
41 | + <resultMap id="authMap" type="MberAuthorVO"> | |
42 | + <result property="mbrId" column="mbr_id" /> | |
43 | + <result property="authrtNm" column="authrt_nm" /> | |
44 | + <result property="authrtCd" column="authrt_cd" /> | |
45 | + <result property="rgtr" column="rgtr" /> | |
46 | + <result property="regDt" column="reg_dt" /> | |
47 | + </resultMap> | |
48 | + | |
49 | + <sql id="selectMbr"> | |
50 | + SELECT mi.mbr_id | |
51 | + , mi.lgn_id | |
52 | + , mi.mbr_nm | |
53 | + , mi.ncnm | |
54 | + , mi.pswd | |
55 | + , mi.mbl_telno | |
56 | + , mi.telno | |
57 | + , mi.eml | |
58 | + , mi.zip | |
59 | + , mi.addr | |
60 | + , mi.daddr | |
61 | + , mi.mbr_stts | |
62 | + , mi.use_yn | |
63 | + , TO_CHAR(mi.cntrl_dt, 'YYYY-MM-DD') AS cntrl_dt | |
64 | + , mi.cntrl_rsn | |
65 | + , mi.sms_rcptn_agre_yn | |
66 | + , mi.eml_rcptn_agre_yn | |
67 | + , mi.prvc_rls_yn | |
68 | + , mi.mbr_type | |
69 | + , TO_CHAR(mi.pswd_chg_dt, 'YYYY-MM-DD HH24:MI') AS pswd_chg_dt | |
70 | + , mi.frst_reg_ip | |
71 | + , mi.sys_pvsn_yn | |
72 | + , mi.rgtr | |
73 | + , TO_CHAR(mi.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
74 | + , mi.mdfr | |
75 | + , TO_CHAR(mi.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
76 | + FROM mbr_info AS mi | |
77 | + </sql> | |
78 | + | |
79 | + <sql id="selectRequirement"> | |
80 | + <if test="searchText != null and searchText != ''"> | |
81 | + <choose> | |
82 | + <when test="searchType != null and searchType != ''"> | |
83 | + <if test="searchType == 'lgn_id'"> | |
84 | + AND mi.lgn_id LIKE '%' || #{searchText} || '%' | |
85 | + </if> | |
86 | + <if test="searchType == 'mbr_nm'"> | |
87 | + AND mi.mbr_nm LIKE '%' || #{searchText} || '%' | |
88 | + </if> | |
89 | + </when> | |
90 | + <otherwise> | |
91 | + AND ( | |
92 | + mi.lgn_id LIKE '%' || #{searchText} || '%' | |
93 | + OR | |
94 | + mi.mbr_nm LIKE '%' || #{searchText} || '%' | |
95 | + ) | |
96 | + </otherwise> | |
97 | + </choose> | |
98 | + </if> | |
99 | + </sql> | |
100 | + | |
101 | + <!-- | |
102 | + 작 성 자 : 박정하 | |
103 | + 작 성 일 : 2024.06.21 | |
104 | + 내 용 : 회원정보 목록 개수 조회 | |
105 | + --> | |
106 | + <select id="mbrListCnt" resultType="int"> | |
107 | + SELECT COUNT(mi.mbr_id) | |
108 | + FROM mbr_info AS mi | |
109 | + LEFT JOIN mbr_authrt_info AS mai | |
110 | + ON mi.mbr_id = mai.mbr_id | |
111 | + WHERE mi.use_yn = 'Y' | |
112 | + <if test="cateId == 'authrt_cd' and cateValue != null and cateValue != ''"> | |
113 | + AND mai.authrt_cd = #{cateValue} | |
114 | + </if> | |
115 | + <include refid="selectRequirement" /> | |
116 | + </select> | |
117 | + | |
118 | + <!-- | |
119 | + 작 성 자 : 박정하 | |
120 | + 작 성 일 : 2024.06.21 | |
121 | + 내 용 : 회원정보 목록 조회 | |
122 | + --> | |
123 | + <select id="mbrList" resultMap="mbrMap"> | |
124 | + <include refid="selectMbr" /> | |
125 | + LEFT JOIN mbr_authrt_info AS mai | |
126 | + ON mi.mbr_id = mai.mbr_id | |
127 | + WHERE mi.use_yn = 'Y' | |
128 | + <if test="cateId == 'authrt_cd' and cateValue != null and cateValue != ''"> | |
129 | + AND mai.authrt_cd = #{cateValue} | |
130 | + </if> | |
131 | + <include refid="selectRequirement" /> | |
132 | + ORDER BY mi.reg_dt DESC | |
133 | + OFFSET #{limitStart} LIMIT #{recordSize} | |
134 | + </select> | |
135 | + | |
136 | + <!-- | |
137 | + 작 성 자 : 박정하 | |
138 | + 작 성 일 : 2024.06.21 | |
139 | + 내 용 : 회원 권한 조회 | |
140 | + --> | |
141 | + <select id="mbrAuthorList" parameterType="MberVO" resultMap="authMap"> | |
142 | + SELECT mai.mbr_id | |
143 | + , ai.authrt_nm | |
144 | + , mai.authrt_cd | |
145 | + , mai.rgtr | |
146 | + , TO_CHAR(mai.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
147 | + FROM mbr_authrt_info AS mai | |
148 | + LEFT JOIN authrt_info AS ai | |
149 | + ON mai.authrt_cd = ai.authrt_cd | |
150 | + AND ai.use_yn = 'Y' | |
151 | + WHERE mai.mbr_id = #{mbrId} | |
152 | + </select> | |
153 | + | |
154 | + <!-- | |
155 | + 작 성 자 : 박정하 | |
156 | + 작 성 일 : 2024.06.21 | |
157 | + 내 용 : 회원정보 상세 조회 | |
158 | + --> | |
159 | + <select id="mbrDetail" parameterType="String" resultMap="mbrMap"> | |
160 | + <include refid="selectMbr" /> | |
161 | + WHERE mi.use_yn = 'Y' | |
162 | + AND mi.mbr_id = #{mbrId} | |
163 | + </select> | |
164 | + | |
165 | + <!-- | |
166 | + 작 성 자 : 박정하 | |
167 | + 작 성 일 : 2024.06.21 | |
168 | + 내 용 : 회원정보 수정 | |
169 | + --> | |
170 | + <update id="updateMbr" parameterType="JoinDTO"> | |
171 | + UPDATE mbr_info | |
172 | + SET mbr_nm = #{mbrNm} | |
173 | + , ncnm = #{ncnm} | |
174 | + , mbl_telno = #{mblTelno} | |
175 | + , telno = #{telno} | |
176 | + , eml = #{eml} | |
177 | + , zip = #{zip} | |
178 | + , addr = #{addr} | |
179 | + , daddr = #{daddr} | |
180 | + , mbr_stts = #{mbrStts} | |
181 | + , use_yn = #{useYn} | |
182 | + , cntrl_dt = #{cntrlDt}::timestamp | |
183 | + , cntrl_rsn = #{cntrlRsn} | |
184 | + , sms_rcptn_agre_yn = #{smsRcptnAgreYn} | |
185 | + , eml_rcptn_agre_yn = #{emlRcptnAgreYn} | |
186 | + , prvc_rls_yn = #{prvcRlsYn} | |
187 | + , mbr_type = #{mbrType} | |
188 | + , sys_pvsn_yn = #{sysPvsnYn} | |
189 | + , mdfr = #{mdfr} | |
190 | + , mdfcn_dt = NOW() | |
191 | + WHERE mbr_id = #{mbrId} | |
192 | + </update> | |
193 | + | |
194 | + <!-- | |
195 | + 작 성 자 : 박정하 | |
196 | + 작 성 일 : 2024.06.21 | |
197 | + 내 용 : 회원 권한 삭제 | |
198 | + --> | |
199 | + <delete id="deleteAuthorListByMbrId" parameterType="String"> | |
200 | + DELETE | |
201 | + FROM mbr_authrt_info | |
202 | + WHERE mbr_id = #{mbrId} | |
203 | + </delete> | |
204 | + | |
205 | + <!-- | |
206 | + 작 성 자 : 박정하 | |
207 | + 작 성 일 : 2024.06.21 | |
208 | + 내 용 : 회원 권한 등록 | |
209 | + --> | |
210 | + <insert id="insertAuthor" parameterType="MberAuthorVO"> | |
211 | + INSERT INTO mbr_authrt_info ( | |
212 | + mbr_id | |
213 | + , authrt_cd | |
214 | + , rgtr | |
215 | + , reg_dt | |
216 | + ) VALUES ( | |
217 | + #{mbrId} | |
218 | + , #{authrtCd} | |
219 | + , #{rgtr} | |
220 | + , NOW() | |
221 | + ) | |
222 | + </insert> | |
223 | + | |
224 | + <!-- | |
225 | + 작 성 자 : 박정하 | |
226 | + 작 성 일 : 2024.06.21 | |
227 | + 내 용 : 회원정보 등록 | |
228 | + --> | |
229 | + <insert id="mbrInsert" parameterType="JoinDTO"> | |
230 | + INSERT INTO mbr_info ( | |
231 | + mbr_id | |
232 | + , lgn_id | |
233 | + , mbr_nm | |
234 | + , ncnm | |
235 | + , pswd | |
236 | + , mbl_telno | |
237 | + , telno | |
238 | + , eml | |
239 | + , zip | |
240 | + , addr | |
241 | + , daddr | |
242 | + , mbr_stts | |
243 | + , use_yn | |
244 | + , cntrl_dt | |
245 | + , cntrl_rsn | |
246 | + , sms_rcptn_agre_yn | |
247 | + , eml_rcptn_agre_yn | |
248 | + , prvc_rls_yn | |
249 | + , mbr_type | |
250 | + , pswd_chg_dt | |
251 | + , frst_reg_ip | |
252 | + , sys_pvsn_yn | |
253 | + , rgtr | |
254 | + , reg_dt | |
255 | + ) VALUES ( | |
256 | + #{mbrId} | |
257 | + , #{lgnId} | |
258 | + , #{mbrNm} | |
259 | + , #{ncnm} | |
260 | + , #{pswd} | |
261 | + , #{mblTelno} | |
262 | + , #{telno} | |
263 | + , #{eml} | |
264 | + , #{zip} | |
265 | + , #{addr} | |
266 | + , #{daddr} | |
267 | + , #{mbrStts} | |
268 | + , 'Y' | |
269 | + , #{cntrlDt}::timestamp | |
270 | + , #{cntrlRsn} | |
271 | + , #{smsRcptnAgreYn} | |
272 | + , #{emlRcptnAgreYn} | |
273 | + , #{prvcRlsYn} | |
274 | + , 'S' | |
275 | + , NOW() | |
276 | + , #{frstRegIp} | |
277 | + , 'Y' | |
278 | + , #{rgtr} | |
279 | + , NOW() | |
280 | + ) | |
281 | + </insert> | |
282 | + | |
283 | + <!-- | |
284 | + 작 성 자 : 박정하 | |
285 | + 작 성 일 : 2024.07.03 | |
286 | + 내 용 : 아이디 찾기 (로그인 아이디) | |
287 | + --> | |
288 | + <select id="lgnIdSearch" parameterType="MberVO" resultType="String"> | |
289 | + SELECT lgn_id | |
290 | + FROM mbr_info | |
291 | + WHERE mbr_nm = #{mbrNm} | |
292 | + AND eml = #{eml} | |
293 | + AND use_yn = 'Y' | |
294 | + </select> | |
295 | + | |
296 | + <!-- | |
297 | + 작 성 자 : 박정하 | |
298 | + 작 성 일 : 2024.07.03 | |
299 | + 내 용 : 아이디 찾기 (멤버 아이디) | |
300 | + --> | |
301 | + <select id="mbrIdSearch" parameterType="AdmMbrDTO" resultType="String"> | |
302 | + SELECT mbr_id | |
303 | + FROM mbr_info | |
304 | + WHERE lgn_id = #{lgnId} | |
305 | + AND mbr_nm = #{mbrNm} | |
306 | + AND eml = #{eml} | |
307 | + AND use_yn = 'Y' | |
308 | + </select> | |
309 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/mber/lgnHstry-SQL.xml
... | ... | @@ -0,0 +1,126 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : takensoft | |
5 | + 작성일 : 2024.04.09 | |
6 | + 내 용 : 로그인 이력 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.mber.dao.LgnHstryDAO"> | |
9 | + <!-- 로그인 이력 resultMap --> | |
10 | + <resultMap id="lgnHstryMap" type="LgnHstryVO"> | |
11 | + <result property="lgnId" column="lgn_id" /> | |
12 | + <result property="lgnType" column="lgn_type" /> | |
13 | + <result property="cntnDt" column="cntn_dt" /> | |
14 | + <result property="cntnIp" column="cntn_ip" /> | |
15 | + <result property="cntnOperSys" column="cntn_oper_sys" /> | |
16 | + <result property="deviceNm" column="device_nm" /> | |
17 | + <result property="brwsrNm" column="brwsr_nm" /> | |
18 | + </resultMap> | |
19 | + | |
20 | + <!-- | |
21 | + 작성자 : takensoft | |
22 | + 작성일 : 2024.04.11 | |
23 | + 내 용 : 로그인 이력 등록 | |
24 | + --> | |
25 | + <insert id="save" parameterType="LgnHstryVO"> | |
26 | + INSERT INTO lgn_hstry ( | |
27 | + lgn_id | |
28 | + , lgn_type | |
29 | + , cntn_dt | |
30 | + , cntn_ip | |
31 | + , cntn_oper_sys | |
32 | + , device_nm | |
33 | + , brwsr_nm | |
34 | + ) VALUES ( | |
35 | + #{lgnId} | |
36 | + , #{lgnType} | |
37 | + , NOW() | |
38 | + , #{cntnIp} | |
39 | + , #{cntnOperSys} | |
40 | + , #{deviceNm} | |
41 | + , #{brwsrNm} | |
42 | + ) | |
43 | + </insert> | |
44 | + | |
45 | + <!-- SELECT SQL --> | |
46 | + <sql id="selectItem"> | |
47 | + SELECT lh.lgn_id | |
48 | + , lh.lgn_type | |
49 | + , TO_CHAR(lh.cntn_dt, 'YYYY-MM-DD HH24:MI') AS cntn_dt | |
50 | + , lh.cntn_ip | |
51 | + , lh.cntn_oper_sys | |
52 | + , lh.device_nm | |
53 | + , lh.brwsr_nm | |
54 | + FROM lgn_hstry AS lh | |
55 | + </sql> | |
56 | + | |
57 | + <sql id="selectRequirement"> | |
58 | + <if test="startDt != null and startDt != ''"> | |
59 | + AND lh.cntn_dt >= #{startDt}::timestamp | |
60 | + </if> | |
61 | + <if test="endDt != null and endDt != ''"> | |
62 | + AND #{endDt}::timestamp >= lh.cntn_dt | |
63 | + </if> | |
64 | + <if test="searchText != null and searchText != ''"> | |
65 | + <choose> | |
66 | + <when test="searchType != null and searchType != ''"> | |
67 | + <if test="searchType == 'lgnType'"> | |
68 | + lh.lgn_type = (SELECT CASE cm.cd_nm | |
69 | + WHEN '관리자' THEN '0' | |
70 | + WHEN '사용자' THEN '1' | |
71 | + ELSE '' | |
72 | + END | |
73 | + FROM cd_mng AS cm | |
74 | + WHERE cm.use_yn = 'Y' | |
75 | + AND cm.up_cd = 'lgnHstryType' | |
76 | + AND cm.cd_nm LIKE '%' || #{searchText} || '%') | |
77 | + </if> | |
78 | + <if test="searchType == 'lgnId'"> | |
79 | + AND lh.lgn_id LIKE '%' || #{searchText} || '%' | |
80 | + </if> | |
81 | + </when> | |
82 | + <otherwise> | |
83 | + AND ( | |
84 | + lh.lgn_type = (SELECT CASE cm.cd_nm | |
85 | + WHEN '관리자' THEN '0' | |
86 | + WHEN '사용자' THEN '1' | |
87 | + ELSE '' | |
88 | + END | |
89 | + FROM cd_mng AS cm | |
90 | + WHERE cm.use_yn = 'Y' | |
91 | + AND cm.up_cd = 'lgnHstryType' | |
92 | + AND cm.cd_nm LIKE '%' || #{searchText} || '%') | |
93 | + OR | |
94 | + lh.lgn_id LIKE '%' || #{searchText} || '%' | |
95 | + ) | |
96 | + </otherwise> | |
97 | + </choose> | |
98 | + </if> | |
99 | + </sql> | |
100 | + <!-- // SELECT SQL --> | |
101 | + | |
102 | + <!-- | |
103 | + 작 성 자 : 박정하 | |
104 | + 작 성 일 : 2024.05.24 | |
105 | + 내 용 : 로그인 이력 개수 | |
106 | + --> | |
107 | + <select id="selectLgnHstryListCnt" parameterType="Pagination" resultType="Integer"> | |
108 | + SELECT COUNT(lgn_hstry_id) | |
109 | + FROM lgn_hstry AS lh | |
110 | + WHERE true | |
111 | + <include refid="selectRequirement" /> | |
112 | + </select> | |
113 | + | |
114 | + <!-- | |
115 | + 작 성 자 : 박정하 | |
116 | + 작 성 일 : 2024.05.24 | |
117 | + 내 용 : 로그인 이력 조회 | |
118 | + --> | |
119 | + <select id="selectLgnHstryList" parameterType="Pagination" resultMap="lgnHstryMap"> | |
120 | + <include refid="selectItem" /> | |
121 | + WHERE true | |
122 | + <include refid="selectRequirement" /> | |
123 | + ORDER BY cntn_dt DESC | |
124 | + LIMIT #{recordSize} OFFSET #{limitStart} | |
125 | + </select> | |
126 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/mber/mber-SQL.xml
... | ... | @@ -0,0 +1,215 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : takensoft | |
5 | + 작성일 : 2024.04.03 | |
6 | + 내 용 : 회원정보 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.mber.dao.MberDAO"> | |
9 | + <!-- 회원 정보 resultMap(권한 포함) --> | |
10 | + <resultMap id="mberMap" type="MberVO"> | |
11 | + <result property="mbrId" column="mbr_id" /> | |
12 | + <result property="lgnId" column="lgn_id" /> | |
13 | + <result property="mbrNm" column="mbr_nm" /> | |
14 | + <result property="ncnm" column="ncnm" /> | |
15 | + <result property="pswd" column="pswd" /> | |
16 | + <result property="mblTelno" column="mbl_telno" /> | |
17 | + <result property="telno" column="telno" /> | |
18 | + <result property="eml" column="eml" /> | |
19 | + <result property="zip" column="zip" /> | |
20 | + <result property="addr" column="addr" /> | |
21 | + <result property="daddr" column="daddr" /> | |
22 | + <result property="mbrStts" column="mbr_stts" /> | |
23 | + <result property="useYn" column="use_yn" /> | |
24 | + <result property="cntrlDt" column="cntrl_dt" /> | |
25 | + <result property="cntrlRsn" column="cntrl_rsn" /> | |
26 | + <result property="smsRcptnAgreYn" column="sms_rcptn_agre_yn" /> | |
27 | + <result property="emlRcptnAgreYn" column="eml_rcptn_agre_yn" /> | |
28 | + <result property="prvcRlsYn" column="prvc_rls_yn" /> | |
29 | + <result property="mbrType" column="mbr_type" /> | |
30 | + <result property="pswdChgDt" column="pswd_chg_dt" /> | |
31 | + <result property="frstRegIp" column="frst_reg_ip" /> | |
32 | + <result property="sysPvsnYn" column="sys_pvsn_yn" /> | |
33 | + <result property="rgtr" column="rgtr" /> | |
34 | + <result property="regDt" column="reg_dt" /> | |
35 | + <result property="mdfr" column="mdfr" /> | |
36 | + <result property="mdfcnDt" column="mdfcn_dt" /> | |
37 | + <collection property="authorList" column="{mbrId = mbr_id}" javaType="java.util.ArrayList" ofType="MberAuthorVO" select="findByMberAuthor" /> | |
38 | + </resultMap> | |
39 | + | |
40 | + <!-- 회원, 권한 매핑 --> | |
41 | + <resultMap id="authMap" type="MberAuthorVO"> | |
42 | + <result property="mbrId" column="mbr_id" /> | |
43 | + <result property="authrtNm" column="authrt_nm" /> | |
44 | + <result property="authrtCd" column="authrt_cd" /> | |
45 | + <result property="rgtr" column="rgtr" /> | |
46 | + <result property="regDt" column="reg_dt" /> | |
47 | + </resultMap> | |
48 | + | |
49 | + <sql id="selectMber"> | |
50 | + SELECT mi.mbr_id | |
51 | + , mi.lgn_id | |
52 | + , mi.mbr_nm | |
53 | + , mi.ncnm | |
54 | + , mi.pswd | |
55 | + , mi.mbl_telno | |
56 | + , mi.telno | |
57 | + , mi.eml | |
58 | + , mi.zip | |
59 | + , mi.addr | |
60 | + , mi.daddr | |
61 | + , mi.mbr_stts | |
62 | + , mi.use_yn | |
63 | + , TO_CHAR(mi.cntrl_dt, 'YYYY-MM-DD') AS cntrl_dt | |
64 | + , mi.cntrl_rsn | |
65 | + , mi.sms_rcptn_agre_yn | |
66 | + , mi.eml_rcptn_agre_yn | |
67 | + , mi.prvc_rls_yn | |
68 | + , mi.mbr_type | |
69 | + , TO_CHAR(mi.pswd_chg_dt, 'YYYY-MM-DD HH24:MI') AS pswd_chg_dt | |
70 | + , mi.frst_reg_ip | |
71 | + , mi.sys_pvsn_yn | |
72 | + , mi.rgtr | |
73 | + , TO_CHAR(mi.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
74 | + , mi.mdfr | |
75 | + , TO_CHAR(mi.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
76 | + FROM mbr_info mi | |
77 | + </sql> | |
78 | + | |
79 | + <!-- | |
80 | + 작성자 : takensoft | |
81 | + 작성일 : 2024.04.03 | |
82 | + 내 용 : 회원정보 조회 [security 용] | |
83 | + --> | |
84 | + <select id="findByMberSecurity" parameterType="String" resultMap="mberMap"> | |
85 | + <include refid="selectMber" /> | |
86 | + WHERE mi.lgn_id = #{lgnId} | |
87 | + AND mi.use_yn = 'Y' | |
88 | + </select> | |
89 | + | |
90 | + <!-- | |
91 | + 작성자 : takensoft | |
92 | + 작성일 : 2024.04.03 | |
93 | + 내 용 : 로그인 아이디 중복 확인 | |
94 | + --> | |
95 | + <select id="findByCheckLoginId" parameterType="String" resultType="boolean"> | |
96 | + SELECT COUNT(lgn_id) | |
97 | + FROM mbr_info | |
98 | + WHERE lgn_id = #{lgnId} | |
99 | + AND use_yn = 'Y' | |
100 | + </select> | |
101 | + | |
102 | + <!-- | |
103 | + 작성자 : takensoft | |
104 | + 작성일 : 2024.04.03 | |
105 | + 내 용 : 회원가입 | |
106 | + --> | |
107 | + <insert id="save" parameterType="JoinDTO"> | |
108 | + INSERT INTO mbr_info ( | |
109 | + mbr_id | |
110 | + , lgn_id | |
111 | + , mbr_nm | |
112 | + , ncnm | |
113 | + , pswd | |
114 | + , mbl_telno | |
115 | + , telno | |
116 | + , eml | |
117 | + , zip | |
118 | + , addr | |
119 | + , daddr | |
120 | + , mbr_stts | |
121 | + , use_yn | |
122 | + , cntrl_dt | |
123 | + , cntrl_rsn | |
124 | + , sms_rcptn_agre_yn | |
125 | + , eml_rcptn_agre_yn | |
126 | + , prvc_rls_yn | |
127 | + , mbr_type | |
128 | + , pswd_chg_dt | |
129 | + , frst_reg_ip | |
130 | + , sys_pvsn_yn | |
131 | + , rgtr | |
132 | + , reg_dt | |
133 | + ) VALUES ( | |
134 | + #{mbrId} | |
135 | + , #{lgnId} | |
136 | + , #{mbrNm} | |
137 | + , #{ncnm} | |
138 | + , #{pswd} | |
139 | + , #{mblTelno} | |
140 | + , #{telno} | |
141 | + , #{eml} | |
142 | + , #{zip} | |
143 | + , #{addr} | |
144 | + , #{daddr} | |
145 | + , #{mbrStts} | |
146 | + , 'Y' | |
147 | + , #{cntrlDt}::timestamp | |
148 | + , #{cntrlRsn} | |
149 | + , #{smsRcptnAgreYn} | |
150 | + , #{emlRcptnAgreYn} | |
151 | + , #{prvcRlsYn} | |
152 | + , 'S' | |
153 | + , NOW() | |
154 | + , #{frstRegIp} | |
155 | + , 'Y' | |
156 | + , #{rgtr} | |
157 | + , NOW() | |
158 | + ) | |
159 | + </insert> | |
160 | + | |
161 | + <!-- | |
162 | + 작성자 : takensoft | |
163 | + 작성일 : 2024.04.03 | |
164 | + 내 용 : 회원 권한 등록 | |
165 | + --> | |
166 | + <insert id="authorSave" parameterType="MberAuthorVO"> | |
167 | + INSERT INTO mbr_authrt_info ( | |
168 | + mbr_id | |
169 | + , authrt_cd | |
170 | + , rgtr | |
171 | + , reg_dt | |
172 | + ) VALUES ( | |
173 | + #{mbrId} | |
174 | + , #{authrtCd} | |
175 | + , #{rgtr} | |
176 | + , NOW() | |
177 | + ) | |
178 | + </insert> | |
179 | + | |
180 | + <!-- | |
181 | + 작성자 : takensoft | |
182 | + 작성일 : 2024.04.15 | |
183 | + 내 용 : 비밀번호 변경 | |
184 | + --> | |
185 | + <update id="updatePassword" parameterType="PasswordDTO"> | |
186 | + UPDATE mbr_info | |
187 | + SET pswd = #{newPswd} | |
188 | + WHERE mbr_id = #{mbrId} | |
189 | + </update> | |
190 | + | |
191 | + <!-- | |
192 | + 작성자 : takensoft | |
193 | + 작성일 : 2024.04.15 | |
194 | + 내 용 : 회원정보 조회 | |
195 | + --> | |
196 | + <select id="findByMber" parameterType="String" resultMap="mberMap"> | |
197 | + <include refid="selectMber" /> | |
198 | + WHERE mi.mbr_id = #{mbrId} | |
199 | + AND mi.use_yn = 'Y' | |
200 | + </select> | |
201 | + | |
202 | + <!-- | |
203 | + 작성자 : takensoft | |
204 | + 작성일 : 2024.04.03 | |
205 | + 내 용 : 회원 권한 정보 조회 | |
206 | + --> | |
207 | + <select id="findByMberAuthor" parameterType="MberVO" resultMap="authMap"> | |
208 | + SELECT mai.mbr_id | |
209 | + , mai.authrt_cd | |
210 | + , mai.rgtr | |
211 | + , TO_CHAR(mai.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
212 | + FROM mbr_authrt_info mai | |
213 | + WHERE mai.mbr_id = #{mbrId} | |
214 | + </select> | |
215 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/mber/refresh-SQL.xml
... | ... | @@ -0,0 +1,65 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : takensoft | |
5 | + 작성일 : 2024.04.04 | |
6 | + 내 용 : 토큰 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.mber.dao.RefreshTokenDAO"> | |
9 | + | |
10 | + <!-- | |
11 | + 작성자 : takensoft | |
12 | + 작성일 : 2024.04.04 | |
13 | + 내 용 : refresh token 등록 | |
14 | + --> | |
15 | + <insert id="save" parameterType="RefreshVO"> | |
16 | + INSERT INTO mbr_refresh ( | |
17 | + mbr_id | |
18 | + , token | |
19 | + , expry_dt | |
20 | + , use_ip | |
21 | + ) VALUES ( | |
22 | + #{mbrId} | |
23 | + , #{token} | |
24 | + , #{expryDt} | |
25 | + , #{useIp} | |
26 | + ) | |
27 | + </insert> | |
28 | + | |
29 | + <!-- | |
30 | + 작성자 : takensoft | |
31 | + 작성일 : 2024.04.04 | |
32 | + 내 용 : refresh token 삭제 | |
33 | + --> | |
34 | + <delete id="deleteByRefresh" parameterType="RefreshVO"> | |
35 | + DELETE | |
36 | + FROM mbr_refresh | |
37 | + WHERE mbr_id = #{mbrId} | |
38 | + AND use_ip like #{useIp} || '%' | |
39 | + </delete> | |
40 | + | |
41 | + <!-- | |
42 | + 작성자 : takensoft | |
43 | + 작성일 : 2024.04.05 | |
44 | + 내 용 : 기한 만료된 refresh token 삭제 [ Schedule 용 ] | |
45 | + --> | |
46 | + <delete id="cleanExpiredRefreshTokens"> | |
47 | + DELETE | |
48 | + FROM mbr_refresh | |
49 | + WHERE expry_dt <= NOW() | |
50 | + </delete> | |
51 | + | |
52 | + <!-- | |
53 | + 작성자 : takensoft | |
54 | + 작성일 : 2024.04.17 | |
55 | + 내 용 : refresh token 유무 확인 | |
56 | + --> | |
57 | + <select id="findByCheckRefresh" parameterType="RefreshVO" resultType="boolean"> | |
58 | + SELECT EXISTS ( | |
59 | + SELECT 1 | |
60 | + FROM mbr_refresh | |
61 | + WHERE mbr_id = #{mbrId} | |
62 | + AND use_ip = #{useIp} | |
63 | + ) AS result | |
64 | + </select> | |
65 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/popup/popup-SQL.xml
... | ... | @@ -0,0 +1,226 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작 성 자 : 박정하 | |
5 | + 작 성 일 : 2024.05.13 | |
6 | + 내 용 : 팝업 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.popup.dao.PopupDAO"> | |
9 | + <!-- 팝업 resultMap --> | |
10 | + <resultMap id="popupMap" type="PopupVO"> | |
11 | + <result property="popupId" column="popup_id" /> | |
12 | + <result property="popupTtl" column="popup_ttl" /> | |
13 | + <result property="bgngDt" column="bgng_dt" /> | |
14 | + <result property="endDt" column="end_dt" /> | |
15 | + <result property="wdthLen" column="wdth_len" /> | |
16 | + <result property="vrtcLen" column="vrtc_len" /> | |
17 | + <result property="popupType" column="popup_type" /> | |
18 | + <result property="popupUseYn" column="popup_use_yn" /> | |
19 | + <result property="vdoUrl" column="vdo_url" /> | |
20 | + <result property="linkUrl" column="link_url" /> | |
21 | + <result property="fileMngId" column="file_mng_id" /> | |
22 | + <result property="sn" column="sn" /> | |
23 | + <result property="pageType" column="page_type" /> | |
24 | + <result property="useYn" column="use_yn" /> | |
25 | + <result property="rgtr" column="rgtr" /> | |
26 | + <result property="regDt" column="reg_dt" /> | |
27 | + <result property="mdfr" column="mdfr" /> | |
28 | + <result property="mdfcnDt" column="mdfcn_dt" /> | |
29 | + <result property="mbrNm" column="mbr_nm" /> | |
30 | + </resultMap> | |
31 | + | |
32 | + <!-- | |
33 | + 작 성 자 : 박정하 | |
34 | + 작 성 일 : 2024.05.13 | |
35 | + 내 용 : 팝업 등록 | |
36 | + --> | |
37 | + <insert id="insertPopup" parameterType="PopupVO" useGeneratedKeys="true" keyProperty="popupId"> | |
38 | + INSERT INTO popup_mng ( | |
39 | + popup_id | |
40 | + , popup_ttl | |
41 | + , bgng_dt | |
42 | + , end_dt | |
43 | + , wdth_len | |
44 | + , vrtc_len | |
45 | + , popup_type | |
46 | + , popup_use_yn | |
47 | + , vdo_url | |
48 | + , link_url | |
49 | + , file_mng_id | |
50 | + , sn | |
51 | + , page_type | |
52 | + , use_yn | |
53 | + , rgtr | |
54 | + , reg_dt | |
55 | + ) VALUES ( | |
56 | + #{popupId} | |
57 | + , #{popupTtl} | |
58 | + , #{bgngDt}::timestamp | |
59 | + , #{endDt}::timestamp | |
60 | + , #{wdthLen} | |
61 | + , #{vrtcLen} | |
62 | + , #{popupType} | |
63 | + , #{popupUseYn} | |
64 | + , #{vdoUrl} | |
65 | + , #{linkUrl} | |
66 | + , #{fileMngId} | |
67 | + , #{sn} | |
68 | + , #{pageType} | |
69 | + , 'Y' | |
70 | + , #{rgtr} | |
71 | + , NOW() | |
72 | + ) | |
73 | + </insert> | |
74 | + | |
75 | + <!-- SELECT SQL --> | |
76 | + <sql id="selectItem"> | |
77 | + SELECT pm.popup_id | |
78 | + , pm.popup_ttl | |
79 | + , TO_CHAR(pm.bgng_dt, 'YYYY-MM-DD HH24:MI') AS bgng_dt | |
80 | + , TO_CHAR(pm.end_dt, 'YYYY-MM-DD HH24:MI') AS end_dt | |
81 | + , pm.wdth_len | |
82 | + , pm.vrtc_len | |
83 | + , pm.popup_type | |
84 | + , pm.popup_use_yn | |
85 | + , pm.vdo_url | |
86 | + , pm.link_url | |
87 | + , pm.file_mng_id | |
88 | + , pm.sn | |
89 | + , pm.page_type | |
90 | + , pm.use_yn | |
91 | + , pm.rgtr | |
92 | + , TO_CHAR(pm.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
93 | + , pm.mdfr | |
94 | + , TO_CHAR(pm.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
95 | + , mi.mbr_nm | |
96 | + FROM popup_mng AS pm | |
97 | + LEFT JOIN mbr_info AS mi | |
98 | + ON pm.rgtr = mi.mbr_id | |
99 | + </sql> | |
100 | + | |
101 | + <sql id="selectRequirement"> | |
102 | + <if test="searchText != null and searchText != ''"> | |
103 | + <choose> | |
104 | + <when test="searchType != null and searchType != ''"> | |
105 | + <if test="searchType == 'popup_ttl'"> | |
106 | + AND pm.popup_ttl LIKE '%' || #{searchText} || '%' | |
107 | + </if> | |
108 | + <if test="searchType == 'mbr_nm'"> | |
109 | + AND mi.mbr_nm LIKE '%' || #{searchText} || '%' | |
110 | + </if> | |
111 | + </when> | |
112 | + <otherwise> | |
113 | + AND ( | |
114 | + pm.popup_ttl LIKE '%' || #{searchText} || '%' | |
115 | + OR | |
116 | + mi.mbr_nm LIKE '%' || #{searchText} || '%' | |
117 | + ) | |
118 | + </otherwise> | |
119 | + </choose> | |
120 | + </if> | |
121 | + </sql> | |
122 | + <!-- // SELECT SQL --> | |
123 | + | |
124 | + <!-- | |
125 | + 작 성 자 : 박정하 | |
126 | + 작 성 일 : 2024.05.13 | |
127 | + 내 용 : 팝업 목록 개수 | |
128 | + --> | |
129 | + <select id="selectPopupListCnt" parameterType="Pagination" resultType="Integer"> | |
130 | + SELECT COUNT(popup_id) | |
131 | + FROM popup_mng AS pm | |
132 | + LEFT JOIN mbr_info AS mi | |
133 | + ON pm.rgtr = mi.mbr_id | |
134 | + WHERE pm.use_yn = 'Y' | |
135 | + <include refid="selectRequirement" /> | |
136 | + </select> | |
137 | + | |
138 | + <!-- | |
139 | + 작 성 자 : 박정하 | |
140 | + 작 성 일 : 2024.05.13 | |
141 | + 내 용 : 팝업 목록 조회 | |
142 | + --> | |
143 | + <select id="selectPopupList" parameterType="Pagination" resultMap="popupMap"> | |
144 | + <include refid="selectItem" /> | |
145 | + WHERE pm.use_yn = 'Y' | |
146 | + <include refid="selectRequirement" /> | |
147 | + ORDER BY reg_dt DESC | |
148 | + LIMIT #{recordSize} OFFSET #{limitStart} | |
149 | + </select> | |
150 | + | |
151 | + <!-- | |
152 | + 작 성 자 : 박정하 | |
153 | + 작 성 일 : 2024.05.13 | |
154 | + 내 용 : 팝업 상세 조회 | |
155 | + --> | |
156 | + <select id="selectPopupDetail" parameterType="PopupVO" resultMap="popupMap"> | |
157 | + <include refid="selectItem" /> | |
158 | + WHERE pm.popup_id = #{popupId} | |
159 | + AND pm.use_yn = 'Y' | |
160 | + </select> | |
161 | + | |
162 | + <!-- | |
163 | + 작 성 자 : 박정하 | |
164 | + 작 성 일 : 2024.05.13 | |
165 | + 내 용 : 팝업 수정 | |
166 | + --> | |
167 | + <update id="updatePopup" parameterType="PopupVO"> | |
168 | + UPDATE popup_mng | |
169 | + SET popup_ttl = #{popupTtl} | |
170 | + , bgng_dt = #{bgngDt}::timestamp | |
171 | + , end_dt = #{endDt}::timestamp | |
172 | + , wdth_len = #{wdthLen} | |
173 | + , vrtc_len = #{vrtcLen} | |
174 | + , popup_type = #{popupType} | |
175 | + , popup_use_yn = #{popupUseYn} | |
176 | + , vdo_url = #{vdoUrl} | |
177 | + , link_url = #{linkUrl} | |
178 | + , file_mng_id = #{fileMngId} | |
179 | + , sn = #{sn} | |
180 | + , page_type = #{pageType} | |
181 | + , use_yn = #{useYn} | |
182 | + , mdfr = #{mdfr} | |
183 | + , mdfcn_dt = NOW() | |
184 | + WHERE popup_id = #{popupId} | |
185 | + </update> | |
186 | + | |
187 | + <!-- | |
188 | + 작 성 자 : 박정하 | |
189 | + 작 성 일 : 2024.05.22 | |
190 | + 내 용 : 팝업 목록 조회 (팝업창 띄우는 용도) | |
191 | + --> | |
192 | + <select id="selectPopupListByPage" parameterType="String" resultMap="popupMap"> | |
193 | + <include refid="selectItem" /> | |
194 | + WHERE pm.use_yn = 'Y' | |
195 | + AND pm.popup_use_yn = 'Y' | |
196 | + AND pm.page_type = #{pageType} | |
197 | + AND now() >= pm.bgng_dt::timestamp | |
198 | + AND pm.end_dt::timestamp >= now() | |
199 | + ORDER BY reg_dt DESC | |
200 | + </select> | |
201 | + | |
202 | + <!-- | |
203 | + 작 성 자 : 박정하 | |
204 | + 작 성 일 : 2024.05.23 | |
205 | + 내 용 : 매일 자정에 종료일이 지난 팝업 사용여부 변경 | |
206 | + --> | |
207 | + <update id="cleanExpiredPopups"> | |
208 | + UPDATE popup_mng | |
209 | + SET popup_use_yn = 'N' | |
210 | + , mdfr = null | |
211 | + , mdfcn_dt = NOW() | |
212 | + WHERE end_dt <= NOW() | |
213 | + </update> | |
214 | + | |
215 | + <!-- | |
216 | + 작 성 자 : 박정하 | |
217 | + 작 성 일 : 2024.05.28 | |
218 | + 내 용 : 팝업 최신 목록 조회 (최신글 5건 출력) | |
219 | + --> | |
220 | + <select id="selectPopupListByNew" resultMap="popupMap"> | |
221 | + <include refid="selectItem" /> | |
222 | + WHERE pm.use_yn = 'Y' | |
223 | + ORDER BY pm.reg_dt DESC | |
224 | + LIMIT 5 | |
225 | + </select> | |
226 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/prvcInqHstry/prvcInqHstry-SQL.xml
... | ... | @@ -0,0 +1,126 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작 성 자 : 박정하 | |
5 | + 작 성 일 : 2024.05.22 | |
6 | + 내 용 : 개인정보 조회 이력 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.cms.prvcInqHstry.dao.PrvcInqHstryDAO"> | |
9 | + <!-- 개인정보 조회 이력 resultMap --> | |
10 | + <resultMap id="prvcInqHstryMap" type="PrvcInqHstryVO"> | |
11 | + <result property="inqHstryId" column="inq_hstry_id" /> | |
12 | + <result property="inqTrprId" column="inq_trpr_id" /> | |
13 | + <result property="inqRsn" column="inq_rsn" /> | |
14 | + <result property="inqIp" column="inq_ip" /> | |
15 | + <result property="rdr" column="rdr" /> | |
16 | + <result property="inqDt" column="inq_dt" /> | |
17 | + <result property="mbrNm" column="mbr_nm" /> | |
18 | + <result property="lgnId" column="lgn_id" /> | |
19 | + </resultMap> | |
20 | + | |
21 | + <!-- | |
22 | + 작 성 자 : 박정하 | |
23 | + 작 성 일 : 2024.05.22 | |
24 | + 내 용 : 개인정보조회 이력 등록 | |
25 | + --> | |
26 | + <insert id="insertPrvcInqHstry" parameterType="PrvcInqHstryVO"> | |
27 | + INSERT INTO prvc_inq_hstry ( | |
28 | + inq_trpr_id | |
29 | + , inq_rsn | |
30 | + , inq_ip | |
31 | + , rdr | |
32 | + , inq_dt | |
33 | + ) VALUES ( | |
34 | + #{inqTrprId} | |
35 | + , #{inqRsn} | |
36 | + , #{inqIp} | |
37 | + , #{rdr} | |
38 | + , now() | |
39 | + ) | |
40 | + </insert> | |
41 | + | |
42 | + <!-- SELECT SQL --> | |
43 | + <sql id="selectItem"> | |
44 | + SELECT pih.inq_hstry_id | |
45 | + , pih.inq_trpr_id | |
46 | + , pih.inq_rsn | |
47 | + , pih.inq_ip | |
48 | + , pih.rdr | |
49 | + , TO_CHAR(pih.inq_dt, 'YYYY-MM-DD HH24:MI') AS inq_dt | |
50 | + , mi.mbr_nm | |
51 | + , (SELECT lgn_id FROM mbr_info WHERE pih.inq_trpr_id = mbr_id) AS lgn_id | |
52 | + FROM prvc_inq_hstry AS pih | |
53 | + LEFT JOIN mbr_info AS mi | |
54 | + ON pih.rdr = mi.mbr_id | |
55 | + </sql> | |
56 | + | |
57 | + <sql id="selectRequirement"> | |
58 | + <if test="startDt != null and startDt != ''"> | |
59 | + AND pih.inq_dt >= #{startDt}::timestamp | |
60 | + </if> | |
61 | + <if test="endDt != null and endDt != ''"> | |
62 | + AND #{endDt}::timestamp >= pih.inq_dt | |
63 | + </if> | |
64 | + <if test="searchText != null and searchText != ''"> | |
65 | + <choose> | |
66 | + <when test="searchType != null and searchType != ''"> | |
67 | + <if test="searchType == 'inqRdr'"> | |
68 | + AND mi.mbr_nm LIKE '%' || #{searchText} || '%' | |
69 | + </if> | |
70 | + <if test="searchType == 'inqTrprId'"> | |
71 | + AND pih.inq_trpr_id IN (select mbr_id | |
72 | + from mbr_info | |
73 | + where lgn_id LIKE '%' || #{searchText} || '%') | |
74 | + </if> | |
75 | + </when> | |
76 | + <otherwise> | |
77 | + AND ( | |
78 | + mi.mbr_nm LIKE '%' || #{searchText} || '%' | |
79 | + OR | |
80 | + pih.inq_trpr_id IN (select mbr_id | |
81 | + from mbr_info | |
82 | + where lgn_id LIKE '%' || #{searchText} || '%') | |
83 | + ) | |
84 | + </otherwise> | |
85 | + </choose> | |
86 | + </if> | |
87 | + </sql> | |
88 | + <!-- // SELECT SQL --> | |
89 | + | |
90 | + <!-- | |
91 | + 작 성 자 : 박정하 | |
92 | + 작 성 일 : 2024.05.27 | |
93 | + 내 용 : 개인정보조회 이력 개수 | |
94 | + --> | |
95 | + <select id="selectPrvcInqHstryListCnt" parameterType="Pagination" resultType="Integer"> | |
96 | + SELECT COUNT(pih.inq_hstry_id) | |
97 | + FROM prvc_inq_hstry AS pih | |
98 | + LEFT JOIN mbr_info AS mi | |
99 | + ON pih.rdr = mi.mbr_id | |
100 | + WHERE true | |
101 | + <include refid="selectRequirement" /> | |
102 | + </select> | |
103 | + | |
104 | + <!-- | |
105 | + 작 성 자 : 박정하 | |
106 | + 작 성 일 : 2024.05.27 | |
107 | + 내 용 : 개인정보조회 이력 조회 | |
108 | + --> | |
109 | + <select id="selectPrvcInqHstryList" parameterType="Pagination" resultMap="prvcInqHstryMap"> | |
110 | + <include refid="selectItem" /> | |
111 | + WHERE true | |
112 | + <include refid="selectRequirement" /> | |
113 | + ORDER BY pih.inq_dt DESC | |
114 | + LIMIT #{recordSize} OFFSET #{limitStart} | |
115 | + </select> | |
116 | + | |
117 | + <!-- | |
118 | + 작 성 자 : 박정하 | |
119 | + 작 성 일 : 2024.05.27 | |
120 | + 내 용 : 개인정보조회 이력 상세 조회 | |
121 | + --> | |
122 | + <select id="selectPrvcInqHstryDetail" parameterType="Integer" resultMap="prvcInqHstryMap"> | |
123 | + <include refid="selectItem" /> | |
124 | + WHERE pih.inq_hstry_id = #{inqHstryId} | |
125 | + </select> | |
126 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/rvwMttr/rvwMttr-SQL.xml
... | ... | @@ -0,0 +1,294 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<!-- | |
4 | + 작성자 : 박정하 | |
5 | + 작성일 : 2024.03.29 | |
6 | + 내 용 : 검토사항 관련 | |
7 | +--> | |
8 | +<mapper namespace="com.takensoft.portal.rvwMttr.dao.RvwMttrDAO"> | |
9 | + <!-- 검토사항 resultMap --> | |
10 | + <resultMap id="rvwMttrMap" type="RvwMttrVO"> | |
11 | + <result property="rvwMttrId" column="rvw_mttr_id" /> | |
12 | + <result property="ivstDscsnId" column="ivst_dscsn_id" /> | |
13 | + <result property="type" column="type" /> | |
14 | + <result property="clr" column="clr" /> | |
15 | + <result property="rcptDt" column="rcpt_dt" /> | |
16 | + <result property="rcptCn" column="rcpt_cn" /> | |
17 | + <result property="useYn" column="use_yn" /> | |
18 | + <result property="rgtr" column="rgtr" /> | |
19 | + <result property="regDt" column="reg_dt" /> | |
20 | + <result property="mdfr" column="mdfr" /> | |
21 | + <result property="mdfcnDt" column="mdfcn_dt" /> | |
22 | + <result property="entId" column="ent_Id" /> | |
23 | + <result property="entNm" column="ent_nm" /> | |
24 | + <result property="ttl" column="ttl" /> | |
25 | + <result property="clrNm" column="clr_nm" /> | |
26 | + <result property="nowPrgrsCrs" column="now_prgrs_crs" /> | |
27 | + <result property="fileMngId" column="file_mng_id" /> | |
28 | + <result property="mainCn" column="main_cn" /> | |
29 | + <collection property="prgrsList" column="{rvwMttrId = rvw_mttr_id}" javaType="java.util.ArrayList" ofType="RvwMttrPrgrsVO" select="selectRvwMttrPrgrsList" /> | |
30 | + </resultMap> | |
31 | + | |
32 | + <!-- 검토사항진행 resultMap --> | |
33 | + <resultMap id="rvwMttrPrgrsMap" type="RvwMttrPrgrsVO"> | |
34 | + <result property="rvwMttrPrgrsId" column="rvw_mttr_prgrs_id" /> | |
35 | + <result property="rvwMttrId" column="rvw_mttr_id" /> | |
36 | + <result property="picId" column="pic_id" /> | |
37 | + <result property="prgrsCrs" column="prgrs_crs" /> | |
38 | + <result property="prgrsDt" column="prgrs_dt" /> | |
39 | + <result property="sprtMthd" column="sprt_mthd" /> | |
40 | + <result property="rgtr" column="rgtr" /> | |
41 | + <result property="regDt" column="reg_dt" /> | |
42 | + <result property="mdfr" column="mdfr" /> | |
43 | + <result property="mdfcnDt" column="mdfcn_dt" /> | |
44 | + <result property="picNm" column="pic_nm" /> | |
45 | + </resultMap> | |
46 | + | |
47 | + <!-- | |
48 | + 작성자 : 박정하 | |
49 | + 작성일자 : 2024-03-29 | |
50 | + 내용 : 검토사항 등록 | |
51 | + --> | |
52 | + <insert id="rvwMttrInsert" parameterType="RvwMttrVO"> | |
53 | + INSERT INTO rvw_mttr ( | |
54 | + rvw_mttr_id | |
55 | + , ivst_dscsn_id | |
56 | + , type | |
57 | + , clr | |
58 | + , rcpt_dt | |
59 | + , rcpt_cn | |
60 | + , use_yn | |
61 | + , rgtr | |
62 | + , reg_dt | |
63 | + , file_mng_id | |
64 | + ) VALUES ( | |
65 | + #{rvwMttrId} | |
66 | + , #{ivstDscsnId} | |
67 | + , #{type} | |
68 | + , #{clr} | |
69 | + , #{rcptDt}::timestamp | |
70 | + , #{rcptCn} | |
71 | + , 'Y' | |
72 | + , #{rgtr} | |
73 | + , now() | |
74 | + , #{fileMngId} | |
75 | + ) | |
76 | + </insert> | |
77 | + | |
78 | + <!-- 검색 조건 --> | |
79 | + <sql id="selectRequirement"> | |
80 | + <if test="searchText != null and searchText != ''"> | |
81 | + <choose> | |
82 | + <when test="searchType != null and searchType != ''"> | |
83 | + <if test="searchType == 'ent_nm'"> | |
84 | + AND ei.ent_nm LIKE '%' || #{searchText} || '%' | |
85 | + </if> | |
86 | + <if test="searchType == 'ttl'"> | |
87 | + AND id.ttl LIKE '%' || #{searchText} || '%' | |
88 | + </if> | |
89 | + </when> | |
90 | + <otherwise> | |
91 | + AND ( | |
92 | + ei.ent_nm LIKE '%' || #{searchText} || '%' | |
93 | + OR | |
94 | + id.ttl LIKE '%' || #{searchText} || '%' | |
95 | + ) | |
96 | + </otherwise> | |
97 | + </choose> | |
98 | + </if> | |
99 | + <if test="cateId == 'ivst_dscsn_id' and cateValue != null and cateValue != ''"> | |
100 | + AND rm.ivst_dscsn_id = #{cateValue} | |
101 | + </if> | |
102 | + <if test="type != null and type != ''"> | |
103 | + AND rm.type = #{type} | |
104 | + </if> | |
105 | + </sql> | |
106 | + | |
107 | + <!-- | |
108 | + 작성자 : 박정하 | |
109 | + 작성일자 : 2024-03-29 | |
110 | + 내용 : 검토사항 목록 조회 | |
111 | + --> | |
112 | + <select id="rvwMttrSelectList" resultMap="rvwMttrMap"> | |
113 | + SELECT | |
114 | + rvw_mttr_id | |
115 | + , ivst_dscsn_id | |
116 | + , type | |
117 | + , clr | |
118 | + , to_char(rcpt_dt, 'YYYY-MM-DD HH24:MI') AS rcpt_dt | |
119 | + , rcpt_cn | |
120 | + , use_yn | |
121 | + , rgtr | |
122 | + , to_char(reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
123 | + , mdfr | |
124 | + , to_char(mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
125 | + , ttl | |
126 | + , ent_id | |
127 | + , ent_nm | |
128 | + , now_prgrs_crs | |
129 | + , file_mng_id | |
130 | + FROM ( | |
131 | + SELECT rm.rvw_mttr_id | |
132 | + , rm.ivst_dscsn_id | |
133 | + , rm.type | |
134 | + , rm.clr | |
135 | + , rm.rcpt_dt | |
136 | + , rm.rcpt_cn | |
137 | + , rm.use_yn | |
138 | + , rm.rgtr | |
139 | + , rm.reg_dt | |
140 | + , rm.mdfr | |
141 | + , rm.mdfcn_dt | |
142 | + , id.ttl | |
143 | + , ei.ent_id | |
144 | + , ei.ent_nm | |
145 | + , (select rmp.prgrs_crs | |
146 | + from rvw_mttr_prgrs AS rmp | |
147 | + where rmp.rvw_mttr_id = rm.rvw_mttr_id | |
148 | + order by rmp.reg_dt DESC | |
149 | + limit 1 ) AS now_prgrs_crs | |
150 | + , rm.file_mng_id | |
151 | + FROM rvw_mttr AS rm | |
152 | + LEFT JOIN ivst_dscsn AS id | |
153 | + ON rm.ivst_dscsn_id = id.ivst_dscsn_id | |
154 | + LEFT JOIN ent_info AS ei | |
155 | + ON id.ent_id = ei.ent_id | |
156 | + WHERE rm.use_yn = 'Y' | |
157 | + <include refid="selectRequirement" /> | |
158 | + ) AS datas | |
159 | + WHERE TRUE | |
160 | + <if test="prgrsCrs != null and prgrsCrs != ''"> | |
161 | + AND now_prgrs_crs = #{prgrsCrs} | |
162 | + </if> | |
163 | + ORDER BY rvw_mttr_id DESC | |
164 | + OFFSET #{limitStart} LIMIT #{recordSize} | |
165 | + </select> | |
166 | + | |
167 | + <!-- | |
168 | + 작성자 : 박정하 | |
169 | + 작성일자 : 2024-03-29 | |
170 | + 내용 : 검토사항 목록 총 개수 조회 | |
171 | + --> | |
172 | + <select id="rvwMttrSelectListCount" resultType="int"> | |
173 | + SELECT count(*) | |
174 | + FROM rvw_mttr AS rm | |
175 | + LEFT JOIN ivst_dscsn AS id | |
176 | + ON rm.ivst_dscsn_id = id.ivst_dscsn_id | |
177 | + LEFT JOIN ent_info AS ei | |
178 | + ON id.ent_id = ei.ent_id | |
179 | + WHERE rm.use_yn = 'Y' | |
180 | + <include refid="selectRequirement" /> | |
181 | + </select> | |
182 | + | |
183 | + <!-- | |
184 | + 작 성 자 : 박정하 | |
185 | + 작 성 일 : 2024-06-04 | |
186 | + 내 용 : 검토사항 상세 조회 | |
187 | + --> | |
188 | + <select id="selectRvwMttrDetail" parameterType="String" resultMap="rvwMttrMap"> | |
189 | + SELECT rm.rvw_mttr_id | |
190 | + , rm.type | |
191 | + , rm.clr | |
192 | + , to_char(rm.rcpt_dt, 'YYYY-MM-DD') AS rcpt_dt | |
193 | + , rm.rcpt_cn | |
194 | + , rm.use_yn | |
195 | + , rm.rgtr | |
196 | + , to_char(rm.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
197 | + , rm.mdfr | |
198 | + , to_char(rm.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
199 | + , rm.ivst_dscsn_id | |
200 | + , ei.ent_id | |
201 | + , ei.ent_nm | |
202 | + , id.ttl | |
203 | + , mi.mbr_nm AS clr_nm | |
204 | + , rm.file_mng_id | |
205 | + , id.main_cn | |
206 | + FROM rvw_mttr AS rm | |
207 | + LEFT JOIN ivst_dscsn AS id | |
208 | + ON rm.ivst_dscsn_id = id.ivst_dscsn_id | |
209 | + LEFT JOIN ent_info AS ei | |
210 | + ON id.ent_id = ei.ent_id | |
211 | + LEFT JOIN mbr_info AS mi | |
212 | + ON rm.clr = mi.mbr_id | |
213 | + WHERE rm.use_yn = 'Y' | |
214 | + AND rm.rvw_mttr_id = #{rvwMttrId} | |
215 | + </select> | |
216 | + | |
217 | + <!-- | |
218 | + 작 성 자 : 박정하 | |
219 | + 작 성 일 : 2024-06-04 | |
220 | + 내 용 : 검토사항진행 목록 조회 | |
221 | + --> | |
222 | + <select id="selectRvwMttrPrgrsList" parameterType="RvwMttrVO" resultMap="rvwMttrPrgrsMap"> | |
223 | + SELECT rmp.rvw_mttr_prgrs_id | |
224 | + , rmp.rvw_mttr_id | |
225 | + , rmp.pic_id | |
226 | + , mi.mbr_nm AS pic_nm | |
227 | + , rmp.prgrs_crs | |
228 | + , to_char(rmp.prgrs_dt, 'YYYY-MM-DD') AS prgrs_dt | |
229 | + , rmp.sprt_mthd | |
230 | + , rmp.rgtr | |
231 | + , to_char(rmp.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
232 | + , rmp.mdfr | |
233 | + , to_char(rmp.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
234 | + FROM rvw_mttr_prgrs AS rmp | |
235 | + LEFT JOIN mbr_info AS mi | |
236 | + ON rmp.pic_id = mi.mbr_id | |
237 | + WHERE rmp.rvw_mttr_id = #{rvwMttrId} | |
238 | + ORDER BY prgrs_dt, rvw_mttr_prgrs_id | |
239 | + </select> | |
240 | + | |
241 | + <!-- | |
242 | + 작 성 자 : 박정하 | |
243 | + 작 성 일 : 2024.04.01 | |
244 | + 내 용 : 검토사항 수정 | |
245 | + --> | |
246 | + <update id="rvwMttrUpdate" parameterType="RvwMttrVO"> | |
247 | + UPDATE rvw_mttr | |
248 | + SET ivst_dscsn_id = #{ivstDscsnId} | |
249 | + , type = #{type} | |
250 | + , clr = #{clr} | |
251 | + , rcpt_dt = #{rcptDt}::timestamp | |
252 | + , rcpt_cn = #{rcptCn} | |
253 | + , use_yn = #{useYn} | |
254 | + , mdfr = #{mdfr} | |
255 | + , mdfcn_dt = now() | |
256 | + , file_mng_id = #{fileMngId} | |
257 | + WHERE rvw_mttr_id = #{rvwMttrId} | |
258 | + </update> | |
259 | + | |
260 | + <!-- | |
261 | + 작 성 자 : 박정하 | |
262 | + 작 성 일 : 2024.04.01 | |
263 | + 내 용 : 검토사항 삭제 | |
264 | + --> | |
265 | + <update id="rvwMttrDelete" parameterType="RvwMttrVO"> | |
266 | + UPDATE rvw_mttr | |
267 | + SET use_yn = 'N' | |
268 | + WHERE rvw_mttr_id = #{rvwMttrId} | |
269 | + </update> | |
270 | + | |
271 | + <!-- | |
272 | + 작 성 자 : 박정하 | |
273 | + 작 성 일 : 2024.06.12 | |
274 | + 내 용 : 검토사항 목록 조회 (검토사항 삭제용) | |
275 | + --> | |
276 | + <select id="rvwMttrListByIvstDscsnId" resultMap="rvwMttrMap"> | |
277 | + SELECT rm.rvw_mttr_id | |
278 | + , rm.ivst_dscsn_id | |
279 | + , rm.type | |
280 | + , rm.clr | |
281 | + , to_char(rm.rcpt_dt, 'YYYY-MM-DD HH24:MI') AS rcpt_dt | |
282 | + , rm.rcpt_cn | |
283 | + , rm.use_yn | |
284 | + , rm.rgtr | |
285 | + , to_char(rm.reg_dt, 'YYYY-MM-DD HH24:MI') AS reg_dt | |
286 | + , rm.mdfr | |
287 | + , to_char(rm.mdfcn_dt, 'YYYY-MM-DD HH24:MI') AS mdfcn_dt | |
288 | + , rm.file_mng_id | |
289 | + FROM rvw_mttr AS rm | |
290 | + WHERE rm.use_yn = 'Y' | |
291 | + AND rm.ivst_dscsn_id = #{ivst_dscsn_id} | |
292 | + ORDER BY rm.rvw_mttr_id DESC | |
293 | + </select> | |
294 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/rvwMttr/rvwMttrPrgrs-SQL.xml
... | ... | @@ -0,0 +1,81 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.takensoft.portal.rvwMttr.dao.RvwMttrPrgrsDAO"> | |
4 | + <!-- 검토사항진행 resultMap --> | |
5 | + <resultMap id="rvwMttrPrgrsMap" type="HashMap"> | |
6 | + <result property="rvwMttrPrgrsId" column="rvw_mttr_prgrs_id" /> | |
7 | + <result property="rvwMttrId" column="rvw_mttr_id" /> | |
8 | + <result property="picId" column="pic_id" /> | |
9 | + <result property="mbrNm" column="mbr_nm" /> | |
10 | + <result property="prgrsCrs" column="prgrs_crs" /> | |
11 | + <result property="prgrsDt" column="prgrs_dt" /> | |
12 | + <result property="sprtMthd" column="sprt_mthd" /> | |
13 | + <result property="rgtr" column="rgtr" /> | |
14 | + <result property="regDt" column="reg_dt" /> | |
15 | + <result property="mdfr" column="mdfr" /> | |
16 | + <result property="mdfcnDt" column="mdfcn_dt" /> | |
17 | + </resultMap> | |
18 | + | |
19 | + <!-- | |
20 | + 작 성 자 : 박정하 | |
21 | + 작 성 일 : 2024.04.25 | |
22 | + 내 용 : 검토사항진행 등록 | |
23 | + --> | |
24 | + <insert id="prgrsInsert" parameterType="RvwMttrPrgrsVO"> | |
25 | + INSERT INTO rvw_mttr_prgrs ( | |
26 | + rvw_mttr_id | |
27 | + , pic_id | |
28 | + , prgrs_crs | |
29 | + , prgrs_dt | |
30 | + , sprt_mthd | |
31 | + , rgtr | |
32 | + , reg_dt | |
33 | + ) VALUES ( | |
34 | + #{rvwMttrId} | |
35 | + , #{picId} | |
36 | + , #{prgrsCrs} | |
37 | + , #{prgrsDt}::timestamp | |
38 | + , #{sprtMthd} | |
39 | + , #{rgtr} | |
40 | + , now() | |
41 | + ) | |
42 | + </insert> | |
43 | + | |
44 | + <!-- | |
45 | + 작 성 자 : 박정하 | |
46 | + 작 성 일 : 2024.04.25 | |
47 | + 내 용 : 검토사항진행 수정 | |
48 | + --> | |
49 | + <update id="prgrsUpdate" parameterType="RvwMttrPrgrsVO"> | |
50 | + UPDATE rvw_mttr_prgrs | |
51 | + SET pic_id = #{picId} | |
52 | + , prgrs_crs = #{prgrsCrs} | |
53 | + , prgrs_dt = #{prgrsDt}::timestamp | |
54 | + , sprt_mthd = #{sprtMthd} | |
55 | + , mdfr = #{mdfr} | |
56 | + , mdfcn_dt = now() | |
57 | + WHERE rvw_mttr_prgrs_id = #{rvwMttrPrgrsId} | |
58 | + </update> | |
59 | + | |
60 | + <!-- | |
61 | + 작 성 자 : 박정하 | |
62 | + 작 성 일 : 2024-04-01 | |
63 | + 내 용 : 검토사항진행 삭제 | |
64 | + --> | |
65 | + <delete id="prgrsDelete" parameterType="int"> | |
66 | + DELETE | |
67 | + FROM rvw_mttr_prgrs | |
68 | + WHERE rvw_mttr_prgrs_id = #{rvwMttrPrgrsId} | |
69 | + </delete> | |
70 | + | |
71 | + <!-- | |
72 | + 작 성 자 : 박정하 | |
73 | + 작 성 일 : 2024-06-04 | |
74 | + 내 용 : 검토사항진행 삭제 (검토사항 삭제용) | |
75 | + --> | |
76 | + <delete id="prgrsDeleteForRvwMttr" parameterType="String"> | |
77 | + DELETE | |
78 | + FROM rvw_mttr_prgrs | |
79 | + WHERE rvw_mttr_id = #{rvwMttrId} | |
80 | + </delete> | |
81 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ build/resources/main/mybatis/mapper/statistics/statistics-SQL.xml
... | ... | @@ -0,0 +1,136 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.takensoft.portal.statistics.dao.StatisticsDAO"> | |
4 | + <sql id="intenMid"> | |
5 | + , ksic_up_cd | |
6 | + , ksic_cd | |
7 | + from ent_info as ei | |
8 | + left join ivst_dscsn as id | |
9 | + on ei.ent_id = id.ent_id | |
10 | + AND id.reg_dt::DATE >= #{startDt}::TIMESTAMP | |
11 | + AND #{endDt}::TIMESTAMP >= id.reg_dt::DATE | |
12 | + and id.use_yn = 'Y' | |
13 | + </sql> | |
14 | + | |
15 | + <sql id="intenBot"> | |
16 | + where ei.use_yn = 'Y' | |
17 | + AND ei.reg_dt::DATE >= #{startDt}::TIMESTAMP | |
18 | + AND #{endDt}::TIMESTAMP >= ei.reg_dt::DATE | |
19 | + group by ksic_up_cd, ksic_cd | |
20 | + </sql> | |
21 | + | |
22 | + <!-- | |
23 | + 작 성 자 : 박정하 | |
24 | + 작 성 일 : 2024.06.13 | |
25 | + 내 용 : 분류별 통계 조회 | |
26 | + --> | |
27 | + <select id="categoryStatistics" resultType="HashMap"> | |
28 | + SELECT datas.ksic_up_cd | |
29 | + , datas.ksic_cd | |
30 | + , ent_cnt | |
31 | + , id_cnt | |
32 | + , mvn.mvn_cnt | |
33 | + , mou.mou_cnt | |
34 | + FROM ( | |
35 | + SELECT ksic_up_cd | |
36 | + , ksic_cd | |
37 | + , COUNT(ei.ent_id) AS ent_cnt | |
38 | + , COUNT(id.ivst_dscsn_id) AS id_cnt | |
39 | + FROM ent_info AS ei | |
40 | + LEFT JOIN ivst_dscsn AS id | |
41 | + ON ei.ent_id = id.ent_id | |
42 | + AND id.use_yn='y' | |
43 | + AND id.reg_dt::DATE >= #{startDt}::TIMESTAMP | |
44 | + AND #{endDt}::TIMESTAMP >= id.reg_dt::DATE | |
45 | + WHERE ei.use_yn = 'Y' | |
46 | + AND ei.reg_dt::DATE >= #{startDt}::TIMESTAMP | |
47 | + AND #{endDt}::TIMESTAMP >= ei.reg_dt::DATE | |
48 | + GROUP BY ksic_up_cd, ksic_cd | |
49 | + ) AS datas | |
50 | + LEFT JOIN (SELECT COUNT(ivst_dscsn_id) AS mvn_cnt <include refid="intenMid" /> AND mvn_inten = '1' <include refid="intenBot" />) AS mvn | |
51 | + ON datas.ksic_up_cd = mvn.ksic_up_cd | |
52 | + AND datas.ksic_cd = mvn.ksic_cd | |
53 | + LEFT JOIN (SELECT COUNT(ivst_dscsn_id) AS mou_cnt <include refid="intenMid" /> AND mou_inten = '1' <include refid="intenBot" />) AS mou | |
54 | + ON datas.ksic_up_cd = mou.ksic_up_cd | |
55 | + AND datas.ksic_cd = mou.ksic_cd | |
56 | + ORDER BY datas.ksic_up_cd, datas.ksic_cd | |
57 | + </select> | |
58 | + | |
59 | + <sql id="selectConsultation"> | |
60 | + SELECT COUNT(rvw_mttr_prgrs_id) AS cnt | |
61 | + FROM rvw_mttr_prgrs AS rmp | |
62 | + LEFT JOIN rvw_mttr AS imp | |
63 | + ON imp.rvw_mttr_id = rmp.rvw_mttr_id | |
64 | + WHERE imp.type = rm.type | |
65 | + </sql> | |
66 | + | |
67 | + <!-- | |
68 | + 작 성 자 : 박정하 | |
69 | + 작 성 일 : 2024.06.13 | |
70 | + 내 용 : 검토사항 통계 조회 | |
71 | + --> | |
72 | + <select id="rvwMttrStatistics" resultType="HashMap"> | |
73 | + SELECT cm.cd AS type | |
74 | + , COALESCE(count, 0) AS count | |
75 | + , COALESCE(before, 0) AS before | |
76 | + , COALESCE(progress, 0) AS progress | |
77 | + , COALESCE(complete, 0) AS complete | |
78 | + FROM cd_mng AS cm | |
79 | + LEFT JOIN ( | |
80 | + SELECT rm.type | |
81 | + , COUNT(ormp.rvw_mttr_prgrs_id) AS count | |
82 | + , (<include refid="selectConsultation" /> and prgrs_crs = '0') AS before | |
83 | + , (<include refid="selectConsultation" /> and prgrs_crs = '1') AS progress | |
84 | + , (<include refid="selectConsultation" /> and prgrs_crs = '2') AS complete | |
85 | + FROM rvw_mttr AS rm | |
86 | + LEFT JOIN rvw_mttr_prgrs AS ormp | |
87 | + ON rm.rvw_mttr_id = ormp.rvw_mttr_id | |
88 | + WHERE rm.use_yn = 'Y' | |
89 | + AND rm.reg_dt::DATE >= #{startDt}::TIMESTAMP | |
90 | + AND #{endDt}::TIMESTAMP >= rm.reg_dt::DATE | |
91 | + GROUP BY rm.type | |
92 | + ) AS datas | |
93 | + ON cm.cd = datas.type | |
94 | + WHERE up_cd = 'rvwMttrType' | |
95 | + </select> | |
96 | + | |
97 | + <!-- | |
98 | + 작 성 자 : 박정하 | |
99 | + 작 성 일 : 2024.06.14 | |
100 | + 내 용 : 상담신청 통계 조회 | |
101 | + --> | |
102 | + <select id="consultationStatistics" resultType="HashMap"> | |
103 | + SELECT years | |
104 | + , months | |
105 | + , days | |
106 | + , SUM(aply_cnt) AS aply_cnt | |
107 | + , SUM(complete_cnt) AS complete_cnt | |
108 | + FROM ( | |
109 | + SELECT TO_CHAR(dates, 'YYYY') AS years | |
110 | + , TO_CHAR(dates, 'MM') AS months | |
111 | + , TO_CHAR(dates, 'DD') AS days | |
112 | + , COALESCE(aply.cnt, 0) AS aply_cnt | |
113 | + , COALESCE(complete.cnt, 0) AS complete_cnt | |
114 | + FROM generate_series(#{startDt}::TIMESTAMP, #{endDt}::TIMESTAMP, '1 day'::interval) AS dates | |
115 | + LEFT JOIN ( | |
116 | + SELECT COUNT(ent_dscsn_aply_id) AS cnt | |
117 | + , reg_dt::DATE | |
118 | + FROM ent_dscsn_aply AS eda | |
119 | + WHERE use_yn = 'Y' | |
120 | + GROUP BY reg_dt::DATE | |
121 | + ) AS aply | |
122 | + ON dates::DATE = aply.reg_dt | |
123 | + LEFT JOIN ( | |
124 | + SELECT COUNT(ent_dscsn_aply_id) AS cnt | |
125 | + , actn_dt::DATE | |
126 | + FROM ent_dscsn_aply AS eda | |
127 | + WHERE use_yn = 'Y' | |
128 | + AND prcs_stts = 'E' | |
129 | + GROUP BY actn_dt::DATE | |
130 | + ) AS complete | |
131 | + ON dates::DATE = complete.actn_dt | |
132 | + ) AS datas | |
133 | + GROUP BY years, months, days | |
134 | + ORDER BY years, months, days | |
135 | + </select> | |
136 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ gradle/libs.versions.toml
... | ... | @@ -0,0 +1,58 @@ |
1 | +# This file was generated by the Gradle 'init' task. | |
2 | +# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format | |
3 | + | |
4 | +[versions] | |
5 | +com-github-ben-manes-caffeine-caffeine = "2.9.3" | |
6 | +com-oracle-database-jdbc-ojdbc10 = "19.16.0.0" | |
7 | +io-jsonwebtoken-jjwt-api = "0.12.5" | |
8 | +io-jsonwebtoken-jjwt-impl = "0.12.5" | |
9 | +io-jsonwebtoken-jjwt-jackson = "0.12.5" | |
10 | +mysql-mysql-connector-java = "8.0.23" | |
11 | +org-apache-commons-commons-lang3 = "3.14.0" | |
12 | +org-apache-poi-poi-ooxml = "4.1.2" | |
13 | +org-bgee-log4jdbc-log4j2-log4jdbc-log4j2-jdbc4 = "1.16" | |
14 | +org-egovframe-rte-org-egovframe-rte-fdl-idgnr = "4.2.0" | |
15 | +org-egovframe-rte-org-egovframe-rte-fdl-property = "4.2.0" | |
16 | +org-egovframe-rte-org-egovframe-rte-psl-dataaccess = "4.2.0" | |
17 | +org-egovframe-rte-org-egovframe-rte-ptl-mvc = "4.2.0" | |
18 | +org-hibernate-hibernate-entitymanager = "5.6.15.Final" | |
19 | +org-hsqldb-hsqldb = "2.7.2" | |
20 | +org-mariadb-jdbc-mariadb-java-client = "2.6.2" | |
21 | +org-mybatis-spring-boot-mybatis-spring-boot-starter = "2.2.2" | |
22 | +org-postgresql-postgresql = "42.6.0" | |
23 | +org-projectlombok-lombok = "1.18.28" | |
24 | +org-springframework-boot-spring-boot-devtools = "2.7.12" | |
25 | +org-springframework-boot-spring-boot-starter-cache = "2.7.12" | |
26 | +org-springframework-boot-spring-boot-starter-security = "3.2.4" | |
27 | +org-springframework-boot-spring-boot-starter-test = "2.7.12" | |
28 | +org-springframework-boot-spring-boot-starter-thymeleaf = "2.7.12" | |
29 | +org-springframework-boot-spring-boot-starter-validation = "2.7.12" | |
30 | +org-springframework-boot-spring-boot-starter-web = "2.7.12" | |
31 | + | |
32 | +[libraries] | |
33 | +com-github-ben-manes-caffeine-caffeine = { module = "com.github.ben-manes.caffeine:caffeine", version.ref = "com-github-ben-manes-caffeine-caffeine" } | |
34 | +com-oracle-database-jdbc-ojdbc10 = { module = "com.oracle.database.jdbc:ojdbc10", version.ref = "com-oracle-database-jdbc-ojdbc10" } | |
35 | +io-jsonwebtoken-jjwt-api = { module = "io.jsonwebtoken:jjwt-api", version.ref = "io-jsonwebtoken-jjwt-api" } | |
36 | +io-jsonwebtoken-jjwt-impl = { module = "io.jsonwebtoken:jjwt-impl", version.ref = "io-jsonwebtoken-jjwt-impl" } | |
37 | +io-jsonwebtoken-jjwt-jackson = { module = "io.jsonwebtoken:jjwt-jackson", version.ref = "io-jsonwebtoken-jjwt-jackson" } | |
38 | +mysql-mysql-connector-java = { module = "mysql:mysql-connector-java", version.ref = "mysql-mysql-connector-java" } | |
39 | +org-apache-commons-commons-lang3 = { module = "org.apache.commons:commons-lang3", version.ref = "org-apache-commons-commons-lang3" } | |
40 | +org-apache-poi-poi-ooxml = { module = "org.apache.poi:poi-ooxml", version.ref = "org-apache-poi-poi-ooxml" } | |
41 | +org-bgee-log4jdbc-log4j2-log4jdbc-log4j2-jdbc4 = { module = "org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4", version.ref = "org-bgee-log4jdbc-log4j2-log4jdbc-log4j2-jdbc4" } | |
42 | +org-egovframe-rte-org-egovframe-rte-fdl-idgnr = { module = "org.egovframe.rte:org.egovframe.rte.fdl.idgnr", version.ref = "org-egovframe-rte-org-egovframe-rte-fdl-idgnr" } | |
43 | +org-egovframe-rte-org-egovframe-rte-fdl-property = { module = "org.egovframe.rte:org.egovframe.rte.fdl.property", version.ref = "org-egovframe-rte-org-egovframe-rte-fdl-property" } | |
44 | +org-egovframe-rte-org-egovframe-rte-psl-dataaccess = { module = "org.egovframe.rte:org.egovframe.rte.psl.dataaccess", version.ref = "org-egovframe-rte-org-egovframe-rte-psl-dataaccess" } | |
45 | +org-egovframe-rte-org-egovframe-rte-ptl-mvc = { module = "org.egovframe.rte:org.egovframe.rte.ptl.mvc", version.ref = "org-egovframe-rte-org-egovframe-rte-ptl-mvc" } | |
46 | +org-hibernate-hibernate-entitymanager = { module = "org.hibernate:hibernate-entitymanager", version.ref = "org-hibernate-hibernate-entitymanager" } | |
47 | +org-hsqldb-hsqldb = { module = "org.hsqldb:hsqldb", version.ref = "org-hsqldb-hsqldb" } | |
48 | +org-mariadb-jdbc-mariadb-java-client = { module = "org.mariadb.jdbc:mariadb-java-client", version.ref = "org-mariadb-jdbc-mariadb-java-client" } | |
49 | +org-mybatis-spring-boot-mybatis-spring-boot-starter = { module = "org.mybatis.spring.boot:mybatis-spring-boot-starter", version.ref = "org-mybatis-spring-boot-mybatis-spring-boot-starter" } | |
50 | +org-postgresql-postgresql = { module = "org.postgresql:postgresql", version.ref = "org-postgresql-postgresql" } | |
51 | +org-projectlombok-lombok = { module = "org.projectlombok:lombok", version.ref = "org-projectlombok-lombok" } | |
52 | +org-springframework-boot-spring-boot-devtools = { module = "org.springframework.boot:spring-boot-devtools", version.ref = "org-springframework-boot-spring-boot-devtools" } | |
53 | +org-springframework-boot-spring-boot-starter-cache = { module = "org.springframework.boot:spring-boot-starter-cache", version.ref = "org-springframework-boot-spring-boot-starter-cache" } | |
54 | +org-springframework-boot-spring-boot-starter-security = { module = "org.springframework.boot:spring-boot-starter-security", version.ref = "org-springframework-boot-spring-boot-starter-security" } | |
55 | +org-springframework-boot-spring-boot-starter-test = { module = "org.springframework.boot:spring-boot-starter-test", version.ref = "org-springframework-boot-spring-boot-starter-test" } | |
56 | +org-springframework-boot-spring-boot-starter-thymeleaf = { module = "org.springframework.boot:spring-boot-starter-thymeleaf", version.ref = "org-springframework-boot-spring-boot-starter-thymeleaf" } | |
57 | +org-springframework-boot-spring-boot-starter-validation = { module = "org.springframework.boot:spring-boot-starter-validation", version.ref = "org-springframework-boot-spring-boot-starter-validation" } | |
58 | +org-springframework-boot-spring-boot-starter-web = { module = "org.springframework.boot:spring-boot-starter-web", version.ref = "org-springframework-boot-spring-boot-starter-web" } |
+++ gradle/wrapper/gradle-wrapper.jar
Binary file is not shown |
+++ gradle/wrapper/gradle-wrapper.properties
... | ... | @@ -0,0 +1,7 @@ |
1 | +distributionBase=GRADLE_USER_HOME | |
2 | +distributionPath=wrapper/dists | |
3 | +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip | |
4 | +networkTimeout=10000 | |
5 | +validateDistributionUrl=true | |
6 | +zipStoreBase=GRADLE_USER_HOME | |
7 | +zipStorePath=wrapper/dists |
+++ gradlew
... | ... | @@ -0,0 +1,251 @@ |
1 | +#!/bin/sh | |
2 | + | |
3 | +# | |
4 | +# Copyright © 2015-2021 the original authors. | |
5 | +# | |
6 | +# Licensed under the Apache License, Version 2.0 (the "License"); | |
7 | +# you may not use this file except in compliance with the License. | |
8 | +# You may obtain a copy of the License at | |
9 | +# | |
10 | +# https://www.apache.org/licenses/LICENSE-2.0 | |
11 | +# | |
12 | +# Unless required by applicable law or agreed to in writing, software | |
13 | +# distributed under the License is distributed on an "AS IS" BASIS, | |
14 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
15 | +# See the License for the specific language governing permissions and | |
16 | +# limitations under the License. | |
17 | +# | |
18 | +# SPDX-License-Identifier: Apache-2.0 | |
19 | +# | |
20 | + | |
21 | +############################################################################## | |
22 | +# | |
23 | +# Gradle start up script for POSIX generated by Gradle. | |
24 | +# | |
25 | +# Important for running: | |
26 | +# | |
27 | +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is | |
28 | +# noncompliant, but you have some other compliant shell such as ksh or | |
29 | +# bash, then to run this script, type that shell name before the whole | |
30 | +# command line, like: | |
31 | +# | |
32 | +# ksh Gradle | |
33 | +# | |
34 | +# Busybox and similar reduced shells will NOT work, because this script | |
35 | +# requires all of these POSIX shell features: | |
36 | +# * functions; | |
37 | +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», | |
38 | +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; | |
39 | +# * compound commands having a testable exit status, especially «case»; | |
40 | +# * various built-in commands including «command», «set», and «ulimit». | |
41 | +# | |
42 | +# Important for patching: | |
43 | +# | |
44 | +# (2) This script targets any POSIX shell, so it avoids extensions provided | |
45 | +# by Bash, Ksh, etc; in particular arrays are avoided. | |
46 | +# | |
47 | +# The "traditional" practice of packing multiple parameters into a | |
48 | +# space-separated string is a well documented source of bugs and security | |
49 | +# problems, so this is (mostly) avoided, by progressively accumulating | |
50 | +# options in "$@", and eventually passing that to Java. | |
51 | +# | |
52 | +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, | |
53 | +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; | |
54 | +# see the in-line comments for details. | |
55 | +# | |
56 | +# There are tweaks for specific operating systems such as AIX, CygWin, | |
57 | +# Darwin, MinGW, and NonStop. | |
58 | +# | |
59 | +# (3) This script is generated from the Groovy template | |
60 | +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt | |
61 | +# within the Gradle project. | |
62 | +# | |
63 | +# You can find Gradle at https://github.com/gradle/gradle/. | |
64 | +# | |
65 | +############################################################################## | |
66 | + | |
67 | +# Attempt to set APP_HOME | |
68 | + | |
69 | +# Resolve links: $0 may be a link | |
70 | +app_path=$0 | |
71 | + | |
72 | +# Need this for daisy-chained symlinks. | |
73 | +while | |
74 | + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path | |
75 | + [ -h "$app_path" ] | |
76 | +do | |
77 | + ls=$( ls -ld "$app_path" ) | |
78 | + link=${ls#*' -> '} | |
79 | + case $link in #( | |
80 | + /*) app_path=$link ;; #( | |
81 | + *) app_path=$APP_HOME$link ;; | |
82 | + esac | |
83 | +done | |
84 | + | |
85 | +# This is normally unused | |
86 | +# shellcheck disable=SC2034 | |
87 | +APP_BASE_NAME=${0##*/} | |
88 | +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) | |
89 | +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit | |
90 | + | |
91 | +# Use the maximum available, or set MAX_FD != -1 to use that value. | |
92 | +MAX_FD=maximum | |
93 | + | |
94 | +warn () { | |
95 | + echo "$*" | |
96 | +} >&2 | |
97 | + | |
98 | +die () { | |
99 | + echo | |
100 | + echo "$*" | |
101 | + echo | |
102 | + exit 1 | |
103 | +} >&2 | |
104 | + | |
105 | +# OS specific support (must be 'true' or 'false'). | |
106 | +cygwin=false | |
107 | +msys=false | |
108 | +darwin=false | |
109 | +nonstop=false | |
110 | +case "$( uname )" in #( | |
111 | + CYGWIN* ) cygwin=true ;; #( | |
112 | + Darwin* ) darwin=true ;; #( | |
113 | + MSYS* | MINGW* ) msys=true ;; #( | |
114 | + NONSTOP* ) nonstop=true ;; | |
115 | +esac | |
116 | + | |
117 | +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar | |
118 | + | |
119 | + | |
120 | +# Determine the Java command to use to start the JVM. | |
121 | +if [ -n "$JAVA_HOME" ] ; then | |
122 | + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then | |
123 | + # IBM's JDK on AIX uses strange locations for the executables | |
124 | + JAVACMD=$JAVA_HOME/jre/sh/java | |
125 | + else | |
126 | + JAVACMD=$JAVA_HOME/bin/java | |
127 | + fi | |
128 | + if [ ! -x "$JAVACMD" ] ; then | |
129 | + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME | |
130 | + | |
131 | +Please set the JAVA_HOME variable in your environment to match the | |
132 | +location of your Java installation." | |
133 | + fi | |
134 | +else | |
135 | + JAVACMD=java | |
136 | + if ! command -v java >/dev/null 2>&1 | |
137 | + then | |
138 | + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | |
139 | + | |
140 | +Please set the JAVA_HOME variable in your environment to match the | |
141 | +location of your Java installation." | |
142 | + fi | |
143 | +fi | |
144 | + | |
145 | +# Increase the maximum file descriptors if we can. | |
146 | +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then | |
147 | + case $MAX_FD in #( | |
148 | + max*) | |
149 | + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. | |
150 | + # shellcheck disable=SC2039,SC3045 | |
151 | + MAX_FD=$( ulimit -H -n ) || | |
152 | + warn "Could not query maximum file descriptor limit" | |
153 | + esac | |
154 | + case $MAX_FD in #( | |
155 | + '' | soft) :;; #( | |
156 | + *) | |
157 | + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. | |
158 | + # shellcheck disable=SC2039,SC3045 | |
159 | + ulimit -n "$MAX_FD" || | |
160 | + warn "Could not set maximum file descriptor limit to $MAX_FD" | |
161 | + esac | |
162 | +fi | |
163 | + | |
164 | +# Collect all arguments for the java command, stacking in reverse order: | |
165 | +# * args from the command line | |
166 | +# * the main class name | |
167 | +# * -classpath | |
168 | +# * -D...appname settings | |
169 | +# * --module-path (only if needed) | |
170 | +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. | |
171 | + | |
172 | +# For Cygwin or MSYS, switch paths to Windows format before running java | |
173 | +if "$cygwin" || "$msys" ; then | |
174 | + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) | |
175 | + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) | |
176 | + | |
177 | + JAVACMD=$( cygpath --unix "$JAVACMD" ) | |
178 | + | |
179 | + # Now convert the arguments - kludge to limit ourselves to /bin/sh | |
180 | + for arg do | |
181 | + if | |
182 | + case $arg in #( | |
183 | + -*) false ;; # don't mess with options #( | |
184 | + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath | |
185 | + [ -e "$t" ] ;; #( | |
186 | + *) false ;; | |
187 | + esac | |
188 | + then | |
189 | + arg=$( cygpath --path --ignore --mixed "$arg" ) | |
190 | + fi | |
191 | + # Roll the args list around exactly as many times as the number of | |
192 | + # args, so each arg winds up back in the position where it started, but | |
193 | + # possibly modified. | |
194 | + # | |
195 | + # NB: a `for` loop captures its iteration list before it begins, so | |
196 | + # changing the positional parameters here affects neither the number of | |
197 | + # iterations, nor the values presented in `arg`. | |
198 | + shift # remove old arg | |
199 | + set -- "$@" "$arg" # push replacement arg | |
200 | + done | |
201 | +fi | |
202 | + | |
203 | + | |
204 | +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | |
205 | +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' | |
206 | + | |
207 | +# Collect all arguments for the java command: | |
208 | +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, | |
209 | +# and any embedded shellness will be escaped. | |
210 | +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be | |
211 | +# treated as '${Hostname}' itself on the command line. | |
212 | + | |
213 | +set -- \ | |
214 | + "-Dorg.gradle.appname=$APP_BASE_NAME" \ | |
215 | + -classpath "$CLASSPATH" \ | |
216 | + org.gradle.wrapper.GradleWrapperMain \ | |
217 | + "$@" | |
218 | + | |
219 | +# Stop when "xargs" is not available. | |
220 | +if ! command -v xargs >/dev/null 2>&1 | |
221 | +then | |
222 | + die "xargs is not available" | |
223 | +fi | |
224 | + | |
225 | +# Use "xargs" to parse quoted args. | |
226 | +# | |
227 | +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. | |
228 | +# | |
229 | +# In Bash we could simply go: | |
230 | +# | |
231 | +# readarray ARGS < <( xargs -n1 <<<"$var" ) && | |
232 | +# set -- "${ARGS[@]}" "$@" | |
233 | +# | |
234 | +# but POSIX shell has neither arrays nor command substitution, so instead we | |
235 | +# post-process each arg (as a line of input to sed) to backslash-escape any | |
236 | +# character that might be a shell metacharacter, then use eval to reverse | |
237 | +# that process (while maintaining the separation between arguments), and wrap | |
238 | +# the whole thing up as a single "set" statement. | |
239 | +# | |
240 | +# This will of course break if any of these variables contains a newline or | |
241 | +# an unmatched quote. | |
242 | +# | |
243 | + | |
244 | +eval "set -- $( | |
245 | + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | | |
246 | + xargs -n1 | | |
247 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | | |
248 | + tr '\n' ' ' | |
249 | + )" '"$@"' | |
250 | + | |
251 | +exec "$JAVACMD" "$@" |
+++ gradlew.bat
... | ... | @@ -0,0 +1,94 @@ |
1 | +@rem | |
2 | +@rem Copyright 2015 the original author or authors. | |
3 | +@rem | |
4 | +@rem Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | +@rem you may not use this file except in compliance with the License. | |
6 | +@rem You may obtain a copy of the License at | |
7 | +@rem | |
8 | +@rem https://www.apache.org/licenses/LICENSE-2.0 | |
9 | +@rem | |
10 | +@rem Unless required by applicable law or agreed to in writing, software | |
11 | +@rem distributed under the License is distributed on an "AS IS" BASIS, | |
12 | +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | +@rem See the License for the specific language governing permissions and | |
14 | +@rem limitations under the License. | |
15 | +@rem | |
16 | +@rem SPDX-License-Identifier: Apache-2.0 | |
17 | +@rem | |
18 | + | |
19 | +@if "%DEBUG%"=="" @echo off | |
20 | +@rem ########################################################################## | |
21 | +@rem | |
22 | +@rem Gradle startup script for Windows | |
23 | +@rem | |
24 | +@rem ########################################################################## | |
25 | + | |
26 | +@rem Set local scope for the variables with windows NT shell | |
27 | +if "%OS%"=="Windows_NT" setlocal | |
28 | + | |
29 | +set DIRNAME=%~dp0 | |
30 | +if "%DIRNAME%"=="" set DIRNAME=. | |
31 | +@rem This is normally unused | |
32 | +set APP_BASE_NAME=%~n0 | |
33 | +set APP_HOME=%DIRNAME% | |
34 | + | |
35 | +@rem Resolve any "." and ".." in APP_HOME to make it shorter. | |
36 | +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi | |
37 | + | |
38 | +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | |
39 | +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" | |
40 | + | |
41 | +@rem Find java.exe | |
42 | +if defined JAVA_HOME goto findJavaFromJavaHome | |
43 | + | |
44 | +set JAVA_EXE=java.exe | |
45 | +%JAVA_EXE% -version >NUL 2>&1 | |
46 | +if %ERRORLEVEL% equ 0 goto execute | |
47 | + | |
48 | +echo. 1>&2 | |
49 | +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 | |
50 | +echo. 1>&2 | |
51 | +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 | |
52 | +echo location of your Java installation. 1>&2 | |
53 | + | |
54 | +goto fail | |
55 | + | |
56 | +:findJavaFromJavaHome | |
57 | +set JAVA_HOME=%JAVA_HOME:"=% | |
58 | +set JAVA_EXE=%JAVA_HOME%/bin/java.exe | |
59 | + | |
60 | +if exist "%JAVA_EXE%" goto execute | |
61 | + | |
62 | +echo. 1>&2 | |
63 | +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 | |
64 | +echo. 1>&2 | |
65 | +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 | |
66 | +echo location of your Java installation. 1>&2 | |
67 | + | |
68 | +goto fail | |
69 | + | |
70 | +:execute | |
71 | +@rem Setup the command line | |
72 | + | |
73 | +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar | |
74 | + | |
75 | + | |
76 | +@rem Execute Gradle | |
77 | +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* | |
78 | + | |
79 | +:end | |
80 | +@rem End local scope for the variables with windows NT shell | |
81 | +if %ERRORLEVEL% equ 0 goto mainEnd | |
82 | + | |
83 | +:fail | |
84 | +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of | |
85 | +rem the _cmd.exe /c_ return code! | |
86 | +set EXIT_CODE=%ERRORLEVEL% | |
87 | +if %EXIT_CODE% equ 0 set EXIT_CODE=1 | |
88 | +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% | |
89 | +exit /b %EXIT_CODE% | |
90 | + | |
91 | +:mainEnd | |
92 | +if "%OS%"=="Windows_NT" endlocal | |
93 | + | |
94 | +:omega |
--- pom.xml
... | ... | @@ -1,224 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
3 | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
4 | - <modelVersion>4.0.0</modelVersion> | |
5 | - <groupId>com.takensoft</groupId> | |
6 | - <artifactId>cms</artifactId> | |
7 | - <packaging>jar</packaging> | |
8 | - <version>1.0.0</version> | |
9 | - <name>cms</name> | |
10 | - <url>http://www.egovframe.go.kr</url> | |
11 | - | |
12 | - <licenses> | |
13 | - <license> | |
14 | - <name>The Apache Software License, Version 2.0</name> | |
15 | - <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> | |
16 | - </license> | |
17 | - </licenses> | |
18 | - | |
19 | - <parent> | |
20 | - <groupId>org.springframework.boot</groupId> | |
21 | - <artifactId>spring-boot-starter-parent</artifactId> | |
22 | - <version>2.7.12</version> | |
23 | - </parent> | |
24 | - | |
25 | - <properties> | |
26 | - <spring.maven.artifact.version>5.3.27</spring.maven.artifact.version> | |
27 | - <org.egovframe.rte.version>4.2.0</org.egovframe.rte.version> | |
28 | - </properties> | |
29 | - | |
30 | - <repositories> | |
31 | - <repository> | |
32 | - <id>mvn2s</id> | |
33 | - <url>https://repo1.maven.org/maven2/</url> | |
34 | - <releases> | |
35 | - <enabled>true</enabled> | |
36 | - </releases> | |
37 | - <snapshots> | |
38 | - <enabled>true</enabled> | |
39 | - </snapshots> | |
40 | - </repository> | |
41 | - <repository> | |
42 | - <id>egovframe</id> | |
43 | - <url>https://maven.egovframe.go.kr/maven/</url> | |
44 | - <releases> | |
45 | - <enabled>true</enabled> | |
46 | - </releases> | |
47 | - <snapshots> | |
48 | - <enabled>false</enabled> | |
49 | - </snapshots> | |
50 | - </repository> | |
51 | - </repositories> | |
52 | - | |
53 | - <dependencies> | |
54 | - <dependency> | |
55 | - <groupId>org.springframework.boot</groupId> | |
56 | - <artifactId>spring-boot-starter-web</artifactId> | |
57 | - <exclusions> | |
58 | - <exclusion> | |
59 | - <groupId>org.springframework.boot</groupId> | |
60 | - <artifactId>spring-boot-starter-logging</artifactId> | |
61 | - </exclusion> | |
62 | - </exclusions> | |
63 | - </dependency> | |
64 | - <dependency> | |
65 | - <groupId>org.springframework.boot</groupId> | |
66 | - <artifactId>spring-boot-starter-thymeleaf</artifactId> | |
67 | - </dependency> | |
68 | - <dependency> | |
69 | - <groupId>org.springframework.boot</groupId> | |
70 | - <artifactId>spring-boot-starter-validation</artifactId> | |
71 | - </dependency> | |
72 | - <dependency> | |
73 | - <groupId>org.springframework.boot</groupId> | |
74 | - <artifactId>spring-boot-devtools</artifactId> | |
75 | - <optional>true</optional> | |
76 | - </dependency> | |
77 | - | |
78 | - <!-- 표준프레임워크 실행환경 --> | |
79 | - <dependency> | |
80 | - <groupId>org.egovframe.rte</groupId> | |
81 | - <artifactId>org.egovframe.rte.ptl.mvc</artifactId> | |
82 | - <version>${org.egovframe.rte.version}</version> | |
83 | - </dependency> | |
84 | - <dependency> | |
85 | - <groupId>org.egovframe.rte</groupId> | |
86 | - <artifactId>org.egovframe.rte.psl.dataaccess</artifactId> | |
87 | - <version>${org.egovframe.rte.version}</version> | |
88 | - </dependency> | |
89 | - <dependency> | |
90 | - <groupId>org.egovframe.rte</groupId> | |
91 | - <artifactId>org.egovframe.rte.fdl.idgnr</artifactId> | |
92 | - <version>${org.egovframe.rte.version}</version> | |
93 | - </dependency> | |
94 | - <dependency> | |
95 | - <groupId>org.egovframe.rte</groupId> | |
96 | - <artifactId>org.egovframe.rte.fdl.property</artifactId> | |
97 | - <version>${org.egovframe.rte.version}</version> | |
98 | - </dependency> | |
99 | - | |
100 | - <dependency> | |
101 | - <groupId>org.hsqldb</groupId> | |
102 | - <artifactId>hsqldb</artifactId> | |
103 | - <version>2.7.2</version> | |
104 | - <classifier>jdk8</classifier> | |
105 | - </dependency> | |
106 | - <dependency> | |
107 | - <groupId>org.projectlombok</groupId> | |
108 | - <artifactId>lombok</artifactId> | |
109 | - <version>1.18.28</version> | |
110 | - <optional>true</optional> | |
111 | - </dependency> | |
112 | - <dependency> | |
113 | - <groupId>org.hibernate</groupId> | |
114 | - <artifactId>hibernate-entitymanager</artifactId> | |
115 | - <version>5.6.15.Final</version> | |
116 | - </dependency> | |
117 | - <dependency> | |
118 | - <groupId>org.springframework.boot</groupId> | |
119 | - <artifactId>spring-boot-starter-test</artifactId> | |
120 | - <scope>test</scope> | |
121 | - </dependency> | |
122 | - | |
123 | - <!-- 추가 --> | |
124 | - <dependency> | |
125 | - <groupId>org.mybatis.spring.boot</groupId> | |
126 | - <artifactId>mybatis-spring-boot-starter</artifactId> | |
127 | - <version>2.2.2</version> | |
128 | - </dependency> | |
129 | - <dependency> | |
130 | - <groupId>org.springframework.boot</groupId> | |
131 | - <artifactId>spring-boot-starter-security</artifactId> | |
132 | - <version>3.2.4</version> | |
133 | - </dependency> | |
134 | - <dependency> | |
135 | - <groupId>org.springframework.boot</groupId> | |
136 | - <artifactId>spring-boot-starter-cache</artifactId> | |
137 | - </dependency> | |
138 | - <dependency> | |
139 | - <groupId>com.github.ben-manes.caffeine</groupId> | |
140 | - <artifactId>caffeine</artifactId> | |
141 | - </dependency> | |
142 | - <dependency> | |
143 | - <groupId>mysql</groupId> | |
144 | - <artifactId>mysql-connector-java</artifactId> | |
145 | - <version>8.0.23</version> | |
146 | - </dependency> | |
147 | - <dependency> | |
148 | - <groupId>org.mariadb.jdbc</groupId> | |
149 | - <artifactId>mariadb-java-client</artifactId> | |
150 | - <version>2.6.2</version> | |
151 | - </dependency> | |
152 | - | |
153 | - <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql --> | |
154 | - <dependency> | |
155 | - <groupId>org.postgresql</groupId> | |
156 | - <artifactId>postgresql</artifactId> | |
157 | - <version>42.6.0</version> | |
158 | - </dependency> | |
159 | - | |
160 | - <dependency> | |
161 | - <groupId>org.bgee.log4jdbc-log4j2</groupId> | |
162 | - <artifactId>log4jdbc-log4j2-jdbc4</artifactId> | |
163 | - <version>1.16</version> | |
164 | - </dependency> | |
165 | - <dependency> | |
166 | - <groupId>org.apache.poi</groupId> | |
167 | - <artifactId>poi-ooxml</artifactId> | |
168 | - <version>4.1.2</version> | |
169 | - </dependency> | |
170 | - <!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-api --> | |
171 | - <dependency> | |
172 | - <groupId>io.jsonwebtoken</groupId> | |
173 | - <artifactId>jjwt-api</artifactId> | |
174 | - <version>0.12.5</version> | |
175 | - </dependency> | |
176 | - <!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-impl --> | |
177 | - <dependency> | |
178 | - <groupId>io.jsonwebtoken</groupId> | |
179 | - <artifactId>jjwt-impl</artifactId> | |
180 | - <version>0.12.5</version> | |
181 | - <scope>runtime</scope> | |
182 | - </dependency> | |
183 | - <!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-jackson --> | |
184 | - <dependency> | |
185 | - <groupId>io.jsonwebtoken</groupId> | |
186 | - <artifactId>jjwt-jackson</artifactId> | |
187 | - <version>0.12.5</version> | |
188 | - <scope>runtime</scope> | |
189 | - </dependency> | |
190 | - | |
191 | - <!-- 추가 --> | |
192 | - <!-- HTML 엔티티를 처리 관련 https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 --> | |
193 | - <dependency> | |
194 | - <groupId>org.apache.commons</groupId> | |
195 | - <artifactId>commons-lang3</artifactId> | |
196 | - <version>3.14.0</version> | |
197 | - </dependency> | |
198 | - | |
199 | - <!-- oracle 추가 --> | |
200 | - <dependency> | |
201 | - <groupId>com.oracle.database.jdbc</groupId> | |
202 | - <artifactId>ojdbc10</artifactId> | |
203 | - <version>19.16.0.0</version> | |
204 | - </dependency> | |
205 | - </dependencies> | |
206 | - | |
207 | - <build> | |
208 | - <plugins> | |
209 | - <plugin> | |
210 | - <groupId>org.springframework.boot</groupId> | |
211 | - <artifactId>spring-boot-maven-plugin</artifactId> | |
212 | - <configuration> | |
213 | - <excludes> | |
214 | - <exclude> | |
215 | - <groupId>org.projectlombok</groupId> | |
216 | - <artifactId>lombok</artifactId> | |
217 | - </exclude> | |
218 | - </excludes> | |
219 | - </configuration> | |
220 | - </plugin> | |
221 | - </plugins> | |
222 | - </build> | |
223 | - | |
224 | -</project> |
+++ settings.gradle
... | ... | @@ -0,0 +1,5 @@ |
1 | +/* | |
2 | + * This file was generated by the Gradle 'init' task. | |
3 | + */ | |
4 | + | |
5 | +rootProject.name = 'cms' |
--- src/main/java/com/takensoft/cms/accesCtrl/service/AccesCtrlService.java
+++ src/main/java/com/takensoft/cms/accesCtrl/service/AccesCtrlService.java
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.accesCtrl.vo.AccesCtrlVO; |
4 | 4 |
|
5 |
-import javax.servlet.http.HttpServletRequest; |
|
5 |
+import jakarta.servlet.http.HttpServletRequest; |
|
6 | 6 |
import java.util.HashMap; |
7 | 7 |
import java.util.List; |
8 | 8 |
import java.util.Map; |
--- src/main/java/com/takensoft/cms/accesCtrl/service/Impl/SystemAccesCtrlServiceImpl.java
+++ src/main/java/com/takensoft/cms/accesCtrl/service/Impl/SystemAccesCtrlServiceImpl.java
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 |
import org.springframework.stereotype.Service; |
10 | 10 |
import org.springframework.util.AntPathMatcher; |
11 | 11 |
|
12 |
-import javax.servlet.http.HttpServletRequest; |
|
12 |
+import jakarta.servlet.http.HttpServletRequest; |
|
13 | 13 |
import java.util.List; |
14 | 14 |
import java.util.Map; |
15 | 15 |
|
--- src/main/java/com/takensoft/cms/accesCtrl/service/SystemAccesCtrlService.java
+++ src/main/java/com/takensoft/cms/accesCtrl/service/SystemAccesCtrlService.java
... | ... | @@ -1,6 +1,6 @@ |
1 | 1 |
package com.takensoft.cms.accesCtrl.service; |
2 | 2 |
|
3 |
-import javax.servlet.http.HttpServletRequest; |
|
3 |
+import jakarta.servlet.http.HttpServletRequest; |
|
4 | 4 |
import java.util.Map; |
5 | 5 |
|
6 | 6 |
/** |
--- src/main/java/com/takensoft/cms/accesCtrl/web/AccesCtrlController.java
+++ src/main/java/com/takensoft/cms/accesCtrl/web/AccesCtrlController.java
... | ... | @@ -2,7 +2,9 @@ |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.accesCtrl.service.AccesCtrlService; |
4 | 4 |
import com.takensoft.cms.accesCtrl.vo.AccesCtrlVO; |
5 |
+import com.takensoft.common.message.MessageCode; |
|
5 | 6 |
import com.takensoft.common.util.ResponseData; |
7 |
+import com.takensoft.common.util.ResponseUtil; |
|
6 | 8 |
import lombok.RequiredArgsConstructor; |
7 | 9 |
import lombok.extern.slf4j.Slf4j; |
8 | 10 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -11,15 +13,17 @@ |
11 | 13 |
import org.springframework.http.ResponseEntity; |
12 | 14 |
import org.springframework.web.bind.annotation.*; |
13 | 15 |
|
14 |
-import javax.servlet.http.HttpServletRequest; |
|
16 |
+import jakarta.servlet.http.HttpServletRequest; |
|
15 | 17 |
import java.nio.charset.Charset; |
16 | 18 |
import java.util.HashMap; |
17 | 19 |
import java.util.List; |
18 | 20 |
import java.util.Map; |
19 |
- |
|
20 | 21 |
/** |
21 |
- * @author : takensoft |
|
22 |
- * @since : 2024.04.01 |
|
22 |
+ * @author takensoft |
|
23 |
+ * @since 2024.04.01 |
|
24 |
+ * @modification |
|
25 |
+ * since | author | description |
|
26 |
+ * 2024.04.01 | takensoft | 최초 등록 |
|
23 | 27 |
* |
24 | 28 |
* 접근 제어 관련 컨트롤러 |
25 | 29 |
*/ |
... | ... | @@ -29,6 +33,7 @@ |
29 | 33 |
@RequestMapping(value = "/admin/accesCtrl") |
30 | 34 |
public class AccesCtrlController { |
31 | 35 |
|
36 |
+ private final ResponseUtil resUtil; |
|
32 | 37 |
private final AccesCtrlService accesCtrlService; |
33 | 38 |
|
34 | 39 |
/** |
... | ... | @@ -47,18 +52,10 @@ |
47 | 52 |
int saveResult = (int) result.get("result"); |
48 | 53 |
|
49 | 54 |
// 응답 처리 |
50 |
- HttpHeaders headers = new HttpHeaders(); |
|
51 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
52 |
- ResponseData responseData = new ResponseData(); |
|
53 | 55 |
if(saveResult > 0) { |
54 |
- responseData.setStatus(HttpStatus.OK); |
|
55 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
56 |
- responseData.setData(result); |
|
57 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
56 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
58 | 57 |
} else { |
59 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
60 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
61 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
58 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
62 | 59 |
} |
63 | 60 |
} |
64 | 61 |
|
... | ... | @@ -77,13 +74,7 @@ |
77 | 74 |
// 접근제어 목록 관련 정보 조회 |
78 | 75 |
Map<String, Object> result = accesCtrlService.findAll(params); |
79 | 76 |
// 응답 처리 |
80 |
- HttpHeaders headers = new HttpHeaders(); |
|
81 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
82 |
- ResponseData responseData = new ResponseData(); |
|
83 |
- responseData.setStatus(HttpStatus.OK); |
|
84 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
85 |
- responseData.setData(result); |
|
86 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
77 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
87 | 78 |
} |
88 | 79 |
|
89 | 80 |
/** |
... | ... | @@ -101,13 +92,7 @@ |
101 | 92 |
Map<String, Object> result = accesCtrlService.findByAccesCtrl(accesCtrlVO.getAcsCntrlId()); |
102 | 93 |
|
103 | 94 |
// 응답 처리 |
104 |
- HttpHeaders headers = new HttpHeaders(); |
|
105 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
106 |
- ResponseData responseData = new ResponseData(); |
|
107 |
- responseData.setStatus(HttpStatus.OK); |
|
108 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
109 |
- responseData.setData(result); |
|
110 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
95 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
111 | 96 |
} |
112 | 97 |
|
113 | 98 |
/** |
... | ... | @@ -125,17 +110,10 @@ |
125 | 110 |
int result = accesCtrlService.accesCtrlUpdate(accesCtrlVO); |
126 | 111 |
|
127 | 112 |
// 응답 처리 |
128 |
- HttpHeaders headers = new HttpHeaders(); |
|
129 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
130 |
- ResponseData responseData = new ResponseData(); |
|
131 | 113 |
if(result > 0) { |
132 |
- responseData.setStatus(HttpStatus.OK); |
|
133 |
- responseData.setMessage("정상적으로 수정 처리되었습니다."); |
|
134 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
114 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
135 | 115 |
} else { |
136 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
137 |
- responseData.setMessage("수정에 실패하였습니다.\n담당자에게 문의하세요."); |
|
138 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
116 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
139 | 117 |
} |
140 | 118 |
} |
141 | 119 |
|
... | ... | @@ -154,17 +132,10 @@ |
154 | 132 |
int result = accesCtrlService.accesCtrlUpdate(accesCtrlVO); |
155 | 133 |
|
156 | 134 |
// 응답 처리 |
157 |
- HttpHeaders headers = new HttpHeaders(); |
|
158 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
159 |
- ResponseData responseData = new ResponseData(); |
|
160 | 135 |
if(result > 0) { |
161 |
- responseData.setStatus(HttpStatus.OK); |
|
162 |
- responseData.setMessage("정상적으로 삭제 처리되었습니다."); |
|
163 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
136 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
164 | 137 |
} else { |
165 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
166 |
- responseData.setMessage("삭제에 실패하였습니다.\n담당자에게 문의하세요."); |
|
167 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
138 |
+ return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); |
|
168 | 139 |
} |
169 | 140 |
} |
170 | 141 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/cms/accesCtrl/web/SystemAccesCtrlController.java
+++ src/main/java/com/takensoft/cms/accesCtrl/web/SystemAccesCtrlController.java
... | ... | @@ -2,7 +2,9 @@ |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.accesCtrl.service.AccesCtrlService; |
4 | 4 |
import com.takensoft.cms.accesCtrl.service.SystemAccesCtrlService; |
5 |
+import com.takensoft.common.message.MessageCode; |
|
5 | 6 |
import com.takensoft.common.util.ResponseData; |
7 |
+import com.takensoft.common.util.ResponseUtil; |
|
6 | 8 |
import lombok.RequiredArgsConstructor; |
7 | 9 |
import lombok.extern.slf4j.Slf4j; |
8 | 10 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -14,7 +16,7 @@ |
14 | 16 |
import org.springframework.web.bind.annotation.RequestMapping; |
15 | 17 |
import org.springframework.web.bind.annotation.RestController; |
16 | 18 |
|
17 |
-import javax.servlet.http.HttpServletRequest; |
|
19 |
+import jakarta.servlet.http.HttpServletRequest; |
|
18 | 20 |
import java.nio.charset.Charset; |
19 | 21 |
import java.util.Map; |
20 | 22 |
|
... | ... | @@ -31,7 +33,7 @@ |
31 | 33 |
public class SystemAccesCtrlController { |
32 | 34 |
|
33 | 35 |
private final SystemAccesCtrlService systemAccesCtrlService; |
34 |
- |
|
36 |
+ private final ResponseUtil resUtil; |
|
35 | 37 |
/** |
36 | 38 |
* @author takensoft |
37 | 39 |
* @since 2024.05.20 |
... | ... | @@ -48,11 +50,7 @@ |
48 | 50 |
// 응답 처리 |
49 | 51 |
HttpHeaders headers = new HttpHeaders(); |
50 | 52 |
headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
51 |
- ResponseData responseData = new ResponseData(); |
|
52 |
- responseData.setStatus(HttpStatus.OK); |
|
53 |
- responseData.setMessage("검증"); |
|
54 |
- responseData.setData(result); |
|
55 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
53 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
56 | 54 |
} |
57 | 55 |
|
58 | 56 |
} |
--- src/main/java/com/takensoft/cms/bbs/web/BbsCnController.java
+++ src/main/java/com/takensoft/cms/bbs/web/BbsCnController.java
... | ... | @@ -8,7 +8,9 @@ |
8 | 8 |
import com.takensoft.cms.bbs.vo.CmntVO; |
9 | 9 |
import com.takensoft.common.file.service.FileService; |
10 | 10 |
import com.takensoft.common.file.vo.FileVO; |
11 |
+import com.takensoft.common.message.MessageCode; |
|
11 | 12 |
import com.takensoft.common.util.ResponseData; |
13 |
+import com.takensoft.common.util.ResponseUtil; |
|
12 | 14 |
import lombok.RequiredArgsConstructor; |
13 | 15 |
import lombok.extern.slf4j.Slf4j; |
14 | 16 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -18,7 +20,7 @@ |
18 | 20 |
import org.springframework.web.bind.annotation.*; |
19 | 21 |
import org.springframework.web.multipart.MultipartFile; |
20 | 22 |
|
21 |
-import javax.servlet.http.HttpServletResponse; |
|
23 |
+import jakarta.servlet.http.HttpServletResponse; |
|
22 | 24 |
import java.io.File; |
23 | 25 |
import java.io.FileInputStream; |
24 | 26 |
import java.io.OutputStream; |
... | ... | @@ -27,10 +29,12 @@ |
27 | 29 |
import java.util.HashMap; |
28 | 30 |
import java.util.List; |
29 | 31 |
import java.util.Map; |
30 |
- |
|
31 | 32 |
/** |
32 |
- * @author : 하석형 |
|
33 |
- * @since : 2024.05.09 |
|
33 |
+ * @author 하석형 |
|
34 |
+ * @since 2024.05.09 |
|
35 |
+ * @modification |
|
36 |
+ * since | author | description |
|
37 |
+ * 2024.05.09 | 하석형 | 최초 등록 |
|
34 | 38 |
* |
35 | 39 |
* 게시판 내용 관련 컨트롤러 |
36 | 40 |
*/ |
... | ... | @@ -40,6 +44,7 @@ |
40 | 44 |
@RequestMapping(value="/sys/bbsCn") |
41 | 45 |
public class BbsCnController { |
42 | 46 |
|
47 |
+ private final ResponseUtil resUtil; |
|
43 | 48 |
private final BbsCnService bbsCnService; |
44 | 49 |
private final BbsMngService bbsMngService; |
45 | 50 |
private final FileService fileService; |
... | ... | @@ -95,19 +100,14 @@ |
95 | 100 |
int insertResult = (int) result.get("result"); |
96 | 101 |
|
97 | 102 |
if (insertResult > 0) { |
98 |
- responseData.setStatus(HttpStatus.OK); |
|
99 |
- responseData.setMessage("정상적으로 등록되었습니다."); |
|
100 |
- responseData.setData(result); |
|
101 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
103 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
102 | 104 |
} else if (insertResult == -1){ |
103 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
105 |
+ responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value()); |
|
106 |
+ responseData.setStatusText(HttpStatus.INTERNAL_SERVER_ERROR); |
|
104 | 107 |
responseData.setMessage("아래의 금지어가 포함되어 있습니다.\n* " + result.get("word")); |
105 | 108 |
return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
106 |
- |
|
107 | 109 |
} else { |
108 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
109 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
110 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
110 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
111 | 111 |
} |
112 | 112 |
} |
113 | 113 |
|
... | ... | @@ -126,13 +126,7 @@ |
126 | 126 |
Map<String, Object> result = bbsCnService.findAllBbsCn(params); |
127 | 127 |
|
128 | 128 |
// 응답처리 |
129 |
- HttpHeaders headers = new HttpHeaders(); |
|
130 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
131 |
- ResponseData responseData = new ResponseData(); |
|
132 |
- responseData.setStatus(HttpStatus.OK); |
|
133 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
134 |
- responseData.setData(result); |
|
135 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
129 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
136 | 130 |
} |
137 | 131 |
|
138 | 132 |
/** |
... | ... | @@ -172,13 +166,7 @@ |
172 | 166 |
result.put("nextBbsCn", nextBbsCn); |
173 | 167 |
|
174 | 168 |
// 응답 처리 |
175 |
- HttpHeaders headers = new HttpHeaders(); |
|
176 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
177 |
- ResponseData responseData = new ResponseData(); |
|
178 |
- responseData.setStatus(HttpStatus.OK); |
|
179 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
180 |
- responseData.setData(result); |
|
181 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
169 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
182 | 170 |
} |
183 | 171 |
|
184 | 172 |
// /** |
... | ... | @@ -231,19 +219,15 @@ |
231 | 219 |
headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
232 | 220 |
ResponseData responseData = new ResponseData(); |
233 | 221 |
if (updateResult > 0) { |
234 |
- responseData.setStatus(HttpStatus.OK); |
|
235 |
- responseData.setMessage("정상적으로 게시글이 수정 되었습니다."); |
|
236 |
- responseData.setData(params.get("bbsId")); |
|
237 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
222 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
238 | 223 |
} else if (updateResult == -1){ |
239 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
224 |
+ responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value()); |
|
225 |
+ responseData.setStatusText(HttpStatus.INTERNAL_SERVER_ERROR); |
|
240 | 226 |
responseData.setMessage("아래의 금지어가 포함되어 있습니다.\n* " + result.get("word")); |
241 | 227 |
return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
242 | 228 |
|
243 | 229 |
} else { |
244 |
- responseData.setStatus(HttpStatus.BAD_REQUEST); |
|
245 |
- responseData.setMessage("게시글 수정에 실패하였습니다.\n담당자에게 문의하세요."); |
|
246 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.BAD_REQUEST); |
|
230 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
247 | 231 |
} |
248 | 232 |
} |
249 | 233 |
|
... | ... | @@ -258,22 +242,15 @@ |
258 | 242 |
*/ |
259 | 243 |
@PostMapping("/deleteProc.json") |
260 | 244 |
public ResponseEntity<?> deleteProc(@RequestBody BbsCnVO bbsCnVO) throws Exception { |
261 |
- HttpHeaders headers = new HttpHeaders(); |
|
262 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
263 |
- ResponseData responseData = new ResponseData(); |
|
264 | 245 |
|
265 | 246 |
// 게시판 내용 수정 |
266 | 247 |
int result = bbsCnService.deleteBbsCn(bbsCnVO); |
267 | 248 |
|
268 | 249 |
// 응답 처리 |
269 | 250 |
if(result > 0) { |
270 |
- responseData.setStatus(HttpStatus.OK); |
|
271 |
- responseData.setMessage("정상적으로 삭제 처리되었습니다."); |
|
272 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
251 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
273 | 252 |
} else { |
274 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
275 |
- responseData.setMessage("삭제에 실패하였습니다.\n담당자에게 문의하세요."); |
|
276 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
253 |
+ return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); |
|
277 | 254 |
} |
278 | 255 |
} |
279 | 256 |
/** |
... | ... | @@ -287,22 +264,15 @@ |
287 | 264 |
*/ |
288 | 265 |
@PostMapping("/updateVwCnt.json") |
289 | 266 |
public ResponseEntity<?> updateVwCnt(@RequestBody HashMap<String, Object> params) throws Exception { |
290 |
- HttpHeaders headers = new HttpHeaders(); |
|
291 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
292 |
- ResponseData responseData = new ResponseData(); |
|
293 | 267 |
|
294 | 268 |
// 조회수 증가 |
295 | 269 |
int result = bbsCnService.updateVwCnt(params); |
296 | 270 |
|
297 | 271 |
// 응답 처리 |
298 | 272 |
if(result > 0) { |
299 |
- responseData.setStatus(HttpStatus.OK); |
|
300 |
- responseData.setMessage("정상적으로 조회수가 증가되었습니다."); |
|
301 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
273 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
302 | 274 |
} else { |
303 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
304 |
- responseData.setMessage("조회수 증가에 실패하였습니다.\n담당자에게 문의하세요."); |
|
305 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
275 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
306 | 276 |
} |
307 | 277 |
} |
308 | 278 |
|
... | ... | @@ -365,19 +335,14 @@ |
365 | 335 |
|
366 | 336 |
|
367 | 337 |
if(insertResult > 0) { |
368 |
- responseData.setStatus(HttpStatus.OK); |
|
369 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
370 |
- responseData.setData(result); |
|
371 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
338 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
372 | 339 |
} else if (insertResult == -1){ |
373 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
340 |
+ responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value()); |
|
341 |
+ responseData.setStatusText(HttpStatus.INTERNAL_SERVER_ERROR); |
|
374 | 342 |
responseData.setMessage("아래의 금지어가 포함되어 있습니다.\n* " + result.get("word")); |
375 | 343 |
return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
376 |
- |
|
377 | 344 |
} else { |
378 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
379 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
380 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
345 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
381 | 346 |
} |
382 | 347 |
} |
383 | 348 |
/** |
... | ... | @@ -401,19 +366,14 @@ |
401 | 366 |
int updateResult = (int) result.get("result"); |
402 | 367 |
|
403 | 368 |
if(updateResult > 0) { |
404 |
- responseData.setStatus(HttpStatus.OK); |
|
405 |
- responseData.setMessage("정상적으로 수정 처리되었습니다."); |
|
406 |
- responseData.setData(result); |
|
407 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
369 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
408 | 370 |
} else if (updateResult == -1){ |
409 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
371 |
+ responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value()); |
|
372 |
+ responseData.setStatusText(HttpStatus.INTERNAL_SERVER_ERROR); |
|
410 | 373 |
responseData.setMessage("아래의 금지어가 포함되어 있습니다.\n* " + result.get("word")); |
411 | 374 |
return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
412 |
- |
|
413 | 375 |
} else { |
414 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
415 |
- responseData.setMessage("수정에 실패하였습니다.\n담당자에게 문의하세요."); |
|
416 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
376 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
417 | 377 |
} |
418 | 378 |
} |
419 | 379 |
/** |
... | ... | @@ -428,22 +388,14 @@ |
428 | 388 |
@PostMapping("/ansDeleteProc.json") |
429 | 389 |
public ResponseEntity<?> ansDeleteProc(@RequestBody BbsCnVO bbsCnVO) throws Exception { |
430 | 390 |
// 응답 처리 |
431 |
- HttpHeaders headers = new HttpHeaders(); |
|
432 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
433 |
- ResponseData responseData = new ResponseData(); |
|
434 | 391 |
|
435 | 392 |
// int result = 1; |
436 | 393 |
int result = bbsCnService.deleteAns(bbsCnVO); |
437 | 394 |
|
438 | 395 |
if(result > 0) { |
439 |
- responseData.setStatus(HttpStatus.OK); |
|
440 |
- responseData.setMessage("정상적으로 삭제 처리되었습니다."); |
|
441 |
- responseData.setData(result); |
|
442 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
396 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
443 | 397 |
} else { |
444 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
445 |
- responseData.setMessage("삭제에 실패하였습니다.\n담당자에게 문의하세요."); |
|
446 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
398 |
+ return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); |
|
447 | 399 |
} |
448 | 400 |
} |
449 | 401 |
/** |
... | ... | @@ -461,12 +413,6 @@ |
461 | 413 |
List<BbsCnVO> result = bbsCnService.findFiveNotice(bbsCn); |
462 | 414 |
|
463 | 415 |
// 응답 처리 |
464 |
- HttpHeaders headers = new HttpHeaders(); |
|
465 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
466 |
- ResponseData responseData = new ResponseData(); |
|
467 |
- responseData.setStatus(HttpStatus.OK); |
|
468 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
469 |
- responseData.setData(result); |
|
470 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
416 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
471 | 417 |
} |
472 | 418 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/cms/bbs/web/BbsMngController.java
+++ src/main/java/com/takensoft/cms/bbs/web/BbsMngController.java
... | ... | @@ -8,7 +8,9 @@ |
8 | 8 |
import com.takensoft.cms.codeManage.service.CodeManageService; |
9 | 9 |
import com.takensoft.cms.codeManage.vo.CodeManageVO; |
10 | 10 |
import com.takensoft.common.HierachyVO; |
11 |
+import com.takensoft.common.message.MessageCode; |
|
11 | 12 |
import com.takensoft.common.util.ResponseData; |
13 |
+import com.takensoft.common.util.ResponseUtil; |
|
12 | 14 |
import lombok.RequiredArgsConstructor; |
13 | 15 |
import lombok.extern.slf4j.Slf4j; |
14 | 16 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -22,10 +24,12 @@ |
22 | 24 |
|
23 | 25 |
import java.nio.charset.Charset; |
24 | 26 |
import java.util.*; |
25 |
- |
|
26 | 27 |
/** |
27 |
- * @author : 박정하 |
|
28 |
- * @since : 2024.05.08 |
|
28 |
+ * @author 박정하 |
|
29 |
+ * @since 2024.05.08 |
|
30 |
+ * @modification |
|
31 |
+ * since | author | description |
|
32 |
+ * 2024.05.08 | 박정하 | 최초 등록 |
|
29 | 33 |
* |
30 | 34 |
* 게시판 관리 관련 컨트롤러 |
31 | 35 |
*/ |
... | ... | @@ -35,6 +39,7 @@ |
35 | 39 |
@RequestMapping(value="/admin/bbsMng") |
36 | 40 |
public class BbsMngController { |
37 | 41 |
|
42 |
+ private final ResponseUtil resUtil; |
|
38 | 43 |
private final BbsMngService bbsMngService; |
39 | 44 |
private final BbsTypeMngService bbsTypeMngService; |
40 | 45 |
private final CodeManageService codeManageService; |
... | ... | @@ -50,11 +55,6 @@ |
50 | 55 |
*/ |
51 | 56 |
@PostMapping("/saveProc.json") |
52 | 57 |
public ResponseEntity<?> saveProc(@RequestBody BbsMngVO bbsMngVO) throws Exception { |
53 |
- // 응답 처리 |
|
54 |
- HttpHeaders headers = new HttpHeaders(); |
|
55 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
56 |
- ResponseData responseData = new ResponseData(); |
|
57 |
- |
|
58 | 58 |
// 게시판 관리 아이디 중복 검사 (아이디 입력 삭제로 미사용) |
59 | 59 |
/*boolean isExistence = bbsMngService.bbsMngIdCheck(bbsMngVO); |
60 | 60 |
if(isExistence) { |
... | ... | @@ -62,19 +62,14 @@ |
62 | 62 |
responseData.setMessage("이미 존재하는 게시판 아이디입니다."); |
63 | 63 |
return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
64 | 64 |
}*/ |
65 |
- |
|
66 | 65 |
// 게시판 관리 등록 |
67 | 66 |
HashMap<String, Object> result = bbsMngService.saveBbsMng(bbsMngVO); |
68 | 67 |
int insertResult = (int) result.get("result"); |
68 |
+ // 응답 처리 |
|
69 | 69 |
if(insertResult > 0) { |
70 |
- responseData.setStatus(HttpStatus.OK); |
|
71 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
72 |
- responseData.setData(result); |
|
73 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
70 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
74 | 71 |
} else { |
75 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
76 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
77 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
72 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
78 | 73 |
} |
79 | 74 |
} |
80 | 75 |
|
... | ... | @@ -93,13 +88,7 @@ |
93 | 88 |
Map<String, Object> result = bbsMngService.findAllBbsMng(params); |
94 | 89 |
|
95 | 90 |
// 응답처리 |
96 |
- HttpHeaders headers = new HttpHeaders(); |
|
97 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
98 |
- ResponseData responseData = new ResponseData(); |
|
99 |
- responseData.setStatus(HttpStatus.OK); |
|
100 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
101 |
- responseData.setData(result); |
|
102 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
91 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
103 | 92 |
} |
104 | 93 |
|
105 | 94 |
/** |
... | ... | @@ -117,13 +106,7 @@ |
117 | 106 |
List<BbsMngVO> result = bbsMngService.findAllByMenuMng(); |
118 | 107 |
|
119 | 108 |
// 응답처리 |
120 |
- HttpHeaders headers = new HttpHeaders(); |
|
121 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
122 |
- ResponseData responseData = new ResponseData(); |
|
123 |
- responseData.setStatus(HttpStatus.OK); |
|
124 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
125 |
- responseData.setData(result); |
|
126 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
109 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
127 | 110 |
} |
128 | 111 |
|
129 | 112 |
/** |
... | ... | @@ -153,13 +136,7 @@ |
153 | 136 |
result.put("pageTypeList", pageType); |
154 | 137 |
|
155 | 138 |
// 응답 처리 |
156 |
- HttpHeaders headers = new HttpHeaders(); |
|
157 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
158 |
- ResponseData responseData = new ResponseData(); |
|
159 |
- responseData.setStatus(HttpStatus.OK); |
|
160 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
161 |
- responseData.setData(result); |
|
162 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
139 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
163 | 140 |
} |
164 | 141 |
|
165 | 142 |
/** |
... | ... | @@ -173,22 +150,15 @@ |
173 | 150 |
*/ |
174 | 151 |
@PostMapping("/updateProc.json") |
175 | 152 |
public ResponseEntity<?> updateProc(@RequestBody BbsMngVO bbsMngVO) throws Exception { |
176 |
- HttpHeaders headers = new HttpHeaders(); |
|
177 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
178 |
- ResponseData responseData = new ResponseData(); |
|
179 | 153 |
|
180 | 154 |
// 게시판 관리 수정 |
181 | 155 |
int result = bbsMngService.updateBbsMng(bbsMngVO); |
182 | 156 |
|
183 | 157 |
// 응답 처리 |
184 | 158 |
if(result > 0) { |
185 |
- responseData.setStatus(HttpStatus.OK); |
|
186 |
- responseData.setMessage("정상적으로 수정 처리되었습니다."); |
|
187 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
159 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
188 | 160 |
} else { |
189 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
190 |
- responseData.setMessage("수정에 실패하였습니다.\n담당자에게 문의하세요."); |
|
191 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
161 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
192 | 162 |
} |
193 | 163 |
} |
194 | 164 |
|
... | ... | @@ -203,22 +173,15 @@ |
203 | 173 |
*/ |
204 | 174 |
@PostMapping("/deleteProc.json") |
205 | 175 |
public ResponseEntity<?> deleteProc(@RequestBody BbsMngVO bbsMngVO) throws Exception { |
206 |
- HttpHeaders headers = new HttpHeaders(); |
|
207 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
208 |
- ResponseData responseData = new ResponseData(); |
|
209 | 176 |
|
210 | 177 |
// 게시판 관리 수정 |
211 | 178 |
int result = bbsMngService.deleteBbsMng(bbsMngVO); |
212 | 179 |
|
213 | 180 |
// 응답 처리 |
214 | 181 |
if(result > 0) { |
215 |
- responseData.setStatus(HttpStatus.OK); |
|
216 |
- responseData.setMessage("정상적으로 삭제 처리되었습니다."); |
|
217 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
182 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
218 | 183 |
} else { |
219 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
220 |
- responseData.setMessage("삭제에 실패하였습니다.\n담당자에게 문의하세요."); |
|
221 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
184 |
+ return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); |
|
222 | 185 |
} |
223 | 186 |
} |
224 | 187 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/cms/bbs/web/BbsTypeMngController.java
+++ src/main/java/com/takensoft/cms/bbs/web/BbsTypeMngController.java
... | ... | @@ -2,7 +2,9 @@ |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.bbs.service.BbsTypeMngService; |
4 | 4 |
import com.takensoft.cms.bbs.vo.BbsTypeMngVO; |
5 |
+import com.takensoft.common.message.MessageCode; |
|
5 | 6 |
import com.takensoft.common.util.ResponseData; |
7 |
+import com.takensoft.common.util.ResponseUtil; |
|
6 | 8 |
import lombok.RequiredArgsConstructor; |
7 | 9 |
import org.springframework.http.HttpHeaders; |
8 | 10 |
import org.springframework.http.HttpStatus; |
... | ... | @@ -15,10 +17,12 @@ |
15 | 17 |
|
16 | 18 |
import java.nio.charset.Charset; |
17 | 19 |
import java.util.*; |
18 |
- |
|
19 | 20 |
/** |
20 |
- * @author : 박정하 |
|
21 |
- * @since : 2024.05.08 |
|
21 |
+ * @author 박정하 |
|
22 |
+ * @since 2024.05.08 |
|
23 |
+ * @modification |
|
24 |
+ * since | author | description |
|
25 |
+ * 2024.05.08 | 박정하 | 최초 등록 |
|
22 | 26 |
* |
23 | 27 |
* 게시판 유형 관리 관련 컨트롤러 |
24 | 28 |
*/ |
... | ... | @@ -26,6 +30,8 @@ |
26 | 30 |
@RequiredArgsConstructor |
27 | 31 |
@RequestMapping(value="/admin/bbsTypeMng") |
28 | 32 |
public class BbsTypeMngController { |
33 |
+ |
|
34 |
+ private final ResponseUtil resUtil; |
|
29 | 35 |
private final BbsTypeMngService bbsTypeMngService; |
30 | 36 |
|
31 | 37 |
/** |
... | ... | @@ -48,14 +54,9 @@ |
48 | 54 |
headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
49 | 55 |
ResponseData responseData = new ResponseData(); |
50 | 56 |
if(insertResult > 0) { |
51 |
- responseData.setStatus(HttpStatus.OK); |
|
52 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
53 |
- responseData.setData(result); |
|
54 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
57 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
55 | 58 |
} else { |
56 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
57 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
58 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
59 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
59 | 60 |
} |
60 | 61 |
} |
61 | 62 |
|
... | ... | @@ -74,12 +75,6 @@ |
74 | 75 |
Map<String, Object> result = bbsTypeMngService.findAllBbsTypeMng(bbsTypeMngVO); |
75 | 76 |
|
76 | 77 |
// 응답처리 |
77 |
- HttpHeaders headers = new HttpHeaders(); |
|
78 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
79 |
- ResponseData responseData = new ResponseData(); |
|
80 |
- responseData.setStatus(HttpStatus.OK); |
|
81 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
82 |
- responseData.setData(result); |
|
83 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
78 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
84 | 79 |
} |
85 | 80 |
} |
--- src/main/java/com/takensoft/cms/bbs/web/CmntController.java
+++ src/main/java/com/takensoft/cms/bbs/web/CmntController.java
... | ... | @@ -2,7 +2,9 @@ |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.bbs.service.CmntService; |
4 | 4 |
import com.takensoft.cms.bbs.vo.CmntVO; |
5 |
+import com.takensoft.common.message.MessageCode; |
|
5 | 6 |
import com.takensoft.common.util.ResponseData; |
7 |
+import com.takensoft.common.util.ResponseUtil; |
|
6 | 8 |
import lombok.RequiredArgsConstructor; |
7 | 9 |
import lombok.extern.slf4j.Slf4j; |
8 | 10 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -18,10 +20,12 @@ |
18 | 20 |
import java.util.HashMap; |
19 | 21 |
import java.util.List; |
20 | 22 |
import java.util.Map; |
21 |
- |
|
22 | 23 |
/** |
23 |
- * @author : 방선주 |
|
24 |
- * @since : 2024.05.27 |
|
24 |
+ * @author 방선주 |
|
25 |
+ * @since 2024.05.27 |
|
26 |
+ * @modification |
|
27 |
+ * since | author | description |
|
28 |
+ * 2024.05.27 | 방선주 | 최초 등록 |
|
25 | 29 |
* |
26 | 30 |
* 게시판 댓글 관련 Controller |
27 | 31 |
*/ |
... | ... | @@ -32,7 +36,7 @@ |
32 | 36 |
public class CmntController { |
33 | 37 |
|
34 | 38 |
private final CmntService cmntService; |
35 |
- |
|
39 |
+ private final ResponseUtil resUtil; |
|
36 | 40 |
/** |
37 | 41 |
* @author 방선주 |
38 | 42 |
* @since 2024.05.27 |
... | ... | @@ -56,22 +60,19 @@ |
56 | 60 |
int insertResult = (int) result.get("result"); |
57 | 61 |
|
58 | 62 |
if(insertResult > 0) { |
59 |
- responseData.setStatus(HttpStatus.OK); |
|
60 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
61 |
- responseData.setData(result); |
|
62 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
63 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
63 | 64 |
} else if (insertResult == -1) { |
64 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
65 |
+ responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value()); |
|
66 |
+ responseData.setStatusText(HttpStatus.INTERNAL_SERVER_ERROR); |
|
65 | 67 |
responseData.setMessage("아래의 금지어가 포함되어 있습니다.\n* " + result.get("word")); |
66 | 68 |
return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
67 | 69 |
} else if (insertResult == -2){ |
68 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
70 |
+ responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value()); |
|
71 |
+ responseData.setStatusText(HttpStatus.INTERNAL_SERVER_ERROR); |
|
69 | 72 |
responseData.setMessage("로그인 후 이용 가능합니다."); |
70 | 73 |
return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
71 | 74 |
} else { |
72 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
73 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
74 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
75 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
75 | 76 |
} |
76 | 77 |
|
77 | 78 |
} |
... | ... | @@ -94,13 +95,7 @@ |
94 | 95 |
result.put("cmntList", cmntList); |
95 | 96 |
|
96 | 97 |
// 응답처리 |
97 |
- HttpHeaders headers = new HttpHeaders(); |
|
98 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
99 |
- ResponseData responseData = new ResponseData(); |
|
100 |
- responseData.setStatus(HttpStatus.OK); |
|
101 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
102 |
- responseData.setData(result); |
|
103 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
98 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
104 | 99 |
|
105 | 100 |
} |
106 | 101 |
|
... | ... | @@ -126,19 +121,14 @@ |
126 | 121 |
|
127 | 122 |
// 응답처리 |
128 | 123 |
if(updateResult > 0) { |
129 |
- responseData.setStatus(HttpStatus.OK); |
|
130 |
- responseData.setMessage("정상적으로 수정 처리되었습니다."); |
|
131 |
- responseData.setData(result); |
|
132 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
124 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
133 | 125 |
} else if (updateResult == -1){ |
134 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
126 |
+ responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value()); |
|
127 |
+ responseData.setStatusText(HttpStatus.INTERNAL_SERVER_ERROR); |
|
135 | 128 |
responseData.setMessage("아래의 금지어가 포함되어 있습니다.\n* " + result.get("word")); |
136 | 129 |
return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
137 |
- |
|
138 | 130 |
} else { |
139 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
140 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
141 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
131 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
142 | 132 |
} |
143 | 133 |
|
144 | 134 |
} |
... | ... | @@ -158,13 +148,7 @@ |
158 | 148 |
int result = cmntService.deleteCmnt(cmntVO); |
159 | 149 |
|
160 | 150 |
// 응답처리 |
161 |
- HttpHeaders headers = new HttpHeaders(); |
|
162 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
163 |
- ResponseData responseData = new ResponseData(); |
|
164 |
- responseData.setStatus(HttpStatus.OK); |
|
165 |
- responseData.setMessage("정상적으로 삭제가 처리되었습니다."); |
|
166 |
- responseData.setData(result); |
|
167 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
151 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
168 | 152 |
|
169 | 153 |
} |
170 | 154 |
|
--- src/main/java/com/takensoft/cms/bbs/web/WordMngController.java
+++ src/main/java/com/takensoft/cms/bbs/web/WordMngController.java
... | ... | @@ -2,7 +2,9 @@ |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.bbs.service.WordMngService; |
4 | 4 |
import com.takensoft.cms.bbs.vo.WordMngVO; |
5 |
+import com.takensoft.common.message.MessageCode; |
|
5 | 6 |
import com.takensoft.common.util.ResponseData; |
7 |
+import com.takensoft.common.util.ResponseUtil; |
|
6 | 8 |
import lombok.RequiredArgsConstructor; |
7 | 9 |
import lombok.extern.slf4j.Slf4j; |
8 | 10 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -18,20 +20,22 @@ |
18 | 20 |
import java.util.HashMap; |
19 | 21 |
import java.util.List; |
20 | 22 |
import java.util.Map; |
21 |
- |
|
22 | 23 |
/** |
23 |
- * @author : 방선주 |
|
24 |
- * @since : 2024.05.31 |
|
24 |
+ * @author 방선주 |
|
25 |
+ * @since 2024.05.31 |
|
26 |
+ * @modification |
|
27 |
+ * since | author | description |
|
28 |
+ * 2024.05.31 | 방선주 | 최초 등록 |
|
25 | 29 |
* |
26 | 30 |
* 금지 단어 관리 Controller |
27 | 31 |
*/ |
28 |
- |
|
29 | 32 |
@RestController |
30 | 33 |
@RequiredArgsConstructor |
31 | 34 |
@Slf4j |
32 | 35 |
@RequestMapping(value="/wordMng") |
33 | 36 |
public class WordMngController { |
34 | 37 |
|
38 |
+ private final ResponseUtil resUtil; |
|
35 | 39 |
private final WordMngService wordMngService; |
36 | 40 |
|
37 | 41 |
/** |
... | ... | @@ -45,23 +49,13 @@ |
45 | 49 |
*/ |
46 | 50 |
@PostMapping("/saveProc.json") |
47 | 51 |
public ResponseEntity<?> saveProc(@RequestBody HashMap<String, Object> wordList) throws Exception { |
48 |
- // 응답 처리 |
|
49 |
- HttpHeaders headers = new HttpHeaders(); |
|
50 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
51 |
- ResponseData responseData = new ResponseData(); |
|
52 |
- |
|
53 | 52 |
// 금지어 등록 |
54 | 53 |
int result = wordMngService.saveWords(wordList); |
55 |
- |
|
54 |
+ // 응답 처리 |
|
56 | 55 |
if(result > 0) { |
57 |
- responseData.setStatus(HttpStatus.OK); |
|
58 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
59 |
- responseData.setData(result); |
|
60 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
56 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
61 | 57 |
} else { |
62 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
63 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
64 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
58 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
65 | 59 |
} |
66 | 60 |
} |
67 | 61 |
@PostMapping("/findAll.json") |
... | ... | @@ -74,33 +68,20 @@ |
74 | 68 |
result.put("words", wordsList); |
75 | 69 |
|
76 | 70 |
// 응답처리 |
77 |
- HttpHeaders headers = new HttpHeaders(); |
|
78 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
79 |
- ResponseData responseData = new ResponseData(); |
|
80 |
- responseData.setStatus(HttpStatus.OK); |
|
81 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
82 |
- responseData.setData(result); |
|
83 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
71 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
84 | 72 |
} |
85 | 73 |
|
86 | 74 |
@PostMapping("/deleteProc.json") |
87 | 75 |
public ResponseEntity<?> deleteProc(@RequestBody HashMap<String, Object> params) throws Exception { |
88 |
- HttpHeaders headers = new HttpHeaders(); |
|
89 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
90 |
- ResponseData responseData = new ResponseData(); |
|
91 | 76 |
|
92 | 77 |
// 금지어 삭제 |
93 | 78 |
int result = wordMngService.deleteWords(params); |
94 | 79 |
|
95 | 80 |
// 응답 처리 |
96 | 81 |
if(result > 0) { |
97 |
- responseData.setStatus(HttpStatus.OK); |
|
98 |
- responseData.setMessage("정상적으로 삭제 처리되었습니다."); |
|
99 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
82 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
100 | 83 |
} else { |
101 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
102 |
- responseData.setMessage("삭제에 실패하였습니다.\n담당자에게 문의하세요."); |
|
103 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
84 |
+ return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); |
|
104 | 85 |
} |
105 | 86 |
} |
106 | 87 |
} |
--- src/main/java/com/takensoft/cms/cntnStats/dto/CntnStatsDTO.java
+++ src/main/java/com/takensoft/cms/cntnStats/dto/CntnStatsDTO.java
... | ... | @@ -25,5 +25,6 @@ |
25 | 25 |
/** |
26 | 26 |
* 권한 목록 |
27 | 27 |
*/ |
28 |
+ @Builder.Default |
|
28 | 29 |
private List<String> mbrAuthList = new ArrayList<String>(); |
29 | 30 |
} |
--- src/main/java/com/takensoft/cms/cntnStats/web/CntnStatsController.java
+++ src/main/java/com/takensoft/cms/cntnStats/web/CntnStatsController.java
... | ... | @@ -4,7 +4,9 @@ |
4 | 4 |
import com.takensoft.cms.cntnStats.dto.CntnStatsExcelDTO; |
5 | 5 |
import com.takensoft.cms.cntnStats.service.CntnStatsService; |
6 | 6 |
import com.takensoft.common.excel.service.ExcelService; |
7 |
+import com.takensoft.common.message.MessageCode; |
|
7 | 8 |
import com.takensoft.common.util.ResponseData; |
9 |
+import com.takensoft.common.util.ResponseUtil; |
|
8 | 10 |
import lombok.RequiredArgsConstructor; |
9 | 11 |
import lombok.extern.slf4j.Slf4j; |
10 | 12 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -13,13 +15,15 @@ |
13 | 15 |
import org.springframework.http.ResponseEntity; |
14 | 16 |
import org.springframework.web.bind.annotation.*; |
15 | 17 |
|
16 |
-import javax.servlet.http.HttpServletResponse; |
|
18 |
+import jakarta.servlet.http.HttpServletResponse; |
|
17 | 19 |
import java.nio.charset.Charset; |
18 | 20 |
import java.util.*; |
19 |
- |
|
20 | 21 |
/** |
21 |
- * @author : takensoft |
|
22 |
- * @since : 2024.05.23 |
|
22 |
+ * @author takensoft |
|
23 |
+ * @since 2024.05.23 |
|
24 |
+ * @modification |
|
25 |
+ * since | author | description |
|
26 |
+ * 2024.05.23 | takensoft | 최초 등록 |
|
23 | 27 |
* |
24 | 28 |
* 접속 통계 관련 컨트롤러 |
25 | 29 |
*/ |
... | ... | @@ -30,6 +34,7 @@ |
30 | 34 |
public class CntnStatsController { |
31 | 35 |
private final CntnStatsService cntnStatsService; |
32 | 36 |
private final ExcelService excelService; |
37 |
+ private final ResponseUtil resUtil; |
|
33 | 38 |
|
34 | 39 |
/** |
35 | 40 |
* @author takensoft |
... | ... | @@ -45,18 +50,10 @@ |
45 | 50 |
int result = cntnStatsService.cntnStatsSave(cntnStatsDTO); |
46 | 51 |
|
47 | 52 |
// 응답 처리 |
48 |
- HttpHeaders headers = new HttpHeaders(); |
|
49 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
50 |
- ResponseData responseData = new ResponseData(); |
|
51 | 53 |
if(result > 0) { |
52 |
- responseData.setStatus(HttpStatus.OK); |
|
53 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
54 |
- responseData.setData(result); |
|
55 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
54 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
56 | 55 |
} else { |
57 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
58 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
59 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
56 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
60 | 57 |
} |
61 | 58 |
} |
62 | 59 |
|
... | ... | @@ -75,13 +72,7 @@ |
75 | 72 |
HashMap<String, Object> result = cntnStatsService.userCntnStatsSelect(params); |
76 | 73 |
|
77 | 74 |
// 응답 처리 |
78 |
- HttpHeaders headers = new HttpHeaders(); |
|
79 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
80 |
- ResponseData responseData = new ResponseData(); |
|
81 |
- responseData.setStatus(HttpStatus.OK); |
|
82 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
83 |
- responseData.setData(result); |
|
84 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
75 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
85 | 76 |
} |
86 | 77 |
|
87 | 78 |
/** |
... | ... | @@ -99,13 +90,7 @@ |
99 | 90 |
HashMap<String, Object> result = cntnStatsService.menuCntnStatsSelect(params); |
100 | 91 |
|
101 | 92 |
// 응답 처리 |
102 |
- HttpHeaders headers = new HttpHeaders(); |
|
103 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
104 |
- ResponseData responseData = new ResponseData(); |
|
105 |
- responseData.setStatus(HttpStatus.OK); |
|
106 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
107 |
- responseData.setData(result); |
|
108 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
93 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
109 | 94 |
} |
110 | 95 |
|
111 | 96 |
/** |
... | ... | @@ -123,13 +108,7 @@ |
123 | 108 |
HashMap<String, Object> result = cntnStatsService.bbsCntnStatsSelect(params); |
124 | 109 |
|
125 | 110 |
// 응답 처리 |
126 |
- HttpHeaders headers = new HttpHeaders(); |
|
127 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
128 |
- ResponseData responseData = new ResponseData(); |
|
129 |
- responseData.setStatus(HttpStatus.OK); |
|
130 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
131 |
- responseData.setData(result); |
|
132 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
111 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
133 | 112 |
} |
134 | 113 |
|
135 | 114 |
/** |
--- src/main/java/com/takensoft/cms/codeManage/web/CodeManageController.java
+++ src/main/java/com/takensoft/cms/codeManage/web/CodeManageController.java
... | ... | @@ -2,8 +2,10 @@ |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.codeManage.service.CodeManageService; |
4 | 4 |
import com.takensoft.cms.codeManage.vo.CodeManageVO; |
5 |
+import com.takensoft.common.message.MessageCode; |
|
5 | 6 |
import com.takensoft.common.util.ResponseData; |
6 | 7 |
import com.takensoft.common.HierachyVO; |
8 |
+import com.takensoft.common.util.ResponseUtil; |
|
7 | 9 |
import lombok.RequiredArgsConstructor; |
8 | 10 |
import lombok.extern.slf4j.Slf4j; |
9 | 11 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -23,6 +25,15 @@ |
23 | 25 |
* |
24 | 26 |
* 공통코드 정보 관련 컨트롤러 |
25 | 27 |
*/ |
28 |
+/** |
|
29 |
+ * @author takensoft |
|
30 |
+ * @since 2024.04.09 |
|
31 |
+ * @modification |
|
32 |
+ * since | author | description |
|
33 |
+ * 2024.04.09 | takensoft | 최초 등록 |
|
34 |
+ * |
|
35 |
+ * 공통코드 정보 관련 컨트롤러 |
|
36 |
+ */ |
|
26 | 37 |
@RestController |
27 | 38 |
@RequiredArgsConstructor |
28 | 39 |
@Slf4j |
... | ... | @@ -30,6 +41,7 @@ |
30 | 41 |
public class CodeManageController { |
31 | 42 |
|
32 | 43 |
private final CodeManageService codeManageService; |
44 |
+ private final ResponseUtil resUtil; |
|
33 | 45 |
|
34 | 46 |
/** |
35 | 47 |
* @author takensoft |
... | ... | @@ -46,27 +58,16 @@ |
46 | 58 |
boolean isExistence = codeManageService.findByCheckCd(codeManageVO); |
47 | 59 |
|
48 | 60 |
// 응답 처리 |
49 |
- HttpHeaders headers = new HttpHeaders(); |
|
50 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
51 |
- ResponseData responseData = new ResponseData(); |
|
52 |
- |
|
53 | 61 |
if(isExistence) { |
54 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
55 |
- responseData.setMessage("이미 존재하는 코드입니다."); |
|
56 |
- log.error("이미 존재하는 코드입니다."); |
|
57 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
62 |
+ return resUtil.errorRes(MessageCode.COMMON_DUPLICATION_CODE); |
|
58 | 63 |
} |
59 | 64 |
|
60 | 65 |
// 코드 등록 |
61 | 66 |
int result = codeManageService.cdSave(codeManageVO); |
62 | 67 |
if(result > 0) { |
63 |
- responseData.setStatus(HttpStatus.OK); |
|
64 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
65 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
68 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
66 | 69 |
} else { |
67 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
68 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
69 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
70 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
70 | 71 |
} |
71 | 72 |
} |
72 | 73 |
|
... | ... | @@ -89,13 +90,7 @@ |
89 | 90 |
result.put("newCode", new CodeManageVO()); |
90 | 91 |
|
91 | 92 |
// 응답 처리 |
92 |
- HttpHeaders headers = new HttpHeaders(); |
|
93 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
94 |
- ResponseData responseData = new ResponseData(); |
|
95 |
- responseData.setStatus(HttpStatus.OK); |
|
96 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
97 |
- responseData.setData(result); |
|
98 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
93 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
99 | 94 |
} |
100 | 95 |
|
101 | 96 |
/** |
... | ... | @@ -116,13 +111,7 @@ |
116 | 111 |
result.put("code", code); |
117 | 112 |
|
118 | 113 |
// 응답 처리 |
119 |
- HttpHeaders headers = new HttpHeaders(); |
|
120 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
121 |
- ResponseData responseData = new ResponseData(); |
|
122 |
- responseData.setStatus(HttpStatus.OK); |
|
123 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
124 |
- responseData.setData(result); |
|
125 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
114 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
126 | 115 |
} |
127 | 116 |
|
128 | 117 |
/** |
... | ... | @@ -146,10 +135,7 @@ |
146 | 135 |
// 코드 중복 검사 |
147 | 136 |
boolean isExistence = codeManageService.findByCheckCd(codeManageVO); |
148 | 137 |
if(isExistence) { |
149 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
150 |
- responseData.setMessage("이미 존재하는 코드입니다."); |
|
151 |
- log.error("이미 존재하는 코드입니다."); |
|
152 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
138 |
+ return resUtil.errorRes(MessageCode.COMMON_DUPLICATION_CODE); |
|
153 | 139 |
} |
154 | 140 |
} |
155 | 141 |
// 코드 수정 |
... | ... | @@ -157,13 +143,9 @@ |
157 | 143 |
|
158 | 144 |
// 응답 처리 |
159 | 145 |
if(result > 0) { |
160 |
- responseData.setStatus(HttpStatus.OK); |
|
161 |
- responseData.setMessage("정상적으로 수정 처리되었습니다."); |
|
162 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
146 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
163 | 147 |
} else { |
164 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
165 |
- responseData.setMessage("수정에 실패하였습니다.\n담당자에게 문의하세요."); |
|
166 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
148 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
167 | 149 |
} |
168 | 150 |
} |
169 | 151 |
|
... | ... | @@ -182,17 +164,10 @@ |
182 | 164 |
int result = codeManageService.cdDelete(codeManageVO.getCd()); |
183 | 165 |
|
184 | 166 |
// 응답 처리 |
185 |
- HttpHeaders headers = new HttpHeaders(); |
|
186 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
187 |
- ResponseData responseData = new ResponseData(); |
|
188 | 167 |
if(result > 0) { |
189 |
- responseData.setStatus(HttpStatus.OK); |
|
190 |
- responseData.setMessage("정상적으로 삭제 처리되었습니다."); |
|
191 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
168 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
192 | 169 |
} else { |
193 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
194 |
- responseData.setMessage("삭제에 실패하였습니다.\n담당자에게 문의하세요."); |
|
195 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
170 |
+ return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); |
|
196 | 171 |
} |
197 | 172 |
} |
198 | 173 |
|
... | ... | @@ -214,13 +189,7 @@ |
214 | 189 |
result.put("code", code); |
215 | 190 |
|
216 | 191 |
// 응답 처리 |
217 |
- HttpHeaders headers = new HttpHeaders(); |
|
218 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
219 |
- ResponseData responseData = new ResponseData(); |
|
220 |
- responseData.setStatus(HttpStatus.OK); |
|
221 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
222 |
- responseData.setData(result); |
|
223 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
192 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
224 | 193 |
} |
225 | 194 |
|
226 | 195 |
/** |
... | ... | @@ -242,13 +211,9 @@ |
242 | 211 |
headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
243 | 212 |
ResponseData responseData = new ResponseData(); |
244 | 213 |
if(result > 0) { |
245 |
- responseData.setStatus(HttpStatus.OK); |
|
246 |
- responseData.setMessage("정상적으로 수정 처리되었습니다."); |
|
247 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
214 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
248 | 215 |
} else { |
249 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
250 |
- responseData.setMessage("수정에 실패하였습니다.\n담당자에게 문의하세요."); |
|
251 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
216 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
252 | 217 |
} |
253 | 218 |
} |
254 | 219 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/cms/contsType/web/ContsTypeController.java
+++ src/main/java/com/takensoft/cms/contsType/web/ContsTypeController.java
... | ... | @@ -2,7 +2,9 @@ |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.contsType.service.ContsTypeService; |
4 | 4 |
import com.takensoft.cms.contsType.vo.ContsTypeVO; |
5 |
+import com.takensoft.common.message.MessageCode; |
|
5 | 6 |
import com.takensoft.common.util.ResponseData; |
7 |
+import com.takensoft.common.util.ResponseUtil; |
|
6 | 8 |
import lombok.RequiredArgsConstructor; |
7 | 9 |
import org.springframework.http.HttpHeaders; |
8 | 10 |
import org.springframework.http.HttpStatus; |
... | ... | @@ -15,10 +17,12 @@ |
15 | 17 |
|
16 | 18 |
import java.nio.charset.Charset; |
17 | 19 |
import java.util.*; |
18 |
- |
|
19 | 20 |
/** |
20 |
- * @author : takensoft |
|
21 |
- * @since : 2024.04.17 |
|
21 |
+ * @author takensoft |
|
22 |
+ * @since 2024.04.17 |
|
23 |
+ * @modification |
|
24 |
+ * since | author | description |
|
25 |
+ * 2024.04.17 | takensoft | 최초 등록 |
|
22 | 26 |
* |
23 | 27 |
* 콘텐츠 유형 관리 관련 컨트롤러 |
24 | 28 |
*/ |
... | ... | @@ -27,6 +31,7 @@ |
27 | 31 |
@RequestMapping(value = "/admin/contsType") |
28 | 32 |
public class ContsTypeController { |
29 | 33 |
private final ContsTypeService contsTypeService; |
34 |
+ private final ResponseUtil resUtil; |
|
30 | 35 |
|
31 | 36 |
/** |
32 | 37 |
* @author takensoft |
... | ... | @@ -44,18 +49,10 @@ |
44 | 49 |
int insertResult = (int) result.get("result"); |
45 | 50 |
|
46 | 51 |
// 응답 처리 |
47 |
- HttpHeaders headers = new HttpHeaders(); |
|
48 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
49 |
- ResponseData responseData = new ResponseData(); |
|
50 | 52 |
if(insertResult > 0) { |
51 |
- responseData.setStatus(HttpStatus.OK); |
|
52 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
53 |
- responseData.setData(result); |
|
54 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
53 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
55 | 54 |
} else { |
56 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
57 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
58 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
55 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
59 | 56 |
} |
60 | 57 |
} |
61 | 58 |
|
... | ... | @@ -74,17 +71,10 @@ |
74 | 71 |
int result = contsTypeService.contsUpdate(contsTypeVO); |
75 | 72 |
|
76 | 73 |
// 응답 처리 |
77 |
- HttpHeaders headers = new HttpHeaders(); |
|
78 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
79 |
- ResponseData responseData = new ResponseData(); |
|
80 | 74 |
if(result > 0) { |
81 |
- responseData.setStatus(HttpStatus.OK); |
|
82 |
- responseData.setMessage("정상적으로 수정 처리되었습니다."); |
|
83 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
75 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
84 | 76 |
} else { |
85 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
86 |
- responseData.setMessage("수정에 실패하였습니다.\n담당자에게 문의하세요."); |
|
87 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
77 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
88 | 78 |
} |
89 | 79 |
} |
90 | 80 |
|
... | ... | @@ -103,13 +93,7 @@ |
103 | 93 |
Map<String, Object> result = contsTypeService.findAll(params); |
104 | 94 |
|
105 | 95 |
// 응답 처리 |
106 |
- HttpHeaders headers = new HttpHeaders(); |
|
107 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
108 |
- ResponseData responseData = new ResponseData(); |
|
109 |
- responseData.setStatus(HttpStatus.OK); |
|
110 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
111 |
- responseData.setData(result); |
|
112 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
96 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
113 | 97 |
} |
114 | 98 |
|
115 | 99 |
/** |
... | ... | @@ -126,13 +110,7 @@ |
126 | 110 |
ContsTypeVO result = contsTypeService.findByContsType(contsTypeVO.getContsId()); |
127 | 111 |
|
128 | 112 |
// 응답 처리 |
129 |
- HttpHeaders headers = new HttpHeaders(); |
|
130 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
131 |
- ResponseData responseData = new ResponseData(); |
|
132 |
- responseData.setStatus(HttpStatus.OK); |
|
133 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
134 |
- responseData.setData(result); |
|
135 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
113 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
136 | 114 |
} |
137 | 115 |
|
138 | 116 |
/** |
... | ... | @@ -150,17 +128,10 @@ |
150 | 128 |
int result = contsTypeService.contsUpdate(contsTypeVO); |
151 | 129 |
|
152 | 130 |
// 응답 처리 |
153 |
- HttpHeaders headers = new HttpHeaders(); |
|
154 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
155 |
- ResponseData responseData = new ResponseData(); |
|
156 | 131 |
if(result > 0) { |
157 |
- responseData.setStatus(HttpStatus.OK); |
|
158 |
- responseData.setMessage("정상적으로 삭제 처리되었습니다."); |
|
159 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
132 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
160 | 133 |
} else { |
161 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
162 |
- responseData.setMessage("삭제에 실패하였습니다.\n담당자에게 문의하세요."); |
|
163 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
134 |
+ return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); |
|
164 | 135 |
} |
165 | 136 |
} |
166 | 137 |
|
... | ... | @@ -179,12 +150,6 @@ |
179 | 150 |
List<ContsTypeVO> result = contsTypeService.findAllByExpsr(contsTypeVO); |
180 | 151 |
|
181 | 152 |
// 응답 처리 |
182 |
- HttpHeaders headers = new HttpHeaders(); |
|
183 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
184 |
- ResponseData responseData = new ResponseData(); |
|
185 |
- responseData.setStatus(HttpStatus.OK); |
|
186 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
187 |
- responseData.setData(result); |
|
188 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
153 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
189 | 154 |
} |
190 | 155 |
} |
--- src/main/java/com/takensoft/cms/contsType/web/SystemContsTypeController.java
+++ src/main/java/com/takensoft/cms/contsType/web/SystemContsTypeController.java
... | ... | @@ -3,7 +3,9 @@ |
3 | 3 |
import com.takensoft.cms.contsType.service.ContsTypeService; |
4 | 4 |
import com.takensoft.cms.contsType.vo.ContsAuthrtVO; |
5 | 5 |
import com.takensoft.cms.contsType.vo.ContsTypeVO; |
6 |
+import com.takensoft.common.message.MessageCode; |
|
6 | 7 |
import com.takensoft.common.util.ResponseData; |
8 |
+import com.takensoft.common.util.ResponseUtil; |
|
7 | 9 |
import lombok.RequiredArgsConstructor; |
8 | 10 |
import lombok.extern.slf4j.Slf4j; |
9 | 11 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -14,10 +16,12 @@ |
14 | 16 |
|
15 | 17 |
import java.nio.charset.Charset; |
16 | 18 |
import java.util.List; |
17 |
- |
|
18 | 19 |
/** |
19 |
- * @author : takensoft |
|
20 |
- * @since : 2024.04.17 |
|
20 |
+ * @author takensoft |
|
21 |
+ * @since 2024.04.17 |
|
22 |
+ * @modification |
|
23 |
+ * since | author | description |
|
24 |
+ * 2024.04.17 | takensoft | 최초 등록 |
|
21 | 25 |
* |
22 | 26 |
* 콘텐츠 유형 관리 관련 컨트롤러 |
23 | 27 |
*/ |
... | ... | @@ -27,6 +31,7 @@ |
27 | 31 |
@RequestMapping(value = "/sys/contsType") |
28 | 32 |
public class SystemContsTypeController { |
29 | 33 |
|
34 |
+ private final ResponseUtil resUtil; |
|
30 | 35 |
private final ContsTypeService contsTypeService; |
31 | 36 |
|
32 | 37 |
/** |
... | ... | @@ -42,13 +47,7 @@ |
42 | 47 |
List<ContsTypeVO> result = contsTypeService.findByContsTypeSys(contsTypeVO); |
43 | 48 |
|
44 | 49 |
// 응답 처리 |
45 |
- HttpHeaders headers = new HttpHeaders(); |
|
46 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
47 |
- ResponseData responseData = new ResponseData(); |
|
48 |
- responseData.setStatus(HttpStatus.OK); |
|
49 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
50 |
- responseData.setData(result); |
|
51 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
50 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
52 | 51 |
} |
53 | 52 |
|
54 | 53 |
/** |
... | ... | @@ -64,12 +63,6 @@ |
64 | 63 |
List<ContsAuthrtVO> result = contsTypeService.findByContsAuthrt(); |
65 | 64 |
|
66 | 65 |
// 응답 처리 |
67 |
- HttpHeaders headers = new HttpHeaders(); |
|
68 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
69 |
- ResponseData responseData = new ResponseData(); |
|
70 |
- responseData.setStatus(HttpStatus.OK); |
|
71 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
72 |
- responseData.setData(result); |
|
73 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
66 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
74 | 67 |
} |
75 | 68 |
} |
--- src/main/java/com/takensoft/cms/dept/web/DeptController.java
+++ src/main/java/com/takensoft/cms/dept/web/DeptController.java
... | ... | @@ -6,7 +6,9 @@ |
6 | 6 |
import com.takensoft.cms.dept.vo.DeptMbrVO; |
7 | 7 |
import com.takensoft.cms.dept.vo.DeptVO; |
8 | 8 |
import com.takensoft.common.HierachyVO; |
9 |
+import com.takensoft.common.message.MessageCode; |
|
9 | 10 |
import com.takensoft.common.util.ResponseData; |
11 |
+import com.takensoft.common.util.ResponseUtil; |
|
10 | 12 |
import lombok.RequiredArgsConstructor; |
11 | 13 |
import lombok.extern.slf4j.Slf4j; |
12 | 14 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -19,10 +21,12 @@ |
19 | 21 |
import java.util.HashMap; |
20 | 22 |
import java.util.List; |
21 | 23 |
import java.util.Map; |
22 |
- |
|
23 | 24 |
/** |
24 |
- * @author : takensoft |
|
25 |
- * @since : 2024.04.24 |
|
25 |
+ * @author takensoft |
|
26 |
+ * @since 2024.04.24 |
|
27 |
+ * @modification |
|
28 |
+ * since | author | description |
|
29 |
+ * 2024.04.24 | takensoft | 최초 등록 |
|
26 | 30 |
* |
27 | 31 |
* 부서 정보 관련 컨트롤러 |
28 | 32 |
*/ |
... | ... | @@ -32,6 +36,7 @@ |
32 | 36 |
@RequestMapping("/admin/dept") |
33 | 37 |
public class DeptController { |
34 | 38 |
|
39 |
+ private final ResponseUtil resUtil; |
|
35 | 40 |
private final DeptService deptService; |
36 | 41 |
private final AuthorService authorService; |
37 | 42 |
|
... | ... | @@ -51,19 +56,10 @@ |
51 | 56 |
int insertResult = (int) result.get("insertResult"); |
52 | 57 |
|
53 | 58 |
// 응답 처리 |
54 |
- HttpHeaders headers = new HttpHeaders(); |
|
55 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
56 |
- ResponseData responseData = new ResponseData(); |
|
57 |
- |
|
58 | 59 |
if(insertResult > 0) { |
59 |
- responseData.setStatus(HttpStatus.OK); |
|
60 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
61 |
- responseData.setData(result); |
|
62 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
60 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
63 | 61 |
} else { |
64 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
65 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
66 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
62 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
67 | 63 |
} |
68 | 64 |
} |
69 | 65 |
|
... | ... | @@ -82,18 +78,10 @@ |
82 | 78 |
int result = deptService.deptMbrSave(deptMbrVO); |
83 | 79 |
|
84 | 80 |
// 응답 처리 |
85 |
- HttpHeaders headers = new HttpHeaders(); |
|
86 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
87 |
- ResponseData responseData = new ResponseData(); |
|
88 |
- |
|
89 | 81 |
if(result > 0) { |
90 |
- responseData.setStatus(HttpStatus.OK); |
|
91 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
92 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
82 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
93 | 83 |
} else { |
94 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
95 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
96 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
84 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
97 | 85 |
} |
98 | 86 |
} |
99 | 87 |
|
... | ... | @@ -119,13 +107,7 @@ |
119 | 107 |
result.put("newDept", new DeptVO()); |
120 | 108 |
|
121 | 109 |
// 응답 처리 |
122 |
- HttpHeaders headers = new HttpHeaders(); |
|
123 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
124 |
- ResponseData responseData = new ResponseData(); |
|
125 |
- responseData.setStatus(HttpStatus.OK); |
|
126 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
127 |
- responseData.setData(result); |
|
128 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
110 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
129 | 111 |
} |
130 | 112 |
|
131 | 113 |
/** |
... | ... | @@ -143,13 +125,7 @@ |
143 | 125 |
Map<String, Object> result = deptService.findByDept(params); |
144 | 126 |
|
145 | 127 |
// 응답 처리 |
146 |
- HttpHeaders headers = new HttpHeaders(); |
|
147 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
148 |
- ResponseData responseData = new ResponseData(); |
|
149 |
- responseData.setStatus(HttpStatus.OK); |
|
150 |
- responseData.setMessage("정상적으로 조회 처리되었습니다."); |
|
151 |
- responseData.setData(result); |
|
152 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
128 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
153 | 129 |
} |
154 | 130 |
|
155 | 131 |
/** |
... | ... | @@ -167,18 +143,10 @@ |
167 | 143 |
int result = deptService.deptUpdate(deptVO); |
168 | 144 |
|
169 | 145 |
// 응답 처리 |
170 |
- HttpHeaders headers = new HttpHeaders(); |
|
171 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
172 |
- ResponseData responseData = new ResponseData(); |
|
173 |
- |
|
174 | 146 |
if(result > 0) { |
175 |
- responseData.setStatus(HttpStatus.OK); |
|
176 |
- responseData.setMessage("정상적으로 수정 처리되었습니다."); |
|
177 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
147 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
178 | 148 |
} else { |
179 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
180 |
- responseData.setMessage("수정에 실패하였습니다.\n담당자에게 문의하세요."); |
|
181 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
149 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
182 | 150 |
} |
183 | 151 |
} |
184 | 152 |
|
... | ... | @@ -197,18 +165,10 @@ |
197 | 165 |
int result = deptService.deptDelete(deptVO); |
198 | 166 |
|
199 | 167 |
// 응답 처리 |
200 |
- HttpHeaders headers = new HttpHeaders(); |
|
201 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
202 |
- ResponseData responseData = new ResponseData(); |
|
203 |
- |
|
204 | 168 |
if(result > 0) { |
205 |
- responseData.setStatus(HttpStatus.OK); |
|
206 |
- responseData.setMessage("정상적으로 삭제 처리되었습니다."); |
|
207 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
169 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
208 | 170 |
} else { |
209 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
210 |
- responseData.setMessage("삭제에 실패하였습니다.\n담당자에게 문의하세요."); |
|
211 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
171 |
+ return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); |
|
212 | 172 |
} |
213 | 173 |
} |
214 | 174 |
|
... | ... | @@ -227,18 +187,10 @@ |
227 | 187 |
int result = deptService.deptMbrDelete(deptMbrList); |
228 | 188 |
|
229 | 189 |
// 응답 처리 |
230 |
- HttpHeaders headers = new HttpHeaders(); |
|
231 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
232 |
- ResponseData responseData = new ResponseData(); |
|
233 |
- |
|
234 | 190 |
if(result > 0) { |
235 |
- responseData.setStatus(HttpStatus.OK); |
|
236 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
237 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
191 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
238 | 192 |
} else { |
239 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
240 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
241 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
193 |
+ return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); |
|
242 | 194 |
} |
243 | 195 |
} |
244 | 196 |
|
... | ... | @@ -257,13 +209,7 @@ |
257 | 209 |
Map<String, Object> result = deptService.findByMbr(params); |
258 | 210 |
|
259 | 211 |
// 응답 처리 |
260 |
- HttpHeaders headers = new HttpHeaders(); |
|
261 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
262 |
- ResponseData responseData = new ResponseData(); |
|
263 |
- responseData.setStatus(HttpStatus.OK); |
|
264 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
265 |
- responseData.setData(result); |
|
266 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
212 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
267 | 213 |
} |
268 | 214 |
|
269 | 215 |
/** |
... | ... | @@ -281,17 +227,10 @@ |
281 | 227 |
int result = deptService.updateList(deptList); |
282 | 228 |
|
283 | 229 |
// 응답 처리 |
284 |
- HttpHeaders headers = new HttpHeaders(); |
|
285 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
286 |
- ResponseData responseData = new ResponseData(); |
|
287 | 230 |
if(result > 0) { |
288 |
- responseData.setStatus(HttpStatus.OK); |
|
289 |
- responseData.setMessage("정상적으로 수정 처리되었습니다."); |
|
290 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
231 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
291 | 232 |
} else { |
292 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
293 |
- responseData.setMessage("수정에 실패하였습니다.\n담당자에게 문의하세요."); |
|
294 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
233 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
295 | 234 |
} |
296 | 235 |
} |
297 | 236 |
} |
--- src/main/java/com/takensoft/cms/main/web/MainController.java
+++ src/main/java/com/takensoft/cms/main/web/MainController.java
... | ... | @@ -1,7 +1,9 @@ |
1 | 1 |
package com.takensoft.cms.main.web; |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.main.service.MainService; |
4 |
+import com.takensoft.common.message.MessageCode; |
|
4 | 5 |
import com.takensoft.common.util.ResponseData; |
6 |
+import com.takensoft.common.util.ResponseUtil; |
|
5 | 7 |
import lombok.RequiredArgsConstructor; |
6 | 8 |
import org.springframework.cache.CacheManager; |
7 | 9 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -14,12 +16,14 @@ |
14 | 16 |
|
15 | 17 |
import java.nio.charset.Charset; |
16 | 18 |
import java.util.*; |
17 |
- |
|
18 | 19 |
/** |
19 |
- * @author : 박정하 |
|
20 |
- * @since : 2024.05.29 |
|
20 |
+ * @author 박정하 |
|
21 |
+ * @since 2024.05.29 |
|
22 |
+ * @modification |
|
23 |
+ * since | author | description |
|
24 |
+ * 2024.05.29 | 박정하 | 최초 등록 |
|
21 | 25 |
* |
22 |
- * 메인 관련 컨트롤러 |
|
26 |
+ * 메인 관련 Controller |
|
23 | 27 |
*/ |
24 | 28 |
@RestController |
25 | 29 |
@RequiredArgsConstructor |
... | ... | @@ -27,6 +31,7 @@ |
27 | 31 |
public class MainController { |
28 | 32 |
private final MainService mainService; |
29 | 33 |
private final CacheManager cacheManager; // 캐시를 관리하기 위한 CacheManager 인스턴스 |
34 |
+ private final ResponseUtil resUtil; |
|
30 | 35 |
|
31 | 36 |
/** |
32 | 37 |
* @author takensoft |
... | ... | @@ -43,13 +48,7 @@ |
43 | 48 |
Map<String, Object> result = mainService.selectAdminMain(); |
44 | 49 |
|
45 | 50 |
// 응답 처리 |
46 |
- HttpHeaders headers = new HttpHeaders(); |
|
47 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
48 |
- ResponseData responseData = new ResponseData(); |
|
49 |
- responseData.setStatus(HttpStatus.OK); |
|
50 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
51 |
- responseData.setData(result); |
|
52 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
51 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
53 | 52 |
} |
54 | 53 |
|
55 | 54 |
/** |
... | ... | @@ -72,13 +71,12 @@ |
72 | 71 |
for(String nm : cacheManager.getCacheNames()) { |
73 | 72 |
cacheManager.getCache(nm).clear(); |
74 | 73 |
} |
75 |
- responseData.setStatus(HttpStatus.OK); |
|
74 |
+ responseData.setStatus(HttpStatus.OK.value()); |
|
75 |
+ responseData.setStatusText(HttpStatus.OK); |
|
76 | 76 |
responseData.setMessage("정상적으로 처리되었습니다."); |
77 | 77 |
return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
78 | 78 |
} catch (Exception e) { |
79 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
80 |
- responseData.setMessage("적용에 실패했습니다.\n관리자에게 문의해주시기 바랍니다."); |
|
81 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
79 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
82 | 80 |
} |
83 | 81 |
} |
84 | 82 |
|
... | ... | @@ -96,12 +94,6 @@ |
96 | 94 |
List<HashMap<String, Object>> result = mainService.findAplyToasts(); |
97 | 95 |
|
98 | 96 |
// 응답 처리 |
99 |
- HttpHeaders headers = new HttpHeaders(); |
|
100 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
101 |
- ResponseData responseData = new ResponseData(); |
|
102 |
- responseData.setStatus(HttpStatus.OK); |
|
103 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
104 |
- responseData.setData(result); |
|
105 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
97 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
106 | 98 |
} |
107 | 99 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/cms/mber/dto/AdmMbrDTO.java
+++ src/main/java/com/takensoft/cms/mber/dto/AdmMbrDTO.java
... | ... | @@ -132,5 +132,6 @@ |
132 | 132 |
/** |
133 | 133 |
* 권한 정보 |
134 | 134 |
*/ |
135 |
+ @Builder.Default |
|
135 | 136 |
private List<MberAuthorVO> authorList = new ArrayList<MberAuthorVO>(); |
136 | 137 |
} |
--- src/main/java/com/takensoft/cms/mber/dto/JoinDTO.java
+++ src/main/java/com/takensoft/cms/mber/dto/JoinDTO.java
... | ... | @@ -141,5 +141,6 @@ |
141 | 141 |
/** |
142 | 142 |
* 권한 정보 |
143 | 143 |
*/ |
144 |
+ @Builder.Default |
|
144 | 145 |
private List<MberAuthorVO> authorList = new ArrayList<MberAuthorVO>(); |
145 | 146 |
} |
--- src/main/java/com/takensoft/cms/mber/service/AdmMbrService.java
+++ src/main/java/com/takensoft/cms/mber/service/AdmMbrService.java
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 |
import com.takensoft.cms.mber.dto.JoinDTO; |
5 | 5 |
import com.takensoft.cms.mber.vo.MberVO; |
6 | 6 |
|
7 |
-import javax.servlet.http.HttpServletRequest; |
|
7 |
+import jakarta.servlet.http.HttpServletRequest; |
|
8 | 8 |
import java.util.HashMap; |
9 | 9 |
|
10 | 10 |
/** |
--- src/main/java/com/takensoft/cms/mber/service/Impl/AdmMbrServiceImpl.java
+++ src/main/java/com/takensoft/cms/mber/service/Impl/AdmMbrServiceImpl.java
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 |
import org.springframework.stereotype.Service; |
20 | 20 |
import org.springframework.transaction.annotation.Transactional; |
21 | 21 |
|
22 |
-import javax.servlet.http.HttpServletRequest; |
|
22 |
+import jakarta.servlet.http.HttpServletRequest; |
|
23 | 23 |
import java.util.HashMap; |
24 | 24 |
import java.util.List; |
25 | 25 |
|
--- src/main/java/com/takensoft/cms/mber/service/Impl/MberServiceImpl.java
+++ src/main/java/com/takensoft/cms/mber/service/Impl/MberServiceImpl.java
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 |
import org.springframework.stereotype.Service; |
20 | 20 |
import org.springframework.transaction.annotation.Transactional; |
21 | 21 |
|
22 |
-import javax.servlet.http.HttpServletRequest; |
|
22 |
+import jakarta.servlet.http.HttpServletRequest; |
|
23 | 23 |
import java.util.HashMap; |
24 | 24 |
|
25 | 25 |
/** |
--- src/main/java/com/takensoft/cms/mber/service/Impl/RefreshTokenServiceImpl.java
+++ src/main/java/com/takensoft/cms/mber/service/Impl/RefreshTokenServiceImpl.java
... | ... | @@ -17,9 +17,9 @@ |
17 | 17 |
import org.springframework.stereotype.Service; |
18 | 18 |
import org.springframework.transaction.annotation.Transactional; |
19 | 19 |
|
20 |
-import javax.servlet.http.Cookie; |
|
21 |
-import javax.servlet.http.HttpServletRequest; |
|
22 |
-import javax.servlet.http.HttpServletResponse; |
|
20 |
+import jakarta.servlet.http.Cookie; |
|
21 |
+import jakarta.servlet.http.HttpServletRequest; |
|
22 |
+import jakarta.servlet.http.HttpServletResponse; |
|
23 | 23 |
import java.util.Date; |
24 | 24 |
import java.util.HashMap; |
25 | 25 |
import java.util.List; |
--- src/main/java/com/takensoft/cms/mber/service/MberService.java
+++ src/main/java/com/takensoft/cms/mber/service/MberService.java
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 |
import com.takensoft.cms.mber.dto.PasswordDTO; |
5 | 5 |
import com.takensoft.cms.mber.vo.MberVO; |
6 | 6 |
|
7 |
-import javax.servlet.http.HttpServletRequest; |
|
7 |
+import jakarta.servlet.http.HttpServletRequest; |
|
8 | 8 |
import java.util.*; |
9 | 9 |
|
10 | 10 |
/** |
--- src/main/java/com/takensoft/cms/mber/service/RefreshTokenService.java
+++ src/main/java/com/takensoft/cms/mber/service/RefreshTokenService.java
... | ... | @@ -2,8 +2,8 @@ |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.mber.vo.RefreshVO; |
4 | 4 |
|
5 |
-import javax.servlet.http.HttpServletRequest; |
|
6 |
-import javax.servlet.http.HttpServletResponse; |
|
5 |
+import jakarta.servlet.http.HttpServletRequest; |
|
6 |
+import jakarta.servlet.http.HttpServletResponse; |
|
7 | 7 |
|
8 | 8 |
/** |
9 | 9 |
* @author : takensoft |
--- src/main/java/com/takensoft/cms/mber/web/AdmMbrController.java
+++ src/main/java/com/takensoft/cms/mber/web/AdmMbrController.java
... | ... | @@ -7,7 +7,9 @@ |
7 | 7 |
import com.takensoft.cms.mber.service.MberService; |
8 | 8 |
import com.takensoft.cms.mber.vo.MberVO; |
9 | 9 |
import com.takensoft.common.exception.IdDuplicationException; |
10 |
+import com.takensoft.common.message.MessageCode; |
|
10 | 11 |
import com.takensoft.common.util.ResponseData; |
12 |
+import com.takensoft.common.util.ResponseUtil; |
|
11 | 13 |
import lombok.RequiredArgsConstructor; |
12 | 14 |
import org.springframework.http.HttpHeaders; |
13 | 15 |
import org.springframework.http.HttpStatus; |
... | ... | @@ -19,16 +21,18 @@ |
19 | 21 |
import org.springframework.web.bind.annotation.RestController; |
20 | 22 |
import org.springframework.beans.factory.annotation.Value; |
21 | 23 |
|
22 |
-import javax.servlet.http.HttpServletRequest; |
|
24 |
+import jakarta.servlet.http.HttpServletRequest; |
|
23 | 25 |
import javax.validation.Valid; |
24 | 26 |
import java.nio.charset.Charset; |
25 | 27 |
import java.util.*; |
26 |
- |
|
27 | 28 |
/** |
28 |
- * @author : 박정하 |
|
29 |
- * @since : 2024.06.21 |
|
29 |
+ * @author 박정하 |
|
30 |
+ * @since 2024.06.21 |
|
31 |
+ * @modification |
|
32 |
+ * since | author | description |
|
33 |
+ * 2024.06.21 | 박정하 | 최초 등록 |
|
30 | 34 |
* |
31 |
- * 회원정보 관련 컨트롤러 |
|
35 |
+ * 회원정보 관련 Controller |
|
32 | 36 |
*/ |
33 | 37 |
@RestController |
34 | 38 |
@RequiredArgsConstructor |
... | ... | @@ -36,7 +40,7 @@ |
36 | 40 |
public class AdmMbrController { |
37 | 41 |
private final AdmMbrService admMbrService; |
38 | 42 |
private final MberService mbrService; |
39 |
- |
|
43 |
+ private final ResponseUtil resUtil; |
|
40 | 44 |
/** |
41 | 45 |
* @author 박정하 |
42 | 46 |
* @since 2024.06.21 |
... | ... | @@ -51,13 +55,7 @@ |
51 | 55 |
HashMap<String, Object> result = admMbrService.mbrList(params); |
52 | 56 |
|
53 | 57 |
// 응답 처리 |
54 |
- HttpHeaders headers = new HttpHeaders(); |
|
55 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
56 |
- ResponseData responseData = new ResponseData(); |
|
57 |
- responseData.setStatus(HttpStatus.OK); |
|
58 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
59 |
- responseData.setData(result); |
|
60 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
58 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
61 | 59 |
} |
62 | 60 |
|
63 | 61 |
/** |
... | ... | @@ -80,17 +78,10 @@ |
80 | 78 |
int result = mbrService.updatePassword(passwordDTO); |
81 | 79 |
|
82 | 80 |
// 응답 처리 |
83 |
- HttpHeaders headers = new HttpHeaders(); |
|
84 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
85 |
- ResponseData responseData = new ResponseData(); |
|
86 | 81 |
if(result > 0) { |
87 |
- responseData.setStatus(HttpStatus.OK); |
|
88 |
- responseData.setMessage("정상적으로 초기화 처리되었습니다."); |
|
89 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
82 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
90 | 83 |
} else { |
91 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
92 |
- responseData.setMessage("초기화에 실패하였습니다.\n담당자에게 문의하세요."); |
|
93 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
84 |
+ return resUtil.errorRes(MessageCode.COMMON_UNKNOWN_ERROR); |
|
94 | 85 |
} |
95 | 86 |
} |
96 | 87 |
|
... | ... | @@ -109,13 +100,7 @@ |
109 | 100 |
AdmMbrDTO result = admMbrService.mbrDetail(admMbrDTO.getMbrId()); |
110 | 101 |
|
111 | 102 |
// 응답 처리 |
112 |
- HttpHeaders headers = new HttpHeaders(); |
|
113 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
114 |
- ResponseData responseData = new ResponseData(); |
|
115 |
- responseData.setStatus(HttpStatus.OK); |
|
116 |
- responseData.setMessage("정상적으로 회원정보 상세 조회가 처리되었습니다."); |
|
117 |
- responseData.setData(result); |
|
118 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
103 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
119 | 104 |
} |
120 | 105 |
|
121 | 106 |
/** |
... | ... | @@ -132,17 +117,10 @@ |
132 | 117 |
int result = admMbrService.updateMbr(admMbrDTO); |
133 | 118 |
|
134 | 119 |
// 응답 처리 |
135 |
- HttpHeaders headers = new HttpHeaders(); |
|
136 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
137 |
- ResponseData responseData = new ResponseData(); |
|
138 | 120 |
if(result > 0) { |
139 |
- responseData.setStatus(HttpStatus.OK); |
|
140 |
- responseData.setMessage("정상적으로 수정되었습니다."); |
|
141 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
121 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
142 | 122 |
} else { |
143 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
144 |
- responseData.setMessage("수정에 실패하였습니다.\n담당자에게 문의하세요."); |
|
145 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
123 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
146 | 124 |
} |
147 | 125 |
} |
148 | 126 |
|
... | ... | @@ -161,17 +139,10 @@ |
161 | 139 |
int result = admMbrService.updateMbr(admMbrDTO); |
162 | 140 |
|
163 | 141 |
// 응답 처리 |
164 |
- HttpHeaders headers = new HttpHeaders(); |
|
165 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
166 |
- ResponseData responseData = new ResponseData(); |
|
167 | 142 |
if(result > 0) { |
168 |
- responseData.setStatus(HttpStatus.OK); |
|
169 |
- responseData.setMessage("정상적으로 삭제되었습니다."); |
|
170 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
143 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
171 | 144 |
} else { |
172 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
173 |
- responseData.setMessage("삭제에 실패하였습니다.\n담당자에게 문의하세요."); |
|
174 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
145 |
+ return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); |
|
175 | 146 |
} |
176 | 147 |
} |
177 | 148 |
|
... | ... | @@ -194,10 +165,7 @@ |
194 | 165 |
// 아이디 중복 검사 |
195 | 166 |
boolean isExistence = mbrService.findByCheckLoginId(joinDTO.getLgnId()); |
196 | 167 |
if(isExistence) { |
197 |
-// throw new IdDuplicationException("이미 존재하는 아이디입니다."); |
|
198 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
199 |
- responseData.setMessage("이미 존재하는 아이디입니다."); |
|
200 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
168 |
+ return resUtil.errorRes(MessageCode.SIGNUP_ID_TAKEN); |
|
201 | 169 |
} |
202 | 170 |
|
203 | 171 |
// 회원 가입 진행 |
... | ... | @@ -205,14 +173,9 @@ |
205 | 173 |
int insertResult = (int) result.get("insertResult"); |
206 | 174 |
|
207 | 175 |
if(insertResult > 0) { |
208 |
- responseData.setStatus(HttpStatus.OK); |
|
209 |
- responseData.setMessage("정상적으로 회원가입 처리되었습니다."); |
|
210 |
- responseData.setData(result); |
|
211 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
176 |
+ return resUtil.successRes(result, MessageCode.SIGNUP_SUCCESS); |
|
212 | 177 |
} else { |
213 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
214 |
- responseData.setMessage("회원가입에 실패하였습니다.\n담당자에게 문의하세요."); |
|
215 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
178 |
+ return resUtil.errorRes(MessageCode.COMMON_UNKNOWN_ERROR); |
|
216 | 179 |
} |
217 | 180 |
} |
218 | 181 |
|
... | ... | @@ -234,14 +197,9 @@ |
234 | 197 |
headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
235 | 198 |
ResponseData responseData = new ResponseData(); |
236 | 199 |
if(result != null) { |
237 |
- responseData.setStatus(HttpStatus.OK); |
|
238 |
- responseData.setMessage("정상적으로 조회 처리되었습니다."); |
|
239 |
- responseData.setData(result); |
|
240 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
200 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
241 | 201 |
} else { |
242 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
243 |
- responseData.setMessage("입력하신 정보와 일치하는 회원이 존재하지 않습니다.\n다시 시도하세요."); |
|
244 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
202 |
+ return resUtil.errorRes(MessageCode.LOGIN_USER_NOT_FOUND); |
|
245 | 203 |
} |
246 | 204 |
} |
247 | 205 |
|
... | ... | @@ -264,14 +222,9 @@ |
264 | 222 |
headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
265 | 223 |
ResponseData responseData = new ResponseData(); |
266 | 224 |
if(result > 0) { |
267 |
- responseData.setStatus(HttpStatus.OK); |
|
268 |
- responseData.setMessage("정상적으로 조회 처리되었습니다."); |
|
269 |
- responseData.setData(result); |
|
270 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
225 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
271 | 226 |
} else { |
272 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
273 |
- responseData.setMessage("입력하신 정보와 일치하는 회원이 존재하지 않습니다.\n다시 시도하세요."); |
|
274 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
227 |
+ return resUtil.errorRes(MessageCode.LOGIN_USER_NOT_FOUND); |
|
275 | 228 |
} |
276 | 229 |
} |
277 | 230 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/cms/mber/web/LgnHstryController.java
+++ src/main/java/com/takensoft/cms/mber/web/LgnHstryController.java
... | ... | @@ -1,7 +1,9 @@ |
1 | 1 |
package com.takensoft.cms.mber.web; |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.mber.service.LgnHstryService; |
4 |
+import com.takensoft.common.message.MessageCode; |
|
4 | 5 |
import com.takensoft.common.util.ResponseData; |
6 |
+import com.takensoft.common.util.ResponseUtil; |
|
5 | 7 |
import lombok.RequiredArgsConstructor; |
6 | 8 |
import org.springframework.http.HttpHeaders; |
7 | 9 |
import org.springframework.http.HttpStatus; |
... | ... | @@ -14,18 +16,21 @@ |
14 | 16 |
|
15 | 17 |
import java.nio.charset.Charset; |
16 | 18 |
import java.util.HashMap; |
17 |
- |
|
18 | 19 |
/** |
19 |
- * @author : 박정하 |
|
20 |
- * @since : 2024.05.24 |
|
20 |
+ * @author 박정하 |
|
21 |
+ * @since 2024.05.24 |
|
22 |
+ * @modification |
|
23 |
+ * since | author | description |
|
24 |
+ * 2024.05.24 | 박정하 | 최초 등록 |
|
21 | 25 |
* |
22 |
- * 로그인 이력 관련 컨트롤러 |
|
26 |
+ * 로그인 이력 관련 Controller |
|
23 | 27 |
*/ |
24 | 28 |
@RestController |
25 | 29 |
@RequiredArgsConstructor |
26 | 30 |
@RequestMapping(value = "/admin/lgnHstry") |
27 | 31 |
public class LgnHstryController { |
28 | 32 |
private final LgnHstryService lgnHstryService; |
33 |
+ private final ResponseUtil resUtil; |
|
29 | 34 |
|
30 | 35 |
/** |
31 | 36 |
* @author 박정하 |
... | ... | @@ -41,12 +46,6 @@ |
41 | 46 |
HashMap<String, Object> result = lgnHstryService.lgnHstryList(params); |
42 | 47 |
|
43 | 48 |
// 응답 처리 |
44 |
- HttpHeaders headers = new HttpHeaders(); |
|
45 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
46 |
- ResponseData responseData = new ResponseData(); |
|
47 |
- responseData.setStatus(HttpStatus.OK); |
|
48 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
49 |
- responseData.setData(result); |
|
50 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
49 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
51 | 50 |
} |
52 | 51 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/cms/mber/web/MberController.java
+++ src/main/java/com/takensoft/cms/mber/web/MberController.java
... | ... | @@ -5,7 +5,9 @@ |
5 | 5 |
import com.takensoft.cms.mber.service.MberService; |
6 | 6 |
import com.takensoft.cms.mber.vo.MberVO; |
7 | 7 |
import com.takensoft.common.exception.IdDuplicationException; |
8 |
+import com.takensoft.common.message.MessageCode; |
|
8 | 9 |
import com.takensoft.common.util.ResponseData; |
10 |
+import com.takensoft.common.util.ResponseUtil; |
|
9 | 11 |
import lombok.RequiredArgsConstructor; |
10 | 12 |
import lombok.extern.slf4j.Slf4j; |
11 | 13 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -14,14 +16,16 @@ |
14 | 16 |
import org.springframework.http.ResponseEntity; |
15 | 17 |
import org.springframework.web.bind.annotation.*; |
16 | 18 |
|
17 |
-import javax.servlet.http.HttpServletRequest; |
|
19 |
+import jakarta.servlet.http.HttpServletRequest; |
|
18 | 20 |
import javax.validation.Valid; |
19 | 21 |
import java.nio.charset.Charset; |
20 | 22 |
import java.util.HashMap; |
21 |
- |
|
22 | 23 |
/** |
23 |
- * @author : takensoft |
|
24 |
- * @since : 2024.04.01 |
|
24 |
+ * @author takensoft |
|
25 |
+ * @since 2024.04.01 |
|
26 |
+ * @modification |
|
27 |
+ * since | author | description |
|
28 |
+ * 2024.04.01 | takensoft | 최초 등록 |
|
25 | 29 |
* |
26 | 30 |
* 회원 정보 관련 컨트롤러 |
27 | 31 |
*/ |
... | ... | @@ -31,6 +35,7 @@ |
31 | 35 |
@RequestMapping(value = "/mbr") |
32 | 36 |
public class MberController { |
33 | 37 |
private final MberService mberService; |
38 |
+ private final ResponseUtil resUtil; |
|
34 | 39 |
|
35 | 40 |
/** |
36 | 41 |
* @author takensoft |
... | ... | @@ -47,13 +52,7 @@ |
47 | 52 |
MberVO result = mberService.findByMbr(params); |
48 | 53 |
|
49 | 54 |
// 응답 처리 |
50 |
- HttpHeaders headers = new HttpHeaders(); |
|
51 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
52 |
- ResponseData responseData = new ResponseData(); |
|
53 |
- responseData.setStatus(HttpStatus.OK); |
|
54 |
- responseData.setMessage("정상적으로 회원정보 상세 조회가 처리되었습니다."); |
|
55 |
- responseData.setData(result); |
|
56 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
55 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
57 | 56 |
} |
58 | 57 |
|
59 | 58 |
/** |
... | ... | @@ -71,17 +70,10 @@ |
71 | 70 |
boolean isExistence = mberService.passwordCheck(passwordDTO); |
72 | 71 |
|
73 | 72 |
// 응답 처리 |
74 |
- HttpHeaders headers = new HttpHeaders(); |
|
75 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
76 |
- ResponseData responseData = new ResponseData(); |
|
77 | 73 |
if(isExistence) { |
78 |
- responseData.setStatus(HttpStatus.OK); |
|
79 |
- responseData.setMessage("정상적으로 수정 처리되었습니다."); |
|
80 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
74 |
+ return resUtil.successRes(isExistence, MessageCode.COMMON_SUCCESS); |
|
81 | 75 |
} else { |
82 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
83 |
- responseData.setMessage("비밀번호를 확인하세요."); |
|
84 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
76 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
85 | 77 |
} |
86 | 78 |
} |
87 | 79 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/cms/mber/web/RefreshTokenController.java
+++ src/main/java/com/takensoft/cms/mber/web/RefreshTokenController.java
... | ... | @@ -2,7 +2,9 @@ |
2 | 2 |
|
3 | 3 |
|
4 | 4 |
import com.takensoft.cms.mber.service.RefreshTokenService; |
5 |
+import com.takensoft.common.message.MessageCode; |
|
5 | 6 |
import com.takensoft.common.util.ResponseData; |
7 |
+import com.takensoft.common.util.ResponseUtil; |
|
6 | 8 |
import lombok.RequiredArgsConstructor; |
7 | 9 |
import lombok.extern.slf4j.Slf4j; |
8 | 10 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -12,14 +14,16 @@ |
12 | 14 |
import org.springframework.web.bind.annotation.PostMapping; |
13 | 15 |
import org.springframework.web.bind.annotation.RestController; |
14 | 16 |
|
15 |
-import javax.servlet.http.Cookie; |
|
16 |
-import javax.servlet.http.HttpServletRequest; |
|
17 |
-import javax.servlet.http.HttpServletResponse; |
|
17 |
+import jakarta.servlet.http.Cookie; |
|
18 |
+import jakarta.servlet.http.HttpServletRequest; |
|
19 |
+import jakarta.servlet.http.HttpServletResponse; |
|
18 | 20 |
import java.nio.charset.Charset; |
19 |
- |
|
20 | 21 |
/** |
21 |
- * @author : takensoft |
|
22 |
- * @since : 2024.04.01 |
|
22 |
+ * @author takensoft |
|
23 |
+ * @since 2024.04.01 |
|
24 |
+ * @modification |
|
25 |
+ * since | author | description |
|
26 |
+ * 2024.04.01 | takensoft | 최초 등록 |
|
23 | 27 |
* |
24 | 28 |
* RefreshToken 정보 관련 컨트롤러 |
25 | 29 |
*/ |
... | ... | @@ -28,6 +32,7 @@ |
28 | 32 |
@Slf4j |
29 | 33 |
public class RefreshTokenController { |
30 | 34 |
|
35 |
+ private final ResponseUtil resUtil; |
|
31 | 36 |
private final RefreshTokenService refreshTokenService; |
32 | 37 |
|
33 | 38 |
/** |
... | ... | @@ -51,13 +56,9 @@ |
51 | 56 |
cookie.setPath("/"); // 쿠키 적용 범위 |
52 | 57 |
cookie.setHttpOnly(true); |
53 | 58 |
res.addCookie(cookie); |
54 |
- responseData.setStatus(HttpStatus.OK); |
|
55 |
- responseData.setMessage("정상적으로 로그아웃 처리되었습니다."); |
|
56 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
59 |
+ return resUtil.successRes(result, MessageCode.LOGOUT_SUCCESS); |
|
57 | 60 |
} else { |
58 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
59 |
- responseData.setMessage("로그아웃에 실패하였습니다.\n담당자에게 문의하세요."); |
|
60 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
61 |
+ return resUtil.errorRes(MessageCode.COMMON_UNKNOWN_ERROR); |
|
61 | 62 |
} |
62 | 63 |
} |
63 | 64 |
|
... | ... | @@ -77,11 +78,10 @@ |
77 | 78 |
headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
78 | 79 |
ResponseData responseData = new ResponseData(); |
79 | 80 |
if(result > 0) { |
80 |
- responseData.setStatus(HttpStatus.OK); |
|
81 |
- responseData.setMessage("정상적으로 발급 처리되었습니다."); |
|
82 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
81 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
83 | 82 |
} else { |
84 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
83 |
+ responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value()); |
|
84 |
+ responseData.setStatusText(HttpStatus.INTERNAL_SERVER_ERROR); |
|
85 | 85 |
responseData.setMessage("로그인을 다시해주시기 바랍니다."); |
86 | 86 |
return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
87 | 87 |
} |
--- src/main/java/com/takensoft/cms/popup/web/PopupController.java
+++ src/main/java/com/takensoft/cms/popup/web/PopupController.java
... | ... | @@ -3,7 +3,9 @@ |
3 | 3 |
import com.takensoft.cms.popup.service.PopupService; |
4 | 4 |
import com.takensoft.cms.popup.vo.PopupVO; |
5 | 5 |
import com.takensoft.common.file.service.FileService; |
6 |
+import com.takensoft.common.message.MessageCode; |
|
6 | 7 |
import com.takensoft.common.util.ResponseData; |
8 |
+import com.takensoft.common.util.ResponseUtil; |
|
7 | 9 |
import lombok.RequiredArgsConstructor; |
8 | 10 |
import org.springframework.http.HttpHeaders; |
9 | 11 |
import org.springframework.http.HttpStatus; |
... | ... | @@ -14,12 +16,14 @@ |
14 | 16 |
|
15 | 17 |
import java.nio.charset.Charset; |
16 | 18 |
import java.util.*; |
17 |
- |
|
18 | 19 |
/** |
19 |
- * @author : 박정하 |
|
20 |
- * @since : 2024.05.13 |
|
20 |
+ * @author 박정하 |
|
21 |
+ * @since 2024.05.13 |
|
22 |
+ * @modification |
|
23 |
+ * since | author | description |
|
24 |
+ * 2024.05.13 | 박정하 | 최초 등록 |
|
21 | 25 |
* |
22 |
- * 팝업 관련 컨트롤러 |
|
26 |
+ * 팝업 관련 Controller |
|
23 | 27 |
*/ |
24 | 28 |
@RestController |
25 | 29 |
@RequiredArgsConstructor |
... | ... | @@ -27,6 +31,7 @@ |
27 | 31 |
public class PopupController { |
28 | 32 |
private final PopupService popupService; |
29 | 33 |
private final FileService fileService; |
34 |
+ private final ResponseUtil resUtil; |
|
30 | 35 |
|
31 | 36 |
/** |
32 | 37 |
* @author 박정하 |
... | ... | @@ -43,18 +48,10 @@ |
43 | 48 |
int insertResult = (int) result.get("insertResult"); |
44 | 49 |
|
45 | 50 |
// 응답 처리 |
46 |
- HttpHeaders headers = new HttpHeaders(); |
|
47 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
48 |
- ResponseData responseData = new ResponseData(); |
|
49 | 51 |
if(insertResult > 0) { |
50 |
- responseData.setStatus(HttpStatus.OK); |
|
51 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
52 |
- responseData.setData(result); |
|
53 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
52 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
54 | 53 |
} else { |
55 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
56 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
57 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
54 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
58 | 55 |
} |
59 | 56 |
} |
60 | 57 |
|
... | ... | @@ -72,13 +69,7 @@ |
72 | 69 |
HashMap<String, Object> result = popupService.popupList(params); |
73 | 70 |
|
74 | 71 |
// 응답 처리 |
75 |
- HttpHeaders headers = new HttpHeaders(); |
|
76 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
77 |
- ResponseData responseData = new ResponseData(); |
|
78 |
- responseData.setStatus(HttpStatus.OK); |
|
79 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
80 |
- responseData.setData(result); |
|
81 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
72 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
82 | 73 |
} |
83 | 74 |
|
84 | 75 |
/** |
... | ... | @@ -102,13 +93,7 @@ |
102 | 93 |
result.put("fileList", fileList); |
103 | 94 |
|
104 | 95 |
// 응답 처리 |
105 |
- HttpHeaders headers = new HttpHeaders(); |
|
106 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
107 |
- ResponseData responseData = new ResponseData(); |
|
108 |
- responseData.setStatus(HttpStatus.OK); |
|
109 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
110 |
- responseData.setData(result); |
|
111 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
96 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
112 | 97 |
} |
113 | 98 |
|
114 | 99 |
/** |
... | ... | @@ -125,17 +110,10 @@ |
125 | 110 |
int result = popupService.popupUpdate(popupVO, multipartFileList); |
126 | 111 |
|
127 | 112 |
// 응답 처리 |
128 |
- HttpHeaders headers = new HttpHeaders(); |
|
129 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
130 |
- ResponseData responseData = new ResponseData(); |
|
131 | 113 |
if(result > 0) { |
132 |
- responseData.setStatus(HttpStatus.OK); |
|
133 |
- responseData.setMessage("정상적으로 수정 처리되었습니다."); |
|
134 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
114 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
135 | 115 |
} else { |
136 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
137 |
- responseData.setMessage("수정에 실패하였습니다.\n담당자에게 문의하세요."); |
|
138 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
116 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
139 | 117 |
} |
140 | 118 |
} |
141 | 119 |
|
... | ... | @@ -153,17 +131,10 @@ |
153 | 131 |
int result = popupService.popupDelete(popupVO); |
154 | 132 |
|
155 | 133 |
// 응답 처리 |
156 |
- HttpHeaders headers = new HttpHeaders(); |
|
157 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
158 |
- ResponseData responseData = new ResponseData(); |
|
159 | 134 |
if(result > 0) { |
160 |
- responseData.setStatus(HttpStatus.OK); |
|
161 |
- responseData.setMessage("정상적으로 삭제 처리되었습니다."); |
|
162 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
135 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
163 | 136 |
} else { |
164 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
165 |
- responseData.setMessage("삭제에 실패하였습니다.\n담당자에게 문의하세요."); |
|
166 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
137 |
+ return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); |
|
167 | 138 |
} |
168 | 139 |
} |
169 | 140 |
|
... | ... | @@ -181,12 +152,6 @@ |
181 | 152 |
List<PopupVO> result = popupService.popupListByPage(popupVO.getPageType()); |
182 | 153 |
|
183 | 154 |
// 응답 처리 |
184 |
- HttpHeaders headers = new HttpHeaders(); |
|
185 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
186 |
- ResponseData responseData = new ResponseData(); |
|
187 |
- responseData.setStatus(HttpStatus.OK); |
|
188 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
189 |
- responseData.setData(result); |
|
190 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
155 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
191 | 156 |
} |
192 | 157 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/cms/popup/web/SysPopupController.java
+++ src/main/java/com/takensoft/cms/popup/web/SysPopupController.java
... | ... | @@ -3,7 +3,9 @@ |
3 | 3 |
import com.takensoft.cms.popup.service.PopupService; |
4 | 4 |
import com.takensoft.cms.popup.vo.PopupVO; |
5 | 5 |
import com.takensoft.common.file.service.FileService; |
6 |
+import com.takensoft.common.message.MessageCode; |
|
6 | 7 |
import com.takensoft.common.util.ResponseData; |
8 |
+import com.takensoft.common.util.ResponseUtil; |
|
7 | 9 |
import lombok.RequiredArgsConstructor; |
8 | 10 |
import org.springframework.http.HttpHeaders; |
9 | 11 |
import org.springframework.http.HttpStatus; |
... | ... | @@ -18,12 +20,14 @@ |
18 | 20 |
import java.util.ArrayList; |
19 | 21 |
import java.util.HashMap; |
20 | 22 |
import java.util.List; |
21 |
- |
|
22 | 23 |
/** |
23 |
- * @author : 박정하 |
|
24 |
- * @since : 2024.05.27 |
|
24 |
+ * @author 박정하 |
|
25 |
+ * @since 2024.05.27 |
|
26 |
+ * @modification |
|
27 |
+ * since | author | description |
|
28 |
+ * 2024.05.27 | 박정하 | 최초 등록 |
|
25 | 29 |
* |
26 |
- * 팝업 관련 컨트롤러 |
|
30 |
+ * 팝업 관련 Controller |
|
27 | 31 |
*/ |
28 | 32 |
@RestController |
29 | 33 |
@RequiredArgsConstructor |
... | ... | @@ -31,6 +35,7 @@ |
31 | 35 |
public class SysPopupController { |
32 | 36 |
private final PopupService popupService; |
33 | 37 |
private final FileService fileService; |
38 |
+ private final ResponseUtil resUtil; |
|
34 | 39 |
|
35 | 40 |
/** |
36 | 41 |
* @author 박정하 |
... | ... | @@ -46,13 +51,7 @@ |
46 | 51 |
List<PopupVO> result = popupService.popupListByPage(popupVO.getPageType()); |
47 | 52 |
|
48 | 53 |
// 응답 처리 |
49 |
- HttpHeaders headers = new HttpHeaders(); |
|
50 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
51 |
- ResponseData responseData = new ResponseData(); |
|
52 |
- responseData.setStatus(HttpStatus.OK); |
|
53 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
54 |
- responseData.setData(result); |
|
55 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
54 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
56 | 55 |
} |
57 | 56 |
|
58 | 57 |
/** |
... | ... | @@ -76,12 +75,6 @@ |
76 | 75 |
result.put("fileList", fileList); |
77 | 76 |
|
78 | 77 |
// 응답 처리 |
79 |
- HttpHeaders headers = new HttpHeaders(); |
|
80 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
81 |
- ResponseData responseData = new ResponseData(); |
|
82 |
- responseData.setStatus(HttpStatus.OK); |
|
83 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
84 |
- responseData.setData(result); |
|
85 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
78 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
86 | 79 |
} |
87 | 80 |
} |
--- src/main/java/com/takensoft/cms/prvcInqHstry/service/Impl/PrvcInqHstryServiceImpl.java
+++ src/main/java/com/takensoft/cms/prvcInqHstry/service/Impl/PrvcInqHstryServiceImpl.java
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 |
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; |
14 | 14 |
import org.springframework.stereotype.Service; |
15 | 15 |
|
16 |
-import javax.servlet.http.HttpServletRequest; |
|
16 |
+import jakarta.servlet.http.HttpServletRequest; |
|
17 | 17 |
import java.util.HashMap; |
18 | 18 |
import java.util.List; |
19 | 19 |
|
--- src/main/java/com/takensoft/cms/prvcInqHstry/service/PrvcInqHstryService.java
+++ src/main/java/com/takensoft/cms/prvcInqHstry/service/PrvcInqHstryService.java
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.prvcInqHstry.vo.PrvcInqHstryVO; |
4 | 4 |
|
5 |
-import javax.servlet.http.HttpServletRequest; |
|
5 |
+import jakarta.servlet.http.HttpServletRequest; |
|
6 | 6 |
import java.util.HashMap; |
7 | 7 |
|
8 | 8 |
/** |
--- src/main/java/com/takensoft/cms/prvcInqHstry/web/PrvcInqHstryController.java
+++ src/main/java/com/takensoft/cms/prvcInqHstry/web/PrvcInqHstryController.java
... | ... | @@ -2,7 +2,9 @@ |
2 | 2 |
|
3 | 3 |
import com.takensoft.cms.prvcInqHstry.service.PrvcInqHstryService; |
4 | 4 |
import com.takensoft.cms.prvcInqHstry.vo.PrvcInqHstryVO; |
5 |
+import com.takensoft.common.message.MessageCode; |
|
5 | 6 |
import com.takensoft.common.util.ResponseData; |
7 |
+import com.takensoft.common.util.ResponseUtil; |
|
6 | 8 |
import lombok.RequiredArgsConstructor; |
7 | 9 |
import org.springframework.http.HttpHeaders; |
8 | 10 |
import org.springframework.http.HttpStatus; |
... | ... | @@ -10,21 +12,24 @@ |
10 | 12 |
import org.springframework.http.ResponseEntity; |
11 | 13 |
import org.springframework.web.bind.annotation.*; |
12 | 14 |
|
13 |
-import javax.servlet.http.HttpServletRequest; |
|
15 |
+import jakarta.servlet.http.HttpServletRequest; |
|
14 | 16 |
import java.nio.charset.Charset; |
15 | 17 |
import java.util.*; |
16 |
- |
|
17 | 18 |
/** |
18 |
- * @author : 박정하 |
|
19 |
- * @since : 2024.05.22 |
|
19 |
+ * @author 박정하 |
|
20 |
+ * @since 2024.05.22 |
|
21 |
+ * @modification |
|
22 |
+ * since | author | description |
|
23 |
+ * 2024.05.22 | 박정하 | 최초 등록 |
|
20 | 24 |
* |
21 |
- * 개인정보 조회 이력 관련 컨트롤러 |
|
25 |
+ * 개인정보 조회 이력 관련 Controller |
|
22 | 26 |
*/ |
23 | 27 |
@RestController |
24 | 28 |
@RequiredArgsConstructor |
25 | 29 |
@RequestMapping(value = "/admin/prvcInqHstry") |
26 | 30 |
public class PrvcInqHstryController { |
27 | 31 |
private final PrvcInqHstryService prvcInqHstryService; |
32 |
+ private final ResponseUtil resUtil; |
|
28 | 33 |
|
29 | 34 |
/** |
30 | 35 |
* @author 박정하 |
... | ... | @@ -40,17 +45,10 @@ |
40 | 45 |
int result = prvcInqHstryService.prvcInqHstryInsert(request, prvcInqHstryVO); |
41 | 46 |
|
42 | 47 |
// 응답 처리 |
43 |
- HttpHeaders headers = new HttpHeaders(); |
|
44 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
45 |
- ResponseData responseData = new ResponseData(); |
|
46 | 48 |
if(result > 0) { |
47 |
- responseData.setStatus(HttpStatus.OK); |
|
48 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
49 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
49 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
50 | 50 |
} else { |
51 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
52 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
53 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
51 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
54 | 52 |
} |
55 | 53 |
} |
56 | 54 |
|
... | ... | @@ -68,13 +66,7 @@ |
68 | 66 |
HashMap<String, Object> result = prvcInqHstryService.prvcInqHstryList(params); |
69 | 67 |
|
70 | 68 |
// 응답 처리 |
71 |
- HttpHeaders headers = new HttpHeaders(); |
|
72 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
73 |
- ResponseData responseData = new ResponseData(); |
|
74 |
- responseData.setStatus(HttpStatus.OK); |
|
75 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
76 |
- responseData.setData(result); |
|
77 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
69 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
78 | 70 |
} |
79 | 71 |
|
80 | 72 |
/** |
... | ... | @@ -91,12 +83,6 @@ |
91 | 83 |
PrvcInqHstryVO result = prvcInqHstryService.prvcInqHstryDetail(prvcInqHstryVO.getInqHstryId()); |
92 | 84 |
|
93 | 85 |
// 응답 처리 |
94 |
- HttpHeaders headers = new HttpHeaders(); |
|
95 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
96 |
- ResponseData responseData = new ResponseData(); |
|
97 |
- responseData.setStatus(HttpStatus.OK); |
|
98 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
99 |
- responseData.setData(result); |
|
100 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
86 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
101 | 87 |
} |
102 | 88 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/cms/search/web/SearchController.java
+++ src/main/java/com/takensoft/cms/search/web/SearchController.java
... | ... | @@ -3,7 +3,9 @@ |
3 | 3 |
import com.takensoft.cms.search.service.SearchService; |
4 | 4 |
import com.takensoft.cms.search.vo.SearchResultVO; |
5 | 5 |
import com.takensoft.cms.search.vo.SearchVO; |
6 |
+import com.takensoft.common.message.MessageCode; |
|
6 | 7 |
import com.takensoft.common.util.ResponseData; |
8 |
+import com.takensoft.common.util.ResponseUtil; |
|
7 | 9 |
import lombok.RequiredArgsConstructor; |
8 | 10 |
import lombok.extern.slf4j.Slf4j; |
9 | 11 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -13,12 +15,14 @@ |
13 | 15 |
import org.springframework.web.bind.annotation.*; |
14 | 16 |
|
15 | 17 |
import java.nio.charset.Charset; |
16 |
- |
|
17 | 18 |
/** |
18 |
- * @author : 하석형 |
|
19 |
- * @since : 2024.06.12 |
|
19 |
+ * @author 하석형 |
|
20 |
+ * @since 2024.06.12 |
|
21 |
+ * @modification |
|
22 |
+ * since | author | description |
|
23 |
+ * 2024.06.12 | 하석형 | 최초 등록 |
|
20 | 24 |
* |
21 |
- * 통합 검색 관련 컨트롤러 |
|
25 |
+ * 통합 검색 관련 Controller |
|
22 | 26 |
*/ |
23 | 27 |
@RestController |
24 | 28 |
@RequiredArgsConstructor |
... | ... | @@ -27,6 +31,7 @@ |
27 | 31 |
public class SearchController { |
28 | 32 |
|
29 | 33 |
private final SearchService searchService; |
34 |
+ private final ResponseUtil resUtil; |
|
30 | 35 |
|
31 | 36 |
/** |
32 | 37 |
* @author 하석형 |
... | ... | @@ -42,12 +47,6 @@ |
42 | 47 |
SearchResultVO result = searchService.searchAll(searchVO); |
43 | 48 |
|
44 | 49 |
// 응답 처리 |
45 |
- HttpHeaders headers = new HttpHeaders(); |
|
46 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
47 |
- ResponseData responseData = new ResponseData(); |
|
48 |
- responseData.setStatus(HttpStatus.OK); |
|
49 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
50 |
- responseData.setData(result); |
|
51 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
50 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
52 | 51 |
} |
53 | 52 |
}(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/java/com/takensoft/common/config/MessageConfig.java
... | ... | @@ -0,0 +1,60 @@ |
1 | +package com.takensoft.common.config; | |
2 | + | |
3 | +import jakarta.validation.constraints.NotNull; | |
4 | +import net.rakugakibox.util.YamlResourceBundle; | |
5 | +import org.springframework.context.MessageSource; | |
6 | +import org.springframework.context.annotation.Bean; | |
7 | +import org.springframework.context.annotation.Configuration; | |
8 | +import org.springframework.context.support.ResourceBundleMessageSource; | |
9 | + | |
10 | +import java.util.Locale; | |
11 | +import java.util.MissingResourceException; | |
12 | +import java.util.ResourceBundle; | |
13 | + | |
14 | +/** | |
15 | + * @author : takensoft | |
16 | + * @since : 2025.01.22 | |
17 | + * @modification | |
18 | + * since | author | description | |
19 | + * 2025.01.22 | takensoft | 최초 등록 | |
20 | + * | |
21 | + * Spring의 다국어 메시지 처리를 위한 설정 Config | |
22 | + */ | |
23 | +@Configuration | |
24 | +public class MessageConfig { | |
25 | + | |
26 | + /** | |
27 | + * ResourceBundleMessageSource를 확장하여 YAML 형식의 메시지를 지원하는 내부 정적 클래스 | |
28 | + */ | |
29 | + private static class YamlMessageSource extends ResourceBundleMessageSource { | |
30 | + /** | |
31 | + * @param basename - 메시지 번들의 기본 이름 | |
32 | + * @param locale - 로케일 정보 | |
33 | + * @return 해당 로케일의 ResourceBundle 객체 | |
34 | + * @throws MissingResourceException - 해당 리소스를 찾지 못할 경우 예외 발생 | |
35 | + * | |
36 | + * YAML 형식의 메시지 번들 호출 | |
37 | + */ | |
38 | + @NotNull | |
39 | + @Override | |
40 | + protected ResourceBundle doGetBundle(@NotNull String basename, @NotNull Locale locale) throws MissingResourceException { | |
41 | + return ResourceBundle.getBundle(basename, locale, YamlResourceBundle.Control.INSTANCE); | |
42 | + } | |
43 | + } | |
44 | + | |
45 | + /** | |
46 | + * @return MessageSource 객체 | |
47 | + * | |
48 | + * YAML 메시지 소스를 설정 | |
49 | + */ | |
50 | + @Bean | |
51 | + public MessageSource messageSource() { | |
52 | + YamlMessageSource messageSource = new YamlMessageSource(); | |
53 | + messageSource.setBasename("message/messages"); // 메시지 찾을 위치 | |
54 | + messageSource.setDefaultEncoding("UTF-8"); // 인코딩 | |
55 | + messageSource.setAlwaysUseMessageFormat(true); // 메시지 포멧 규칙 | |
56 | + messageSource.setUseCodeAsDefaultMessage(true); // 메시지를 못찾으면 그 자체를 디폴트 메시지로 사용 | |
57 | + messageSource.setFallbackToSystemLocale(true); // 특정 로케일에 대한 파일을 발견하지 못 할 경우, 시스템 로케일로 폴백 | |
58 | + return messageSource; | |
59 | + } | |
60 | +} |
--- src/main/java/com/takensoft/common/config/SecurityConfig.java
+++ src/main/java/com/takensoft/common/config/SecurityConfig.java
... | ... | @@ -7,8 +7,8 @@ |
7 | 7 |
import com.takensoft.common.filter.JWTFilter; |
8 | 8 |
import com.takensoft.common.filter.LoginFilter; |
9 | 9 |
import com.takensoft.common.util.CommonUtils; |
10 |
-import com.takensoft.common.util.CustomAccessDenieHandler; |
|
11 |
-import com.takensoft.common.util.CustomAuthenticationEntryPoint; |
|
10 |
+import com.takensoft.common.exception.CustomAccessDenieHandler; |
|
11 |
+import com.takensoft.common.exception.CustomAuthenticationEntryPoint; |
|
12 | 12 |
import com.takensoft.common.util.JWTUtil; |
13 | 13 |
import org.springframework.beans.factory.annotation.Value; |
14 | 14 |
import org.springframework.context.annotation.Bean; |
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 |
import org.springframework.web.cors.CorsConfiguration; |
25 | 25 |
import org.springframework.web.cors.CorsConfigurationSource; |
26 | 26 |
|
27 |
-import javax.servlet.http.HttpServletRequest; |
|
27 |
+import jakarta.servlet.http.HttpServletRequest; |
|
28 | 28 |
import java.util.Collections; |
29 | 29 |
|
30 | 30 |
/** |
... | ... | @@ -117,9 +117,9 @@ |
117 | 117 |
); |
118 | 118 |
|
119 | 119 |
http.authorizeHttpRequests((auth) -> auth |
120 |
- .antMatchers("/", "/mbr/**", "/company/**", "/refresh/**", "/sys/**").permitAll() // 회원관련, 시스템 제공 관련, 기업용페이지는 누구나 접근 가능 |
|
121 |
- .antMatchers("/admin/**").hasRole("ADMIN") // 관리자 페이지는 ADMIN 권한을 가진 사용자만 접근 가능 |
|
122 |
- .antMatchers("/editFileUpload/**", "/fileUpload/**").permitAll() // 에디터 파일 업로드 |
|
120 |
+ .requestMatchers("/", "/mbr/**", "/company/**", "/refresh/**", "/sys/**").permitAll() // 회원관련, 시스템 제공 관련, 기업용페이지는 누구나 접근 가능 |
|
121 |
+ .requestMatchers("/admin/**").hasRole("ADMIN") // 관리자 페이지는 ADMIN 권한을 가진 사용자만 접근 가능 |
|
122 |
+ .requestMatchers("/editFileUpload/**", "/fileUpload/**").permitAll() // 에디터 파일 업로드 |
|
123 | 123 |
.anyRequest().authenticated() // 그 외에는 로그인한 사용자만 접근 가능 |
124 | 124 |
// .anyRequest().permitAll() // 모든 사용자 접근 가능 |
125 | 125 |
); |
--- src/main/java/com/takensoft/common/config/WebConfig.java
+++ src/main/java/com/takensoft/common/config/WebConfig.java
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 |
import org.springframework.web.filter.CommonsRequestLoggingFilter; |
6 | 6 |
import org.springframework.web.filter.ForwardedHeaderFilter; |
7 | 7 |
|
8 |
-import javax.servlet.Filter; |
|
8 |
+import jakarta.servlet.Filter; |
|
9 | 9 |
|
10 | 10 |
@Configuration |
11 | 11 |
public class WebConfig { |
--- src/main/java/com/takensoft/common/excel/service/ExcelService.java
+++ src/main/java/com/takensoft/common/excel/service/ExcelService.java
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 |
import com.takensoft.portal.rvwMttr.dto.RvwMttrExcelDTO; |
8 | 8 |
import com.takensoft.portal.rvwMttr.dto.RvwMttrPrgrsExcelDTO; |
9 | 9 |
|
10 |
-import javax.servlet.http.HttpServletResponse; |
|
10 |
+import jakarta.servlet.http.HttpServletResponse; |
|
11 | 11 |
import java.util.List; |
12 | 12 |
|
13 | 13 |
public interface ExcelService { |
--- src/main/java/com/takensoft/common/excel/service/Impl/ExcelServiceImpl.java
+++ src/main/java/com/takensoft/common/excel/service/Impl/ExcelServiceImpl.java
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 |
import org.springframework.http.HttpHeaders; |
20 | 20 |
import org.springframework.stereotype.Service; |
21 | 21 |
|
22 |
-import javax.servlet.http.HttpServletResponse; |
|
22 |
+import jakarta.servlet.http.HttpServletResponse; |
|
23 | 23 |
import java.io.IOException; |
24 | 24 |
import java.nio.charset.StandardCharsets; |
25 | 25 |
import java.util.*; |
+++ src/main/java/com/takensoft/common/exception/CustomAccessDenieHandler.java
... | ... | @@ -0,0 +1,43 @@ |
1 | +package com.takensoft.common.exception; | |
2 | + | |
3 | +import jakarta.servlet.ServletException; | |
4 | +import jakarta.servlet.http.HttpServletRequest; | |
5 | +import jakarta.servlet.http.HttpServletResponse; | |
6 | +import lombok.RequiredArgsConstructor; | |
7 | +import lombok.extern.slf4j.Slf4j; | |
8 | +import org.springframework.security.access.AccessDeniedException; | |
9 | +import org.springframework.security.web.access.AccessDeniedHandler; | |
10 | +import org.springframework.stereotype.Component; | |
11 | + | |
12 | +import java.io.IOException; | |
13 | + | |
14 | +/** | |
15 | + * @author takensoft | |
16 | + * @since 2025.01.22 | |
17 | + * @modification | |
18 | + * since | author | description | |
19 | + * 2025.01.22 | takensoft | 최초 등록 | |
20 | + * | |
21 | + * AccessDeniedHandler - 접근이 거부된 사용자의 요청을 처리하는 클래스 | |
22 | + * | |
23 | + * 접근이 거부된 사용자의 요청을 처리하고, 필요한 에러 응답을 반환하는 역할을 하는 클래스 | |
24 | + */ | |
25 | +@Component | |
26 | +@Slf4j | |
27 | +@RequiredArgsConstructor | |
28 | +public class CustomAccessDenieHandler implements AccessDeniedHandler { | |
29 | + | |
30 | + /** | |
31 | + * @param req - HTTP 요청 객체 | |
32 | + * @param res - HTTP 응답 객체 | |
33 | + * @param ade - 접근 거부 예외 | |
34 | + * @throws IOException - 입출력 예외 발생 시 | |
35 | + * @throws ServletException - 서블릿 예외 발생 시 | |
36 | + * | |
37 | + * 접근이 거부된 사용자가 요청을 보냈을 때 실행 | |
38 | + */ | |
39 | + @Override | |
40 | + public void handle(HttpServletRequest req, HttpServletResponse res, AccessDeniedException ade) throws IOException, ServletException { | |
41 | + FilterExceptionHandler.accesDenie(res, ade); | |
42 | + } | |
43 | +}(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/java/com/takensoft/common/exception/CustomAccessDeniedException.java
... | ... | @@ -0,0 +1,28 @@ |
1 | +package com.takensoft.common.exception; | |
2 | + | |
3 | +/** | |
4 | + * @author takensoft | |
5 | + * @since 2025.01.22 | |
6 | + * @modification | |
7 | + * since | author | description | |
8 | + * 2025.01.22 | takensoft | 최초 등록 | |
9 | + * | |
10 | + * RuntimeException - 실행 중 발생하는 예외를 처리하는 기본 클래스 | |
11 | + * | |
12 | + * 접근 권한이 없는 경우 발생하는 예외 | |
13 | + */ | |
14 | +public class CustomAccessDeniedException extends RuntimeException { | |
15 | + | |
16 | + public CustomAccessDeniedException() { | |
17 | + | |
18 | + } | |
19 | + | |
20 | + public CustomAccessDeniedException(String message) { | |
21 | + super(message); | |
22 | + } | |
23 | + | |
24 | + public CustomAccessDeniedException(String message, Throwable cause) { | |
25 | + super(message, cause); | |
26 | + } | |
27 | + | |
28 | +} |
+++ src/main/java/com/takensoft/common/exception/CustomAuthenticationEntryPoint.java
... | ... | @@ -0,0 +1,45 @@ |
1 | +package com.takensoft.common.exception; | |
2 | + | |
3 | +import jakarta.servlet.ServletException; | |
4 | +import jakarta.servlet.http.HttpServletRequest; | |
5 | +import jakarta.servlet.http.HttpServletResponse; | |
6 | +import lombok.RequiredArgsConstructor; | |
7 | +import lombok.extern.slf4j.Slf4j; | |
8 | +import org.springframework.security.core.AuthenticationException; | |
9 | +import org.springframework.security.web.AuthenticationEntryPoint; | |
10 | +import org.springframework.stereotype.Component; | |
11 | + | |
12 | +import java.io.IOException; | |
13 | + | |
14 | +/** | |
15 | + * @author takensoft | |
16 | + * @since 2025.01.22 | |
17 | + * @modification | |
18 | + * since | author | description | |
19 | + * 2025.01.22 | takensoft | 최초 등록 | |
20 | + * | |
21 | + * AuthenticationEntryPoint - 인증되지 않은 사용자의 요청을 처리하는 인터페이스 | |
22 | + * | |
23 | + * 인증되지 않은 사용자의 요청을 처리하는 클래스 | |
24 | + */ | |
25 | +@Component | |
26 | +@Slf4j | |
27 | +@RequiredArgsConstructor | |
28 | +public class CustomAuthenticationEntryPoint implements AuthenticationEntryPoint { | |
29 | + | |
30 | + /** | |
31 | + * @param req - HTTP 요청 객체 | |
32 | + * @param res - HTTP 응답 객체 | |
33 | + * @param ae - 인증 예외 | |
34 | + * @throws IOException - 입출력 예외 발생 시 | |
35 | + * @throws ServletException - 서블릿 예외 발생 시 | |
36 | + * | |
37 | + * 인증되지 않은 사용자가 요청을 보냈을 때 실행 | |
38 | + */ | |
39 | + @Override | |
40 | + public void commence(HttpServletRequest req, HttpServletResponse res, AuthenticationException ae) throws IOException, ServletException { | |
41 | + log.info("Requester IP: {}", req.getRemoteAddr()); // 요청자의 IP 주소 로그 출력 | |
42 | + log.info("Request URI: {}", req.getRequestURI()); // 요청 URI 로그 출력 | |
43 | + FilterExceptionHandler.authenticationEntryPoint(res, ae); | |
44 | + } | |
45 | +} |
+++ src/main/java/com/takensoft/common/exception/CustomBadRequestException.java
... | ... | @@ -0,0 +1,28 @@ |
1 | +package com.takensoft.common.exception; | |
2 | + | |
3 | +/** | |
4 | + * @author takensoft | |
5 | + * @since 2025.01.22 | |
6 | + * @modification | |
7 | + * since | author | description | |
8 | + * 2025.01.22 | takensoft | 최초 등록 | |
9 | + * | |
10 | + * RuntimeException - 실행 중 발생하는 예외를 처리하는 기본 클래스 | |
11 | + * | |
12 | + * 사용자의 잘못된 요청 시 발생하는 예외 | |
13 | + */ | |
14 | +public class CustomBadRequestException extends RuntimeException { | |
15 | + | |
16 | + public CustomBadRequestException() { | |
17 | + | |
18 | + } | |
19 | + | |
20 | + public CustomBadRequestException(String message) { | |
21 | + super(message); | |
22 | + } | |
23 | + | |
24 | + public CustomBadRequestException(String message, Throwable cause) { | |
25 | + super(message, cause); | |
26 | + } | |
27 | + | |
28 | +} |
+++ src/main/java/com/takensoft/common/exception/CustomDeleteFailException.java
... | ... | @@ -0,0 +1,26 @@ |
1 | +package com.takensoft.common.exception; | |
2 | + | |
3 | +/** | |
4 | + * @author takensoft | |
5 | + * @since 2025.01.22 | |
6 | + * @modification | |
7 | + * since | author | description | |
8 | + * 2025.01.22 | takensoft | 최초 등록 | |
9 | + * | |
10 | + * RuntimeException - 실행 중 발생하는 예외를 처리하는 기본 클래스 | |
11 | + * | |
12 | + * 삭제 실패 시 발생하는 예외 | |
13 | + */ | |
14 | +public class CustomDeleteFailException extends RuntimeException { | |
15 | + | |
16 | + public CustomDeleteFailException() { | |
17 | + } | |
18 | + | |
19 | + public CustomDeleteFailException(String message) { | |
20 | + super(message); | |
21 | + } | |
22 | + | |
23 | + public CustomDeleteFailException(String message, Throwable cause) { | |
24 | + super(message, cause); | |
25 | + } | |
26 | +}(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/java/com/takensoft/common/exception/CustomIdTakenException.java
... | ... | @@ -0,0 +1,28 @@ |
1 | +package com.takensoft.common.exception; | |
2 | + | |
3 | +/** | |
4 | + * @author takensoft | |
5 | + * @since 2025.01.22 | |
6 | + * @modification | |
7 | + * since | author | description | |
8 | + * 2025.01.22 | takensoft | 최초 등록 | |
9 | + * | |
10 | + * RuntimeException - 실행 중 발생하는 예외를 처리하는 기본 클래스 | |
11 | + * | |
12 | + * 회원가입 시 아이디 중복으로 발생하는 예외 | |
13 | + */ | |
14 | +public class CustomIdTakenException extends RuntimeException { | |
15 | + | |
16 | + public CustomIdTakenException() { | |
17 | + | |
18 | + } | |
19 | + | |
20 | + public CustomIdTakenException(String message) { | |
21 | + super(message); | |
22 | + } | |
23 | + | |
24 | + public CustomIdTakenException(String message, Throwable cause) { | |
25 | + super(message, cause); | |
26 | + } | |
27 | + | |
28 | +}(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/java/com/takensoft/common/exception/CustomInsertFailException.java
... | ... | @@ -0,0 +1,26 @@ |
1 | +package com.takensoft.common.exception; | |
2 | + | |
3 | +/** | |
4 | + * @author takensoft | |
5 | + * @since 2025.01.22 | |
6 | + * @modification | |
7 | + * since | author | description | |
8 | + * 2025.01.22 | takensoft | 최초 등록 | |
9 | + * | |
10 | + * RuntimeException - 실행 중 발생하는 예외를 처리하는 기본 클래스 | |
11 | + * | |
12 | + * 등록 실패 시 발생하는 예외 | |
13 | + */ | |
14 | +public class CustomInsertFailException extends RuntimeException { | |
15 | + | |
16 | + public CustomInsertFailException() { | |
17 | + } | |
18 | + | |
19 | + public CustomInsertFailException(String message) { | |
20 | + super(message); | |
21 | + } | |
22 | + | |
23 | + public CustomInsertFailException(String message, Throwable cause) { | |
24 | + super(message, cause); | |
25 | + } | |
26 | +}(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/java/com/takensoft/common/exception/CustomNotFoundException.java
... | ... | @@ -0,0 +1,26 @@ |
1 | +package com.takensoft.common.exception; | |
2 | + | |
3 | +/** | |
4 | + * @author takensoft | |
5 | + * @since 2025.01.22 | |
6 | + * @modification | |
7 | + * since | author | description | |
8 | + * 2025.01.22 | takensoft | 최초 등록 | |
9 | + * | |
10 | + * RuntimeException - 실행 중 발생하는 예외를 처리하는 기본 클래스 | |
11 | + * | |
12 | + * 존재하지 않는 정보 또는 데이터를 조회할 때 발생하는 예외 | |
13 | + */ | |
14 | +public class CustomNotFoundException extends RuntimeException { | |
15 | + | |
16 | + public CustomNotFoundException() { | |
17 | + | |
18 | + } | |
19 | + public CustomNotFoundException(String message) { | |
20 | + super(message); | |
21 | + } | |
22 | + | |
23 | + public CustomNotFoundException(String message, Throwable cause) { | |
24 | + super(message, cause); | |
25 | + } | |
26 | +} |
+++ src/main/java/com/takensoft/common/exception/CustomPasswordComparisonException.java
... | ... | @@ -0,0 +1,27 @@ |
1 | +package com.takensoft.common.exception; | |
2 | + | |
3 | +/** | |
4 | + * @author takensoft | |
5 | + * @since 2025.01.22 | |
6 | + * @modification | |
7 | + * since | author | description | |
8 | + * 2025.01.22 | takensoft | 최초 등록 | |
9 | + * | |
10 | + * RuntimeException - 실행 중 발생하는 예외를 처리하는 기본 클래스 | |
11 | + * | |
12 | + * 비밀번호 비교 시 다를 경우 발생하는 예외 | |
13 | + */ | |
14 | +public class CustomPasswordComparisonException extends RuntimeException { | |
15 | + | |
16 | + public CustomPasswordComparisonException() { | |
17 | + | |
18 | + } | |
19 | + | |
20 | + public CustomPasswordComparisonException(String message) { | |
21 | + super(message); | |
22 | + } | |
23 | + | |
24 | + public CustomPasswordComparisonException(String message, Throwable cause) { | |
25 | + super(message, cause); | |
26 | + } | |
27 | +} |
+++ src/main/java/com/takensoft/common/exception/CustomUpdateFailException.java
... | ... | @@ -0,0 +1,26 @@ |
1 | +package com.takensoft.common.exception; | |
2 | + | |
3 | +/** | |
4 | + * @author takensoft | |
5 | + * @since 2025.01.22 | |
6 | + * @modification | |
7 | + * since | author | description | |
8 | + * 2025.01.22 | takensoft | 최초 등록 | |
9 | + * | |
10 | + * RuntimeException - 실행 중 발생하는 예외를 처리하는 기본 클래스 | |
11 | + * | |
12 | + * 수정 실패 시 발생하는 예외 | |
13 | + */ | |
14 | +public class CustomUpdateFailException extends RuntimeException { | |
15 | + | |
16 | + public CustomUpdateFailException() { | |
17 | + } | |
18 | + | |
19 | + public CustomUpdateFailException(String message) { | |
20 | + super(message); | |
21 | + } | |
22 | + | |
23 | + public CustomUpdateFailException(String message, Throwable cause) { | |
24 | + super(message, cause); | |
25 | + } | |
26 | +}(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/java/com/takensoft/common/exception/FilterExceptionHandler.java
... | ... | @@ -0,0 +1,186 @@ |
1 | +package com.takensoft.common.exception; | |
2 | + | |
3 | +import com.fasterxml.jackson.databind.ObjectMapper; | |
4 | +import com.takensoft.common.message.MessageCode; | |
5 | +import com.takensoft.common.util.ResponseData; | |
6 | +import io.jsonwebtoken.ExpiredJwtException; | |
7 | +import io.jsonwebtoken.security.SignatureException; | |
8 | +import jakarta.servlet.http.HttpServletResponse; | |
9 | +import lombok.extern.slf4j.Slf4j; | |
10 | +import org.springframework.context.MessageSource; | |
11 | +import org.springframework.context.i18n.LocaleContextHolder; | |
12 | +import org.springframework.http.MediaType; | |
13 | +import org.springframework.security.access.AccessDeniedException; | |
14 | +import org.springframework.security.authentication.*; | |
15 | +import org.springframework.security.authorization.AuthorizationDeniedException; | |
16 | +import org.springframework.security.core.AuthenticationException; | |
17 | +import org.springframework.stereotype.Component; | |
18 | + | |
19 | +import java.io.IOException; | |
20 | + | |
21 | +/** | |
22 | + * @author takensoft | |
23 | + * @since 2025.01.22 | |
24 | + * @modification | |
25 | + * since | author | description | |
26 | + * 2025.01.22 | takensoft | 최초 등록 | |
27 | + * | |
28 | + * Filter에서 발생하는 예외를 처리하고, 적절한 에러 코드와 메시지를 클라이언트에게 응답하는 클래스 | |
29 | + */ | |
30 | +@Component | |
31 | +@Slf4j | |
32 | +public class FilterExceptionHandler { | |
33 | + | |
34 | + private static ObjectMapper objectMapper; | |
35 | + private static MessageSource messageSource; | |
36 | + | |
37 | + /** | |
38 | + * @param objectMapper - ObjectMapper 인스턴스 | |
39 | + * | |
40 | + * FilterExceptionHandler 생성자 | |
41 | + */ | |
42 | + public FilterExceptionHandler(ObjectMapper objectMapper, MessageSource messageSource) { | |
43 | + this.objectMapper = objectMapper; | |
44 | + this.messageSource = messageSource; | |
45 | + } | |
46 | + | |
47 | + /** | |
48 | + * @param e - 처리할 예외 객체 | |
49 | + * | |
50 | + * 예외를 로그로 출력 | |
51 | + */ | |
52 | + private static void logError(Exception e) { | |
53 | + StackTraceElement[] stackTrace = e.getStackTrace(); | |
54 | + if(stackTrace.length > 0) { | |
55 | + StackTraceElement origin = stackTrace[0]; // 예외가 발생한 첫 번째 위치 | |
56 | + log.error("[ {} ] - {} ({} [{}]번째 행)", | |
57 | + e.getClass().getSimpleName(), | |
58 | + e.getMessage(), | |
59 | + origin.getFileName(), | |
60 | + origin.getLineNumber() | |
61 | + ); | |
62 | + } else { | |
63 | + log.error("[ {} ] - {}", e.getClass().getSimpleName(), e.getMessage()); | |
64 | + } | |
65 | + e.printStackTrace(); | |
66 | + } | |
67 | + | |
68 | + /** | |
69 | + * @param res - HTTP 응답 객체 | |
70 | + * @param messageCode - 발생한 메시지 정보 | |
71 | + * @throws IOException - 입출력 예외 발생 시 | |
72 | + * | |
73 | + * 응답 객체에 에러 정보를 JSON 형식으로 작성하여 반환 | |
74 | + */ | |
75 | + private static void errorRes(HttpServletResponse res, MessageCode messageCode) throws IOException { | |
76 | + /* | |
77 | + * Accept-Language가 header에 있으면 해당 언어에 맞게 호출 [ ko: 한국어, en: 영어 ] | |
78 | + * header에 Accept-Language가 없다면 한국어를 기본으로함. | |
79 | + * 다국어 메시지 적용 | |
80 | + */ | |
81 | + String message = messageSource.getMessage(messageCode.getMessageKey(), null, LocaleContextHolder.getLocale()); | |
82 | + | |
83 | + // 반환 정보 | |
84 | + ResponseData responseData = new ResponseData(); | |
85 | + responseData.setStatus(messageCode.getStatus().value()); | |
86 | + responseData.setStatusText(messageCode.getStatus()); | |
87 | + responseData.setMessage(message); | |
88 | + | |
89 | + res.setContentType(MediaType.APPLICATION_JSON_VALUE); | |
90 | + res.setStatus(messageCode.getStatus().value()); | |
91 | + res.getOutputStream().write(objectMapper.writeValueAsBytes(responseData)); | |
92 | + } | |
93 | + | |
94 | + /** | |
95 | + * @param res - HTTP 응답 객체 | |
96 | + * @param e - 발생한 예외 객체 | |
97 | + * @throws IOException - 입출력 예외 발생 시 | |
98 | + * | |
99 | + * 공통 예외 처리 메서드 | |
100 | + */ | |
101 | + public static void handleException(HttpServletResponse res, Exception e) throws IOException { | |
102 | + logError(e); | |
103 | + MessageCode messageCode = getMessageCode(e); | |
104 | + errorRes(res, messageCode); | |
105 | + } | |
106 | + | |
107 | + /** | |
108 | + * @param e - 예외 객체 | |
109 | + * @return 대응되는 MessageCode | |
110 | + * | |
111 | + * 예외 유형에 따른 MessageCode 매핑 | |
112 | + */ | |
113 | + private static MessageCode getMessageCode(Exception e) { | |
114 | + if (e instanceof InternalAuthenticationServiceException) { | |
115 | + return MessageCode.LOGIN_USER_NOT_FOUND; | |
116 | + } else if (e instanceof BadCredentialsException) { | |
117 | + return MessageCode.LOGIN_INVALID_CREDENTIALS; | |
118 | + } else if (e instanceof AuthenticationCredentialsNotFoundException) { | |
119 | + return MessageCode.LOGIN_AUTHENTICATION_REQUIRED; | |
120 | + } else if (e instanceof LockedException) { | |
121 | + return MessageCode.LOGIN_ACCOUNT_LOCKED; | |
122 | + } else if (e instanceof DisabledException) { | |
123 | + return MessageCode.LOGIN_ACCOUNT_DISABLED; | |
124 | + } else if (e instanceof AccountExpiredException) { | |
125 | + return MessageCode.LOGIN_ACCOUNT_EXPIRED; | |
126 | + } else if (e instanceof CredentialsExpiredException) { | |
127 | + return MessageCode.LOGIN_CREDENTIALS_EXPIRED; | |
128 | + } else if (e instanceof ExpiredJwtException) { | |
129 | + return MessageCode.JWT_EXPIRED; | |
130 | + } else if (e instanceof SignatureException) { | |
131 | + return MessageCode.JWT_SIGNATURE_INVALID; | |
132 | + } else if (e instanceof InsufficientAuthenticationException) { | |
133 | + return MessageCode.JWT_INSUFFICIENT_AUTHENTICATION; | |
134 | + } else if (e instanceof AccessDeniedException) { | |
135 | + return MessageCode.ACCESS_DENIED; | |
136 | + } else if (e instanceof AuthorizationDeniedException) { | |
137 | + return MessageCode.ACCESS_DENIED; | |
138 | + } else { | |
139 | + return MessageCode.COMMON_UNKNOWN_ERROR; | |
140 | + } | |
141 | + } | |
142 | + | |
143 | + /** | |
144 | + * @param res - HTTP 응답 객체 | |
145 | + * @param ae - 인증 예외 객체 | |
146 | + * @throws IOException - 입출력 예외 발생 시 | |
147 | + * | |
148 | + * 로그인 오류가 발생한 경우 | |
149 | + */ | |
150 | + public static void loginError(HttpServletResponse res, AuthenticationException ae) throws IOException { | |
151 | + handleException(res, ae); | |
152 | + } | |
153 | + | |
154 | + /** | |
155 | + * @param res - HTTP 응답 객체 | |
156 | + * @param e - JWT 관련 예외 객체 | |
157 | + * @throws IOException - 입출력 예외 발생 시 | |
158 | + * | |
159 | + * JWT 오류가 발생한 경우 | |
160 | + */ | |
161 | + public static void jwtError(HttpServletResponse res, Exception e) throws IOException { | |
162 | + handleException(res, e); | |
163 | + } | |
164 | + | |
165 | + /** | |
166 | + * @param res - HTTP 응답 객체 | |
167 | + * @param ade - 접근 거부 예외 객체 | |
168 | + * @throws IOException - 입출력 예외 발생 시 | |
169 | + * | |
170 | + * 접근이 거부된 경우 | |
171 | + */ | |
172 | + public static void accesDenie(HttpServletResponse res, AccessDeniedException ade) throws IOException { | |
173 | + handleException(res, ade); | |
174 | + } | |
175 | + | |
176 | + /** | |
177 | + * @param res - HTTP 응답 객체 | |
178 | + * @param ae - 인증 예외 객체 | |
179 | + * @throws IOException - 입출력 예외 발생 시 | |
180 | + * | |
181 | + * 인증 예외가 발생한 경우 | |
182 | + */ | |
183 | + public static void authenticationEntryPoint(HttpServletResponse res, AuthenticationException ae) throws IOException{ | |
184 | + handleException(res, ae); | |
185 | + } | |
186 | +}(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/java/com/takensoft/common/exception/GlobalExceptionHandler.java
... | ... | @@ -0,0 +1,257 @@ |
1 | +package com.takensoft.common.exception; | |
2 | + | |
3 | +import com.takensoft.common.message.MessageCode; | |
4 | +import com.takensoft.common.util.ResponseUtil; | |
5 | +import lombok.RequiredArgsConstructor; | |
6 | +import lombok.extern.slf4j.Slf4j; | |
7 | +import org.springframework.dao.DataAccessException; | |
8 | +import org.springframework.http.HttpStatus; | |
9 | +import org.springframework.http.ResponseEntity; | |
10 | +import org.springframework.web.HttpRequestMethodNotSupportedException; | |
11 | +import org.springframework.web.bind.MethodArgumentNotValidException; | |
12 | +import org.springframework.web.bind.annotation.ExceptionHandler; | |
13 | +import org.springframework.web.bind.annotation.RestControllerAdvice; | |
14 | +import org.springframework.web.servlet.resource.NoResourceFoundException; | |
15 | + | |
16 | +import java.net.UnknownHostException; | |
17 | + | |
18 | +/** | |
19 | + * @author takensoft | |
20 | + * @since 2025.01.22 | |
21 | + * @modification | |
22 | + * since | author | description | |
23 | + * 2025.01.22 | takensoft | 최초 등록 | |
24 | + * | |
25 | + * 스프링 MVC 컨트롤러에서 발생하는 예외를 처리하는 공통 클래스 | |
26 | + */ | |
27 | +@RestControllerAdvice | |
28 | +@Slf4j | |
29 | +@RequiredArgsConstructor | |
30 | +public class GlobalExceptionHandler { | |
31 | + | |
32 | + private final ResponseUtil resUtil; | |
33 | + | |
34 | + | |
35 | + /** | |
36 | + * @param e - 처리할 예외 객체 | |
37 | + * | |
38 | + * 예외를 로그로 출력 | |
39 | + */ | |
40 | + private void logError(Exception e) { | |
41 | + StackTraceElement[] stackTrace = e.getStackTrace(); | |
42 | + if(stackTrace.length > 0) { | |
43 | + StackTraceElement origin = stackTrace[0]; // 예외가 발생한 첫 번째 위치 | |
44 | + log.error("[ {} ] - {} ({} [{}]번째 행)", | |
45 | + e.getClass().getSimpleName(), | |
46 | + e.getMessage(), | |
47 | + origin.getFileName(), | |
48 | + origin.getLineNumber() | |
49 | + ); | |
50 | + } else { | |
51 | + log.error("[ {} ] - {}", e.getClass().getSimpleName(), e.getMessage()); | |
52 | + } | |
53 | + e.printStackTrace(); | |
54 | + } | |
55 | + | |
56 | + /** | |
57 | + * @param dae - DataAccessException 예외 객체 | |
58 | + * @return 유효성 검사 실패에 대한 HTTP 응답 | |
59 | + * | |
60 | + * SQL 예외 처리 | |
61 | + */ | |
62 | + @ExceptionHandler(DataAccessException.class) | |
63 | + public ResponseEntity<?> handleDataAccessException(DataAccessException dae) { | |
64 | + logError(dae); | |
65 | +// String msg = dae.getMessage().toLowerCase(); | |
66 | +// if(msg.contains("null value")) { | |
67 | +// return resUtil.errorRes(MessageCode.SQL_NULL_VALUE); | |
68 | +// } else if(msg.contains("duplicate key")) { | |
69 | +// return resUtil.errorRes(MessageCode.SQL_DUPLICATE_KEY); | |
70 | +// } | |
71 | + return resUtil.errorRes(MessageCode.COMMON_UNKNOWN_ERROR); | |
72 | + } | |
73 | + | |
74 | + /** | |
75 | + * @param mave - MethodArgumentNotValidException 예외 객체 | |
76 | + * @return 유효성 검사 실패에 대한 HTTP 응답 | |
77 | + * | |
78 | + * 유효성 검증에 실패한 경우 | |
79 | + */ | |
80 | + @ExceptionHandler(MethodArgumentNotValidException.class) | |
81 | + public ResponseEntity<?> handleValidationException(MethodArgumentNotValidException mave) { | |
82 | + logError(mave); | |
83 | + String message = mave.getBindingResult().getFieldErrors().stream() | |
84 | + .findFirst() | |
85 | + .map(error -> error.getDefaultMessage()) | |
86 | + .orElse("유효성 검증에 실패했습니다."); | |
87 | + return resUtil.errorRes(HttpStatus.BAD_REQUEST, message); | |
88 | + } | |
89 | + | |
90 | + /** | |
91 | + * @param ne - NullPointerException 예외 객체 | |
92 | + * @return NullPointerException에 대한 HTTP 응답 | |
93 | + * | |
94 | + * NullPointerException이 발생한 경우 | |
95 | + */ | |
96 | + @ExceptionHandler(NullPointerException.class) | |
97 | + public ResponseEntity<?> handleNullPointerException(NullPointerException ne) { | |
98 | + logError(ne); | |
99 | + return resUtil.errorRes(MessageCode.COMMON_NULL_POINT); | |
100 | + } | |
101 | + | |
102 | + /** | |
103 | + * @param ie - IllegalArgumentException 예외 객체 | |
104 | + * @return IllegalArgumentException에 대한 HTTP 응답 | |
105 | + * | |
106 | + * IllegalArgumentException이 발생한 경우 | |
107 | + */ | |
108 | + @ExceptionHandler(IllegalArgumentException.class) | |
109 | + public ResponseEntity<?> handleIllegalArgumentException(IllegalArgumentException ie) { | |
110 | + logError(ie); | |
111 | + return resUtil.errorRes(MessageCode.COMMON_ILLEGAL_ARGUMENT); | |
112 | + } | |
113 | + | |
114 | + /** | |
115 | + * @param nrfe - NoResourceFoundException 예외 객체 | |
116 | + * @return NoResourceFoundException 대한 HTTP 응답 | |
117 | + * | |
118 | + * NoResourceFoundException이 발생한 경우 | |
119 | + */ | |
120 | + @ExceptionHandler(NoResourceFoundException.class) | |
121 | + public ResponseEntity<?> handleNoResourceFoundException(NoResourceFoundException nrfe) { | |
122 | + logError(nrfe); | |
123 | + return resUtil.errorRes(MessageCode.COMMON_BAD_REQUEST); | |
124 | + } | |
125 | + | |
126 | + /** | |
127 | + * @param hrmnse - HttpRequestMethodNotSupportedException 예외 객체 | |
128 | + * @return HttpRequestMethodNotSupportedException 대한 HTTP 응답 | |
129 | + * | |
130 | + * HttpRequestMethodNotSupportedException이 발생한 경우 | |
131 | + */ | |
132 | + @ExceptionHandler(HttpRequestMethodNotSupportedException.class) | |
133 | + public ResponseEntity<?> handleHttpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException hrmnse) { | |
134 | + logError(hrmnse); | |
135 | + return resUtil.errorRes(MessageCode.COMMON_METHOD_NOT_ALLOWED); | |
136 | + } | |
137 | + | |
138 | + /** | |
139 | + * @param cite - CustomIdTakenException 예외 객체 | |
140 | + * @return CustomIdTakenException에 대한 HTTP 응답 | |
141 | + * | |
142 | + * CustomIdTakenException이 발생한 경우 | |
143 | + */ | |
144 | + @ExceptionHandler(CustomIdTakenException.class) | |
145 | + public ResponseEntity<?> handleCustomIdTakenException(CustomIdTakenException cite) { | |
146 | + logError(cite); | |
147 | + return resUtil.errorRes(MessageCode.SIGNUP_ID_TAKEN); | |
148 | + } | |
149 | + | |
150 | + /** | |
151 | + * @param cbre - CustomBadRequestException 예외 객체 | |
152 | + * @return CustomBadRequestException에 대한 HTTP 응답 | |
153 | + * | |
154 | + * CustomBadRequestException이 발생한 경우 | |
155 | + */ | |
156 | + @ExceptionHandler(CustomBadRequestException.class) | |
157 | + public ResponseEntity<?> handleCustomBadRequestException(CustomBadRequestException cbre) { | |
158 | + logError(cbre); | |
159 | + return resUtil.errorRes(MessageCode.COMMON_BAD_REQUEST); | |
160 | + } | |
161 | + | |
162 | + /** | |
163 | + * @param cade - CustomAccessDeniedException 예외 객체 | |
164 | + * @return CustomAccessDeniedException에 대한 HTTP 응답 | |
165 | + * | |
166 | + * CustomAccessDeniedException이 발생한 경우 | |
167 | + */ | |
168 | + @ExceptionHandler(CustomAccessDeniedException.class) | |
169 | + public ResponseEntity<?> handleCustomAccessDeniedException(CustomAccessDeniedException cade) { | |
170 | + logError(cade); | |
171 | + return resUtil.errorRes(MessageCode.ACCESS_DENIED); | |
172 | + } | |
173 | + | |
174 | + /** | |
175 | + * @param cpce - CustomPasswordComparisonException 예외 객체 | |
176 | + * @return CustomPasswordComparisonException에 대한 HTTP 응답 | |
177 | + * | |
178 | + * CustomPasswordComparisonException이 발생한 경우 | |
179 | + */ | |
180 | + @ExceptionHandler(CustomPasswordComparisonException.class) | |
181 | + public ResponseEntity<?> handleCustomPasswordComparisonException(CustomPasswordComparisonException cpce) { | |
182 | + logError(cpce); | |
183 | + return resUtil.errorRes(MessageCode.LOGIN_INVALID_CREDENTIALS); | |
184 | + } | |
185 | + | |
186 | + /** | |
187 | + * @param cfe - CustomNotFoundException 예외 객체 | |
188 | + * @return CustomNotFoundException에 대한 HTTP 응답 | |
189 | + * | |
190 | + * CustomNotFoundException 발생한 경우 | |
191 | + */ | |
192 | + @ExceptionHandler(CustomNotFoundException.class) | |
193 | + public ResponseEntity<?> handleNotFoundException(CustomNotFoundException cfe) { | |
194 | + logError(cfe); | |
195 | + return resUtil.errorRes(MessageCode.COMMON_NOT_FOUND); | |
196 | + } | |
197 | + | |
198 | + /** | |
199 | + * @param cife - CustomInsertFailException 예외 객체 | |
200 | + * @return CustomInsertFailException에 대한 HTTP 응답 | |
201 | + * | |
202 | + * CustomInsertFailException이 발생한 경우 | |
203 | + */ | |
204 | + @ExceptionHandler(CustomInsertFailException.class) | |
205 | + public ResponseEntity<?> handleCustomInsertFailException(CustomInsertFailException cife) { | |
206 | + logError(cife); | |
207 | + return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); | |
208 | + } | |
209 | + | |
210 | + /** | |
211 | + * @param cufe - CustomUpdateFailException 예외 객체 | |
212 | + * @return CustomUpdateFailException에 대한 HTTP 응답 | |
213 | + * | |
214 | + * CustomUpdateFailException이 발생한 경우 | |
215 | + */ | |
216 | + @ExceptionHandler(CustomUpdateFailException.class) | |
217 | + public ResponseEntity<?> handleCustomUpdateFailException(CustomUpdateFailException cufe) { | |
218 | + logError(cufe); | |
219 | + return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); | |
220 | + } | |
221 | + | |
222 | + /** | |
223 | + * @param cdfe - CustomDeleteFailException 예외 객체 | |
224 | + * @return CustomDeleteFailException에 대한 HTTP 응답 | |
225 | + * | |
226 | + * CustomDeleteFailException 발생한 경우 | |
227 | + */ | |
228 | + @ExceptionHandler(CustomDeleteFailException.class) | |
229 | + public ResponseEntity<?> handleCustomDeleteFailException(CustomDeleteFailException cdfe) { | |
230 | + logError(cdfe); | |
231 | + return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); | |
232 | + } | |
233 | + | |
234 | + /** | |
235 | + * @param ukhe - UnknownHostException 예외 객체 | |
236 | + * @return UnknownHostException에 대한 HTTP 응답 | |
237 | + * | |
238 | + * UnknownHostException 발생한 경우 | |
239 | + */ | |
240 | + @ExceptionHandler(UnknownHostException.class) | |
241 | + public ResponseEntity<?> handleUnknownHostException(UnknownHostException ukhe) { | |
242 | + logError(ukhe); | |
243 | + return resUtil.errorRes(MessageCode.NETWORK_UNKNOWN_HOST); | |
244 | + } | |
245 | + | |
246 | + /** | |
247 | + * @param e - Exception 예외 객체 | |
248 | + * @return 기타 예외에 대한 HTTP 응답 | |
249 | + * | |
250 | + * 그 외 모든 예외가 발생한 경우 | |
251 | + */ | |
252 | + @ExceptionHandler(Exception.class) | |
253 | + public ResponseEntity<?> handleException(Exception e) { | |
254 | + logError(e); | |
255 | + return resUtil.errorRes(MessageCode.COMMON_UNKNOWN_ERROR); | |
256 | + } | |
257 | +} |
--- src/main/java/com/takensoft/common/file/web/FileController.java
+++ src/main/java/com/takensoft/common/file/web/FileController.java
... | ... | @@ -12,8 +12,8 @@ |
12 | 12 |
import org.springframework.web.multipart.MultipartHttpServletRequest; |
13 | 13 |
import org.springframework.web.multipart.MultipartRequest; |
14 | 14 |
|
15 |
-import javax.servlet.http.HttpServletRequest; |
|
16 |
-import javax.servlet.http.HttpServletResponse; |
|
15 |
+import jakarta.servlet.http.HttpServletRequest; |
|
16 |
+import jakarta.servlet.http.HttpServletResponse; |
|
17 | 17 |
import java.io.*; |
18 | 18 |
import java.net.URLEncoder; |
19 | 19 |
import java.time.LocalDateTime; |
--- src/main/java/com/takensoft/common/filter/AccesFilter.java
+++ src/main/java/com/takensoft/common/filter/AccesFilter.java
... | ... | @@ -11,10 +11,10 @@ |
11 | 11 |
import org.springframework.security.web.util.matcher.AntPathRequestMatcher; |
12 | 12 |
import org.springframework.web.filter.OncePerRequestFilter; |
13 | 13 |
|
14 |
-import javax.servlet.FilterChain; |
|
15 |
-import javax.servlet.ServletException; |
|
16 |
-import javax.servlet.http.HttpServletRequest; |
|
17 |
-import javax.servlet.http.HttpServletResponse; |
|
14 |
+import jakarta.servlet.FilterChain; |
|
15 |
+import jakarta.servlet.ServletException; |
|
16 |
+import jakarta.servlet.http.HttpServletRequest; |
|
17 |
+import jakarta.servlet.http.HttpServletResponse; |
|
18 | 18 |
import java.io.IOException; |
19 | 19 |
import java.time.LocalDateTime; |
20 | 20 |
import java.util.List; |
--- src/main/java/com/takensoft/common/filter/JWTFilter.java
+++ src/main/java/com/takensoft/common/filter/JWTFilter.java
... | ... | @@ -16,10 +16,10 @@ |
16 | 16 |
import org.springframework.security.core.context.SecurityContextHolder; |
17 | 17 |
import org.springframework.web.filter.OncePerRequestFilter; |
18 | 18 |
|
19 |
-import javax.servlet.FilterChain; |
|
20 |
-import javax.servlet.ServletException; |
|
21 |
-import javax.servlet.http.HttpServletRequest; |
|
22 |
-import javax.servlet.http.HttpServletResponse; |
|
19 |
+import jakarta.servlet.FilterChain; |
|
20 |
+import jakarta.servlet.ServletException; |
|
21 |
+import jakarta.servlet.http.HttpServletRequest; |
|
22 |
+import jakarta.servlet.http.HttpServletResponse; |
|
23 | 23 |
import java.io.IOException; |
24 | 24 |
import java.time.LocalDateTime; |
25 | 25 |
import java.util.List; |
--- src/main/java/com/takensoft/common/filter/LoginFilter.java
+++ src/main/java/com/takensoft/common/filter/LoginFilter.java
... | ... | @@ -22,10 +22,10 @@ |
22 | 22 |
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; |
23 | 23 |
import org.springframework.security.web.util.matcher.AntPathRequestMatcher; |
24 | 24 |
|
25 |
-import javax.servlet.FilterChain; |
|
26 |
-import javax.servlet.ServletException; |
|
27 |
-import javax.servlet.http.HttpServletRequest; |
|
28 |
-import javax.servlet.http.HttpServletResponse; |
|
25 |
+import jakarta.servlet.FilterChain; |
|
26 |
+import jakarta.servlet.ServletException; |
|
27 |
+import jakarta.servlet.http.HttpServletRequest; |
|
28 |
+import jakarta.servlet.http.HttpServletResponse; |
|
29 | 29 |
import java.io.IOException; |
30 | 30 |
import java.time.LocalDateTime; |
31 | 31 |
import java.util.List; |
+++ src/main/java/com/takensoft/common/message/MessageCode.java
... | ... | @@ -0,0 +1,67 @@ |
1 | +package com.takensoft.common.message; | |
2 | + | |
3 | +import lombok.AllArgsConstructor; | |
4 | +import lombok.Getter; | |
5 | +import org.springframework.http.HttpStatus; | |
6 | + | |
7 | +/** | |
8 | + * @author takensoft | |
9 | + * @since 2025.01.22 | |
10 | + * @modification | |
11 | + * since | author | description | |
12 | + * 2025.01.22 | takensoft | 최초 등록 | |
13 | + * | |
14 | + * 시스템에서 발생할 수 있는 코드 메시지들을 정의 | |
15 | + */ | |
16 | +@AllArgsConstructor | |
17 | +@Getter | |
18 | +public enum MessageCode { | |
19 | + // 공통 | |
20 | + COMMON_SUCCESS("common.success", HttpStatus.OK), // 처리 성공 | |
21 | + COMMON_UNKNOWN_ERROR("common.unknown", HttpStatus.INTERNAL_SERVER_ERROR), // 일반적인 오류 발생 | |
22 | + COMMON_BAD_REQUEST("common.bad_request", HttpStatus.BAD_REQUEST), // 잘못된 요청 | |
23 | + COMMON_NULL_POINT("common.null_point", HttpStatus.BAD_REQUEST), // NullPointer 발생 | |
24 | + COMMON_ILLEGAL_ARGUMENT("common.illegal_argument", HttpStatus.BAD_REQUEST), // IllegalArgument 발생 | |
25 | + COMMON_NOT_FOUND("common.not_found", HttpStatus.NOT_FOUND), // 정보가 존재 하지 않음 | |
26 | + COMMON_METHOD_NOT_ALLOWED("common.method_not_allowed", HttpStatus.METHOD_NOT_ALLOWED), // 지원하지 않는 HTTP 메서드 | |
27 | + COMMON_INSERT_FAIL("common.insert_fail", HttpStatus.INTERNAL_SERVER_ERROR), // 등록 실패 시 | |
28 | + COMMON_UPDATE_FAIL("common.update_fail", HttpStatus.INTERNAL_SERVER_ERROR), // 수정 실패 시 | |
29 | + COMMON_DELETE_FAIL("common.delete_fail", HttpStatus.INTERNAL_SERVER_ERROR), // 삭제 실패 시 | |
30 | + COMMON_PAYLOAD_TOO_LARGE("common.payload_too_large",HttpStatus.PAYLOAD_TOO_LARGE), //파일 용량 초과 시 | |
31 | + COMMON_DUPLICATION_CODE("common.duplication_code",HttpStatus.INTERNAL_SERVER_ERROR), //중복 코드 | |
32 | + COMMON_DUPLICATION_DATA("common.duplication_data",HttpStatus.INTERNAL_SERVER_ERROR), //중복 데이터 | |
33 | + | |
34 | + //네트워크 관련 | |
35 | + NETWORK_UNKNOWN_HOST("network.unknown_host", HttpStatus.BAD_REQUEST), // 알 수 없는 호스트 | |
36 | + | |
37 | + // SQL 관련 | |
38 | + SQL_NULL_VALUE("sql.null_value", HttpStatus.BAD_REQUEST), // Null 값 위반 | |
39 | + SQL_DUPLICATE_KEY("sql.duplicate_key", HttpStatus.CONFLICT), // 중복 키 위반 | |
40 | + SQL_DATA_INTEGRITY("sql.data_integrity", HttpStatus.BAD_REQUEST), // 데이터 무결성 위반 | |
41 | + SQL_UNKNOWN("sql.unknown", HttpStatus.INTERNAL_SERVER_ERROR), // 알 수 없는 SQL 에러 | |
42 | + | |
43 | + // jwt 관련 | |
44 | + JWT_EXPIRED("jwt.expired", HttpStatus.UNAUTHORIZED), // JWT 토큰 만료 | |
45 | + JWT_SIGNATURE_INVALID("jwt.signature_invalid", HttpStatus.UNAUTHORIZED), // JWT 서명 오류 | |
46 | + JWT_INSUFFICIENT_AUTHENTICATION("jwt.insufficient_authentication", HttpStatus.FORBIDDEN), // 인증 정보 부족 | |
47 | + | |
48 | + // 접근 관련 | |
49 | + ACCESS_DENIED("access.denied", HttpStatus.FORBIDDEN), // 권한 없음 | |
50 | + UNAUTHORIZED_ACCESS("access.unauthorized", HttpStatus.UNAUTHORIZED), // 잘못된 접근 | |
51 | + | |
52 | + // 사용자 관련 | |
53 | + SIGNUP_SUCCESS("user.signup.success", HttpStatus.OK), // 회원가입 성공 | |
54 | + SIGNUP_ID_TAKEN("user.signup.id_taken", HttpStatus.CONFLICT), // 아이디 중복 | |
55 | + SIGNUP_EMAIL_TAKEN("user.signup.email_taken", HttpStatus.CONFLICT), // 이메일 중복 | |
56 | + LOGIN_USER_NOT_FOUND("user.login.user_not_found", HttpStatus.NOT_FOUND), // 사용자가 존재 하지 않는 경우 | |
57 | + LOGIN_INVALID_CREDENTIALS("user.login.invalid_credentials", HttpStatus.UNAUTHORIZED), // 비밀번호 불일치 | |
58 | + LOGIN_AUTHENTICATION_REQUIRED("user.login.authentication_required", HttpStatus.FORBIDDEN), // 인증 거부 | |
59 | + LOGIN_ACCOUNT_LOCKED("user.login.account_locked", HttpStatus.LOCKED), // 계정 잠김 상태 | |
60 | + LOGIN_ACCOUNT_DISABLED("user.login.account_disabled", HttpStatus.FORBIDDEN), // 계정 비활성화 | |
61 | + LOGIN_ACCOUNT_EXPIRED("user.login.account_expired", HttpStatus.FORBIDDEN), // 계정 만료 | |
62 | + LOGIN_CREDENTIALS_EXPIRED("user.login.credentials_expired", HttpStatus.FORBIDDEN), // 비밀번호 유효기간 만료 | |
63 | + LOGOUT_SUCCESS("user.logout.success", HttpStatus.OK); // 로그아웃 성공 | |
64 | + | |
65 | + private final String messageKey; // 메시지 | |
66 | + private final HttpStatus status; // HTTP 상태 | |
67 | +}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/common/util/CommonUtils.java
+++ src/main/java/com/takensoft/common/util/CommonUtils.java
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 |
|
3 | 3 |
import org.springframework.stereotype.Component; |
4 | 4 |
|
5 |
-import javax.servlet.http.HttpServletRequest; |
|
5 |
+import jakarta.servlet.http.HttpServletRequest; |
|
6 | 6 |
import java.net.InetAddress; |
7 | 7 |
import java.net.UnknownHostException; |
8 | 8 |
|
--- src/main/java/com/takensoft/common/util/CustomAccessDenieHandler.java
... | ... | @@ -1,50 +0,0 @@ |
1 | -package com.takensoft.common.util; | |
2 | - | |
3 | -import com.takensoft.common.config.CommonConfig; | |
4 | -import lombok.RequiredArgsConstructor; | |
5 | -import lombok.extern.slf4j.Slf4j; | |
6 | -import org.springframework.http.HttpStatus; | |
7 | -import org.springframework.http.MediaType; | |
8 | -import org.springframework.security.access.AccessDeniedException; | |
9 | -import org.springframework.security.web.access.AccessDeniedHandler; | |
10 | -import org.springframework.stereotype.Component; | |
11 | - | |
12 | -import javax.servlet.ServletException; | |
13 | -import javax.servlet.http.HttpServletRequest; | |
14 | -import javax.servlet.http.HttpServletResponse; | |
15 | -import java.io.IOException; | |
16 | -import java.time.LocalDateTime; | |
17 | - | |
18 | -/** | |
19 | - * @author : takensoft | |
20 | - * @since : 2024.04.05 | |
21 | - * | |
22 | - * 인가(권한) 에러 | |
23 | - * AccessDeniedHandler를 커스텀하여 접근 거부된 요청에 대한 처리 | |
24 | - */ | |
25 | -@Component | |
26 | -@Slf4j | |
27 | -@RequiredArgsConstructor | |
28 | -public class CustomAccessDenieHandler implements AccessDeniedHandler { | |
29 | - | |
30 | - private final CommonConfig commonConfig; | |
31 | - | |
32 | - @Override | |
33 | - public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException, ServletException { | |
34 | - // 접근 거부 예외에 대한 로그 출력 | |
35 | - log.error("Access Denied Exception: {}", accessDeniedException.getMessage()); | |
36 | - | |
37 | - // 접근 거부 에러 응답을 위한 객체 생성 | |
38 | - ErrorResponse errorResponse = new ErrorResponse(); | |
39 | - errorResponse.setMessage("Access Denied"); // 에러 응답 메시지 설정 | |
40 | - errorResponse.setPath(request.getRequestURI()); // 요청 경로 설정 | |
41 | - errorResponse.setError(HttpStatus.FORBIDDEN.getReasonPhrase()); // 에러 메시지 설정 | |
42 | - errorResponse.setStatus(HttpStatus.FORBIDDEN.value()); // 에러 상태 코드 설정 | |
43 | - errorResponse.setTimestamp(LocalDateTime.now()); // 응답 시간 설정 | |
44 | - | |
45 | - // 응답 헤더 설정 및 json 응답 전송 | |
46 | - response.setContentType(MediaType.APPLICATION_JSON_VALUE); | |
47 | - response.setStatus(HttpStatus.FORBIDDEN.value()); | |
48 | - response.getOutputStream().write(commonConfig.getObjectMapper().writeValueAsBytes(errorResponse)); | |
49 | - } | |
50 | -} |
--- src/main/java/com/takensoft/common/util/CustomAuthenticationEntryPoint.java
... | ... | @@ -1,55 +0,0 @@ |
1 | -package com.takensoft.common.util; | |
2 | - | |
3 | -import com.takensoft.common.config.CommonConfig; | |
4 | -import lombok.RequiredArgsConstructor; | |
5 | -import lombok.extern.slf4j.Slf4j; | |
6 | -import org.springframework.http.HttpStatus; | |
7 | -import org.springframework.http.MediaType; | |
8 | -import org.springframework.security.core.AuthenticationException; | |
9 | -import org.springframework.security.web.AuthenticationEntryPoint; | |
10 | -import org.springframework.stereotype.Component; | |
11 | - | |
12 | -import javax.servlet.ServletException; | |
13 | -import javax.servlet.http.HttpServletRequest; | |
14 | -import javax.servlet.http.HttpServletResponse; | |
15 | -import java.io.IOException; | |
16 | -import java.time.LocalDateTime; | |
17 | - | |
18 | -/** | |
19 | - * @author : takensoft | |
20 | - * @since : 2024.04.05 | |
21 | - * | |
22 | - * 인증 에러 | |
23 | - * AuthenticationEntryPoint 커스텀하여 인증이 실패한 경우에 대한 처리 | |
24 | - */ | |
25 | -@Component | |
26 | -@Slf4j | |
27 | -@RequiredArgsConstructor | |
28 | -public class CustomAuthenticationEntryPoint implements AuthenticationEntryPoint { | |
29 | - | |
30 | - private final CommonConfig commonConfig; | |
31 | - | |
32 | - @Override | |
33 | - public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { | |
34 | - // 사용자의 요청이 인증되지 않았을 때 로그 출력 | |
35 | - log.info("Unauthorized user request: {}", authException.getMessage()); | |
36 | - // 요청자의 IP 주소 로그 출력 | |
37 | - log.info("Requester IP: {}", request.getRemoteAddr()); | |
38 | - // 요청 URI 로그 출력 | |
39 | - log.info("Request URI: {}", request.getRequestURI()); | |
40 | - | |
41 | - // 접근 거부 에러 응답을 위한 객체 생성 | |
42 | - ErrorResponse errorResponse = new ErrorResponse(); | |
43 | - errorResponse.setMessage("Token expired"); // 에러 응답 메시지 설정 | |
44 | -// errorResponse.setMessage("인증에러 발생: " + authException.getMessage()); // 에러 응답 메시지 설정 | |
45 | - errorResponse.setPath(request.getRequestURI()); // 요청 경로 설정 | |
46 | - errorResponse.setError(HttpStatus.UNAUTHORIZED.getReasonPhrase()); // 오류 원인 설정 | |
47 | - errorResponse.setStatus(HttpStatus.UNAUTHORIZED.value()); // 상태 코드 설정 | |
48 | - errorResponse.setTimestamp(LocalDateTime.now()); // 응답 시간 설정 | |
49 | - | |
50 | - // 응답 헤더 설정 및 json 응답 전송 | |
51 | - response.setContentType(MediaType.APPLICATION_JSON_VALUE); | |
52 | - response.setStatus(HttpStatus.UNAUTHORIZED.value()); | |
53 | - response.getOutputStream().write(commonConfig.getObjectMapper().writeValueAsBytes(errorResponse)); | |
54 | - } | |
55 | -} |
--- src/main/java/com/takensoft/common/util/JWTUtil.java
+++ src/main/java/com/takensoft/common/util/JWTUtil.java
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 |
|
14 | 14 |
import javax.crypto.SecretKey; |
15 | 15 |
import javax.crypto.spec.SecretKeySpec; |
16 |
-import javax.servlet.http.Cookie; |
|
16 |
+import jakarta.servlet.http.Cookie; |
|
17 | 17 |
import java.nio.charset.StandardCharsets; |
18 | 18 |
import java.util.*; |
19 | 19 |
|
--- src/main/java/com/takensoft/common/util/ResponseData.java
+++ src/main/java/com/takensoft/common/util/ResponseData.java
... | ... | @@ -1,7 +1,11 @@ |
1 | 1 |
package com.takensoft.common.util; |
2 | 2 |
|
3 |
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize; |
|
4 |
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; |
|
3 | 5 |
import lombok.Data; |
4 | 6 |
import org.springframework.http.HttpStatus; |
7 |
+ |
|
8 |
+import java.time.LocalDateTime; |
|
5 | 9 |
|
6 | 10 |
/** |
7 | 11 |
* @author takensoft |
... | ... | @@ -11,13 +15,26 @@ |
11 | 15 |
@Data |
12 | 16 |
public class ResponseData { |
13 | 17 |
|
14 |
- private HttpStatus status; |
|
18 |
+ /*private HttpStatus status; |
|
15 | 19 |
private String message; |
16 |
- private Object data; |
|
20 |
+ private Object data;*/ |
|
21 |
+ |
|
22 |
+ private int status; // 상태 코드 |
|
23 |
+ private HttpStatus statusText; // 상태 메시지 |
|
24 |
+ private String message; // 전달 메시지 |
|
25 |
+ private Object data; // 전달 데이터 |
|
26 |
+ |
|
27 |
+ @JsonDeserialize(using = LocalDateTimeDeserializer.class) |
|
28 |
+ private LocalDateTime resTime; // 응답 시간 |
|
17 | 29 |
|
18 | 30 |
public ResponseData() { |
19 |
- this.status = HttpStatus.BAD_REQUEST; |
|
31 |
+ /*this.status = HttpStatus.BAD_REQUEST; |
|
20 | 32 |
this.data = null; |
33 |
+ this.message = null;*/ |
|
34 |
+ this.status = 0; |
|
35 |
+ this.statusText = null; |
|
21 | 36 |
this.message = null; |
37 |
+ this.data = null; |
|
38 |
+ this.resTime = LocalDateTime.now(); |
|
22 | 39 |
} |
23 | 40 |
} |
+++ src/main/java/com/takensoft/common/util/ResponseUtil.java
... | ... | @@ -0,0 +1,96 @@ |
1 | +package com.takensoft.common.util; | |
2 | + | |
3 | + | |
4 | +import com.takensoft.common.message.MessageCode; | |
5 | +import lombok.RequiredArgsConstructor; | |
6 | +import org.springframework.context.MessageSource; | |
7 | +import org.springframework.context.i18n.LocaleContextHolder; | |
8 | +import org.springframework.http.HttpHeaders; | |
9 | +import org.springframework.http.HttpStatus; | |
10 | +import org.springframework.http.MediaType; | |
11 | +import org.springframework.http.ResponseEntity; | |
12 | +import org.springframework.stereotype.Component; | |
13 | + | |
14 | +import java.nio.charset.Charset; | |
15 | + | |
16 | +/** | |
17 | + * @author : takensoft | |
18 | + * @since : 2025.01.22 | |
19 | + * @modification | |
20 | + * since | author | description | |
21 | + * 2025.01.22 | takensoft | 최초 등록 | |
22 | + * | |
23 | + * HTTP 응답 처리를 위한 유틸리티 | |
24 | + */ | |
25 | +@Component | |
26 | +@RequiredArgsConstructor | |
27 | +public class ResponseUtil { | |
28 | + | |
29 | + private final MessageSource messageSource; | |
30 | + | |
31 | + /** | |
32 | + * @return JSON 응답을 위한 HttpHeaders 객체 | |
33 | + * | |
34 | + * HTTp 해더 생성성 | |
35 | + */ | |
36 | + private static HttpHeaders createHeaders() { | |
37 | + HttpHeaders headers = new HttpHeaders(); | |
38 | + headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); | |
39 | + return headers; | |
40 | + } | |
41 | + | |
42 | + /** | |
43 | + * @param messageCode - 메시지 코드 | |
44 | + * @return 다국어 메시지 | |
45 | + * | |
46 | + * 다국어 메시지 호출 | |
47 | + */ | |
48 | + private String getMessage(MessageCode messageCode) { | |
49 | + return messageSource.getMessage(messageCode.getMessageKey(), null, LocaleContextHolder.getLocale()); | |
50 | + } | |
51 | + | |
52 | + /** | |
53 | + * @param data - 응답 데이터 | |
54 | + * @param messageCode - 응답 메시지 코드 | |
55 | + * @return 성공 응답 결과 | |
56 | + * | |
57 | + * 성공 응답 생성 | |
58 | + */ | |
59 | + public ResponseEntity<?> successRes(Object data, MessageCode messageCode) { | |
60 | + ResponseData responseData = new ResponseData(); | |
61 | + responseData.setStatus(messageCode.getStatus().value()); | |
62 | + responseData.setStatusText(messageCode.getStatus()); | |
63 | + responseData.setMessage(getMessage(messageCode)); | |
64 | + responseData.setData(data); | |
65 | + return new ResponseEntity<>(responseData, createHeaders(), HttpStatus.OK); | |
66 | + } | |
67 | + | |
68 | + /** | |
69 | + * @param status - HTTP 상태 코드 | |
70 | + * @param message - 에러 메시지 | |
71 | + * @return 에러 응답 결과 | |
72 | + * | |
73 | + * 에러 응답 생성 | |
74 | + */ | |
75 | + public ResponseEntity<?> errorRes(HttpStatus status, String message) { | |
76 | + ResponseData responseData = new ResponseData(); | |
77 | + responseData.setStatus(status.value()); | |
78 | + responseData.setStatusText(status); | |
79 | + responseData.setMessage(message); | |
80 | + return new ResponseEntity<>(responseData, createHeaders(), status); | |
81 | + } | |
82 | + | |
83 | + /** | |
84 | + * @param messageCode - 응답 메시지 코드 | |
85 | + * @return 에러 응답 결과 | |
86 | + * | |
87 | + * 에러 응답 생성 | |
88 | + */ | |
89 | + public ResponseEntity<?> errorRes(MessageCode messageCode) { | |
90 | + ResponseData responseData = new ResponseData(); | |
91 | + responseData.setStatus(messageCode.getStatus().value()); | |
92 | + responseData.setStatusText(messageCode.getStatus()); | |
93 | + responseData.setMessage(getMessage(messageCode)); | |
94 | + return new ResponseEntity<>(responseData, createHeaders(), messageCode.getStatus()); | |
95 | + } | |
96 | +} |
--- src/main/java/com/takensoft/portal/entDscsnAply/service/EntDscsnAplyService.java
+++ src/main/java/com/takensoft/portal/entDscsnAply/service/EntDscsnAplyService.java
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 |
import com.takensoft.portal.entDscsnAply.vo.EntDscsnAplyVO; |
5 | 5 |
import org.springframework.web.multipart.MultipartFile; |
6 | 6 |
|
7 |
-import javax.servlet.http.HttpServletRequest; |
|
7 |
+import jakarta.servlet.http.HttpServletRequest; |
|
8 | 8 |
import java.util.*; |
9 | 9 |
|
10 | 10 |
/** |
--- src/main/java/com/takensoft/portal/entDscsnAply/service/Impl/EntDscsnAplyServiceImpl.java
+++ src/main/java/com/takensoft/portal/entDscsnAply/service/Impl/EntDscsnAplyServiceImpl.java
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
import org.springframework.transaction.annotation.Transactional; |
19 | 19 |
import org.springframework.web.multipart.MultipartFile; |
20 | 20 |
|
21 |
-import javax.servlet.http.HttpServletRequest; |
|
21 |
+import jakarta.servlet.http.HttpServletRequest; |
|
22 | 22 |
import java.io.IOException; |
23 | 23 |
import java.util.*; |
24 | 24 |
|
--- src/main/java/com/takensoft/portal/entDscsnAply/web/EntDscsnAplyController.java
+++ src/main/java/com/takensoft/portal/entDscsnAply/web/EntDscsnAplyController.java
... | ... | @@ -1,7 +1,9 @@ |
1 | 1 |
package com.takensoft.portal.entDscsnAply.web; |
2 | 2 |
|
3 | 3 |
import com.takensoft.common.file.service.FileService; |
4 |
+import com.takensoft.common.message.MessageCode; |
|
4 | 5 |
import com.takensoft.common.util.ResponseData; |
6 |
+import com.takensoft.common.util.ResponseUtil; |
|
5 | 7 |
import com.takensoft.portal.entDscsnAply.service.EntDscsnAplyService; |
6 | 8 |
import com.takensoft.portal.entDscsnAply.vo.EntDscsnAplyVO; |
7 | 9 |
import lombok.RequiredArgsConstructor; |
... | ... | @@ -11,21 +13,24 @@ |
11 | 13 |
import org.springframework.http.ResponseEntity; |
12 | 14 |
import org.springframework.web.bind.annotation.*; |
13 | 15 |
|
14 |
-import javax.servlet.http.HttpServletRequest; |
|
16 |
+import jakarta.servlet.http.HttpServletRequest; |
|
15 | 17 |
import java.nio.charset.Charset; |
16 | 18 |
import java.util.*; |
17 |
- |
|
18 | 19 |
/** |
19 |
- * @author : 박정하 |
|
20 |
- * @since : 2024.04.02 |
|
20 |
+ * @author 박정하 |
|
21 |
+ * @since 2024.04.02 |
|
22 |
+ * @modification |
|
23 |
+ * since | author | description |
|
24 |
+ * 2024.04.02 | 박정하 | 최초 등록 |
|
21 | 25 |
* |
22 |
- * 기업상담신청 관련 컨트롤러 |
|
26 |
+ * 기업상담신청 관련 Controller |
|
23 | 27 |
*/ |
24 | 28 |
@RestController |
25 | 29 |
@RequiredArgsConstructor |
26 | 30 |
public class EntDscsnAplyController { |
27 | 31 |
private final EntDscsnAplyService entDscsnAplyService; |
28 | 32 |
private final FileService fileService; |
33 |
+ private final ResponseUtil resUtil; |
|
29 | 34 |
|
30 | 35 |
/** |
31 | 36 |
* @author 박정하 |
... | ... | @@ -46,22 +51,17 @@ |
46 | 51 |
headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
47 | 52 |
ResponseData responseData = new ResponseData(); |
48 | 53 |
if (insertResult > 0) { |
49 |
- responseData.setStatus(HttpStatus.OK); |
|
50 |
- responseData.setMessage("정상적으로 문의 등록되었습니다."); |
|
51 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
54 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
52 | 55 |
} else if(insertResult < 0) { |
53 |
- responseData.setStatus(HttpStatus.PAYLOAD_TOO_LARGE); |
|
54 |
- responseData.setMessage("업로드 가능한 파일 용량 제한을 초과했습니다."); |
|
55 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.PAYLOAD_TOO_LARGE); |
|
56 |
+ return resUtil.errorRes(MessageCode.COMMON_PAYLOAD_TOO_LARGE); |
|
56 | 57 |
} else { |
57 | 58 |
if (result.containsKey("writeCount") && result.containsKey("lastDatetime")) { |
58 |
- responseData.setStatus(HttpStatus.TOO_MANY_REQUESTS); |
|
59 |
+ responseData.setStatus(HttpStatus.TOO_MANY_REQUESTS.value()); |
|
60 |
+ responseData.setStatusText(HttpStatus.TOO_MANY_REQUESTS); |
|
59 | 61 |
responseData.setMessage("주어진 시간 동안 너무 많은 문의를 등록했습니다. " + result.get("lastDatetime") + " 후에 재시도하세요."); |
60 | 62 |
return new ResponseEntity<>(responseData, headers, HttpStatus.TOO_MANY_REQUESTS); |
61 | 63 |
} else { |
62 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
63 |
- responseData.setMessage("문의 등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
64 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
64 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
65 | 65 |
} |
66 | 66 |
} |
67 | 67 |
} |
... | ... | @@ -80,13 +80,7 @@ |
80 | 80 |
Map<String, Object> result = entDscsnAplyService.entDscsnAplyList(request, params); |
81 | 81 |
|
82 | 82 |
// 응답 처리 |
83 |
- HttpHeaders headers = new HttpHeaders(); |
|
84 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
85 |
- ResponseData responseData = new ResponseData(); |
|
86 |
- responseData.setStatus(HttpStatus.OK); |
|
87 |
- responseData.setMessage("정상적으로 기업상담신청 목록 조회가 처리되었습니다."); |
|
88 |
- responseData.setData(result); |
|
89 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
83 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
90 | 84 |
} |
91 | 85 |
|
92 | 86 |
/** |
... | ... | @@ -103,13 +97,7 @@ |
103 | 97 |
EntDscsnAplyVO result = entDscsnAplyService.entDscsnAplyDetail(entDscsnAplyVO); |
104 | 98 |
|
105 | 99 |
// 응답 처리 |
106 |
- HttpHeaders headers = new HttpHeaders(); |
|
107 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
108 |
- ResponseData responseData = new ResponseData(); |
|
109 |
- responseData.setStatus(HttpStatus.OK); |
|
110 |
- responseData.setMessage("정상적으로 기업상담신청 상세 조회가 처리되었습니다."); |
|
111 |
- responseData.setData(result); |
|
112 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
100 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
113 | 101 |
} |
114 | 102 |
|
115 | 103 |
/** |
... | ... | @@ -130,17 +118,11 @@ |
130 | 118 |
headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
131 | 119 |
ResponseData responseData = new ResponseData(); |
132 | 120 |
if (result > 0) { |
133 |
- responseData.setStatus(HttpStatus.OK); |
|
134 |
- responseData.setMessage("정상적으로 처리되었습니다."); |
|
135 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
121 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
136 | 122 |
} else if(result < 0) { |
137 |
- responseData.setStatus(HttpStatus.PAYLOAD_TOO_LARGE); |
|
138 |
- responseData.setMessage("업로드 가능한 파일 용량 제한을 초과했습니다."); |
|
139 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.PAYLOAD_TOO_LARGE); |
|
123 |
+ return resUtil.errorRes(MessageCode.COMMON_PAYLOAD_TOO_LARGE); |
|
140 | 124 |
} else { |
141 |
- responseData.setStatus(HttpStatus.BAD_REQUEST); |
|
142 |
- responseData.setMessage("요청 적용에 실패하였습니다.\n담당자에게 문의하세요."); |
|
143 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.BAD_REQUEST); |
|
125 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
144 | 126 |
} |
145 | 127 |
} |
146 | 128 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/portal/entInfo/web/EntInfoController.java
+++ src/main/java/com/takensoft/portal/entInfo/web/EntInfoController.java
... | ... | @@ -2,7 +2,9 @@ |
2 | 2 |
|
3 | 3 |
import com.takensoft.common.excel.service.ExcelService; |
4 | 4 |
import com.takensoft.common.exception.IdDuplicationException; |
5 |
+import com.takensoft.common.message.MessageCode; |
|
5 | 6 |
import com.takensoft.common.util.ResponseData; |
7 |
+import com.takensoft.common.util.ResponseUtil; |
|
6 | 8 |
import com.takensoft.portal.entInfo.dto.BplcExcelDTO; |
7 | 9 |
import com.takensoft.portal.entInfo.dto.EntInfoExcelDTO; |
8 | 10 |
import com.takensoft.portal.entInfo.service.EntInfoService; |
... | ... | @@ -15,15 +17,17 @@ |
15 | 17 |
import org.springframework.web.bind.annotation.*; |
16 | 18 |
import org.springframework.web.multipart.MultipartFile; |
17 | 19 |
|
18 |
-import javax.servlet.http.HttpServletResponse; |
|
20 |
+import jakarta.servlet.http.HttpServletResponse; |
|
19 | 21 |
import java.nio.charset.Charset; |
20 | 22 |
import java.util.*; |
21 |
- |
|
22 | 23 |
/** |
23 |
- * @author : 박정하 |
|
24 |
- * @since : 2024.03.20 |
|
24 |
+ * @author 박정하 |
|
25 |
+ * @since 2024.03.20 |
|
26 |
+ * @modification |
|
27 |
+ * since | author | description |
|
28 |
+ * 2024.03.20 | 박정하 | 최초 등록 |
|
25 | 29 |
* |
26 |
- * 기업정보 관련 컨트롤러 |
|
30 |
+ * 기업정보 관련 Controller |
|
27 | 31 |
*/ |
28 | 32 |
@RestController |
29 | 33 |
@RequiredArgsConstructor |
... | ... | @@ -31,6 +35,7 @@ |
31 | 35 |
public class EntInfoController { |
32 | 36 |
private final EntInfoService entInfoService; |
33 | 37 |
private final ExcelService excelService; |
38 |
+ private final ResponseUtil resUtil; |
|
34 | 39 |
|
35 | 40 |
/** |
36 | 41 |
* @author 박정하 |
... | ... | @@ -44,17 +49,11 @@ |
44 | 49 |
@PostMapping(path = "/insertProc.file") |
45 | 50 |
public ResponseEntity<?> insertProc(@RequestPart EntInfoVO entInfoVO, @RequestPart(required = false) List<MultipartFile> insertFileList) throws Exception { |
46 | 51 |
// 응답 처리 |
47 |
- HttpHeaders headers = new HttpHeaders(); |
|
48 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
49 |
- ResponseData responseData = new ResponseData(); |
|
50 | 52 |
|
51 | 53 |
// 사업자등록번호 중복 검사 |
52 | 54 |
int isExistence = entInfoService.selectCntByCheckBrno(entInfoVO.getBrno()); |
53 | 55 |
if (isExistence > 0) { |
54 |
- // throw new IdDuplicationException("이미 존재하는 사업자등록번호입니다."); |
|
55 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
56 |
- responseData.setMessage("이미 존재하는 사업자등록번호입니다."); |
|
57 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
56 |
+ return resUtil.errorRes(MessageCode.COMMON_DUPLICATION_DATA); |
|
58 | 57 |
} |
59 | 58 |
|
60 | 59 |
// 기업정보 등록 |
... | ... | @@ -62,18 +61,11 @@ |
62 | 61 |
int insertResult = (int) result.get("result"); |
63 | 62 |
|
64 | 63 |
if(insertResult > 0) { |
65 |
- responseData.setStatus(HttpStatus.OK); |
|
66 |
- responseData.setMessage("정상적으로 등록 처리되었습니다."); |
|
67 |
- responseData.setData(result); |
|
68 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
64 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
69 | 65 |
} else if(insertResult < 0) { |
70 |
- responseData.setStatus(HttpStatus.PAYLOAD_TOO_LARGE); |
|
71 |
- responseData.setMessage("업로드 가능한 파일 용량 제한을 초과했습니다."); |
|
72 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.PAYLOAD_TOO_LARGE); |
|
66 |
+ return resUtil.errorRes(MessageCode.COMMON_PAYLOAD_TOO_LARGE); |
|
73 | 67 |
} else { |
74 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
75 |
- responseData.setMessage("등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
76 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
68 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
77 | 69 |
} |
78 | 70 |
} |
79 | 71 |
|
... | ... | @@ -91,13 +83,7 @@ |
91 | 83 |
Map<String, Object> result = entInfoService.entInfoSelectList(params); |
92 | 84 |
|
93 | 85 |
// 응답 처리 |
94 |
- HttpHeaders headers = new HttpHeaders(); |
|
95 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
96 |
- ResponseData responseData = new ResponseData(); |
|
97 |
- responseData.setStatus(HttpStatus.OK); |
|
98 |
- responseData.setMessage("정상적으로 기업정보 목록 조회가 처리되었습니다."); |
|
99 |
- responseData.setData(result); |
|
100 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
86 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
101 | 87 |
} |
102 | 88 |
|
103 | 89 |
/** |
... | ... | @@ -114,13 +100,7 @@ |
114 | 100 |
HashMap<String, Object> result = entInfoService.entInfoDetail(entInfoVO); |
115 | 101 |
|
116 | 102 |
// 응답 처리 |
117 |
- HttpHeaders headers = new HttpHeaders(); |
|
118 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
119 |
- ResponseData responseData = new ResponseData(); |
|
120 |
- responseData.setStatus(HttpStatus.OK); |
|
121 |
- responseData.setMessage("정상적으로 기업정보 상세 조회가 처리되었습니다."); |
|
122 |
- responseData.setData(result); |
|
123 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
103 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
124 | 104 |
} |
125 | 105 |
|
126 | 106 |
/** |
... | ... | @@ -134,35 +114,21 @@ |
134 | 114 |
*/ |
135 | 115 |
@PostMapping(path = "/updateProc.file") |
136 | 116 |
public ResponseEntity<?> updateProc(@RequestPart EntInfoVO entInfoVO, @RequestPart(required = false) List<MultipartFile> insertFileList) throws Exception { |
137 |
- // 응답 처리 |
|
138 |
- HttpHeaders headers = new HttpHeaders(); |
|
139 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
140 |
- ResponseData responseData = new ResponseData(); |
|
141 |
- |
|
142 |
- // 사업자등록번호 중복 검사 |
|
117 |
+ // 사업자등록번호 중복 검사 |
|
143 | 118 |
if (entInfoVO.getIsBrnoChange()) { |
144 | 119 |
int isExistence = entInfoService.selectCntByCheckBrno(entInfoVO.getBrno()); |
145 | 120 |
if (isExistence > 0) { |
146 |
-// throw new IdDuplicationException("이미 존재하는 사업자등록번호입니다."); |
|
147 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
148 |
- responseData.setMessage("이미 존재하는 사업자등록번호입니다."); |
|
149 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
121 |
+ return resUtil.errorRes(MessageCode.COMMON_DUPLICATION_DATA); |
|
150 | 122 |
} |
151 | 123 |
} |
152 |
- |
|
124 |
+ // 응답 처리 |
|
153 | 125 |
int result = entInfoService.entInfoUpdate(entInfoVO, insertFileList); |
154 | 126 |
if(result > 0) { |
155 |
- responseData.setStatus(HttpStatus.OK); |
|
156 |
- responseData.setMessage("정상적으로 기업정보 수정 처리되었습니다."); |
|
157 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
127 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
158 | 128 |
} else if(result < 0) { |
159 |
- responseData.setStatus(HttpStatus.PAYLOAD_TOO_LARGE); |
|
160 |
- responseData.setMessage("업로드 가능한 파일 용량 제한을 초과했습니다."); |
|
161 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.PAYLOAD_TOO_LARGE); |
|
129 |
+ return resUtil.errorRes(MessageCode.COMMON_PAYLOAD_TOO_LARGE); |
|
162 | 130 |
} else { |
163 |
- responseData.setStatus(HttpStatus.BAD_REQUEST); |
|
164 |
- responseData.setMessage("기업정보 등록 실패하였습니다.\n담당자에게 문의하세요."); |
|
165 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.BAD_REQUEST); |
|
131 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
166 | 132 |
} |
167 | 133 |
} |
168 | 134 |
|
... | ... | @@ -180,17 +146,10 @@ |
180 | 146 |
int result = entInfoService.entInfoDelete(entInfoVO); |
181 | 147 |
|
182 | 148 |
// 응답 처리 |
183 |
- HttpHeaders headers = new HttpHeaders(); |
|
184 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
185 |
- ResponseData responseData = new ResponseData(); |
|
186 | 149 |
if(result > 0) { |
187 |
- responseData.setStatus(HttpStatus.OK); |
|
188 |
- responseData.setMessage("정상적으로 기업정보가 삭제 처리되었습니다."); |
|
189 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
150 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
190 | 151 |
} else { |
191 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
192 |
- responseData.setMessage("기업정보 삭제에 실패하였습니다.\n담당자에게 문의하세요."); |
|
193 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
152 |
+ return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); |
|
194 | 153 |
} |
195 | 154 |
} |
196 | 155 |
|
--- src/main/java/com/takensoft/portal/ivstDscsn/web/IvstDscsnController.java
+++ src/main/java/com/takensoft/portal/ivstDscsn/web/IvstDscsnController.java
... | ... | @@ -1,7 +1,9 @@ |
1 | 1 |
package com.takensoft.portal.ivstDscsn.web; |
2 | 2 |
|
3 | 3 |
import com.takensoft.common.excel.service.ExcelService; |
4 |
+import com.takensoft.common.message.MessageCode; |
|
4 | 5 |
import com.takensoft.common.util.ResponseData; |
6 |
+import com.takensoft.common.util.ResponseUtil; |
|
5 | 7 |
import com.takensoft.portal.ivstDscsn.dto.IvstDscsnExcelDTO; |
6 | 8 |
import com.takensoft.portal.ivstDscsn.service.IvstDscsnService; |
7 | 9 |
import com.takensoft.portal.ivstDscsn.vo.IvstDscsnVO; |
... | ... | @@ -12,15 +14,17 @@ |
12 | 14 |
import org.springframework.http.ResponseEntity; |
13 | 15 |
import org.springframework.web.bind.annotation.*; |
14 | 16 |
|
15 |
-import javax.servlet.http.HttpServletResponse; |
|
17 |
+import jakarta.servlet.http.HttpServletResponse; |
|
16 | 18 |
import java.nio.charset.Charset; |
17 | 19 |
import java.util.*; |
18 |
- |
|
19 | 20 |
/** |
20 |
- * @author : 박정하 |
|
21 |
- * @since : 2024.03.26 |
|
21 |
+ * @author 박정하 |
|
22 |
+ * @since 2024.03.26 |
|
23 |
+ * @modification |
|
24 |
+ * since | author | description |
|
25 |
+ * 2024.03.26 | 박정하 | 최초 등록 |
|
22 | 26 |
* |
23 |
- * 투자상담 관련 컨트롤러 |
|
27 |
+ * 투자상담 관련 Controller |
|
24 | 28 |
*/ |
25 | 29 |
@RestController |
26 | 30 |
@RequiredArgsConstructor |
... | ... | @@ -28,6 +32,7 @@ |
28 | 32 |
public class IvstDscsnController { |
29 | 33 |
private final IvstDscsnService ivstDscsnService; |
30 | 34 |
private final ExcelService excelService; |
35 |
+ private final ResponseUtil resUtil; |
|
31 | 36 |
|
32 | 37 |
/** |
33 | 38 |
* @author 박정하 |
... | ... | @@ -48,18 +53,11 @@ |
48 | 53 |
headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
49 | 54 |
ResponseData responseData = new ResponseData(); |
50 | 55 |
if (insertResult > 0) { |
51 |
- responseData.setStatus(HttpStatus.OK); |
|
52 |
- responseData.setMessage("정상적으로 투자상담 등록되었습니다."); |
|
53 |
- responseData.setData(result); |
|
54 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
56 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
55 | 57 |
} else if(insertResult < 0) { |
56 |
- responseData.setStatus(HttpStatus.PAYLOAD_TOO_LARGE); |
|
57 |
- responseData.setMessage("업로드 가능한 파일 용량 제한을 초과했습니다."); |
|
58 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.PAYLOAD_TOO_LARGE); |
|
58 |
+ return resUtil.errorRes(MessageCode.COMMON_PAYLOAD_TOO_LARGE); |
|
59 | 59 |
} else { |
60 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
61 |
- responseData.setMessage("투자상담 등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
62 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
60 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
63 | 61 |
} |
64 | 62 |
} |
65 | 63 |
|
... | ... | @@ -77,13 +75,7 @@ |
77 | 75 |
Map<String, Object> result = ivstDscsnService.ivstDscsnList(params); |
78 | 76 |
|
79 | 77 |
// 응답 처리 |
80 |
- HttpHeaders headers = new HttpHeaders(); |
|
81 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
82 |
- ResponseData responseData = new ResponseData(); |
|
83 |
- responseData.setStatus(HttpStatus.OK); |
|
84 |
- responseData.setMessage("정상적으로 투자상담 목록 조회가 처리되었습니다."); |
|
85 |
- responseData.setData(result); |
|
86 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
78 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
87 | 79 |
} |
88 | 80 |
|
89 | 81 |
/** |
... | ... | @@ -100,13 +92,7 @@ |
100 | 92 |
IvstDscsnVO result = ivstDscsnService.ivstDscsnDetail(ivstDscsnVO); |
101 | 93 |
|
102 | 94 |
// 응답 처리 |
103 |
- HttpHeaders headers = new HttpHeaders(); |
|
104 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
105 |
- ResponseData responseData = new ResponseData(); |
|
106 |
- responseData.setStatus(HttpStatus.OK); |
|
107 |
- responseData.setMessage("정상적으로 투자상담 상세 조회가 처리되었습니다."); |
|
108 |
- responseData.setData(result); |
|
109 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
95 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
110 | 96 |
} |
111 | 97 |
|
112 | 98 |
/** |
... | ... | @@ -127,17 +113,11 @@ |
127 | 113 |
headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
128 | 114 |
ResponseData responseData = new ResponseData(); |
129 | 115 |
if (result > 0) { |
130 |
- responseData.setStatus(HttpStatus.OK); |
|
131 |
- responseData.setMessage("정상적으로 투자상담 수정 처리되었습니다."); |
|
132 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
116 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
133 | 117 |
} else if(result < 0) { |
134 |
- responseData.setStatus(HttpStatus.PAYLOAD_TOO_LARGE); |
|
135 |
- responseData.setMessage("업로드 가능한 파일 용량 제한을 초과했습니다."); |
|
136 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.PAYLOAD_TOO_LARGE); |
|
118 |
+ return resUtil.errorRes(MessageCode.COMMON_PAYLOAD_TOO_LARGE); |
|
137 | 119 |
} else { |
138 |
- responseData.setStatus(HttpStatus.BAD_REQUEST); |
|
139 |
- responseData.setMessage("투자상담 수정에 실패하였습니다.\n담당자에게 문의하세요."); |
|
140 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.BAD_REQUEST); |
|
120 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
141 | 121 |
} |
142 | 122 |
} |
143 | 123 |
|
... | ... | @@ -155,17 +135,10 @@ |
155 | 135 |
int result = ivstDscsnService.ivstDscsnDelete(ivstDscsnVO); |
156 | 136 |
|
157 | 137 |
// 응답처리 |
158 |
- HttpHeaders headers = new HttpHeaders(); |
|
159 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
160 |
- ResponseData responseData = new ResponseData(); |
|
161 | 138 |
if (result > 0) { |
162 |
- responseData.setStatus(HttpStatus.OK); |
|
163 |
- responseData.setMessage("정상적으로 투자상담 삭제 처리되었습니다."); |
|
164 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
139 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
165 | 140 |
} else { |
166 |
- responseData.setStatus(HttpStatus.BAD_REQUEST); |
|
167 |
- responseData.setMessage("투자상담 삭제에 실패했습니다.\n담당자에게 문의하세요."); |
|
168 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.BAD_REQUEST); |
|
141 |
+ return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); |
|
169 | 142 |
} |
170 | 143 |
} |
171 | 144 |
|
--- src/main/java/com/takensoft/portal/main/web/GovernmentMainController.java
+++ src/main/java/com/takensoft/portal/main/web/GovernmentMainController.java
... | ... | @@ -1,6 +1,8 @@ |
1 | 1 |
package com.takensoft.portal.main.web; |
2 | 2 |
|
3 |
+import com.takensoft.common.message.MessageCode; |
|
3 | 4 |
import com.takensoft.common.util.ResponseData; |
5 |
+import com.takensoft.common.util.ResponseUtil; |
|
4 | 6 |
import com.takensoft.portal.main.service.GovernmentMainService; |
5 | 7 |
import lombok.RequiredArgsConstructor; |
6 | 8 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -14,19 +16,21 @@ |
14 | 16 |
|
15 | 17 |
import java.nio.charset.Charset; |
16 | 18 |
import java.util.*; |
17 |
- |
|
18 | 19 |
/** |
19 |
- * @author : 박정하 |
|
20 |
- * @since : 2024.05.29 |
|
20 |
+ * @author 박정하 |
|
21 |
+ * @since 2024.05.29 |
|
22 |
+ * @modification |
|
23 |
+ * since | author | description |
|
24 |
+ * 2024.05.29 | 박정하 | 최초 등록 |
|
21 | 25 |
* |
22 |
- * 메인 관련 컨트롤러 |
|
26 |
+ * 메인 관련 Controller |
|
23 | 27 |
*/ |
24 | 28 |
@RestController |
25 | 29 |
@RequiredArgsConstructor |
26 | 30 |
@RequestMapping(value = "/government/main") |
27 | 31 |
public class GovernmentMainController { |
28 | 32 |
private final GovernmentMainService governmentMainService; |
29 |
- |
|
33 |
+ private final ResponseUtil resUtil; |
|
30 | 34 |
/** |
31 | 35 |
* @author 박정하 |
32 | 36 |
* @since 2024.05.29 |
... | ... | @@ -42,12 +46,6 @@ |
42 | 46 |
Map<String, Object> result = governmentMainService.selectGovernmentMain(params); |
43 | 47 |
|
44 | 48 |
// 응답 처리 |
45 |
- HttpHeaders headers = new HttpHeaders(); |
|
46 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
47 |
- ResponseData responseData = new ResponseData(); |
|
48 |
- responseData.setStatus(HttpStatus.OK); |
|
49 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
50 |
- responseData.setData(result); |
|
51 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
49 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
52 | 50 |
} |
53 | 51 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/portal/rvwMttr/web/RvwMttrController.java
+++ src/main/java/com/takensoft/portal/rvwMttr/web/RvwMttrController.java
... | ... | @@ -1,7 +1,9 @@ |
1 | 1 |
package com.takensoft.portal.rvwMttr.web; |
2 | 2 |
|
3 | 3 |
import com.takensoft.common.excel.service.ExcelService; |
4 |
+import com.takensoft.common.message.MessageCode; |
|
4 | 5 |
import com.takensoft.common.util.ResponseData; |
6 |
+import com.takensoft.common.util.ResponseUtil; |
|
5 | 7 |
import com.takensoft.portal.rvwMttr.dto.RvwMttrExcelDTO; |
6 | 8 |
import com.takensoft.portal.rvwMttr.dto.RvwMttrPrgrsExcelDTO; |
7 | 9 |
import com.takensoft.portal.rvwMttr.service.RvwMttrService; |
... | ... | @@ -14,15 +16,17 @@ |
14 | 16 |
import org.springframework.web.bind.annotation.*; |
15 | 17 |
import org.springframework.web.multipart.MultipartFile; |
16 | 18 |
|
17 |
-import javax.servlet.http.HttpServletResponse; |
|
19 |
+import jakarta.servlet.http.HttpServletResponse; |
|
18 | 20 |
import java.nio.charset.Charset; |
19 | 21 |
import java.util.*; |
20 |
- |
|
21 | 22 |
/** |
22 |
- * @author : 박정하 |
|
23 |
- * @since : 2024.03.29 |
|
23 |
+ * @author 박정하 |
|
24 |
+ * @since 2024.03.29 |
|
25 |
+ * @modification |
|
26 |
+ * since | author | description |
|
27 |
+ * 2024.03.29 | 박정하 | 최초 등록 |
|
24 | 28 |
* |
25 |
- * 검토사항 관련 컨트롤러 |
|
29 |
+ * 검토사항 관련 Controller |
|
26 | 30 |
*/ |
27 | 31 |
@RestController |
28 | 32 |
@RequiredArgsConstructor |
... | ... | @@ -30,6 +34,7 @@ |
30 | 34 |
public class RvwMttrController { |
31 | 35 |
private final RvwMttrService rvwMttrService; |
32 | 36 |
private final ExcelService excelService; |
37 |
+ private final ResponseUtil resUtil; |
|
33 | 38 |
|
34 | 39 |
/** |
35 | 40 |
* @author 박정하 |
... | ... | @@ -46,22 +51,12 @@ |
46 | 51 |
int insertResult = (int)result.get("result"); |
47 | 52 |
|
48 | 53 |
// 응답 처리 |
49 |
- HttpHeaders headers = new HttpHeaders(); |
|
50 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
51 |
- ResponseData responseData = new ResponseData(); |
|
52 | 54 |
if(insertResult > 0) { |
53 |
- responseData.setStatus(HttpStatus.OK); |
|
54 |
- responseData.setMessage("정상적으로 검토사항 등록 처리되었습니다."); |
|
55 |
- responseData.setData(result); |
|
56 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
55 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
57 | 56 |
} else if(insertResult < 0) { |
58 |
- responseData.setStatus(HttpStatus.PAYLOAD_TOO_LARGE); |
|
59 |
- responseData.setMessage("업로드 가능한 파일 용량 제한을 초과했습니다."); |
|
60 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.PAYLOAD_TOO_LARGE); |
|
57 |
+ return resUtil.errorRes(MessageCode.COMMON_PAYLOAD_TOO_LARGE); |
|
61 | 58 |
} else { |
62 |
- responseData.setStatus(HttpStatus.INTERNAL_SERVER_ERROR); |
|
63 |
- responseData.setMessage("검토사항 등록에 실패하였습니다.\n담당자에게 문의하세요."); |
|
64 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.INTERNAL_SERVER_ERROR); |
|
59 |
+ return resUtil.errorRes(MessageCode.COMMON_INSERT_FAIL); |
|
65 | 60 |
} |
66 | 61 |
} |
67 | 62 |
|
... | ... | @@ -79,13 +74,7 @@ |
79 | 74 |
Map<String, Object> result = rvwMttrService.rvwMttrSelectList(params); |
80 | 75 |
|
81 | 76 |
// 응답 처리 |
82 |
- HttpHeaders headers = new HttpHeaders(); |
|
83 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
84 |
- ResponseData responseData = new ResponseData(); |
|
85 |
- responseData.setStatus(HttpStatus.OK); |
|
86 |
- responseData.setMessage("정상적으로 검토사항 목록 조회가 처리되었습니다."); |
|
87 |
- responseData.setData(result); |
|
88 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
77 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
89 | 78 |
} |
90 | 79 |
|
91 | 80 |
/** |
... | ... | @@ -102,13 +91,7 @@ |
102 | 91 |
Map<String, Object> result = rvwMttrService.rvwMttrDetail(rvwMttrVO); |
103 | 92 |
|
104 | 93 |
// 응답 처리 |
105 |
- HttpHeaders headers = new HttpHeaders(); |
|
106 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
107 |
- ResponseData responseData = new ResponseData(); |
|
108 |
- responseData.setStatus(HttpStatus.OK); |
|
109 |
- responseData.setMessage("정상적으로 검토사항 상세 조회가 처리되었습니다."); |
|
110 |
- responseData.setData(result); |
|
111 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
94 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
112 | 95 |
} |
113 | 96 |
|
114 | 97 |
/** |
... | ... | @@ -125,17 +108,10 @@ |
125 | 108 |
int result = rvwMttrService.rvwMttrUpdate(rvwMttrVO, insertFileList); |
126 | 109 |
|
127 | 110 |
// 응답 처리 |
128 |
- HttpHeaders headers = new HttpHeaders(); |
|
129 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
130 |
- ResponseData responseData = new ResponseData(); |
|
131 | 111 |
if (result > 0) { |
132 |
- responseData.setStatus(HttpStatus.OK); |
|
133 |
- responseData.setMessage("정상적으로 검토사항 수정 처리되었습니다."); |
|
134 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
112 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
135 | 113 |
} else { |
136 |
- responseData.setStatus(HttpStatus.BAD_REQUEST); |
|
137 |
- responseData.setMessage("검토사항 수정에 실패하였습니다.\n담당자에게 문의하세요."); |
|
138 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.BAD_REQUEST); |
|
114 |
+ return resUtil.errorRes(MessageCode.COMMON_UPDATE_FAIL); |
|
139 | 115 |
} |
140 | 116 |
} |
141 | 117 |
|
... | ... | @@ -154,17 +130,10 @@ |
154 | 130 |
int result = rvwMttrService.rvwMttrDelete(rvwMttrVO); |
155 | 131 |
|
156 | 132 |
// 응답 처리 |
157 |
- HttpHeaders headers = new HttpHeaders(); |
|
158 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
159 |
- ResponseData responseData = new ResponseData(); |
|
160 | 133 |
if (result > 0) { |
161 |
- responseData.setStatus(HttpStatus.OK); |
|
162 |
- responseData.setMessage("정상적으로 검토사항 삭제 처리되었습니다."); |
|
163 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
134 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
164 | 135 |
} else { |
165 |
- responseData.setStatus(HttpStatus.BAD_REQUEST); |
|
166 |
- responseData.setMessage("검토사항 삭제에 실패하였습니다.\n담당자에게 문의하세요."); |
|
167 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.BAD_REQUEST); |
|
136 |
+ return resUtil.errorRes(MessageCode.COMMON_DELETE_FAIL); |
|
168 | 137 |
} |
169 | 138 |
} |
170 | 139 |
|
--- src/main/java/com/takensoft/portal/statistics/web/StatisticsController.java
+++ src/main/java/com/takensoft/portal/statistics/web/StatisticsController.java
... | ... | @@ -1,6 +1,8 @@ |
1 | 1 |
package com.takensoft.portal.statistics.web; |
2 | 2 |
|
3 |
+import com.takensoft.common.message.MessageCode; |
|
3 | 4 |
import com.takensoft.common.util.ResponseData; |
5 |
+import com.takensoft.common.util.ResponseUtil; |
|
4 | 6 |
import com.takensoft.portal.statistics.service.StatisticsService; |
5 | 7 |
import lombok.RequiredArgsConstructor; |
6 | 8 |
import org.springframework.http.HttpHeaders; |
... | ... | @@ -16,19 +18,21 @@ |
16 | 18 |
import java.util.HashMap; |
17 | 19 |
import java.util.List; |
18 | 20 |
import java.util.Map; |
19 |
- |
|
20 | 21 |
/** |
21 |
- * @author : 박정하 |
|
22 |
- * @since : 2024.06.13 |
|
22 |
+ * @author 박정하 |
|
23 |
+ * @since 2024.06.13 |
|
24 |
+ * @modification |
|
25 |
+ * since | author | description |
|
26 |
+ * 2024.06.13 | 박정하 | 최초 등록 |
|
23 | 27 |
* |
24 |
- * 통계 관련 컨트롤러 |
|
28 |
+ * 통계 관련 Controller |
|
25 | 29 |
*/ |
26 | 30 |
@RestController |
27 | 31 |
@RequiredArgsConstructor |
28 | 32 |
@RequestMapping(value = "/government/statistics") |
29 | 33 |
public class StatisticsController { |
30 | 34 |
private final StatisticsService statisticsService; |
31 |
- |
|
35 |
+ private final ResponseUtil resUtil; |
|
32 | 36 |
/** |
33 | 37 |
* @author 박정하 |
34 | 38 |
* @since 2024.06.13 |
... | ... | @@ -43,13 +47,7 @@ |
43 | 47 |
List<HashMap<String, Object>> result = statisticsService.categoryStatistics(params); |
44 | 48 |
|
45 | 49 |
// 응답 처리 |
46 |
- HttpHeaders headers = new HttpHeaders(); |
|
47 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
48 |
- ResponseData responseData = new ResponseData(); |
|
49 |
- responseData.setStatus(HttpStatus.OK); |
|
50 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
51 |
- responseData.setData(result); |
|
52 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
50 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
53 | 51 |
} |
54 | 52 |
|
55 | 53 |
/** |
... | ... | @@ -66,13 +64,7 @@ |
66 | 64 |
Map<String, Object> result = statisticsService.rvwMttrStatistics(params); |
67 | 65 |
|
68 | 66 |
// 응답 처리 |
69 |
- HttpHeaders headers = new HttpHeaders(); |
|
70 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
71 |
- ResponseData responseData = new ResponseData(); |
|
72 |
- responseData.setStatus(HttpStatus.OK); |
|
73 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
74 |
- responseData.setData(result); |
|
75 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
67 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
76 | 68 |
} |
77 | 69 |
|
78 | 70 |
/** |
... | ... | @@ -89,12 +81,6 @@ |
89 | 81 |
List<HashMap<String, Object>> result = statisticsService.consultationStatistics(params); |
90 | 82 |
|
91 | 83 |
// 응답 처리 |
92 |
- HttpHeaders headers = new HttpHeaders(); |
|
93 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
94 |
- ResponseData responseData = new ResponseData(); |
|
95 |
- responseData.setStatus(HttpStatus.OK); |
|
96 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
97 |
- responseData.setData(result); |
|
98 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
84 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
99 | 85 |
} |
100 | 86 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/ums/web/UmsController.java
+++ src/main/java/com/takensoft/ums/web/UmsController.java
... | ... | @@ -1,6 +1,8 @@ |
1 | 1 |
package com.takensoft.ums.web; |
2 | 2 |
|
3 |
+import com.takensoft.common.message.MessageCode; |
|
3 | 4 |
import com.takensoft.common.util.ResponseData; |
5 |
+import com.takensoft.common.util.ResponseUtil; |
|
4 | 6 |
import com.takensoft.ums.service.UmsService; |
5 | 7 |
import lombok.RequiredArgsConstructor; |
6 | 8 |
import lombok.extern.slf4j.Slf4j; |
... | ... | @@ -15,10 +17,12 @@ |
15 | 17 |
import java.nio.charset.Charset; |
16 | 18 |
import java.util.HashMap; |
17 | 19 |
import java.util.Map; |
18 |
- |
|
19 | 20 |
/** |
20 |
- * @author : 방선주 |
|
21 |
- * @since : 2024.06.25 |
|
21 |
+ * @author 방선주 |
|
22 |
+ * @since 2024.06.25 |
|
23 |
+ * @modification |
|
24 |
+ * since | author | description |
|
25 |
+ * 2024.06.25 | 방선주 | 최초 등록 |
|
22 | 26 |
* |
23 | 27 |
* UmsController - 문자 메시지 전송을 위한 컨트롤러 |
24 | 28 |
*/ |
... | ... | @@ -28,6 +32,7 @@ |
28 | 32 |
@RequestMapping(value="/ums") |
29 | 33 |
public class UmsController { |
30 | 34 |
|
35 |
+ private final ResponseUtil resUtil; |
|
31 | 36 |
private final UmsService umsService; |
32 | 37 |
|
33 | 38 |
// 문자 메시지 테이블 확인 |
... | ... | @@ -38,12 +43,6 @@ |
38 | 43 |
Map<String, Object> result = umsService.save(); |
39 | 44 |
|
40 | 45 |
// 응답처리 |
41 |
- HttpHeaders headers = new HttpHeaders(); |
|
42 |
- headers.setContentType(new MediaType("application", "json", Charset.forName("UTF-8"))); |
|
43 |
- ResponseData responseData = new ResponseData(); |
|
44 |
- responseData.setStatus(HttpStatus.OK); |
|
45 |
- responseData.setMessage("정상적으로 조회가 처리되었습니다."); |
|
46 |
- responseData.setData(result); |
|
47 |
- return new ResponseEntity<>(responseData, headers, HttpStatus.OK); |
|
46 |
+ return resUtil.successRes(result, MessageCode.COMMON_SUCCESS); |
|
48 | 47 |
} |
49 | 48 |
}(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/resources/message/messages_en.yml
... | ... | @@ -0,0 +1,55 @@ |
1 | +# 공통 에러 | |
2 | +common: | |
3 | + success: "Successfully processed." | |
4 | + unknown: "An error has occurred." | |
5 | + bad_request: "Bad request." | |
6 | + null_point: "A null value occurred." | |
7 | + illegal_argument: "Invalid argument provided." | |
8 | + method_not_allowed: "Unsupported HTTP method." | |
9 | + not_found: "No information found." | |
10 | + insert_fail: "Registration failed." | |
11 | + update_fail: "Edit failed." | |
12 | + delete_fail: "Deletion failed." | |
13 | + payload_too_large : "File size limit exceeded." | |
14 | + duplication_code: "This code already exists." | |
15 | + duplication_data: "This data already exists." | |
16 | + | |
17 | + | |
18 | +# 네트워크 관련 | |
19 | +network: | |
20 | + unknown_host: "Request to an unknown host." | |
21 | + | |
22 | +# SQL 관련 | |
23 | +sql: | |
24 | + null_value: "Null value violation in SQL query." | |
25 | + duplicate_key: "Duplicate key violation in SQL query." | |
26 | + data_integrity: "Data integrity violation in SQL query." | |
27 | + unknown: "An unknown SQL error occurred." | |
28 | + | |
29 | +# jwt 인증 관련 | |
30 | +jwt: | |
31 | + expired: "Login session has expired." | |
32 | + signature_invalid: "Invalid token type." | |
33 | + insufficient_authentication: "Insufficient authentication information." | |
34 | + | |
35 | +# 접근 관련 | |
36 | +access: | |
37 | + denied: "Access is denied." | |
38 | + unauthorized: "Unauthorized access." | |
39 | + | |
40 | +# 사용자 관련 | |
41 | +user: | |
42 | + signup: | |
43 | + id_taken: "The userid is already in use." | |
44 | + email_taken: "The email is already in use." | |
45 | + success: "Registration completed successfully." | |
46 | + login: | |
47 | + user_not_found: "User information does not exist." | |
48 | + invalid_credentials: "Incorrect password." | |
49 | + authentication_required: "Authentication request was denied." | |
50 | + account_locked: "Account is locked." | |
51 | + account_disabled: "Account is disabled." | |
52 | + account_expired: "Account has expired." | |
53 | + credentials_expired: "Password has expired." | |
54 | + logout: | |
55 | + success: "You have been logged out."(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/resources/message/messages_ko.yml
... | ... | @@ -0,0 +1,55 @@ |
1 | +# 공통 | |
2 | +common: | |
3 | + success: "정상 처리되었습니다." | |
4 | + unknown: "오류가 발생했습니다." | |
5 | + bad_request: "잘못된 요청입니다." | |
6 | + null_point: "Null 값이 발생했습니다." | |
7 | + illegal_argument: "잘못된 인자가 전달되었습니다." | |
8 | + method_not_allowed: "지원하지 않는 HTTP 메서드입니다." | |
9 | + not_found: "정보를 찾을 수 없습니다." | |
10 | + insert_fail: "등록에 실패했습니다." | |
11 | + update_fail: "수정에 실패했습니다." | |
12 | + delete_fail: "삭제에 실패했습니다." | |
13 | + payload_too_large: "파일 용량 제한을 초과했습니다." | |
14 | + duplication_code: "이미 존재하는 코드입니다." | |
15 | + duplication_data: "이미 존재하는 정보입니다." | |
16 | + | |
17 | +# 네트워크 관련 | |
18 | +network: | |
19 | + unknown_host: "알 수 없는 호스트에 대한 요청입니다." | |
20 | + | |
21 | + | |
22 | +# SQL 관련 | |
23 | +sql: | |
24 | + null_value: "SQL Query에서 NULL 값이 발생했습니다." | |
25 | + duplicate_key: "SQL Query에서 중복 키가 발생했습니다." | |
26 | + data_integrity: "SQL Query에서 데이터 무결성을 위반했습니다." | |
27 | + unknown: "SQL Query 오류가 발생했습니다." | |
28 | + | |
29 | +# jwt 인증 관련 | |
30 | +jwt: | |
31 | + expired: "로그인 시간이 만료되었습니다." | |
32 | + signature_invalid: "잘못된 토큰 유형입니다." | |
33 | + insufficient_authentication: "인증 정보가 부족합니다." | |
34 | + | |
35 | +# 접근 관련 | |
36 | +access: | |
37 | + denied: "접근 권한이 없습니다." | |
38 | + unauthorized: "잘못된 접근입니다." | |
39 | + | |
40 | +# 사용자 관련 | |
41 | +user: | |
42 | + signup: | |
43 | + id_taken: "이미 사용중인 아이디입니다." | |
44 | + email_taken: "이미 사용중인 이메일입니다." | |
45 | + success: "회원가입이 정상처리 되었습니다." | |
46 | + login: | |
47 | + user_not_found: "회원정보가 존재하지 않습니다." | |
48 | + invalid_credentials: "비밀번호가 일치하지 않습니다." | |
49 | + authentication_required: "인증 요구가 거부되었습니다." | |
50 | + account_locked: "계정이 잠겼습니다." | |
51 | + account_disabled: "계정이 비활성화 되어있습니다." | |
52 | + account_expired: "계정 유효기간이 만료되었습니다." | |
53 | + credentials_expired: "계정 비밀번호 유효기간이 만료되었습니다." | |
54 | + logout: | |
55 | + success: "로그아웃 되었습니다." |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?