Skip to content

Commit

Permalink
Merge pull request #134 from Kernel360/develop
Browse files Browse the repository at this point in the history
develop to main
  • Loading branch information
xorwns118 authored Aug 22, 2024
2 parents 889d3fb + 56fa965 commit a22eb21
Show file tree
Hide file tree
Showing 10 changed files with 537 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
- AI API/DATA (ETRI) 사용
- pcm 형식의 비압축파일 (wav) 파일 지원
- AI가 인식한 발음과 내 대본을 비교 (1 ~ 5점)
- Kakao Map Api 연동
- 사용자 주변의 스피치 학원 탐색 (5km 이내)
---

## 추가 해야 할 기능
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ protected SecurityFilterChain configure(HttpSecurity httpSecurity) throws Except
.sessionManagement(
sessionManagement -> sessionManagement.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(request -> request.requestMatchers(
"/", "api/v1/auth/**", "/oauth2/**", "/sign-up", "/css/**", "/js/**","/**","/logout",
"/static/images/**","/boards/**", "/api/upload", "/report", "/speech-record", "reports/**").permitAll()
"/", "api/v1/auth/**", "/oauth2/**", "/sign-up", "/js/**","/**","/logout",
"/static/images/**","/boards/**", "/api/upload", "/report", "/speech-record", "reports/**",
"/map").permitAll()
.requestMatchers("/script-list").hasRole("GENERAL_USER")
.requestMatchers("/script-write").hasRole("GENERAL_USER")
.requestMatchers("/boards-write").hasRole("GENERAL_USER")
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/speech/up/demo/HomePageController.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@ public String login() {
public String myPage(){
return "myPage";
}

@GetMapping("/map")
public String mapPage() {
return "map";
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
package com.speech.up.report.repository;

import java.util.Optional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.speech.up.record.entity.RecordEntity;
import com.speech.up.report.entity.ReportEntity;

public interface ReportRepository extends JpaRepository<ReportEntity, Long> {
@Query(value = "SELECT * FROM report WHERE `record_id` = :recordId", nativeQuery = true)
ReportEntity findByRecordId(Long recordId);
ReportEntity findReportEntityByReportId(Long recordId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void saveReport(RecordEntity recordEntity, String recognized, double scor
}

public ReportEntity getReportFromRecordId(Long recordId) {
return reportRepository.findByRecordId(recordId);
return reportRepository.findReportEntityByReportId(recordId);
}

public String getScriptFromRecordId (Long recordId) {
Expand Down
186 changes: 186 additions & 0 deletions src/main/resources/static/css/kakaomap-style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
.map_wrap, .map_wrap * {
margin:0;
padding:0;
font-family:'Malgun Gothic',dotum,'돋움',sans-serif;
font-size:12px;
}

.map_wrap a, .map_wrap a:hover, .map_wrap a:active{
color:#000;
text-decoration: none;
}

#map {
width: 95%;
height: 80%;
position: relative;
box-shadow: 14px 14px 10px 0 rgba(0, 0, 0, 0.1)
}

.map_wrap {
flex: 2; /* 지도 섹션이 더 넓게 차지하게 설정 */
position: relative;
}

.container {
display: flex;
height: 100vh; /* 전체 화면을 차지하도록 설정 */
}

#menu_wrap {
flex: 1; /* 리스트 섹션의 크기 */
padding: 10px;
overflow-y: auto; /* 스크롤 가능하게 설정 */
height: 80%;
box-shadow: 14px 14px 10px 0 rgba(0, 0, 0, 0.1) /* 약간의 그림자 효과 */
}

.bg_white {
background:#fff;
}

/* 옵션 폼 스타일 */
.option {
margin-bottom: 10px;
}

#menu_wrap hr {
display: block; height: 1px;border: 0; border-top: 2px solid #5F5F5F;margin:3px 0;
}

#menu_wrap .option{
text-align: center;
}

#menu_wrap .option p {
margin:10px 0;
}

#menu_wrap .option button {
margin-left:5px;
}

#placesList li {
list-style: none;
}

#placesList .item {
position:relative;
border-bottom:1px solid #888;
overflow: hidden;
cursor: pointer;
min-height: 65px;
}

#placesList .item span {
display: block;
margin-top:4px;
}

#placesList .item h5, #placesList .item .info {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}

#placesList .item .info{
padding:10px 0 10px 55px;
}

#placesList .info .gray {
color:#8a8a8a;
}

#placesList .info .jibun {
padding-left:26px;
background:url(https://t1.daumcdn.net/localimg/localimages/07/mapapidoc/places_jibun.png) no-repeat;
}

#placesList .info .tel {
color:#009900;
}

#placesList .item .markerbg {
float:left;
position:absolute;
width:36px;
height:37px;
margin:10px 0 0 10px;
background:url(https://t1.daumcdn.net/localimg/localimages/07/mapapidoc/marker_number_blue.png) no-repeat;
}

#placesList .item .marker_1 {
background-position: 0 -10px;
}

#placesList .item .marker_2 {
background-position: 0 -56px;
}

#placesList .item .marker_3 {
background-position: 0 -102px
}

#placesList .item .marker_4 {
background-position: 0 -148px;
}

#placesList .item .marker_5 {
background-position: 0 -194px;
}

#placesList .item .marker_6 {
background-position: 0 -240px;
}

#placesList .item .marker_7 {
background-position: 0 -286px;
}

#placesList .item .marker_8 {
background-position: 0 -332px;
}

#placesList .item .marker_9 {
background-position: 0 -378px;
}

#placesList .item .marker_10 {
background-position: 0 -423px;
}

#placesList .item .marker_11 {
background-position: 0 -470px;
}

#placesList .item .marker_12 {
background-position: 0 -516px;
}

#placesList .item .marker_13 {
background-position: 0 -562px;
}

#placesList .item .marker_14 {
background-position: 0 -608px;
}

#placesList .item .marker_15 {
background-position: 0 -654px;
}

#pagination {
margin:10px auto;
text-align: center;
}

#pagination a {
display:inline-block;
margin-right:10px;
}

#pagination .on {
font-weight: bold;
cursor: default;
color:#777;
}
1 change: 1 addition & 0 deletions src/main/resources/static/scriptPage/js/analyticRecord.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ function navigate(record) {

if (recordJson.analyzed) {
const url = `/reports/${recordJson.record_id}`;
const name = 'popup-analyze'
const options = 'top=10, left=10, width=500, height=600, status=no, menubar=no, toolbar=no, resizable=no';
window.open(url, options);
} else {
Expand Down
Loading

0 comments on commit a22eb21

Please sign in to comment.