Compare commits
27 Commits
main
...
dev_tymele
@ -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/
|
@ -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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,7 @@
|
|||||||
|
package com.icomsys.main_vm.biz.addr.buildname.controller;
|
||||||
|
|
||||||
|
|
||||||
|
public class AddrBuildnameController {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -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";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -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…
Reference in New Issue