Skip to content

Commit 4e2ed48

Browse files
authored
Merge pull request #182 from GTable/feature/#181-add-noticeTitle
refactor(Store): noticeTile 컬럼 추가
2 parents 581ed75 + af5b16d commit 4e2ed48

8 files changed

Lines changed: 42 additions & 20 deletions

File tree

nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/dto/StoreCreateRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ public Store toEntity() {
2929
.name(name)
3030
.location(location)
3131
.description(description)
32-
.notice("")
32+
.noticeTitle("제목을 입력해주세요.")
33+
.noticeContent("내용을 입력해주세요.")
3334
.openTime("00002359")
3435
.isActive(false)
3536
.deleted(false)

nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/dto/StoreCreateResponse.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ public class StoreCreateResponse {
1818
private String name;
1919
private String location;
2020
private String description;
21-
private String notice;
21+
private String noticeTitle;
22+
private String noticeContent;
2223
private String openTime;
2324
private Boolean isActive;
2425
private Boolean deleted;
@@ -32,7 +33,8 @@ public static StoreCreateResponse fromEntity(Store store) {
3233
.name(store.getName())
3334
.location(store.getLocation())
3435
.description(store.getDescription())
35-
.notice(store.getNotice())
36+
.noticeTitle(store.getNoticeTitle())
37+
.noticeContent(store.getNoticeContent())
3638
.openTime(store.getOpenTime())
3739
.isActive(store.getIsActive())
3840
.deleted(store.getDeleted())

nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/dto/StoreReadDto.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public class StoreReadDto {
1919
private String name;
2020
private String location;
2121
private String description;
22-
private String notice;
22+
private String noticeTitle;
23+
private String noticeContent;
2324
private String openTime;
2425
private StoreImageUploadResponse profileImage;
2526
private List<StoreImageUploadResponse> bannerImages;
@@ -45,7 +46,8 @@ public static StoreReadDto fromEntity(Store store, List<StoreImageUploadResponse
4546
.name(store.getName())
4647
.location(store.getLocation())
4748
.description(store.getDescription())
48-
.notice(store.getNotice())
49+
.noticeTitle(store.getNoticeTitle())
50+
.noticeContent(store.getNoticeContent())
4951
.openTime(store.getOpenTime())
5052
.isActive(store.getIsActive())
5153
.deleted(store.getDeleted())

nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/dto/StoreUpdateRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class StoreUpdateRequest {
1313
private String name;
1414
private String location;
1515
private String description;
16-
private String notice;
16+
private String noticeTitle;
17+
private String noticeContent;
1718
private String openTime;
1819
}

nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/service/StoreServiceImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ public StoreReadDto updateStore(Long storeId, StoreUpdateRequest request, Member
8383
request.getName(),
8484
request.getLocation(),
8585
request.getDescription(),
86-
request.getNotice(),
86+
request.getNoticeTitle(),
87+
request.getNoticeContent(),
8788
request.getOpenTime()
8889
);
8990

nowait-app-user-api/src/main/java/com/nowait/applicationuser/store/dto/StoreDetailReadResponse.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ public class StoreDetailReadResponse {
2323
private String name;
2424
private String location;
2525
private String description;
26-
private String notice;
26+
private String noticeTitle;
27+
private String noticeContent;
2728
private String openTime;
2829
private StoreImageUploadResponse profileImage;
2930
private List<StoreImageUploadResponse> bannerImages;
@@ -54,7 +55,8 @@ public static StoreDetailReadResponse fromEntity(
5455
.name(store.getName())
5556
.location(store.getLocation())
5657
.description(store.getDescription())
57-
.notice(store.getNotice())
58+
.noticeTitle(store.getNoticeTitle())
59+
.noticeContent(store.getNoticeContent())
5860
.openTime(store.getOpenTime())
5961
.profileImage(profile)
6062
.bannerImages(banners)

nowait-app-user-api/src/main/java/com/nowait/applicationuser/store/dto/StorePageReadResponse.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ public class StorePageReadResponse {
2222
private String name;
2323
private String location;
2424
private String description;
25-
private String notice;
25+
private String noticeTitle;
26+
private String noticeContent;
2627
private String openTime;
2728
private StoreImageUploadResponse profileImage;
2829
private List<StoreImageUploadResponse> bannerImages;
@@ -50,7 +51,8 @@ public static StorePageReadResponse fromEntity(Store store, List<StoreImageUploa
5051
.name(store.getName())
5152
.location(store.getLocation())
5253
.description(store.getDescription())
53-
.notice(store.getNotice())
54+
.noticeTitle(store.getNoticeTitle())
55+
.noticeContent(store.getNoticeContent())
5456
.openTime(store.getOpenTime())
5557
.profileImage(profile)
5658
.bannerImages(banners)

nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/store/entity/Store.java

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ public class Store extends BaseTimeEntity {
4141
private String description;
4242

4343
@Column(nullable = true, length = 200)
44-
private String notice;
44+
private String noticeTitle;
45+
46+
@Column(nullable = true, length = 200)
47+
private String noticeContent;
4548

4649
@Column(nullable = true, length = 200)
4750
private String openTime;
@@ -53,25 +56,33 @@ public class Store extends BaseTimeEntity {
5356
private Boolean deleted;
5457

5558
public Store(LocalDateTime createdAt, Long storeId, Long departmentId, String name, String location,
56-
String description,String notice,String openTime, Boolean isActive, Boolean deleted) {
59+
String description, String noticeTitle, String noticeContent, String openTime, Boolean isActive, Boolean deleted) {
5760
super(createdAt);
5861
this.storeId = storeId;
5962
this.departmentId = departmentId;
6063
this.name = name;
6164
this.location = location;
6265
this.description = description;
63-
this.notice = notice;
66+
this.noticeTitle = noticeTitle;
67+
this.noticeContent = noticeContent;
6468
this.openTime = openTime;
6569
this.isActive = isActive;
6670
this.deleted = deleted;
6771
}
6872

69-
public void updateInfo(String name, String location, String description, String notice, String openTime) {
70-
if (name != null) this.name = name;
71-
if (location != null) this.location = location;
72-
if (description != null) this.description = description;
73-
if (notice != null) this.notice = notice;
74-
if (openTime != null) this.openTime = openTime;
73+
public void updateInfo(String name, String location, String description, String noticeTitle, String notice, String openTime) {
74+
if (name != null)
75+
this.name = name;
76+
if (location != null)
77+
this.location = location;
78+
if (description != null)
79+
this.description = description;
80+
if (noticeTitle != null)
81+
this.noticeTitle = noticeTitle;
82+
if (notice != null)
83+
this.noticeContent = notice;
84+
if (openTime != null)
85+
this.openTime = openTime;
7586
}
7687

7788
public void markAsDeleted() {

0 commit comments

Comments
 (0)