-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from KAKAO-TOUR-API-CONTEST/devyj
Devyj
- Loading branch information
Showing
16 changed files
with
591 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package com.example.ai_jeju.domain; | ||
|
||
import static com.querydsl.core.types.PathMetadataFactory.*; | ||
|
||
import com.querydsl.core.types.dsl.*; | ||
|
||
import com.querydsl.core.types.PathMetadata; | ||
import javax.annotation.processing.Generated; | ||
import com.querydsl.core.types.Path; | ||
|
||
|
||
/** | ||
* QTest is a Querydsl query type for Test | ||
*/ | ||
@Generated("com.querydsl.codegen.DefaultEntitySerializer") | ||
public class QTest extends EntityPathBase<Test> { | ||
|
||
private static final long serialVersionUID = 743624506L; | ||
|
||
public static final QTest test = new QTest("test"); | ||
|
||
public final StringPath address = createString("address"); | ||
|
||
public final BooleanPath babySpareChair = createBoolean("babySpareChair"); | ||
|
||
public final StringPath breakTime = createString("breakTime"); | ||
|
||
public final NumberPath<Integer> categoryId = createNumber("categoryId", Integer.class); | ||
|
||
public final StringPath imgSrc = createString("imgSrc"); | ||
|
||
public final NumberPath<Double> mapX = createNumber("mapX", Double.class); | ||
|
||
public final NumberPath<Double> mapY = createNumber("mapY", Double.class); | ||
|
||
public final StringPath name = createString("name"); | ||
|
||
public final StringPath nokidsdetail = createString("nokidsdetail"); | ||
|
||
public final StringPath noKidsZone = createString("noKidsZone"); | ||
|
||
public final StringPath operationTime = createString("operationTime"); | ||
|
||
public final BooleanPath parking = createBoolean("parking"); | ||
|
||
public final BooleanPath pet = createBoolean("pet"); | ||
|
||
public final BooleanPath playground = createBoolean("playground"); | ||
|
||
public final NumberPath<Long> storeId = createNumber("storeId", Long.class); | ||
|
||
public final BooleanPath stroller = createBoolean("stroller"); | ||
|
||
public final BooleanPath strollerVal = createBoolean("strollerVal"); | ||
|
||
public final StringPath tel = createString("tel"); | ||
|
||
public QTest(String variable) { | ||
super(Test.class, forVariable(variable)); | ||
} | ||
|
||
public QTest(Path<? extends Test> path) { | ||
super(path.getType(), path.getMetadata()); | ||
} | ||
|
||
public QTest(PathMetadata metadata) { | ||
super(Test.class, metadata); | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package com.example.ai_jeju.domain; | ||
|
||
import static com.querydsl.core.types.PathMetadataFactory.*; | ||
|
||
import com.querydsl.core.types.dsl.*; | ||
|
||
import com.querydsl.core.types.PathMetadata; | ||
import javax.annotation.processing.Generated; | ||
import com.querydsl.core.types.Path; | ||
|
||
|
||
/** | ||
* QTest2 is a Querydsl query type for Test2 | ||
*/ | ||
@Generated("com.querydsl.codegen.DefaultEntitySerializer") | ||
public class QTest2 extends EntityPathBase<Test2> { | ||
|
||
private static final long serialVersionUID = 1577523256L; | ||
|
||
public static final QTest2 test2 = new QTest2("test2"); | ||
|
||
public final StringPath address = createString("address"); | ||
|
||
public final BooleanPath babySpareChair = createBoolean("babySpareChair"); | ||
|
||
public final NumberPath<Integer> categoryId = createNumber("categoryId", Integer.class); | ||
|
||
public final StringPath imgSrc = createString("imgSrc"); | ||
|
||
public final NumberPath<Double> mapX = createNumber("mapX", Double.class); | ||
|
||
public final NumberPath<Double> mapY = createNumber("mapY", Double.class); | ||
|
||
public final StringPath name = createString("name"); | ||
|
||
public final NumberPath<Long> nearbyStoreId = createNumber("nearbyStoreId", Long.class); | ||
|
||
public final StringPath nokidsdetail = createString("nokidsdetail"); | ||
|
||
public final StringPath noKidsZone = createString("noKidsZone"); | ||
|
||
public final StringPath operationTime = createString("operationTime"); | ||
|
||
public final BooleanPath parking = createBoolean("parking"); | ||
|
||
public final BooleanPath pet = createBoolean("pet"); | ||
|
||
public final BooleanPath playground = createBoolean("playground"); | ||
|
||
public final NumberPath<Long> storeId = createNumber("storeId", Long.class); | ||
|
||
public final BooleanPath stroller = createBoolean("stroller"); | ||
|
||
public final BooleanPath strollerVal = createBoolean("strollerVal"); | ||
|
||
public final StringPath tel = createString("tel"); | ||
|
||
public QTest2(String variable) { | ||
super(Test2.class, forVariable(variable)); | ||
} | ||
|
||
public QTest2(Path<? extends Test2> path) { | ||
super(path.getType(), path.getMetadata()); | ||
} | ||
|
||
public QTest2(PathMetadata metadata) { | ||
super(Test2.class, metadata); | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,4 @@ public Emergency getFacilityById(@PathVariable("emergencyid") Long emergencyid) | |
|
||
|
||
|
||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/main/java/com/example/ai_jeju/controller/TestController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.example.ai_jeju.controller; | ||
|
||
|
||
import com.example.ai_jeju.domain.Emergency; | ||
import com.example.ai_jeju.domain.Test; | ||
import com.example.ai_jeju.domain.Test2; | ||
import com.example.ai_jeju.service.TestService; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.ui.Model; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
|
||
import java.util.List; | ||
|
||
@Controller | ||
public class TestController { | ||
@Autowired | ||
TestService testService; | ||
|
||
@GetMapping("/tests") | ||
public String getAllTests(Model model) { | ||
List<Test2> tests = testService.getAllTests(); | ||
model.addAttribute("tests", tests); | ||
return "imgtest"; // This will map to testImages.html in the templates folder | ||
} | ||
|
||
@GetMapping("/sse-test") | ||
public String sseTestPage() { | ||
return "test"; // test.html 파일을 반환 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,5 +50,4 @@ public void postPersist() { | |
|
||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
package com.example.ai_jeju.domain; | ||
|
||
|
||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Table(name="test") | ||
@NoArgsConstructor(access= AccessLevel.PROTECTED) //기본생성자 | ||
@Getter | ||
@Entity | ||
@AllArgsConstructor // 모든 필드를 초기화하는 생성자 | ||
@Builder // 빌더 패턴 | ||
public class Test { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "storeId", updatable = false, unique = true) | ||
private Long storeId; | ||
|
||
@Column(name = "name",updatable = false) | ||
String name; | ||
|
||
//이미지 소스 | ||
@Column(name = "imgSrc",updatable = false,nullable = true, columnDefinition = "TEXT") | ||
String imgSrc; | ||
|
||
@Column(name = "address",updatable = false,nullable = true) | ||
String address; | ||
|
||
|
||
@Column(name = "mapX",updatable = false,nullable = true) | ||
Double mapX; | ||
|
||
@Column(name = "mapY",updatable = false,nullable = true) | ||
Double mapY; | ||
|
||
|
||
|
||
|
||
/** | ||
카테고리 value | ||
1 : 숙박 | ||
2 : 음식점 | ||
3 : 레져 | ||
*/ | ||
|
||
//유모차 대여여부 | ||
@Column(name = "stroller",updatable = false,nullable = true) | ||
Boolean stroller; | ||
|
||
//유모차 편의성 | ||
@Column(name = "strollerVal",updatable = false,nullable = true) | ||
Boolean strollerVal; | ||
|
||
//아이 스페어 체어 | ||
@Column(name = "babySpareChair",updatable = false,nullable = true) | ||
Boolean babySpareChair; | ||
|
||
//아이 놀이방 | ||
@Column(name = "playground",updatable = false,nullable = true) | ||
Boolean playground; | ||
|
||
@Column(name = "noKidsZone",updatable = false,nullable = true) | ||
String noKidsZone; | ||
|
||
@Column(name = "nokidsdetail",updatable = false,nullable = true) | ||
String nokidsdetail; | ||
|
||
@Column(name = "categoryId",updatable = false,nullable = true) | ||
Integer categoryId; | ||
|
||
@Column(name = "operationTime",updatable = false,nullable = true , length = 1024) | ||
String operationTime; | ||
|
||
@Column(name = "breakTime",updatable = false,nullable = true , length = 1024) | ||
String breakTime; | ||
|
||
@Column(name = "tel",updatable = false,nullable = true) | ||
String tel; | ||
|
||
@Column(name = "pet",updatable = false,nullable = true) | ||
Boolean pet; | ||
|
||
@Column(name = "parking",updatable = false,nullable = true) | ||
Boolean parking; | ||
|
||
|
||
|
||
} |
Oops, something went wrong.