Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
da9b6fe
CLAP-343 fix: ์นดํ…Œ๊ณ ๋ฆฌ ๊ณ ์œ ์ฝ”๋“œ ๋ฐ ์ œ๋ชฉ ์ค‘๋ณต ๊ฐ€๋Šฅํ•œ ๋ฌธ์ œ ์ˆ˜์ •
hyoseong-Choi Feb 9, 2025
c5b632e
CLAP-343 fix: ์นดํ…Œ๊ณ ๋ฆฌ ๊ณ ์œ ์ฝ”๋“œ ๋ฐ ์ œ๋ชฉ ์ค‘๋ณต ๊ฐ€๋Šฅํ•œ ๋ฌธ์ œ ์ˆ˜์ •
hyoseong-Choi Feb 9, 2025
13a5745
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-Sโ€ฆ
hyoseong-Choi Feb 10, 2025
e2372a6
CLAP-356 fix: ์นดํ…Œ๊ณ ๋ฆฌ ์ˆ˜์ •์‹œ ๊ณ ์œ ์ฝ”๋“œ ๋ฐ ์ œ๋ชฉ ์ค‘๋ณต ๊ฐ€๋Šฅํ•œ ๋ฌธ์ œ ์ˆ˜์ •
hyoseong-Choi Feb 10, 2025
0dea66b
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-Sโ€ฆ
hyoseong-Choi Feb 10, 2025
8a6c12a
CLAP-362 fix:save๋ฉ”์†Œ๋“œ ์œ„์น˜ ๋ณ€๊ฒฝ
Feb 10, 2025
e4ab582
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-Sโ€ฆ
hyoseong-Choi Feb 10, 2025
fd52f10
Merge branch 'release' of https://github.com/TaskFlow-CLAP/TaskFlow-Sโ€ฆ
hyoseong-Choi Feb 10, 2025
b8e9aa8
CLAP-362 fix: ํšŒ์› ์ƒํƒœ ํ•„๋“œ ์ถ”๊ฐ€
Feb 10, 2025
95a36ad
CLAP-373 Fix: ๋กœ๊ทธ์ธ ์กฐํšŒ์‹œ logstatus ์ œ๊ฑฐ
parkjaehak Feb 11, 2025
8dbf9b4
Merge pull request #477 from TaskFlow-CLAP/CLAP-373
joowojr Feb 11, 2025
3dc1310
CLAP-362 fix:MemberStatus response type String->Enum์œผ๋กœ ๋ณ€๊ฒฝ
Feb 11, 2025
12feb9e
Merge pull request #462 from TaskFlow-CLAP/CLAP-362
joowojr Feb 11, 2025
cf951aa
Refactor: ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” dto deprecated ์ฒ˜๋ฆฌ
joowojr Feb 11, 2025
d1a7cce
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-Sโ€ฆ
hyoseong-Choi Feb 11, 2025
71d1062
CLAP-378 fix:category id ๋ณ€์ˆ˜๋ช… ๋ณ€๊ฒฝ ๋ฐ mapper ์ˆ˜์ •
Feb 11, 2025
d3649f4
CLAP-370 Fix : ์•„์ง€ํŠธ ํ…œํ”Œ๋ฆฟ ์ˆ˜์ •
starboxxxx Feb 11, 2025
20577e8
CLAP-370 Fix : ์ž‘์—… ์ข…๋ฃŒ ์•Œ๋ฆผ ํ…œํ”Œ๋ฆฟ ์ƒ์„ฑ ๋ฐ ์ˆ˜์ •
starboxxxx Feb 11, 2025
c51f7e9
Merge pull request #481 from TaskFlow-CLAP/CLAP-378
joowojr Feb 11, 2025
e326ee5
CLAP-379 Fix: ๋น„๋ฐ€๋ฒˆํ˜ธ ์ •๊ทœ์‹ ๋ˆ„๋ฝ๋œ ๋ฌธ์ž ์ถ”๊ฐ€
joowojr Feb 11, 2025
6ea29ff
Merge branch 'release' of https://github.com/TaskFlow-CLAP/TaskFlow-Sโ€ฆ
hyoseong-Choi Feb 11, 2025
0668fa0
CLAP-379 Refactor: ๋น„๋ฐ€๋ฒˆํ˜ธ ์ •๊ทœ์‹ ์ •์ฑ…ํ™”
joowojr Feb 11, 2025
79dba17
CLAP-379 Test: ๋น„๋ฐ€๋ฒˆํ˜ธ ์ •๊ทœ์‹ ์ •์ฑ… ๋‹จ์œ„ ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ์ž‘์„ฑ
joowojr Feb 11, 2025
2402cac
CLAP-380 Fix : ์ž‘์—… ์ƒํƒœ ๋ณ€๊ฒฝ, ์ž‘์—… ์ฒ˜๋ฆฌ์ž ๋ณ€๊ฒฝ ๋ชจ๋“  ๋‹ด๋‹น์ž๋“ค์ด ๊ฐ€๋Šฅํ•˜๋„๋ก ์ˆ˜์ •
starboxxxx Feb 11, 2025
1aed5f6
Merge pull request #486 from TaskFlow-CLAP/CLAP-379
joowojr Feb 11, 2025
fd4dc8f
Merge pull request #487 from TaskFlow-CLAP/CLAP-380
joowojr Feb 11, 2025
f5a0808
Merge branch 'release' of https://github.com/TaskFlow-CLAP/TaskFlow-Sโ€ฆ
hyoseong-Choi Feb 11, 2025
a2b2daa
Merge pull request #483 from TaskFlow-CLAP/CLAP-370
joowojr Feb 11, 2025
7eca472
CLAP-381 Fix : ์‚ญ์ œ๋œ task์— ๋Œ€ํ•œ ์•Œ๋ฆผ์€ ๋ถˆ๋Ÿฌ์˜ค์ง€ ์•Š๋„๋ก ์„ค์ • ๋ฐ fetch join ์ถ”๊ฐ€
starboxxxx Feb 11, 2025
e8d5e4c
Merge pull request #489 from TaskFlow-CLAP/CLAP-381
joowojr Feb 11, 2025
95aa9ba
CLAP-382 fix: ์นดํ…Œ๊ณ ๋ฆฌ ์ด๋ฆ„, ์ฝ”๋“œ ์ค‘๋ณต ์ฒดํฌ ๋กœ์ง ์ˆ˜์ •
hyoseong-Choi Feb 11, 2025
7dab99b
Merge branch 'release' of https://github.com/TaskFlow-CLAP/TaskFlow-Sโ€ฆ
hyoseong-Choi Feb 11, 2025
b9dca9b
Merge pull request #492 from TaskFlow-CLAP/CLAP-382
joowojr Feb 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
package clap.server.adapter.inbound.web.dto.admin.response;

