From 2ab8cecd31de082c58d16d1d370b7ca7cc21fd95 Mon Sep 17 00:00:00 2001 From: BowWowBow Date: Thu, 19 Dec 2024 13:02:07 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=EC=9E=84=EC=8B=9C=EC=A0=80=EC=9E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stockm8/controller/HomeController.java | 120 ++++++++++ .../stockm8/controller/UserController.java | 98 +------- .../webapp/WEB-INF/views/consultation.jsp | 31 ++- .../main/webapp/WEB-INF/views/dashboard.jsp | 1 + .../src/main/webapp/WEB-INF/views/intro.jsp | 40 +++- .../main/webapp/WEB-INF/views/location.jsp | 179 ++++++++++++++ .../src/main/webapp/WEB-INF/views/main.jsp | 196 ++++++++-------- .../src/main/webapp/WEB-INF/views/price.jsp | 218 ++++++++++++++++++ 8 files changed, 698 insertions(+), 185 deletions(-) create mode 100644 stockMate/src/main/webapp/WEB-INF/views/location.jsp create mode 100644 stockMate/src/main/webapp/WEB-INF/views/price.jsp diff --git a/stockMate/src/main/java/com/stockm8/controller/HomeController.java b/stockMate/src/main/java/com/stockm8/controller/HomeController.java index bdd2290..b6079d1 100644 --- a/stockMate/src/main/java/com/stockm8/controller/HomeController.java +++ b/stockMate/src/main/java/com/stockm8/controller/HomeController.java @@ -3,7 +3,13 @@ import java.text.DateFormat; import java.util.Date; import java.util.Locale; +import java.util.Properties; +import javax.mail.Message; +import javax.mail.PasswordAuthentication; +import javax.mail.Session; +import javax.mail.Transport; +import javax.mail.internet.MimeMessage; import javax.servlet.http.HttpSession; import org.slf4j.Logger; @@ -12,6 +18,8 @@ import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.servlet.mvc.support.RedirectAttributes; /** * Handles requests for the application home page. @@ -106,6 +114,90 @@ public String consultationGET(Model model, HttpSession session) throws Exception return "consultation"; } + + // 상담하기 email - POST + @RequestMapping(value = "/", method = RequestMethod.POST) + public String sendConsultation( + @RequestParam("company") String company, + @RequestParam("name") String name, + @RequestParam("contact") String contact, + @RequestParam("email") String email, + @RequestParam("inquiry") String inquiry, + RedirectAttributes rttr) { + + final String fromEmail = "zzangmait@naver.com"; // 네이버 이메일 계정 + final String password = "571TT3J3UMVY"; // 네이버 이메일 비밀번호 + + String toEmail = "zzangmait@naver.com"; // 수신 이메일 주소 + + // SMTP 설정 + Properties props = new Properties(); + props.put("mail.smtp.host", "smtp.naver.com"); + props.put("mail.smtp.port", "465"); + props.put("mail.smtp.auth", "true"); + props.put("mail.smtp.ssl.enable", "true"); // SSL 활성화 + props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); + + Session session = Session.getInstance(props, new javax.mail.Authenticator() { + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(fromEmail, password); + } + }); + + try { + // 이메일 내용 설정 + MimeMessage message = new MimeMessage(session); + message.setFrom(new javax.mail.internet.InternetAddress(fromEmail)); + message.addRecipient(Message.RecipientType.TO, new javax.mail.internet.InternetAddress(toEmail)); + message.setSubject("상담 신청 정보"); + + // HTML 형식 이메일 본문 + String content = "" + + "" + + "
" + + "

상담 신청 정보

" + + "" + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + " " + + "
회사명" + company + "
이름" + name + "
연락처" + contact + "
이메일" + email + "
문의 내용" + inquiry + "
" + + "

상담 신청해주셔서 감사합니다.

" + + "
" + + ""; + + // 이메일 본문을 HTML로 설정 + message.setContent(content, "text/html; charset=UTF-8"); + + // 메일 전송 + Transport.send(message); + rttr.addFlashAttribute("message", "상담 신청이 성공적으로 전송되었습니다."); + } catch (Exception e) { + e.printStackTrace(); + rttr.addFlashAttribute("error", "이메일 전송에 실패했습니다. 다시 시도해주세요."); + } + + // http://localhost:8088/로 리다이렉트 + return "redirect:/"; + } + + // 회사소개 - /intro (GET) @RequestMapping(value = "/intro", method = RequestMethod.GET) public String introGET(Model model, HttpSession session) throws Exception { @@ -118,4 +210,32 @@ public String introGET(Model model, HttpSession session) throws Exception { // model.addAttribute("resultVO", resultVO); return "/intro"; } + + // 회사소개 - /price (GET) + @RequestMapping(value = "/price", method = RequestMethod.GET) + public String priceGET(Model model, HttpSession session) throws Exception { + Long userId = (Long) session.getAttribute("userId"); +// if (id == null) { +// // 세션에 id가 없으면 에러 처리 +// return "redirect:/user/main"; +// } +// UserVO resultVO = userService.getUser(userId); +// model.addAttribute("resultVO", resultVO); + return "/price"; + } + + + // 약도 - /minimap (GET) + @RequestMapping(value = "/minimap", method = RequestMethod.GET) + public String minimapGET(Model model, HttpSession session) throws Exception { + Long userId = (Long) session.getAttribute("userId"); +// if (id == null) { +// // 세션에 id가 없으면 에러 처리 +// return "redirect:/user/main"; +// } +// UserVO resultVO = userService.getUser(userId); +// model.addAttribute("resultVO", resultVO); + return "/minimap"; + } + } diff --git a/stockMate/src/main/java/com/stockm8/controller/UserController.java b/stockMate/src/main/java/com/stockm8/controller/UserController.java index 8f2c85b..2bb3c50 100644 --- a/stockMate/src/main/java/com/stockm8/controller/UserController.java +++ b/stockMate/src/main/java/com/stockm8/controller/UserController.java @@ -43,12 +43,10 @@ public class UserController { @Autowired private UserService userService; - - // http://localhost:8088 (o) // http://localhost:8088/user/signup (o) // http://localhost:8088/user/signin (o) - // http://localhost:8088/user/main (o) + // http://localhost:8088/ (o) // http://localhost:8088/user/info1 (o) // http://localhost:8088/user/info2 (o) // http://localhost:8088/dashboard (o) @@ -253,7 +251,7 @@ public String changepassword1GET(HttpSession session) { return "/user/changepassword1"; // 비밀번호 입력 페이지로 이동 } - // 회원정보 수정 + @RequestMapping(value = "/changepassword1", method = RequestMethod.POST) public String changepassword2POST(@RequestParam("password") String password, RedirectAttributes rttr, HttpSession session) { Long userId = (Long) session.getAttribute("userId"); @@ -283,7 +281,7 @@ public String changepassword2POST(@RequestParam("password") String password, Red } } - // - GET + @RequestMapping(value = "/changepassword2", method = RequestMethod.GET) public String changepassword2GET(@ModelAttribute("currentPassword") String currentPassword, Model model) { if (currentPassword == null || currentPassword.isEmpty()) { @@ -294,7 +292,6 @@ public String changepassword2GET(@ModelAttribute("currentPassword") String curre return "/user/changepassword2"; // JSP 페이지 반환 } - // - POST @RequestMapping(value = "/changepassword2", method = RequestMethod.POST) public void changePasswordPOST( @RequestParam("newPassword") String newPassword, @@ -340,96 +337,17 @@ public void changePasswordPOST( } } - // 상담하기 email - GET - @RequestMapping(value = "/sendConsultation", method = RequestMethod.POST) - public String sendConsultation( - @RequestParam("company") String company, - @RequestParam("name") String name, - @RequestParam("contact") String contact, - @RequestParam("email") String email, - @RequestParam("inquiry") String inquiry, - RedirectAttributes rttr) { - - final String fromEmail = "zzangmait@naver.com"; // 네이버 이메일 계정 - final String password = "571TT3J3UMVY"; // 네이버 이메일 비밀번호 - - String toEmail = "zzangmait@naver.com"; // 수신 이메일 주소 - - // SMTP 설정 - Properties props = new Properties(); - props.put("mail.smtp.host", "smtp.naver.com"); - props.put("mail.smtp.port", "465"); - props.put("mail.smtp.auth", "true"); - props.put("mail.smtp.ssl.enable", "true"); // SSL 활성화 - props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); - - Session session = Session.getInstance(props, new javax.mail.Authenticator() { - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(fromEmail, password); - } - }); - try { - // 이메일 내용 설정 - MimeMessage message = new MimeMessage(session); - message.setFrom(new javax.mail.internet.InternetAddress(fromEmail)); - message.addRecipient(Message.RecipientType.TO, new javax.mail.internet.InternetAddress(toEmail)); - message.setSubject("상담 신청 정보"); - - // HTML 형식 이메일 본문 - String content = "" - + "" - + "
" - + "

상담 신청 정보

" - + "" - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + " " - + "
회사명" + company + "
이름" + name + "
연락처" + contact + "
이메일" + email + "
문의 내용" + inquiry + "
" - + "

상담 신청해주셔서 감사합니다.

" - + "
" - + ""; - - // 이메일 본문을 HTML로 설정 - message.setContent(content, "text/html; charset=UTF-8"); - - // 메일 전송 - Transport.send(message); - rttr.addFlashAttribute("message", "상담 신청이 성공적으로 전송되었습니다."); - } catch (Exception e) { - e.printStackTrace(); - rttr.addFlashAttribute("error", "이메일 전송에 실패했습니다. 다시 시도해주세요."); - } - - return "redirect:/user/consultation"; - } // 비밀번호 찾기 - GET - @RequestMapping(value = "/findpassword", method = RequestMethod.GET) + @RequestMapping(value = "/findPassword", method = RequestMethod.GET) public String findPasswordGet() { - return "/user/findpassword"; // 비밀번호 찾기 페이지로 이동 + return "/user/findPassword"; // 비밀번호 찾기 페이지로 이동 } // 비밀번호 찾기 - POST - @RequestMapping(value = "/findpassword", method = RequestMethod.POST) + @RequestMapping(value = "/findPassword", method = RequestMethod.POST) public String findPasswordPost(@RequestParam("email") String email, @RequestParam("name") String name, Model model) { @@ -446,13 +364,13 @@ public String findPasswordPost(@RequestParam("email") String email, // 비밀번호가 일치하지 않으면 오류 메시지 추가 logger.info("비밀번호 찾기 실패: 이메일 또는 이름이 일치하지 않음"); // 실패 로그 model.addAttribute("errorMessage", "이메일 또는 이름이 일치하지 않습니다."); - return "/user/findpassword"; // 비밀번호 찾기 페이지로 다시 이동 + return "/user/findPassword"; // 비밀번호 찾기 페이지로 다시 이동 } } catch (Exception e) { e.printStackTrace(); logger.error("비밀번호 찾기 처리 중 오류 발생", e); // 예외 로그 추가 model.addAttribute("errorMessage", "비밀번호 찾기 처리 중 오류가 발생했습니다."); - return "/user/findpassword"; // 오류 발생 시 비밀번호 찾기 페이지로 돌아감 + return "/user/findPassword"; // 오류 발생 시 비밀번호 찾기 페이지로 돌아감 } } diff --git a/stockMate/src/main/webapp/WEB-INF/views/consultation.jsp b/stockMate/src/main/webapp/WEB-INF/views/consultation.jsp index bf19f4f..6ca4a20 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/consultation.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/consultation.jsp @@ -58,7 +58,7 @@ } .form-container input, .form-container textarea, .form-container button { - width: 95.3%; + width: 96%; margin-bottom: 8px; padding: 8px; border: none; @@ -80,6 +80,30 @@ background-color: #ffaa00; } + .back-button { + display: flex; + justify-content: center; /* 수평 중앙 정렬 */ + margin: 40px auto; /* 위아래 여백 추가 */ +} + +.back-button a { + text-decoration: none; + padding: 15px 30px; + background-color: #007BFF; + color: #fff; + border-radius: 10px; + font-size: 20px; + font-weight: bold; + font-family: 'Roboto', sans-serif; + transition: background-color 0.3s ease, transform 0.3s ease; +} + +.back-button a:hover { + background-color: #0056b3; + transform: scale(1.05); +} + + .footer { text-align: center; margin-top: 10px; @@ -124,7 +148,7 @@

상담문의

-
+ @@ -145,6 +169,9 @@ 1588-2929
+
+ 뒤로 돌아가기 +
diff --git a/stockMate/src/main/webapp/WEB-INF/views/dashboard.jsp b/stockMate/src/main/webapp/WEB-INF/views/dashboard.jsp index b678aab..47976b3 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/dashboard.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/dashboard.jsp @@ -8,6 +8,7 @@ 대시보드 @@ -121,15 +149,25 @@

개발팀

-

개발팀은 이카운트 ERP의 모든 기능을 구현합니다.

+

개발팀은 stock-mate ERP의 모든 기능을 구현합니다.

고객사 제안과 전략적 개발 기능을 기반으로 개발 스케줄을 잡고 기능을 개발합니다.

완성된 기능이 무사히 업그레이드되었을 때의 뿌듯함을 느끼며, 고객 만족도를 위해 지속적으로 노력하고 있습니다.

+
+ 뒤로 돌아가기 +
+ + + + + + + diff --git a/stockMate/src/main/webapp/WEB-INF/views/location.jsp b/stockMate/src/main/webapp/WEB-INF/views/location.jsp new file mode 100644 index 0000000..c9e34a6 --- /dev/null +++ b/stockMate/src/main/webapp/WEB-INF/views/location.jsp @@ -0,0 +1,179 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + + + + + +창고 소개 + + + + +
+

창고 소개

+
+ + +
창고 개요
+ + +
+ +
+ 창고 이미지 +
+ + +
+

용인창고

+

+ 경기 용인시 처인구 양지면 주북로 105-5 본 창고는 연면적 11만 5천여 평 규모로, + 넓은 아드와 최적화된 물류 시스템을 갖춘 복합물류센터입니다.
+ 99% 이상의 전용률과 효율적인 도크 구성으로 물류 프로세스를 신속하게 처리할 수 있습니다. +

+
+
+ +
+ 뒤로 돌아가기 +
+ + + + + + diff --git a/stockMate/src/main/webapp/WEB-INF/views/main.jsp b/stockMate/src/main/webapp/WEB-INF/views/main.jsp index fcd8658..ef88b4c 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/main.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/main.jsp @@ -91,58 +91,6 @@ body { box-shadow: 0 0 15px #007BFF, 0 0 30px #0056b3; } -/* Content Section */ -.content { - text-align: center; - padding: 50px 20px; - background: #1e1e1e; - border-top: 4px solid #007BFF; - border-radius: 10px 10px 0 0; - box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.4); -} - -.content h2 { - color: #007BFF; - font-size: 2.5rem; - margin-bottom: 15px; -} - -.content p { - font-size: 1.2rem; - color: #bbbbbb; - line-height: 1.8; - margin-bottom: 30px; -} - -/* Row Layout */ -.content .row { - display: flex; - justify-content: center; - gap: 30px; -} - -.content .column { - flex: 1; - display: flex; - justify-content: center; - align-items: center; - max-width: 500px; - overflow: hidden; - border-radius: 10px; - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); -} - -.content .column img { - width: 100%; - height: 400px; - object-fit: cover; - transition: transform 0.5s ease; -} - -.content .column img:hover { - transform: scale(1.1); -} - /* Footer */ .footer { background: #333333; @@ -164,8 +112,54 @@ body { text-decoration: underline; } -.map-section{ -margin: 0 auto; +/* 모달 기본 스타일 */ +.modal { + display: none; /* 숨김 처리 */ + position: fixed; + top: 60%; /* 화면 상단에서 20% 아래에 표시 */ + left: 50%; + transform: translate(-50%, -20%); + z-index: 1000; + background-color: rgba(0, 0, 0, 0.8); + width: 100%; + height: 100%; + z-index: 999; /* 모달 뒤 배경 */ + box-shadow: 0 8px 20px 8px rgba(0, 0, 0, 0.4); /* 전체적으로 그림자 효과 추가 */ + +} + +/* 모달 내용 */ +.modal-content { + background-color: #f9f9f9; /* 밝고 부드러운 배경색 */ + color: #1a1a1a; /* 어두운 텍스트 색상 */ + border: 4px solid #007BFF; /* 파란색 테두리 */ + margin: auto; + padding: 30px; /* 더 넉넉한 내부 여백 */ + border-radius: 16px; /* 더 둥근 모서리 */ + width: 40%; /* 적절한 크기 */ + max-width: 600px; /* 최대 너비 제한 */ + position: relative; + box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); /* 부드러운 그림자 효과 */ + modal-overlay: rgba(0, 0, 0, 0.6) + animation: fadeIn 0.3s ease; /* 팝업 열리는 애니메이션 */ + transition: all 0.3s ease; /* 부드러운 상태 전환 */ +} + + + +/* 닫기 버튼 */ +.close { + position: absolute; + top: 10px; + right: 15px; + font-size: 24px; + font-weight: bold; + color: #333333; + cursor: pointer; +} + +.close:hover { + color: red; } @@ -181,56 +175,74 @@ margin: 0 auto; 회원가입 로그인 대시보드 사용법 - 상담문의 회사소개 창고소개 + 임대료 + 상담문의 + 오시는 길 - -
-

20년 노하우의 지산그룹이 만든 안성창고

-

긍정 마인드를 통해 끊임없이 새로운 변화를 추구하고 있습니다

- - -

걸림돌을 디딤돌로 긍정의 끝은 무한한 가능성!

-

지산그룹은 지난 1999년 창립 이후 오늘에 이르기까지 물류센터 개발, 운영 등 물류분야와 국내 PC업계 최초의 스마트 팩토리 구현 등 -축적된 기술력과 차별화된 경영전략 및 인적구성으로 최고의 서비스를 제공해 왔습니다. -특히 건설전문가 집단의 역량을 살려 폭 넓은 지식과 경험을 바탕으로 분야별 전문 인력으로 구성되어 설계, 생산, 조립, 건설사업관리, -프로젝트관리 등 부동산 개발의 전 분양에 걸쳐 자부심을 가지며 국내 최고의 물류센터와 PC개발 전문기업으로 앞서 나아가고 있습니다. -어떠한 난관도 불가능한 것이 없다는 긍정 마인드를 통해 끊임없이 새로운 변화를 추구하는 지산그룹은 고객 여러분과 함께 하겠습니다.

- - - - - -
-
- Warehouse Exterior -
-
- Warehouse Interior -
-
+ + - -
-

회사 약도

- 회사 약도 + + - -
- 뒤로 돌아가기 + + + + diff --git a/stockMate/src/main/webapp/WEB-INF/views/price.jsp b/stockMate/src/main/webapp/WEB-INF/views/price.jsp new file mode 100644 index 0000000..1bd29ba --- /dev/null +++ b/stockMate/src/main/webapp/WEB-INF/views/price.jsp @@ -0,0 +1,218 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + + + + + + 임대료 안내 + + + + +
+

임대료 안내

+
+ + +
+ +
+

20피트 1대 기준

+ + + + + + + + + + + + + + + + + + + + + + + + + +
1층
기본료(10일): 75,000 → 73,000
1일: 7,500 → 7,300
1개월: 220,000 → 210,000
2층
기본료(10일): 52,000 → 46,000
1일: 5,000 → 4,600
1개월: 150,000 → 130,000
+
+ + +
+

40피트 1대 기준

+ + + + + + + + + + + + + + + + + + + + + + + + + +
1층
기본료(10일): 150,000 → 135,000
1일: 15,000 → 13,500
1개월: 440,000 → 390,000
2층
기본료(10일): 104,000 → 84,000
1일: 10,000 → 8,400
1개월: 300,000 → 240,000
+
+
+ + + + + + + + From 7a1b99b6866d3557ea52529896e0f6b2ab332a95 Mon Sep 17 00:00:00 2001 From: BowWowBow Date: Thu, 19 Dec 2024 14:03:57 +0900 Subject: [PATCH 2/3] update main.jsp --- stockMate/src/main/webapp/WEB-INF/views/main.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stockMate/src/main/webapp/WEB-INF/views/main.jsp b/stockMate/src/main/webapp/WEB-INF/views/main.jsp index ef88b4c..94ef367 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/main.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/main.jsp @@ -173,7 +173,7 @@ body {