Compare commits

...

27 Commits

Author SHA1 Message Date
jangwonseokicom 9c7d364c84 메뉴구조 1.2버전 적용 2 years ago
jangwonseokicom 49ee2b554e 메뉴구조 1.2버전 적용 2 years ago
kkw29 0651b8eff3 html 파일 전환 2 years ago
jangwonseokicom 961f79a1ed 구조작업 상담가이드 2 years ago
jangwonseokicom ebce720901 Merge remote-tracking branch 'origin/dev_tymeleaf' into dev_tymeleaf 2 years ago
jangwonseokicom ab344cdd76 구조작업 2 years ago
jangwonseok 92ed9256e0 로그기록 일시 삭제 2 years ago
jangwonseokicom 38eeb6e446 메뉴구조 변경 2 years ago
jangwonseokicom 077dd8266c 토큰 일부 적용 url변경중 2 years ago
jangwonseokicom 8e85e2d32d 토큰 일부 적용 url변경중 2 years ago
jangwonseokicom dfea91edc8 spa식으로 변경 2 years ago
jangwonseokicom 24ba911482 시스템 관리 jsp 의존성 제거 2 years ago
jangwonseokicom 75d1b3b423 html jsp 제거 2 years ago
jangwonseokicom 3d63f2e538 메뉴 lnb jsp제거 2 years ago
jangwonseokicom c8617b3345 컨피그 수정 2 years ago
jangwonseokicom 160f5135f5 Merge branch 'dev_tymeleaf' of http://git.icomsys.co.kr/JANGWONSEOK/cinnamon-ui-v2 into dev_tymeleaf
# Conflicts:
#	.gitignore
2 years ago
kkw29 a588ca3f59 JWT 작업중 2 years ago
jangwonseokicom bb91d6fe7e ignore add 2 years ago
jangwonseokicom 4c89e1d524 thymeleaf convert complate 2 years ago
jangwonseokicom 8a6d69bbf6 thymeleaf convert complate 2 years ago
jangwonseokicom 2058c43ba8 page dash borad css!! 2 years ago
jangwonseokicom b0ef466826 page randering clear 2 years ago
jangwonseokicom 12880e8b5f thymeleaf ssr complate 2 years ago
jangwonseokicom a8ddf60848 thymeleaf template change complate 2 years ago
jangwonseokicom 43ad473107 db정보 업데이트 2 years ago
jangwonseokicom 4c3a5bdfda 권한수정 2 years ago
jangwonseokicom 029911940b 메뉴추가 2 years ago

43
.gitignore vendored

@ -0,0 +1,43 @@
HELP.md
.gradle
.idea
build/
**/.gradle
**/.idea
**/build
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/

@ -4,7 +4,7 @@
<component name="FrameworkDetectionExcludesConfiguration"> <component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$/main_vm" /> <file type="web" url="file://$PROJECT_DIR$/main_vm" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="corretto-17" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" /> <mapping directory="$PROJECT_DIR$" vcs="Git" />
</component> </component>
</project> </project>

Binary file not shown.

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" /> <option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#JAVA_HOME" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />

@ -4,5 +4,5 @@
<component name="FrameworkDetectionExcludesConfiguration"> <component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" /> <file type="web" url="file://$PROJECT_DIR$" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK" /> <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" />
</project> </project>