import io.swagger.v3.oas.annotations.media.Schema;

import java.util.List;

public record FindAllCategoryResponse(
Long id,
@Schema(description = "๋ฉ”์ธ ์นดํ…Œ๊ณ ๋ฆฌ ID", example = "1")
Long mainCategoryId,

@Schema(description = "์นดํ…Œ๊ณ ๋ฆฌ ์ด๋ฆ„", example = "VM ๊ด€๋ จ")
String name,

@Schema(description = "์นดํ…Œ๊ณ ๋ฆฌ ์ฝ”๋“œ", example = "VM")
String code,

@Schema(description = "์„œ๋ธŒ ์นดํ…Œ๊ณ ๋ฆฌ ๋ชฉ๋ก")
List<FindSubCategoryResponse> subCategory
) {
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
package clap.server.adapter.inbound.web.dto.admin.response;

import io.swagger.v3.oas.annotations.media.Schema;

public record FindMainCategoryResponse(
Long id,
@Schema(description = "๋ฉ”์ธ ์นดํ…Œ๊ณ ๋ฆฌ ID", example = "1")
Long mainCategoryId,

@Schema(description = "์นดํ…Œ๊ณ ๋ฆฌ ์ด๋ฆ„", example = "VM ๊ด€๋ จ")
String name,

@Schema(description = "์นดํ…Œ๊ณ ๋ฆฌ ์ฝ”๋“œ", example = "VM")
String code
) {
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
package clap.server.adapter.inbound.web.dto.admin.response;

import io.swagger.v3.oas.annotations.media.Schema;

public record FindSubCategoryResponse(
Long id,
@Schema(description = "์„œ๋ธŒ ์นดํ…Œ๊ณ ๋ฆฌ ID", example = "4")
Long subCategoryId,

@Schema(description = "๋ฉ”์ธ ์นดํ…Œ๊ณ ๋ฆฌ ID", example = "1")
Long mainCategoryId,

@Schema(description = "์นดํ…Œ๊ณ ๋ฆฌ ์ด๋ฆ„", example = "VM ์ˆ˜์ •")
String name,

@Schema(description = "์นดํ…Œ๊ณ ๋ฆฌ ์ฝ”๋“œ", example = "VU")
String code,

@Schema(description = "์นดํ…Œ๊ณ ๋ฆฌ ์„ค๋ช… ์˜ˆ์‹œ", example = "VM์„ ์ˆ˜์ •ํ•ฉ๋‹ˆ๋‹ค.")
String descriptionExample
) {
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package clap.server.adapter.inbound.web.dto.admin.response;

import clap.server.adapter.outbound.persistense.entity.member.constant.MemberRole;
import clap.server.adapter.outbound.persistense.entity.member.constant.MemberStatus;
import io.swagger.v3.oas.annotations.media.Schema;

import java.time.LocalDateTime;
Expand Down Expand Up @@ -31,7 +32,10 @@ public record RetrieveAllMemberResponse(
String departmentRole,

@Schema(description = "๊ฐ€์ž…์ผ", example = "2024-01-01T12:00:00")
LocalDateTime createdAt
LocalDateTime createdAt,

@Schema(description = "ํšŒ์› ์ƒํƒœ", example = "ACTIVE")
MemberStatus memberStatus


) {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;

@Deprecated
public record EditCommentRequest(
@Schema(description = "๋Œ“๊ธ€ ๋‚ด์šฉ")
@NotBlank
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ public record FilterLogRequest(
Integer term,

@NotNull
@Schema(description = "๋กœ๊ทธ ์ƒํƒœ ๋ชฉ๋ก",
example = "[\"LOGIN\", \"ASSIGNER_CHANGED\", \"COMMENT_ADDED\"]")
@Schema(description = "๋กœ๊ทธ ์ƒํƒœ ๋ชฉ๋ก")
List<LogStatus> logStatus,

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import jakarta.validation.constraints.NotBlank;

@Deprecated
public record SendVerificationCodeRequest(
@NotBlank
String nickname,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import jakarta.validation.constraints.NotBlank;

@Deprecated
public record VerifyCodeRequest(
@NotBlank
String email,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ public String createPayLoad(PushNotificationTemplate request, Task task, String

public String createMessage(PushNotificationTemplate request, String taskDetailUrl) {

return switch (request.notificationType()) {
case TASK_REQUESTED -> "๐Ÿ“Œ *์ƒˆ ์ž‘์—… ์š”์ฒญ:* `" + request.taskName() + "`\\n"
+ "\\t\\t*โ€ข์š”์ฒญ์ž: " + request.senderName() + "*\\n"
+ "[ํ™•์ธํ•˜๋Ÿฌ ๊ฐ€๊ธฐ](" + taskDetailUrl + ")";
case STATUS_SWITCHED -> "โš™๏ธ *์ž‘์—… ์ƒํƒœ ๋ณ€๊ฒฝ:* `" + request.taskName() + "\\n"
+ "\\t\\t*โ€ข์ž‘์—… ์ƒํƒœ: " + request.message() + "*\\n"
+ "[ํ™•์ธํ•˜๋Ÿฌ ๊ฐ€๊ธฐ](" + taskDetailUrl + ")";
case PROCESSOR_CHANGED -> "๐Ÿ”„ *๋‹ด๋‹น์ž ๋ณ€๊ฒฝ:* `" + request.taskName() + "\\n"
+ "\\t\\t*โ€ข์ƒˆ ๋‹ด๋‹น์ž: " + request.message() + "*\\n"
+ "[ํ™•์ธํ•˜๋Ÿฌ ๊ฐ€๊ธฐ](" + taskDetailUrl + ")";
case PROCESSOR_ASSIGNED -> "๐Ÿ‘ค *์ž‘์—… ๋‹ด๋‹น์ž ๋ฐฐ์ •:* `" + request.taskName() + "\\n"
+ "\\t\\t*โ€ข๋‹ด๋‹น์ž: " + request.message() + "*\\n"
+ "[ํ™•์ธํ•˜๋Ÿฌ ๊ฐ€๊ธฐ](" + taskDetailUrl + ")";
return switch (request.notificationType()) {
case TASK_REQUESTED -> "๐Ÿ“Œ *์ƒˆ ์ž‘์—…์ด ์š”์ฒญ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.*\\n"
+ "\\t\\t*โ€ข ๐Ÿ”– ์ž‘์—…๋ช…:* " + "*" + request.taskName() + "*" + "\\n"
+ "\\t\\t*โ€ข ๐Ÿ™‹ ์š”์ฒญ์ž:* " + "*" + request.senderName() + "*" + "\\n\\n"
+ "\\t[์ž์„ธํžˆ ๋ณด๊ธฐ](" + taskDetailUrl + ")";

case STATUS_SWITCHED -> "์ž‘์—… ์ƒํƒœ๊ฐ€ " + "*" + request.message() + "*" + "์œผ๋กœ ๋ณ€๊ฒฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.";

case PROCESSOR_CHANGED -> "๋‹ด๋‹น์ž๊ฐ€ " + "*" + request.message() + "*" + "์œผ๋กœ ๋ณ€๊ฒฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.";

case PROCESSOR_ASSIGNED -> "์ž‘์—…์ด *์Šน์ธ*๋˜์—ˆ์Šต๋‹ˆ๋‹ค.*\n"
+ "\\t\\t*โ€ข ๐Ÿ‘ค ๋‹ด๋‹น์ž:* " + "*" + request.message() + "*";

default -> null;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public record PushNotificationTemplate(
String taskName,
String senderName,
String message,
String commenterName
String commenterName,
String reason
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,20 @@ public EmailTemplate createWebhookTemplate(PushNotificationTemplate request, Str
context.setVariable("title", request.taskName());
break;
case STATUS_SWITCHED:
templateName = "status-switched";
subject = "[TaskFlow] "+ request.taskName()+ " ์ž‘์—…์˜ ์ƒํƒœ๊ฐ€ " + request.message() + "์œผ๋กœ ๋ณ€๊ฒฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.";
context.setVariable("taskDetailUrl", taskDetailUrl);
context.setVariable("receiverName", request.senderName());
context.setVariable("title", request.taskName());
context.setVariable("status", request.message());
if (request.message().equals("TERMINATED")) {
templateName = "task-terminated";
subject = "[TaskFlow] " + request.taskName() + " ์ž‘์—…์ด ์ข…๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.";
context.setVariable("taskDetailUrl", taskDetailUrl);
context.setVariable("reason", request.reason());
context.setVariable("title", request.taskName());
} else {
templateName = "status-switched";
subject = "[TaskFlow] "+ request.taskName()+ " ์ž‘์—…์˜ ์ƒํƒœ๊ฐ€ " + request.message() + "์œผ๋กœ ๋ณ€๊ฒฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.";
context.setVariable("taskDetailUrl", taskDetailUrl);
context.setVariable("receiverName", request.senderName());
context.setVariable("title", request.taskName());
context.setVariable("status", request.message());
}
break;
case PROCESSOR_CHANGED:
templateName = "processor-changed";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ public class KakaoWorkBlockBuilder {
public String makeObjectBlock(PushNotificationTemplate request, String taskDetailUrl){
return switch (request.notificationType()) {
case TASK_REQUESTED -> makeTaskRequestBlock(request, taskDetailUrl);
case STATUS_SWITCHED -> makeTaskStatusBlock(request, taskDetailUrl);
case STATUS_SWITCHED -> switch (request.message()) { // getStatusChangeType() ๋ฉ”์„œ๋“œ๋กœ ์ถ”๊ฐ€ ๋ถ„๊ธฐ
case "TERMINATED" -> makeTerminatedStatusBlock(request, taskDetailUrl);
default -> makeTaskStatusBlock(request, taskDetailUrl);
};
case PROCESSOR_CHANGED -> makeProcessorChangeBlock(request, taskDetailUrl);
case PROCESSOR_ASSIGNED -> makeNewProcessorBlock(request, taskDetailUrl);
case COMMENT -> makeCommentBlock(request, taskDetailUrl);
Expand Down Expand Up @@ -366,4 +369,72 @@ private String makeTaskStatusBlock(PushNotificationTemplate request, String task

return payload;
}

private String makeTerminatedStatusBlock(PushNotificationTemplate request, String taskDetailUrl) {
Object[] blocks = new Object[]{
Map.of(
"type", "header",
"text", "TaskFlow ์•Œ๋ฆผ ์„œ๋น„์Šค",
"style", "blue"
),
Map.of(
"type", "text",
"text", "TaskFlow ์ž‘์—… ์ข…๋ฃŒ ์•Œ๋ฆผ",
"inlines", new Object[]{
Map.of(
"type", "styled",
"text", "TaskFlow ์ž‘์—… ์ข…๋ฃŒ ์•Œ๋ฆผ",
"bold", true
)
}
),
Map.of(
"type", "text",
"text", "TaskFlow ์ž‘์—… ์ข…๋ฃŒ ์•Œ๋ฆผ",
"inlines", new Object[]{
Map.of(
"type", "styled",
"text", " - Task Title : " + request.taskName(),
"bold", false
)
}
),
Map.of(
"type", "text",
"text", "TaskFlow ์ž‘์—… ์ข…๋ฃŒ ์•Œ๋ฆผ",
"inlines", new Object[]{
Map.of(
"type", "styled",
"text", " - ๊ฑฐ์ ˆ ์‚ฌ์œ  : " + request.reason(),
"bold", false
)
}
),
Map.of(
"type", "button",
"text", "ํ™•์ธํ•˜๊ธฐ",
"style", "default",
"action", Map.of(
"type", "open_system_browser",
"name", "button1",
"value", taskDetailUrl
)
)
};

String payload;
try {
payload = "{" +
"\"email\":\"" + request.email() + "\"," +
"\"text\":\"์ž‘์—… ์ข…๋ฃŒ ์•Œ๋ฆผ\"," +
"\"blocks\":" + objectMapper.writeValueAsString(blocks) +
"}";
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}

return payload;
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,17 @@ public List<Category> findSubCategory() {
}

@Override
public boolean existsByNameOrCode(String name, String code) {
return categoryRepository.existsByNameOrCodeAndIsDeletedFalse(name, code);
public boolean existsMainCategoryByNameOrCode(String name, String code) {
return categoryRepository.existsByNameOrCodeAndMainCategoryIsNullAndIsDeletedFalse(name, code);
}

@Override
public boolean existsSubCategoryByNameOrCode(Category category, String name, String code) {
CategoryEntity categoryEntity = categoryPersistenceMapper.toEntity(category);
return categoryRepository.existsByMainCategoryAndIsDeletedFalseAndNameOrCode(categoryEntity, name, code);
}


@Override
public void save(final Category category) {
categoryRepository.save(categoryPersistenceMapper.toEntity(category));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ public Page<AnonymousLogEntity> filterAnonymousLogs(FilterLogRequest request, Pa
LocalDateTime fromDate = LocalDateTime.now().minusHours(request.term());
builder.and(anonymousLogEntity.requestAt.after(fromDate));
}
if (!request.logStatus().isEmpty()) {
builder.and(anonymousLogEntity.logStatus.in(request.logStatus()));
}
if (!request.nickName().isEmpty()) {
builder.and(anonymousLogEntity.loginNickname.contains(request.nickName()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Slice;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
Expand All @@ -13,7 +15,14 @@
@Repository
public interface NotificationRepository extends JpaRepository<NotificationEntity, Long> {

Slice<NotificationEntity> findAllByReceiver_MemberIdOrderByCreatedAtDesc(Long receiverId, Pageable pageable);
@Query("SELECT n FROM NotificationEntity n " +
"JOIN FETCH n.task t " +
"JOIN FETCH n.receiver r " +
"WHERE n.receiver.memberId = :receiverId " +
"AND t.isDeleted = false " +
"ORDER BY n.createdAt DESC")
Slice<NotificationEntity> findAllByReceiver_MemberIdOrderByCreatedAtDesc(
@Param("receiverId") Long receiverId, Pageable pageable);

List<NotificationEntity> findAllByReceiver_MemberId(Long memberId);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package clap.server.adapter.outbound.persistense.repository.task;
import clap.server.adapter.outbound.persistense.entity.task.CategoryEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
Expand All @@ -12,5 +14,9 @@ public interface CategoryRepository extends JpaRepository<CategoryEntity, Long>
List<CategoryEntity> findByIsDeletedFalseAndMainCategoryIsNull();
List<CategoryEntity> findByIsDeletedFalseAndMainCategoryIsNotNull();

boolean existsByNameOrCodeAndIsDeletedFalse(String name, String code);
@Query("SELECT CASE WHEN COUNT(c) > 0 THEN true ELSE false END FROM CategoryEntity c WHERE c.mainCategory IS NULL AND c.isDeleted = false AND (c.name = :name OR c.code = :code)")
boolean existsByNameOrCodeAndMainCategoryIsNullAndIsDeletedFalse(@Param("name") String name, @Param("code") String code);

@Query("SELECT CASE WHEN COUNT(c) > 0 THEN true ELSE false END FROM CategoryEntity c WHERE c.mainCategory = :mainCategory AND c.isDeleted = false AND (c.name = :name OR c.code = :code)")
boolean existsByMainCategoryAndIsDeletedFalseAndNameOrCode(@Param("mainCategory")CategoryEntity mainCategory, @Param("name") String name, @Param("code") String code);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import java.util.List;


public class AdminResponseMapper {
private AdminResponseMapper() {
throw new IllegalStateException("Utility class");
Expand All @@ -26,7 +27,8 @@ public static RetrieveAllMemberResponse toRetrieveAllMemberResponse(Member membe
member.getMemberInfo().getDepartment().getName(),
member.getMemberInfo().getRole(),
member.getMemberInfo().getDepartmentRole(),
member.getCreatedAt()
member.getCreatedAt(),
member.getStatus()
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ public class CategoryResponseMapper {
private CategoryResponseMapper() {throw new IllegalStateException("Utility class");}

public static FindAllCategoryResponse toFindAllCategoryResponse(
Long id,
Long mainCategoryId,
String name,
String code,
List<FindSubCategoryResponse> subCategoryResponses) {
return new FindAllCategoryResponse(id, name, code, subCategoryResponses);
return new FindAllCategoryResponse(mainCategoryId, name, code, subCategoryResponses);
}

public static FindMainCategoryResponse toFindMainCategoryResponse(Category category) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ public interface LoadCategoryPort {
List<Category> findMainCategory();
List<Category> findSubCategory();

boolean existsByNameOrCode(String name, String code);
boolean existsMainCategoryByNameOrCode(String name, String code);

boolean existsSubCategoryByNameOrCode(Category category, String name, String code);
}
Loading
Loading