@ -1,6 +1,6 @@
plugins { plugins {
id 'org.springframework.boot' version '2.7.6' id 'org.springframework.boot' version '2.7.6'
id "org.sonarqube" version "2.7" // id "org.sonarqube" version "2.7"
id 'io.spring.dependency-management' version '1.0.14.RELEASE' id 'io.spring.dependency-management' version '1.0.14.RELEASE'
id 'java' id 'java'
id 'com.ewerk.gradle.plugins.querydsl' version '1.0.10' id 'com.ewerk.gradle.plugins.querydsl' version '1.0.10'
@ -9,7 +9,7 @@ plugins {
group = 'com.icom' group = 'com.icom'
version = '0.0.1-SNAPSHOT' version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11' sourceCompatibility = '11'
//sourceCompatibility = '1.8' /*
apply plugin: 'war' apply plugin: 'war'
configurations { configurations {
compileOnly { compileOnly {
@ -30,25 +30,34 @@ repositories {
} }
} }
} }
*/
//repositories { repositories {
// mavenCentral() mavenCentral()
// maven { url "https://maven.egovframe.go.kr/maven/" } // egovframe maven }
//} /*
ext { ext {
set('springCloudVersion', "2021.0.4") set('springCloudVersion', "2021.0.4")
set('log4j2.version', "2.17.1") // log4j set('log4j2.version', "2.17.1") // log4j
} }
*/
ext {
set('springCloudVersion', "2021.0.4")
}
dependencies { dependencies {
/*
implementation 'org.egovframe.cloud:module-common:0.1' implementation 'org.egovframe.cloud:module-common:0.1'
implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.0.0') { implementation('org.egovframe.rte:org.egovframe.rte.fdl.cmmn:4.0.0') {
exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging' exclude group: 'org.egovframe.rte', module: 'org.egovframe.rte.fdl.logging'
} }
*/
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5'
implementation 'org.thymeleaf.extras:thymeleaf-extras-java8time:3.0.4.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-validation'
@ -71,35 +80,36 @@ dependencies {
implementation 'com.querydsl:querydsl-sql-spring:5.0.0' implementation 'com.querydsl:querydsl-sql-spring:5.0.0'
implementation 'com.querydsl:querydsl-sql-codegen:5.0.0' implementation 'com.querydsl:querydsl-sql-codegen:5.0.0'
implementation 'org.apache.tomcat:tomcat-jdbc:10.1.1' // implementation 'javax.servlet:javax.servlet-api'
implementation 'javax.servlet:javax.servlet-api'
implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'org.apache.poi:poi:5.2.2'
implementation 'org.apache.poi:poi-ooxml:5.2.2'
implementation 'software.amazon.awssdk:s3:2.16.1' implementation 'software.amazon.awssdk:s3:2.16.1'
//
implementation 'commons-codec:commons-codec:1.15' implementation 'commons-codec:commons-codec:1.15'
implementation 'org.apache.commons:commons-text:1.8'
implementation 'org.apache.commons:commons-lang3:3.10'
implementation 'org.apache.poi:poi:5.2.2'
implementation 'org.apache.poi:poi-ooxml:5.2.2'
implementation 'org.apache.tomcat:tomcat-jdbc:10.1.1'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
//
// implementation group: 'commons-logging', name: 'commons-logging', version: '1.2' // implementation group: 'commons-logging', name: 'commons-logging', version: '1.2'
// implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.4.5' // implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.4.5'
// testImplementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.4.5' // testImplementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.4.5'
// implementation group: 'org.slf4j', name: 'jcl-over-slf4j', version: '2.0.6' // implementation group: 'org.slf4j', name: 'jcl-over-slf4j', version: '2.0.6'
//jsp //jsp
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper' // implementation 'org.apache.tomcat.embed:tomcat-embed-jasper'
implementation 'javax.servlet:jstl' // implementation 'javax.servlet:jstl'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' // providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.springframework.boot:spring-boot-starter-test' // testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test' // testImplementation 'org.springframework.security:spring-security-test'
implementation 'net.jodah:expiringmap:0.5.9' // implementation 'net.jodah:expiringmap:0.5.9'
// https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient // https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
compileOnly 'org.projectlombok:lombok' compileOnly 'org.projectlombok:lombok'
@ -119,6 +129,14 @@ dependencies {
implementation files("lib/ASRLIB-2.4.0.2.jar") implementation files("lib/ASRLIB-2.4.0.2.jar")
implementation files("lib/pttsnet_class.jar") implementation files("lib/pttsnet_class.jar")
// jwt
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.5'
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.5'
//
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
} }
tasks.named('test') { tasks.named('test') {
@ -132,6 +150,7 @@ dependencyManagement {
} }
} }
// querydsl // querydsl
def querydslDir = "$buildDir/generated/querydsl" def querydslDir = "$buildDir/generated/querydsl"
//def querydslDir = "src/main/qfile" //def querydslDir = "src/main/qfile"

@ -7,13 +7,14 @@ spring:
activate: activate:
on-profile: local on-profile: local
datasource: datasource:
url: jdbc:log4jdbc:mysql://dev-ics-db.c9i6xgmcxx18.ap-northeast-2.rds.amazonaws.com/UPLUS_CINNAMON # url: jdbc:log4jdbc:mysql://dev-ics-db.c9i6xgmcxx18.ap-northeast-2.rds.amazonaws.com/UPLUS_CINNAMON
username: ics_mgr url: jdbc:log4jdbc:mysql://192.168.0.26/ICS_CINNAMON_V2
username: icomsys
password: "#pass180901" password: "#pass180901"
# url: jdbc:log4jdbc:oracle:thin:@localhost:1522:XE # url: jdbc:log4jdbc:oracle:thin:@localhost:1522:XE
# username: LG_LOCAL # username: LG_LOCAL
# password: pass180901 # password: pass180901
owner: LG_LOCAL owner: LG_LOCALqq
driver-class-name: net.sf.log4jdbc.DriverSpy driver-class-name: net.sf.log4jdbc.DriverSpy
hikari: hikari:
connection-timeout: 60000 connection-timeout: 60000
@ -28,6 +29,7 @@ spring:
dialect: com.icomsys.main_vm.common.util.CustomDialect dialect: com.icomsys.main_vm.common.util.CustomDialect
generate_statistics: true generate_statistics: true
#https://docs.jboss.org/hibernate/orm/3.5/javadocs/org/hibernate/dialect/package-summary.html #https://docs.jboss.org/hibernate/orm/3.5/javadocs/org/hibernate/dialect/package-summary.html
feign: feign:

@ -50,6 +50,13 @@ spring:
jackson: jackson:
serialization: serialization:
fail-on-empty-beans: false fail-on-empty-beans: false
thymeleaf:
mode: HTML
cache: false
template-resolver-order: 0
check-template-location: true
jwt:
secret: f2d7e5002d67c8d118ebf800274b6a5c83ed7b3d3518b2cddcd7226f7484eb34
autoconfigure: autoconfigure:
# exclude: org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration # exclude: org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration

@ -35,7 +35,23 @@
<if test="intentGroupCode != null and intentGroupCode != ''"> <if test="intentGroupCode != null and intentGroupCode != ''">
AND CATEGORY = #{intentGroupCode} AND CATEGORY = #{intentGroupCode}
</if> </if>
ORDER BY OPR_MNG_CODE, INTENT_NAME ASC
</select>
<select id="selectServiceGroupUpper" resultType="java.lang.String">
SELECT
SERVICE_GROUP_UPPER
FROM
TB_SERVICE_GROUP
WHERE SERVICE_GROUP = #{serviceGroup}
</select>
<select id="selectOprByServiceCode" resultType="java.lang.String">
SELECT
OPR_MNG_CODE
FROM
TB_ICS_OPR_MNG_INFO
WHERE SERVICE_CODE = #{serviceGroup}
</select> </select>
<select id="selectIntentAnalysisList" resultType="java.util.HashMap"> <select id="selectIntentAnalysisList" resultType="java.util.HashMap">

@ -175,6 +175,7 @@
</choose> </choose>
</if> </if>
GROUP BY SEQ GROUP BY SEQ
ORDER BY OPR_MNG_CODE, SCENARIO_NAME ASC
</select> </select>
<select id="selectTokenListByScenario" resultType="string"> <select id="selectTokenListByScenario" resultType="string">

@ -9,7 +9,6 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
@SpringBootApplication @SpringBootApplication
@EnableFeignClients @EnableFeignClients
@EnableWebMvc
public class MainVmApplication extends SpringBootServletInitializer { public class MainVmApplication extends SpringBootServletInitializer {
public static void main(String[] args) { public static void main(String[] args) {

@ -0,0 +1,7 @@
package com.icomsys.main_vm.biz.addr.buildname.controller;
public class AddrBuildnameController {
}

@ -127,25 +127,25 @@ public class AdviceHandler {
return new ResponseEntity(er, HttpStatus.NOT_FOUND); return new ResponseEntity(er, HttpStatus.NOT_FOUND);
} }
@ExceptionHandler // @ExceptionHandler
public String CustomNoSuchFieldException(NoSuchFieldException e) { // public String CustomNoSuchFieldException(NoSuchFieldException e) {
return "adm/signin/signin"; // return "adm/signin/signin";
} // }
@ExceptionHandler
public String CustomNoSuchFieldException(CustomNoSuchFieldException e) {
return "adm/signin/signin";
}
@ExceptionHandler(NoHandlerFoundException.class)
public String noHandlerFoundHandle(NoHandlerFoundException e) {
return "cmm/error/egovError";
}
@ExceptionHandler // @ExceptionHandler
public ResponseEntity responseStatusException(ResponseStatusException e) { // public String CustomNoSuchFieldException(CustomNoSuchFieldException e) {
return ResponseEntity.status(e.getStatus()).build(); // return "adm/signin/signin";
} // }
//
// @ExceptionHandler(NoHandlerFoundException.class)
// public String noHandlerFoundHandle(NoHandlerFoundException e) {
// return "cmm/error/egovError";
// }
//
// @ExceptionHandler
// public ResponseEntity responseStatusException(ResponseStatusException e) {
// return ResponseEntity.status(e.getStatus()).build();
// }
} }

@ -0,0 +1,22 @@
package com.icomsys.main_vm.biz.botcom.ManageGreetMent.controller;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@Slf4j
@RequiredArgsConstructor
@RequestMapping("/admin/botcom/manage/manageGreetMent")
public class ManageGreetMentController {
@GetMapping("/manage.do")
public String ManageGreetMent() {
return "/adm/botcom/ManageGreetMent/ManageGreetMent";
}
}

@ -0,0 +1,22 @@
package com.icomsys.main_vm.biz.botcom.ManageHoliday.controller;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@Slf4j
@RequiredArgsConstructor
@RequestMapping("/admin/botcom/manage/manageHoliday")
public class ManageHolidayController {
@GetMapping("/manage.do")
public String ManageHoliday() {
return "/adm/botcom/ManageHoliday/ManageHoliday";
}
}

@ -0,0 +1,22 @@
package com.icomsys.main_vm.biz.botcom.ManageNatural.controller;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@Slf4j
@RequiredArgsConstructor
@RequestMapping("/admin/botcom/manage/manageNatural")
public class ManageNaturalController {
@GetMapping("/manage.do")
public String ManageNatural() {
return "/adm/botcom/ManageNatural/ManageNatural";
}
}

@ -0,0 +1,22 @@
package com.icomsys.main_vm.biz.botcom.ManagerMent;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@Slf4j
@RequiredArgsConstructor
@RequestMapping("/admin/botcom/manageMent")
public class ManagerMentController {
@GetMapping("/manage.do")
public String ManagerMent() {
return "/adm/botcom/ManagerMent/ManagerMent";
}
}

@ -0,0 +1,20 @@
package com.icomsys.main_vm.biz.botmoni.AddrRealtimeListExpansion.controller;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@Slf4j
@RequiredArgsConstructor
@RequestMapping("/admin/botmoni/addrRealtimeListExpansion")
public class AddrRealtimeListExpansionController {
@GetMapping("/manage.do")
public String AddrRealtimeListExpansion() {
return "/adm/botmoni/AddrRealtimeListExpansion/AddrRealtimeListExpansion";
}
}

@ -0,0 +1,21 @@
package com.icomsys.main_vm.biz.botmoni.GuideRealtimeListExpansion.controller;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@Slf4j
@RequiredArgsConstructor
@RequestMapping("/admin/botmoni/guideRealtimeListExpansion")
public class GuideRealtimeListExpansionController {
@GetMapping("/manage.do")
public String GuideRealtimeListExpansion() {
return "/adm/botmoni/GuideRealtimeListExpansion/GuideRealtimeListExpansion";
}
}

@ -0,0 +1,21 @@
package com.icomsys.main_vm.biz.botmoni.ReceiptRealtimeListExpansion.controller;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@Slf4j
@RequiredArgsConstructor
@RequestMapping("/admin/botmoni/receiptRealtimeListExpansion")
public class ReceiptRealtimeListExpansionController {
@GetMapping("/manage.do")
public String ReceiptRealtimeListExpansion() {
return "/adm/botmoni/ReceiptRealtimeListExpansion/ReceiptRealtimeListExpansion";
}
}

@ -13,9 +13,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;

@ -6,6 +6,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -19,8 +20,9 @@ public class DashboardController {
private final StatisticsDashboardService statisticsDashboardService; private final StatisticsDashboardService statisticsDashboardService;
@GetMapping("/manage.do") @GetMapping("/manage.do")
public String DashboardView(){ public ModelAndView DashboardView(){
return "/adm/common/dashboard"; // return "/adm/common/dashboard";
return new ModelAndView("/layout/adm/common/dashboard");
} }
@RequestMapping(value = "/callinfolist.do", method = {RequestMethod.GET, RequestMethod.POST}) @RequestMapping(value = "/callinfolist.do", method = {RequestMethod.GET, RequestMethod.POST})

@ -12,7 +12,9 @@ import javax.servlet.http.HttpServletRequest;
@Controller @Controller
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
public class ErrorPageController implements ErrorController { public class ErrorPageController
// implements ErrorController
{
private final HttpServletRequest httpServletRequest; private final HttpServletRequest httpServletRequest;
@ -22,18 +24,18 @@ public class ErrorPageController implements ErrorController {
Object status = httpServletRequest.getAttribute(RequestDispatcher.ERROR_STATUS_CODE); Object status = httpServletRequest.getAttribute(RequestDispatcher.ERROR_STATUS_CODE);
log.info("error status - {}", status.toString()); log.info("error status - {}", status.toString());
if(status.equals("490")){ // if(status.equals("490")){
return "adm/signin/signin"; // return "adm/signin/signin";
} // }
if(status.toString().equals("491")){ // if(status.toString().equals("491")){
return "adm/signin/changePwd"; // return "adm/signin/changePwd";
} // }
// ModelMap mm = new ModelMap(); // ModelMap mm = new ModelMap();
// ErrorResult er = new ErrorResult(); // ErrorResult er = new ErrorResult();
// er.setCode(status.toString()); // er.setCode(status.toString());
// mm.addAttribute("errorResult", "aaa"); // mm.addAttribute("errorResult", "aaa");
// return "adm/common/error"; // return "adm/common/error";
return "adm/signin/signin"; return "/layout/signin";
} }
} }

@ -0,0 +1,15 @@
package com.icomsys.main_vm.biz.common.login;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@Builder
@Data
@AllArgsConstructor
public class CinnamonToken {
private String grantType;
private String accessToken;
private String refreshToken;
}

@ -0,0 +1,157 @@
package com.icomsys.main_vm.biz.common.login;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.icomsys.main_vm.db.jpa.entity.system.TbBotUser;
import com.icomsys.main_vm.db.jpa.repo.system.TbUserAuthGroupRepo;
import io.jsonwebtoken.*;
import io.jsonwebtoken.io.Decoders;
import io.jsonwebtoken.security.Keys;
import lombok.extern.slf4j.Slf4j;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletResponse;
import java.security.Key;
import java.time.LocalDateTime;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.stream.Collectors;
@Slf4j
@Component
public class TokenProvider {
private final TbUserAuthGroupRepo tbUserAuthGroupRepo;
private static final long ACCESS_TOKEN_EXPIRE_TIME = 20 * 60 * 1000L;
private static final long REFRESH_TOKEN_EXPIRE_TIME = 24 * 60 * 60 * 1000L;
private final Key key;
public TokenProvider(@Value("${spring.jwt.secret}") String secretKey, TbUserAuthGroupRepo tbUserAuthGroupRepo) {
this.tbUserAuthGroupRepo = tbUserAuthGroupRepo;
byte[] keyBytes = Decoders.BASE64.decode(secretKey);
this.key = Keys.hmacShaKeyFor(keyBytes);
}
public String generateToken(TbBotUser user) throws JsonProcessingException {
// 권한 가져오기
// String authorities = authentication.getAuthorities().stream()
// .map(GrantedAuthority::getAuthority)
// .collect(Collectors.joining(","));
long now = (new Date()).getTime();
// Access Token 생성
// Todo: Access Token 필요정보 추가 개발 필요
Date accessTokenExpiresIn = new Date(now + ACCESS_TOKEN_EXPIRE_TIME); // Todo: Access Token 만료 기간 설정 파일 추가
Claims claims = Jwts.claims()
.setSubject(user.getUserName())
.setExpiration(accessTokenExpiresIn);
// claims.put("auth", authorities);
// ObjectMapper mapper = new ObjectMapper();
// claims.put("UserVO", mapper.registerModule(new JavaTimeModule()).writeValueAsString(user.toUserVO()));
// try {
// JavaTimeModule javaTimeModule = new JavaTimeModule();
// LocalDateTimeSerializer localDateTimeSerializer = new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
// javaTimeModule.addSerializer(LocalDateTime.class, localDateTimeSerializer);
// // claims.put("UserVO", mapper.registerModule(javaTimeModule).readValue(user.toUserVO(), UserVo.class));
// claims.put("UserVO", mapper.registerModule(javaTimeModule).writeValueAsString(user.toUserVO()));
// // claims.put("PolicyList", tbUserAuthGroupRepo.userPolicyListSelect(user.getUserSeq(), user.getLastUseServiceGroup()));
// }
//
// catch (Exception e) {
// e.printStackTrace();
// }
// claims.put("UserVO", user.toUserVO());
String accessToken = createAccessToken(user, accessTokenExpiresIn);
// Refresh Token 생성
String refreshToken = createRefreshToken(accessTokenExpiresIn);
return accessToken;
}
private String createAccessToken(TbBotUser user, Date accessTokenExpiresIn) {
return Jwts.builder()
.setSubject(user.getUserName())
.setClaims(Jwts.claims()
.setSubject(user.getUserName())
.setExpiration(accessTokenExpiresIn)
).claim("UserVO", new Gson().toJson(user.toUserVO()))
.setExpiration(accessTokenExpiresIn)
.signWith(key, SignatureAlgorithm.HS256)
.compact();
}
private String createRefreshToken(Date accessTokenExpiresIn) {
return Jwts.builder()
.setExpiration(accessTokenExpiresIn) // Todo: Refresh Token 만료 기간 설정 파일에 추가
.signWith(key, SignatureAlgorithm.HS256)
.compact();
}
// JWT 토큰을 복호화하여 토큰에 들어있는 정보를 꺼내는 메서드
public Authentication getAuthentication(String accessToken) {
// 토큰 복호화
Claims claims = parseClaims(accessToken);
// Todo: 권한 관련 정보 처리
if (claims.get("auth") == null) {
throw new RuntimeException("권한 정보가 없는 토큰입니다.");
}
// Todo: 사용자 정보와 권한 관련 정보를 읽어와 리턴
// 클레임에서 권한 정보 가져오기
Collection<? extends GrantedAuthority> authorities =
Arrays.stream(claims.get("auth").toString().split(","))
.map(SimpleGrantedAuthority::new)
.collect(Collectors.toList());
// UserDetails 객체를 만들어서 Authentication 리턴
// UserDetails principal = new User(claims.getSubject(), "", authorities);
return new UsernamePasswordAuthenticationToken(/*principal*/ "", "", authorities);
}
// 토큰 정보를 검증하는 메서드
public boolean validateToken(String token) {
// Todo: 내부 토큰 사용 정책에 따라 추후 수정 필요!!
try {
Jwts.parserBuilder().setSigningKey(key).build().parseClaimsJws(token);
return true;
} catch (io.jsonwebtoken.security.SecurityException | MalformedJwtException e) {
log.info("Invalid JWT Token", e);
} catch (ExpiredJwtException e) {
log.info("Expired JWT Token", e);
} catch (UnsupportedJwtException e) {
log.info("Unsupported JWT Token", e);
} catch (IllegalArgumentException e) {
log.info("JWT claims string is empty.", e);
}
return false;
}
public Claims parseClaims(String accessToken) {
try {
return Jwts.parserBuilder().setSigningKey(key).build().parseClaimsJws(accessToken).getBody();
} catch (ExpiredJwtException e) {
return e.getClaims();
}
}
}

@ -16,13 +16,12 @@ import com.icomsys.main_vm.biz.common.login.service.LoginService;
import com.icomsys.main_vm.common.code.MenuVo; import com.icomsys.main_vm.common.code.MenuVo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.security.core.userdetails.User;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid; import javax.validation.Valid;
@ -40,16 +39,7 @@ public class LoginController {
private final FileService fileService; private final FileService fileService;
private final HttpServletRequest httpServletRequest; private final HttpServletRequest httpServletRequest;
@GetMapping(value = {"/adm/main/egovLoginUsr.do", "/"})
public String loginUsrView() {
loginService.Logout();
return "adm/signin/signin";
}
@GetMapping(value = "/adm/main/changePwd")
public String changePwd() {
return "adm/signin/changePwd";
}
@PostMapping(value = "/adm/main/pwd/update") @PostMapping(value = "/adm/main/pwd/update")
public ResponseEntity PwdUpdate(@RequestBody PwdUpdateReq dto) throws CustomNotFoundException, CustomBadRequestException { public ResponseEntity PwdUpdate(@RequestBody PwdUpdateReq dto) throws CustomNotFoundException, CustomBadRequestException {
@ -59,18 +49,25 @@ public class LoginController {
@PostMapping("/adm/main/check") @PostMapping("/adm/main/check")
@ResponseBody @ResponseBody
public ResponseEntity loginCheck(@RequestBody LoginCheckReq dto) throws CustomNotFoundException, CustomBadRequestException { public String loginCheck(@RequestBody LoginCheckReq dto) throws CustomNotFoundException, CustomBadRequestException {
return loginService.loginCheck(dto); return loginService.loginCheck(dto);
} }
@RequestMapping(value = "/adm/main/actionSecurityLogin.do") @RequestMapping(value = "/adm/main/actionSecurityLogin.do")
public String actionSecurityLogin(@Valid LoginReq loginReq, ModelMap model) { public ModelAndView actionSecurityLogin(
return loginService.LoginValidService(loginReq, model); // @Valid LoginReq loginReq,
ModelMap model) {
log.info("actionlogin");
// return loginService.LoginValidService(loginReq, model);
// String url = loginService.LoginValidService(loginReq, model);
// log.info("redi url? - -{}", url);
return new ModelAndView("layout/main");
} }
@RequestMapping(value = "/adm/main/actionMain.do") @RequestMapping(value = "/adm/main/actionMain.do")
public String actionMain(ModelMap model) { public String actionMain(ModelMap model) {
return loginService.actionMain(model); return loginService.actionMain(model);
// return new ModelAndView(loginService.actionMain(model));
} }
@GetMapping("/adm/main/actionLogout.do") @GetMapping("/adm/main/actionLogout.do")
@ -105,70 +102,6 @@ public class LoginController {
loginService.LastUserServiceGroupUpdate(userSeq, updateService); loginService.LastUserServiceGroupUpdate(userSeq, updateService);
} }
/**
* oprMngCode
*
*
* @param serviceType
* @return
* @throws CustomNoSuchFieldException
*/
@GetMapping("/adm/menu/oprmng")
@ResponseBody
public List<OprmngCodeRes> getOprmngCode(@RequestParam(name = "serviceType", required = false) String serviceType,
@RequestParam(name = "menuval", required = false) String menuval) throws CustomNoSuchFieldException {
if (loginService.getUserVo() == null) {
throw new CustomNoSuchFieldException();
}
log.info("getOPR INIT");
return loginService.getOprmngCode(serviceType, menuval);
}
/**
* oprMngCode
*
*
*
* @param serviceType
* @return
* @throws CustomNoSuchFieldException
*/
@GetMapping("/adm/menu/oprmng/admin")
@ResponseBody
public List<OprmngCodeRes> getOprmngCodeAdmin(@RequestParam(name = "serviceType", required = false) String serviceType) throws CustomNoSuchFieldException {
if (loginService.getUserVo() == null) {
throw new CustomNoSuchFieldException();
}
log.info("getOPR INIT");
return loginService.getOprmngCodeAdmin(serviceType);
}
@GetMapping("/adm/menu/main/oprmng")
@ResponseBody
public ResponseEntity getMainOprmngCode() throws CustomNoSuchFieldException, NoSuchFieldException {
//List<OprmngCodeRes>
if (httpServletRequest.getSession() == null) {
log.info("SESSION NULL");
return ResponseEntity.badRequest().build();
}
if (loginService.getUserVo() == null) {
log.info("getMainOprmngCode NULL");
return ResponseEntity.badRequest().build();
}
log.info("getOPR INIT");
return ResponseEntity.ok(loginService.getMainOprmngCode());
}
@PostMapping("/adm/menu/main/oprmng/update")
@ResponseBody
public void getMainOprmngCodeUpdate(@RequestBody MainOprReq dto) throws CustomNoSuchFieldException, CustomNotFoundException {
if (loginService.getUserVo() == null) {
throw new CustomNoSuchFieldException();
}
log.info("getOPR INIT - {}", new Gson().toJson(dto));
loginService.getMainOprmngCodeUpdate(dto);
}
@GetMapping("/adm/menu/jstree/policy/parent") @GetMapping("/adm/menu/jstree/policy/parent")
@ -190,16 +123,8 @@ public class LoginController {
return fileService.PdfDownload(name); return fileService.PdfDownload(name);
} }
@GetMapping("/adm/main/uv")
@ResponseBody
public UserVo getUserVo() throws CustomNoSuchFieldException {
if (loginService.getUserVo() == null) {
throw new CustomNoSuchFieldException();
} else {
return loginService.getUserVo();
}
}
}
}

@ -0,0 +1,114 @@
package com.icomsys.main_vm.biz.common.login.controller;
import com.google.gson.Gson;
import com.icomsys.main_vm.biz.advice.excep.CustomNoSuchFieldException;
import com.icomsys.main_vm.biz.advice.excep.CustomNotFoundException;
import com.icomsys.main_vm.biz.common.login.TokenProvider;
import com.icomsys.main_vm.biz.common.login.req.MainOprReq;
import com.icomsys.main_vm.biz.common.login.res.OprmngCodeRes;
import com.icomsys.main_vm.biz.common.login.res.UserVo;
import com.icomsys.main_vm.biz.common.login.service.LoginService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
@RestController
@RequiredArgsConstructor
@Slf4j
@RequestMapping("/api/v1")
public class TokenController {
private final TokenProvider tokenProvider;
private final LoginService loginService;
private final HttpServletRequest httpServletRequest;
@GetMapping("/token/check")
public String checkToken(){
// return tokenProvider.parseClaims(
// httpServletRequest.getHeader("Authorization").split(" ")[1]);
return "";
}
@GetMapping("/token/main/oprmng")
@ResponseBody
public ResponseEntity getMainOprmngCode() throws CustomNoSuchFieldException, NoSuchFieldException {
//List<OprmngCodeRes>
if (httpServletRequest.getSession() == null) {
log.info("SESSION NULL");
return ResponseEntity.badRequest().build();
}
if (loginService.getUserVo() == null) {
log.info("getMainOprmngCode NULL");
return ResponseEntity.badRequest().build();
}
log.info("getOPR INIT");
return ResponseEntity.ok(loginService.getMainOprmngCode());
}
@GetMapping("/token/main/uv")
@ResponseBody
public UserVo getUserVo() throws CustomNoSuchFieldException {
if (loginService.getUserVo() == null) {
throw new CustomNoSuchFieldException();
} else {
return loginService.getUserVo();
}
}
/**
* oprMngCode
*
*
* @param serviceType
* @return
* @throws CustomNoSuchFieldException
*/
@GetMapping("/token/menu/oprmng")
@ResponseBody
public List<OprmngCodeRes> getOprmngCode(@RequestParam(name = "serviceType", required = false) String serviceType,
@RequestParam(name = "menuval", required = false) String menuval) throws CustomNoSuchFieldException {
if (loginService.getUserVo() == null) {
throw new CustomNoSuchFieldException();
}
log.info("getOPR INIT");
return loginService.getOprmngCode(serviceType, menuval);
}
/**
* oprMngCode
*
*
*
* @param serviceType
* @return
* @throws CustomNoSuchFieldException
*/
@GetMapping("/token/menu/oprmng/admin")
@ResponseBody
public List<OprmngCodeRes> getOprmngCodeAdmin(@RequestParam(name = "serviceType", required = false) String serviceType) throws CustomNoSuchFieldException {
if (loginService.getUserVo() == null) {
throw new CustomNoSuchFieldException();
}
log.info("getOPR INIT");
return loginService.getOprmngCodeAdmin(serviceType);
}
@PostMapping("/token/menu/main/oprmng/update")
@ResponseBody
public void getMainOprmngCodeUpdate(@RequestBody MainOprReq dto) throws CustomNoSuchFieldException, CustomNotFoundException {
if (loginService.getUserVo() == null) {
throw new CustomNoSuchFieldException();
}
log.info("getOPR INIT - {}", new Gson().toJson(dto));
loginService.getMainOprmngCodeUpdate(dto);
}
}

@ -1,10 +1,17 @@
package com.icomsys.main_vm.biz.common.login.service; package com.icomsys.main_vm.biz.common.login.service;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonObject;
import com.icomsys.main_vm.biz.advice.excep.CustomBadRequestException; import com.icomsys.main_vm.biz.advice.excep.CustomBadRequestException;
import com.icomsys.main_vm.biz.advice.excep.CustomNotFoundException; import com.icomsys.main_vm.biz.advice.excep.CustomNotFoundException;
import com.icomsys.main_vm.biz.common.common.service.LogService; import com.icomsys.main_vm.biz.common.common.service.LogService;
import com.icomsys.main_vm.biz.common.common.service.LogVO; import com.icomsys.main_vm.biz.common.common.service.LogVO;
import com.icomsys.main_vm.biz.common.login.CinnamonToken;
import com.icomsys.main_vm.biz.common.login.TokenProvider;
import com.icomsys.main_vm.biz.common.login.req.LoginReq; import com.icomsys.main_vm.biz.common.login.req.LoginReq;
import com.icomsys.main_vm.biz.common.login.req.MainOprReq; import com.icomsys.main_vm.biz.common.login.req.MainOprReq;
import com.icomsys.main_vm.biz.common.login.req.PwdUpdateReq; import com.icomsys.main_vm.biz.common.login.req.PwdUpdateReq;
@ -20,8 +27,11 @@ import com.icomsys.main_vm.db.jpa.entity.conversation.TbIcsLog;
import com.icomsys.main_vm.db.jpa.entity.system.TbBotUser; import com.icomsys.main_vm.db.jpa.entity.system.TbBotUser;
import com.icomsys.main_vm.db.jpa.repo.system.*; import com.icomsys.main_vm.db.jpa.repo.system.*;
import com.icomsys.main_vm.db.mybatis.alias.LoginVO; import com.icomsys.main_vm.db.mybatis.alias.LoginVO;
import io.jsonwebtoken.Claims;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.catalina.User;
import org.json.JSONObject;
import org.springframework.context.MessageSource; import org.springframework.context.MessageSource;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
@ -37,10 +47,14 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -64,17 +78,21 @@ public class LoginService {
private final TbUserAuthGroupRepo tbUserAuthGroupRepo; private final TbUserAuthGroupRepo tbUserAuthGroupRepo;
private final TbServiceGrouopRepo tbServiceGrouopRepo; private final TbServiceGrouopRepo tbServiceGrouopRepo;
private final TbUserCustRepo tbUserCustRepo; private final TbUserCustRepo tbUserCustRepo;
// private final LogService logService; // private final LogService logService;
private final TbIcsLogRepo tbIcsLogRepo; private final TbIcsLogRepo tbIcsLogRepo;
private final ClientIp clientIp; private final ClientIp clientIp;
private final TokenProvider tokenProvider;
//LoginVo의 경우 Egov 레거시매퍼의존성이 잡혀있어. req에 분리 불가능 //LoginVo의 경우 Egov 레거시매퍼의존성이 잡혀있어. req에 분리 불가능
@Transactional @Transactional
public String LoginValidService(LoginReq dto, ModelMap model) { public String LoginValidService(LoginReq dto, ModelMap model) {
//기본 리턴은 로그인페이지 //기본 리턴은 로그인페이지
String result = "adm/signin/signin"; // String result = "adm/signin/signin";
String result = "layout/signin";
TbBotUser userSelect = null; TbBotUser userSelect = null;
TbBotUser user = tbBotUserRepo.findByUserIdAndUseYn(dto.getUserId(), "Y") TbBotUser user = tbBotUserRepo.findByUserIdAndUseYn(dto.getUserId(), "Y")
@ -96,7 +114,10 @@ public class LoginService {
sessionSetting(user); sessionSetting(user);
LoginVO userResult = user.toLoginVO(); LoginVO userResult = user.toLoginVO();
return "forward:/adm/main/actionMain.do"; // return "forward:/adm/main/actionMain.do";
// return "layout/adm/common/dashboard";
return "layout/main";
} else { } else {
log.info("Fail!"); log.info("Fail!");
} }
@ -122,7 +143,10 @@ public class LoginService {
List<MenuVo> menuVos = new ArrayList<>(); List<MenuVo> menuVos = new ArrayList<>();
String url = ""; String url = "";
// LoginVO loginVO = (LoginVO) httpServletRequest.getSession().getAttribute(SessionResource.LoginVO.getName()); // LoginVO loginVO = (LoginVO) httpServletRequest.getSession().getAttribute(SessionResource.LoginVO.getName());
UserVo userVo = (UserVo) httpServletRequest.getSession().getAttribute(SessionResource.UserVO.getName());
// UserVo userVo = (UserVo) httpServletRequest.getSession().getAttribute(SessionResource.UserVO.getName());
UserVo userVo = getUserVo();
log.info("action main session uservo- {}", new Gson().toJson(userVo)); log.info("action main session uservo- {}", new Gson().toJson(userVo));
// if (loginVO != null && loginVO.getUserId() != null && !loginVO.getUserId().equals("")) { // if (loginVO != null && loginVO.getUserId() != null && !loginVO.getUserId().equals("")) {
if (userVo != null && userVo.getUserId() != null && !userVo.getUserId().equals("")) { if (userVo != null && userVo.getUserId() != null && !userVo.getUserId().equals("")) {
@ -157,10 +181,10 @@ public class LoginService {
} }
public UserVo getUserVo() { public UserVo getUserVo() {
UserVo user = (UserVo) httpServletRequest.getSession().getAttribute(SessionResource.UserVO.getName()); UserVo user = (UserVo) httpServletRequest.getAttribute("UserVO");
// if (user == null || user.equals("")) { log.info("get User Vo!!!! - {}", new Gson().toJson((user) ));
// httpServletResponse.setStatus(401); log.info("get User Vo!!!! - {}", user.getRegistDate());
// } log.info("get User Vo!!!! - {}", user.getUpdateDate());
return user; return user;
} }
@ -351,8 +375,13 @@ public class LoginService {
} }
@Transactional @Transactional
public ResponseEntity loginCheck(LoginCheckReq dto) throws CustomNotFoundException, CustomBadRequestException { public String loginCheck(LoginCheckReq dto) throws CustomNotFoundException, CustomBadRequestException {
// 1. Login ID/PW 를 기반으로 Authentication 객체 생성
// 이때 authentication 는 인증 여부를 확인하는 authenticated 값이 false
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(dto.getUserId(), dto.getPassword());
TbBotUser user = tbBotUserRepo.findByUserId(dto.getUserId()).orElseThrow(() -> new CustomNotFoundException()); TbBotUser user = tbBotUserRepo.findByUserId(dto.getUserId()).orElseThrow(() -> new CustomNotFoundException());
if (user.getLoginCheck() >= 5) { if (user.getLoginCheck() >= 5) {
throw new CustomBadRequestException(); throw new CustomBadRequestException();
} }
@ -360,7 +389,7 @@ public class LoginService {
throw new CustomBadRequestException(); throw new CustomBadRequestException();
} }
if (LocalDateTime.now().isAfter(user.getUpdateDate().plusDays(90))) { if (LocalDateTime.now().isAfter(user.getUpdateDate().plusDays(90))) {
return ResponseEntity.status(401).build(); ResponseEntity.status(401).build();
} }
if (!passwordEncoder.matches(dto.getPassword(), user.getPassword())) { if (!passwordEncoder.matches(dto.getPassword(), user.getPassword())) {
user.loginFailCheck(); user.loginFailCheck();
@ -376,15 +405,27 @@ public class LoginService {
.registDate(LocalDateTime.now()) .registDate(LocalDateTime.now())
.userId(user.getUserId()) .userId(user.getUserId())
.actionCode(ActionResource.login.name()) .actionCode(ActionResource.login.name())
.menuAuth(MenuResource.commonsystemusermanage.name()) .menuAuth(MenuResource.systemuser.name())
.ip(clientIp.getClientIp()) .ip(clientIp.getClientIp())
.serviceGroup(user.getLastUseServiceGroup()) .serviceGroup(user.getLastUseServiceGroup())
.build() .build()
); );
user.resetLoginFailCheck(); user.resetLoginFailCheck();
ResponseEntity.ok().build();
// 2. 실제 검증 (사용자 비밀번호 체크)이 이루어지는 부분
// authenticate 매서드가 실행될 때 CustomUserDetailsService 에서 만든 loadUserByUsername 메서드가 실행
try {
// Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken);
// 3. 인증 정보를 기반으로 JWT 토큰 생성
String accessToken = tokenProvider.generateToken(user);
return accessToken;
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
} }
return ResponseEntity.ok().build();
} }

@ -24,14 +24,12 @@ public class SystemCommoncodeController {
private final SystemCommoncodeService systemOprmngcodeService; private final SystemCommoncodeService systemOprmngcodeService;
@GetMapping("/oprmngcode/manage.do")
public String OprmngcodeView() {
return "/adm/common/system/commoncode";
}
@PostMapping("/oprmngcode/list") @PostMapping("/oprmngcode/list")
@ResponseBody @ResponseBody
public DslDataTableRes<SystemCommoncodeRes> SystemCommoncodeList(@RequestBody SystemCommoncodeReq dto) { public DslDataTableRes<SystemCommoncodeRes> SystemCommoncodeList(@RequestBody SystemCommoncodeReq dto) {
log.info("test!!!");
QueryResults<SystemCommoncodeRes> result = systemOprmngcodeService.SystemCommoncodeList(dto); QueryResults<SystemCommoncodeRes> result = systemOprmngcodeService.SystemCommoncodeList(dto);
return new DslDataTableRes<SystemCommoncodeRes>(result); return new DslDataTableRes<SystemCommoncodeRes>(result);
} }

@ -22,16 +22,6 @@ public class SystemCustController {
private final SystemCustService custService; private final SystemCustService custService;
/**
* @Name JSP
* @Description JSP
* @Author JangWonSeok
* @CreateDate 2023. 03. 09.
*/
@GetMapping("/cust/manage.do")
public String CustListView() {
return "/adm/common/system/cust";
}
/** /**
* @Name API * @Name API
@ -47,16 +37,7 @@ public class SystemCustController {
return new DslDataTableRes<SystemIcsCustInfoRes>(result); return new DslDataTableRes<SystemIcsCustInfoRes>(result);
} }
/**
* @Name API
* @Description API
* @Author JangWonSeok
* @CreateDate 2023. 03. 09.
*/
@GetMapping("/cust/update")
public String custUpdate(@RequestParam(name = "custCode", required = true) String custCode) {
return "/adm/common/system/custUpdate";
}
/** /**
* @Name * @Name
@ -71,17 +52,7 @@ public class SystemCustController {
return custService.custSelect(custCode); return custService.custSelect(custCode);
} }
/**
* @Name
* @Description
* @Author JangWonSeok
* @CreateDate 2023. 03. 09.
*/
@GetMapping("/cust/insert")
public String CustInsert() {
log.info("CustInsert Controller");
return "/adm/common/system/custInsert";
}
/** /**
* @Name * @Name
@ -140,6 +111,7 @@ public class SystemCustController {
@PostMapping("/cust/modify") @PostMapping("/cust/modify")
@ResponseBody @ResponseBody
public void CustModify(@RequestBody SystemCustSaveReq dto) throws CustomNotFoundException { public void CustModify(@RequestBody SystemCustSaveReq dto) throws CustomNotFoundException {
log.info(" useYn------------------ {}", new Gson().toJson(dto));
custService.CustModify(dto); custService.CustModify(dto);
} }

@ -26,18 +26,6 @@ public class SystemGroupAuthController {
private final SystemGroupAuthService groupAuthService; private final SystemGroupAuthService groupAuthService;
/**
* @Name
* @Description
* @Author JangWonSeok
* @CreateDate 2023. 03. 09.
*/
@GetMapping("/groupAuth/manage.do")
public String GroupAuthView() {
log.info("group Auth View controller");
return "/adm/common/system/groupAuth";
}
/** /**
* @Name API * @Name API
* @Description API * @Description API
@ -52,17 +40,6 @@ public class SystemGroupAuthController {
return new DslDataTableRes<SystemServiceAuthGroupRes>(result); return new DslDataTableRes<SystemServiceAuthGroupRes>(result);
} }
/**
* @Name
* @Description JSP .
* @Author JangWonSeok
* @CreateDate 2023. 03. 09.
*/
@GetMapping("/groupAuth/view")
public String GroupAuthView(@RequestParam(name = "custCode", required = true) String custCode) {
log.info("view Controller - {}", custCode);
return "/adm/common/system/groupAuthView";
}
/** /**
* @Name * @Name
@ -88,17 +65,6 @@ public class SystemGroupAuthController {
groupAuthService.GroupAuthUpdateInsert(dto); groupAuthService.GroupAuthUpdateInsert(dto);
} }
/**
* @Name
* @Description JSP
* @Author JangWonSeok
* @CreateDate 2023. 03. 09.
*/
@GetMapping("/groupAuth/update")
public String GroupAuthUpdate() {
log.info("GroupAuthUpdate Controller");
return "/adm/common/system/groupAuthUpdate";
}
/** /**
* @Name * @Name

@ -19,14 +19,7 @@ import java.util.List;
public class SystemPolicyMenuController { public class SystemPolicyMenuController {
private final SystemPolicyMenuService systemPolicyMenuService; private final SystemPolicyMenuService systemPolicyMenuService;
/**
*
*/
@GetMapping("/policyMenu/manage.do")
public String PolicyMenuView(){
return "/adm/common/system/policyMenu";
}
@PostMapping("/policyMenu/list") @PostMapping("/policyMenu/list")
@ResponseBody @ResponseBody

@ -21,24 +21,8 @@ import java.util.List;
@RequestMapping("/admin/common/system") @RequestMapping("/admin/common/system")
public class SystemServiceGroupController { public class SystemServiceGroupController {
private final LoginService loginService;
private final SystemServiceGroupService systemServiceGroupService;
/** private final SystemServiceGroupService systemServiceGroupService;
* @Name
* @Description -> , ,
* @Author JangWonSeok
* @CreateDate 2023. 03. 09.
*/
@GetMapping("/serviceGroup/manage.do")
public String ServiceGroupView() {
UserVo uv = loginService.getUserVo();
if (uv.getRoleVal().equals(RoleResource.SYSTEMADMIN.getName())) {
return "/adm/common/system/serviceGroupList";
} else {
return "/adm/common/system/serviceGroupView";
}
}
/** /**
* @Name * @Name
@ -53,16 +37,6 @@ public class SystemServiceGroupController {
return new DslDataTableRes<SystemServiceGroupRes>(result); return new DslDataTableRes<SystemServiceGroupRes>(result);
} }
/**
* @Name
* @Description ->
* @Author JangWonSeok
* @CreateDate 2023. 03. 09.
*/
@GetMapping("/serviceGroup/view")
public String ServiceGroupView(@RequestParam(name = "serviceGroup", required = false) String serviceGroup) {
return "/adm/common/system/serviceGroupView";
}
/** /**
* @Name API * @Name API

@ -22,16 +22,7 @@ public class SystemUserAdminController {
private final SystemUserAdminService systemUserAdminService; private final SystemUserAdminService systemUserAdminService;
/**
* @Name
* @Description .
* @Author JangWonSeok
* @CreateDate 2023. 03. 09.
*/
@GetMapping("/userAdmin/manage.do")
public String UserAdminView() {
return "/adm/common/system/userAdmin";
}
@PostMapping("/userAdmin/list") @PostMapping("/userAdmin/list")
@ResponseBody @ResponseBody

@ -22,16 +22,6 @@ public class SystemUserController {
private final SystemUserService systemUserService; private final SystemUserService systemUserService;
/**
* @Name
* @Description JSP
* @Author JangWonSeok
* @CreateDate 2023. 03. 09.
*/
@GetMapping("/user/manage.do")
public String UserView() {
return "/adm/common/system/user";
}
/** /**
* @Name Data SEARCH API * @Name Data SEARCH API

@ -16,7 +16,6 @@ import com.icomsys.main_vm.db.jpa.repo.system.*;
import com.querydsl.core.QueryResults; import com.querydsl.core.QueryResults;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.stream.Streams;
import org.apache.el.lang.FunctionMapperImpl; import org.apache.el.lang.FunctionMapperImpl;
import org.apache.http.conn.HttpHostConnectException; import org.apache.http.conn.HttpHostConnectException;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -93,7 +92,7 @@ public class SystemCustService {
tbIcsOprMngInfoRepo.saveAll(dto.toOpr(uv)); tbIcsOprMngInfoRepo.saveAll(dto.toOpr(uv));
tbCustPolicyRepo.saveAll(dto.toPolicy()); tbCustPolicyRepo.saveAll(dto.toPolicy());
tbUserCustRepo.saveAll(dto.toSystemAdmin(uv)); tbUserCustRepo.saveAll(dto.toSystemAdmin(uv));
tbProjectSettingRepo.saveAll(WisenutInsert(dto.toWisenutInsert())); // tbProjectSettingRepo.saveAll(WisenutInsert(dto.toWisenutInsert()));
} }
public List<TbProjectSetting> WisenutInsert(List<WisenutInsertReqVo> dto) throws CustomNotFoundException { public List<TbProjectSetting> WisenutInsert(List<WisenutInsertReqVo> dto) throws CustomNotFoundException {
@ -200,7 +199,7 @@ public class SystemCustService {
String serviceGroup = e.getAddServiceGroup(); String serviceGroup = e.getAddServiceGroup();
List<TbCustPolicy> beforPol = custPolBase.get(serviceGroup); List<TbCustPolicy> beforPol = custPolBase.get(serviceGroup);
List<String> insertVal = e.getAuthList(); List<String> insertVal = e.getAuthList();
log.info("modiiiiiiii - {}", new Gson().toJson(e));
//수정할 데이터 //수정할 데이터
if (custPolBase.keySet().stream().collect(Collectors.toList()).contains(e.getAddServiceGroup())) { if (custPolBase.keySet().stream().collect(Collectors.toList()).contains(e.getAddServiceGroup())) {
TbServiceGrouop tsg = tbServiceGrouopRepo.findByServiceGroup(serviceGroup) TbServiceGrouop tsg = tbServiceGrouopRepo.findByServiceGroup(serviceGroup)
@ -237,7 +236,9 @@ public class SystemCustService {
.policyVal(h) .policyVal(h)
.build()); .build());
} }
log.info(".getAddUseYn() --- " + e.getAddUseYn());
saveService.add(e.toService(custResult.getCustCode(), uv)); saveService.add(e.toService(custResult.getCustCode(), uv));
// saveService.add(e.toService(custResult.getCustCode(), uv));
saveOpr.add(e.toOprmngCode(custResult.getCustCode(), uv)); saveOpr.add(e.toOprmngCode(custResult.getCustCode(), uv));
} }
} }
@ -246,9 +247,9 @@ public class SystemCustService {
tbCustPolicyRepo.deleteByServiceGroupInAndPolicyValIn(e, delUpperVal.get(e)); tbCustPolicyRepo.deleteByServiceGroupInAndPolicyValIn(e, delUpperVal.get(e));
tbServiceGroupPolicyRepo.deleteByServiceGroupInAndPolicyValIn(e, delUpperVal.get(e)); tbServiceGroupPolicyRepo.deleteByServiceGroupInAndPolicyValIn(e, delUpperVal.get(e));
} }
log.info(".saveService() --- {}" , new Gson().toJson(saveService));
tbCustPolicyRepo.saveAll(insertPol);
tbServiceGrouopRepo.saveAll(saveService); tbServiceGrouopRepo.saveAll(saveService);
tbCustPolicyRepo.saveAll(insertPol);
tbIcsOprMngInfoRepo.saveAll(saveOpr); tbIcsOprMngInfoRepo.saveAll(saveOpr);
//프로젝트세팅 테이블이 저장되어야 해야된다해서 나중에 추가된 코드 //프로젝트세팅 테이블이 저장되어야 해야된다해서 나중에 추가된 코드
//1차에선 데이터를 DB에서 SQL로 인서트했다고함. //1차에선 데이터를 DB에서 SQL로 인서트했다고함.
@ -260,7 +261,7 @@ public class SystemCustService {
.serviceGroupDesc(e.getServiceGroupDesc()) .serviceGroupDesc(e.getServiceGroupDesc())
.build()); .build());
} }
tbProjectSettingRepo.saveAll(WisenutInsert(saveProject)); // tbProjectSettingRepo.saveAll(WisenutInsert(saveProject));
} }
} }

@ -186,7 +186,7 @@ public class SystemServiceGroupService {
.oprMngCode(dto.getCustCode()+"_RCP_"+dto.getSubServiceGroup()) .oprMngCode(dto.getCustCode()+"_RCP_"+dto.getSubServiceGroup())
.serviceGroupDesc(dto.getSubServiceGroupDesc()) .serviceGroupDesc(dto.getSubServiceGroupDesc())
.build()); .build());
tbProjectSettingRepo.saveAll(systemCustService.WisenutInsert(proSet)); // tbProjectSettingRepo.saveAll(systemCustService.WisenutInsert(proSet));
} }

@ -34,7 +34,24 @@ public class SystemCustSaveSubReq {
this.authList = authList; this.authList = authList;
} }
public TbServiceGrouop toService(String custCode, UserVo uv, String yn) {
System.out.println("use - " + this.addUseYn);
return TbServiceGrouop.builder()
.serviceGroup(this.addServiceGroup.toUpperCase())
.serviceGroupUpper(this.addServiceGroup)
.custCode(custCode)
.serviceType("M")
.serviceGroupName(this.addServiceGroupName)
.serviceGroupDesc(this.addServiceGroupDesc)
.useYn(yn)
.registId(uv.getUserId())
.registDate(LocalDateTime.now())
.updateId(uv.getUserId())
.updateDate(LocalDateTime.now())
.build();
}
public TbServiceGrouop toService(String custCode, UserVo uv) { public TbServiceGrouop toService(String custCode, UserVo uv) {
System.out.println("use - " + this.addUseYn);
return TbServiceGrouop.builder() return TbServiceGrouop.builder()
.serviceGroup(this.addServiceGroup.toUpperCase()) .serviceGroup(this.addServiceGroup.toUpperCase())
.serviceGroupUpper(this.addServiceGroup) .serviceGroupUpper(this.addServiceGroup)
@ -42,7 +59,7 @@ public class SystemCustSaveSubReq {
.serviceType("M") .serviceType("M")
.serviceGroupName(this.addServiceGroupName) .serviceGroupName(this.addServiceGroupName)
.serviceGroupDesc(this.addServiceGroupDesc) .serviceGroupDesc(this.addServiceGroupDesc)
.useYn(this.addUseYn) .useYn("Y")
.registId(uv.getUserId()) .registId(uv.getUserId())
.registDate(LocalDateTime.now()) .registDate(LocalDateTime.now())
.updateId(uv.getUserId()) .updateId(uv.getUserId())
@ -56,7 +73,7 @@ public class SystemCustSaveSubReq {
.serviceGroup(this.addServiceGroup) .serviceGroup(this.addServiceGroup)
.oprMngCode(custCode+"_RCP_"+this.addServiceGroup.toUpperCase()) .oprMngCode(custCode+"_RCP_"+this.addServiceGroup.toUpperCase())
.solVal("RCP") .solVal("RCP")
.useYn(this.addUseYn) .useYn("Y")
.registId(uv.getUserId()) .registId(uv.getUserId())
.registDate(LocalDateTime.now()) .registDate(LocalDateTime.now())
.updateId(uv.getUserId()) .updateId(uv.getUserId())

@ -0,0 +1,58 @@
package com.icomsys.main_vm.biz.common.view;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@Slf4j
@RequiredArgsConstructor
@RequestMapping("/view/addr")
public class ViewAddrController {
@GetMapping(value = "/section")
public String addrSection() {
return "layout/menu/addr/section";
}
@GetMapping(value = "/buildname")
public String addrBuildname() {
return "layout/menu/addr/buildname";
}
@GetMapping(value = "/synonym")
public String addrSynonym() {
return "layout/menu/addr/synonym";
}
@GetMapping(value = "/buildtype")
public String addrBuildtype() {
return "layout/menu/addr/buildtype";
}
@GetMapping(value = "/jusoupload")
public String addrJusoupload() {
return "layout/menu/addr/jusoupload";
}
@GetMapping(value = "/process")
public String addrProcess() {
return "layout/menu/addr/process";
}
@GetMapping(value = "/search")
public String addrSearch() {
return "layout/menu/addr/search";
}
@GetMapping(value = "/natural")
public String addrNatural() {
return "layout/menu/addr/natural";
}
}

@ -0,0 +1,122 @@
package com.icomsys.main_vm.biz.common.view;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@Slf4j
@RequiredArgsConstructor
@RequestMapping("/view/aiconsultation")
public class ViewAiconsultationController {
@GetMapping(value = "/scenario/intent")
public String aiconsultationscenariointent() {
return "layout/menu/aiconsultation/scenario/intent";
}
@GetMapping(value = "/scenario/synonym")
public String aiconsultationscenariosynonym() {
return "layout/menu/aiconsultation/scenario/synonym";
}
@GetMapping(value = "/scenario/systementity")
public String aiconsultationscenariosystementity() {
return "layout/menu/aiconsultation/scenario/systementity";
}
@GetMapping(value = "/scenario/userentity")
public String aiconsultationscenariouserentity() {
return "layout/menu/aiconsultation/scenario/userentity";
}
@GetMapping(value = "/scenario/scenariomanage")
public String aiconsultationscenarioscenariomanage() {
return "layout/menu/aiconsultation/scenario/scenariomanage";
}
@GetMapping(value = "/scenario/apinode")
public String aiconsultationscenarioapinode() {
return "layout/menu/aiconsultation/scenario/apinode";
}
@GetMapping(value = "/scenario/commonnode")
public String aiconsultationscenariocommonnode() {
return "layout/menu/aiconsultation/scenario/commonnode";
}
@GetMapping(value = "/counrec/intentanalyze")
public String aiconsultationcounrecintentanalyze() {
return "layout/menu/aiconsultation/counrec/intentanalyze";
}
@GetMapping(value = "/counrec/list")
public String aiconsultationcounreclist() {
return "layout/menu/aiconsultation/counrec/list";
}
@GetMapping(value = "/campaign/manage")
public String aiconsultationcampaignmanage() {
return "layout/menu/aiconsultation/campaign/manage";
}
@GetMapping(value = "/campaign/survey")
public String aiconsultationcampaignsurvey() {
return "layout/menu/aiconsultation/campaign/survey";
}
@GetMapping(value = "/campaign/user")
public String aiconsultationcampaignuser() {
return "layout/menu/aiconsultation/campaign/user";
}
@GetMapping(value = "/campaign/perform")
public String aiconsultationcampaignperform() {
return "layout/menu/aiconsultation/campaign/perform";
}
@GetMapping(value = "/monitoring/response")
public String aiconsultationmonitoringresponse() {
return "layout/menu/aiconsultation/monitoring/response";
}
@GetMapping(value = "/monitoring/bookmark")
public String aiconsultationmonitoringbookmark() {
return "layout/menu/aiconsultation/monitoring/bookmark";
}
@GetMapping(value = "/monitoring/breaknode")
public String aiconsultationmonitoringbreaknode() {
return "layout/menu/aiconsultation/monitoring/breaknode";
}
@GetMapping(value = "/setting/greeting")
public String aiconsultationsettinggreeting() {
return "layout/menu/aiconsultation/setting/greeting";
}
@GetMapping(value = "/setting/bgm")
public String aiconsultationsettingbgm() {
return "layout/menu/aiconsultation/setting/bgm";
}
@GetMapping(value = "/setting/holiday")
public String aiconsultationsettingholiday() {
return "layout/menu/aiconsultation/setting/holiday";
}
@GetMapping(value = "/setting/tts")
public String aiconsultationsettingtts() {
return "layout/menu/aiconsultation/setting/tts";
}
@GetMapping(value = "/setting/nlp")
public String aiconsultationsettingnlp() {
return "layout/menu/aiconsultation/setting/nlp";
}
@GetMapping(value = "/realtimemonitoring")
public String aiconsultationrealtimemonitoring() {
return "layout/menu/aiconsultation/realtimemonitoring";
}
}

@ -0,0 +1,33 @@
package com.icomsys.main_vm.biz.common.view;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
@Controller
@Slf4j
@RequiredArgsConstructor
public class ViewController {
@GetMapping(value = "/view")
public ModelAndView view() {
return new ModelAndView("layout/main");
}
@GetMapping(value = {"/view/signin", "/"})
public ModelAndView viewSignin() {
return new ModelAndView("layout/signin");
}
@GetMapping(value = "/view/changePwd")
public String viewChangePwd() {
return "layout/changePwd";
}
@GetMapping(value = "/view/main")
public String viewMain() {
return "layout/dashboard";
}
}

@ -0,0 +1,103 @@
package com.icomsys.main_vm.biz.common.view;
import com.icomsys.main_vm.biz.common.login.service.LoginService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@Slf4j
@RequiredArgsConstructor
@RequestMapping("/view/customer")
public class ViewCustormerController {
private final LoginService loginService;
@GetMapping(value = "/company")
public String systemCust() {
return "layout/menu/customer/cust";
}
@GetMapping(value = "/servicegroup")
public String systemServicegroup() {
return "layout/menu/customer/serviceGroupList";
}
@GetMapping(value = "/license")
public String systemlicense() {
return "layout/menu/customer/license";
}
@GetMapping(value = "/dnis")
public String systemdnis() {
return "layout/menu/customer/dnis";
}
/*
@GetMapping("/view/admin/common/system/cust/manage.do")
public String CustListView() {
return "layout/adm/common/system/cust";
}
@GetMapping("/view/admin/common/system/cust/update")
public String custUpdate(@RequestParam(name = "custCode", required = true) String custCode) {
return "layout/adm/common/system/custUpdate";
}
@GetMapping("/view/admin/common/system/cust/insert")
public String CustInsert() {
log.info("CustInsert Controller");
return "layout/adm/common/system/custInsert";
}
@GetMapping("/view/admin/common/system/groupAuth/manage.do")
public String GroupAuthView() {
log.info("group Auth View controller");
return "layout/adm/common/system/groupAuth";
}
@GetMapping("/view/admin/common/system/groupAuth/view")
public String GroupAuthView(@RequestParam(name = "custCode", required = true) String custCode) {
log.info("view Controller - {}", custCode);
return "layout/adm/common/system/groupAuthView";
}
@GetMapping("/view/admin/common/system/groupAuth/update")
public String GroupAuthUpdate() {
log.info("GroupAuthUpdate Controller");
return "layout/adm/common/system/groupAuthUpdate";
}
@GetMapping("/view/admin/common/system/serviceGroup/manage.do")
public String ServiceGroupView() {
UserVo uv = loginService.getUserVo();
if (uv.getRoleVal().equals(RoleResource.SYSTEMADMIN.getName())) {
return "layout/adm/common/system/serviceGroupList";
} else {
return "layout/adm/common/system/serviceGroupView";
}
}
@GetMapping("/view/admin/common/system/serviceGroup/view")
public String ServiceGroupView(@RequestParam(name = "serviceGroup", required = false) String serviceGroup) {
return "layout/adm/common/system/serviceGroupView";
}
@GetMapping("/view/admin/common/system/userAdmin/manage.do")
public String UserAdminView() {
return "layout/adm/common/system/userAdmin";
}
@GetMapping("/view/admin/common/system/user/manage.do")
public String UserView() {
return "layout/adm/common/system/user";
}
*/
}

@ -0,0 +1,104 @@
package com.icomsys.main_vm.biz.common.view;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@Slf4j
@RequiredArgsConstructor
@RequestMapping("/view/guide")
public class ViewGuideController {
@GetMapping(value = "/realtime")
public String guideRealtime() {
return "layout/menu/guide/realtime";
}
@GetMapping(value = "/adminmonitoring")
public String guideAdminmonitoring() {
return "layout/menu/guide/adminmonitoring";
}
@GetMapping(value = "/history/list")
public String guideHistoryList() {
return "layout/menu/guide/history/list";
}
@GetMapping(value = "/history/outbox")
public String guideHistoryOutbox() {
return "layout/menu/guide/history/outbox";
}
@GetMapping(value = "/history/inbox")
public String guideHistoryInbox() {
return "layout/menu/guide/history/inbox";
}
@GetMapping(value = "/contents/search")
public String guideContentsSerarch() {
return "layout/menu/guide/contents/search";
}
@GetMapping(value = "/contents/manage")
public String guideContentsManage() {
return "layout/menu/guide/contents/manage";
}
@GetMapping(value = "/contents/evaluation")
public String guideContentsEvaluation() {
return "layout/menu/guide/contents/evaluation";
}
@GetMapping(value = "/contents/evaluationhistory")
public String guideContentsEvaluationhistory() {
return "layout/menu/guide/contents/evaluationhistory";
}
@GetMapping(value = "/nlp/conversation")
public String guideNlpConversation() {
return "layout/menu/guide/nlp/conversation";
}
@GetMapping(value = "/nlp/entity")
public String guideNlpEntity() {
return "layout/menu/guide/nlp/entity";
}
@GetMapping(value = "/nlp/conversationhistory")
public String guideNlpConversationhistory() {
return "layout/menu/guide/nlp/conversationhistory";
}
@GetMapping(value = "/nlp/ml")
public String guideNlpMl() {
return "layout/menu/guide/nlp/ml";
}
@GetMapping(value = "/nlp/conversationtest")
public String guideNlpconversationtest() {
return "layout/menu/guide/nlp/conversationtest";
}
@GetMapping(value = "/nlp/dictionary")
public String guideNlpdictionary() {
return "layout/menu/guide/nlp/dictionary";
}
@GetMapping(value = "/nlp/mlsuggestion")
public String guideNlpmlsuggestion() {
return "layout/menu/guide/nlp/mlsuggestion";
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save