-
Notifications
You must be signed in to change notification settings - Fork 0
Feat : Admin 통계 기능 추가 #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1e6141a
de18a50
ed760cc
acda7bf
96b96bb
26d87dd
804d127
33e68c1
f03d1ec
2ded712
7cbf0d0
66e4f3f
20ffe4b
fdc23dc
4707bf5
125ffc2
1ec1a60
8261602
e745550
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| package com.nowait.applicationadmin.storePayment.service; | ||
| package com.nowait.applicationadmin.storepayment.service; | ||
|
|
||
| import org.springframework.stereotype.Service; | ||
| import org.springframework.transaction.annotation.Transactional; | ||
|
|
||
| import com.nowait.applicationadmin.storePayment.dto.StorePaymentCreateRequest; | ||
| import com.nowait.applicationadmin.storePayment.dto.StorePaymentCreateResponse; | ||
| import com.nowait.applicationadmin.storePayment.dto.StorePaymentReadDto; | ||
| import com.nowait.applicationadmin.storePayment.dto.StorePaymentUpdateRequest; | ||
| import com.nowait.applicationadmin.storepayment.dto.StorePaymentCreateRequest; | ||
| import com.nowait.applicationadmin.storepayment.dto.StorePaymentCreateResponse; | ||
| import com.nowait.applicationadmin.storepayment.dto.StorePaymentReadDto; | ||
| import com.nowait.applicationadmin.storepayment.dto.StorePaymentUpdateRequest; | ||
|
Comment on lines
+6
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chain레거시 패키지( 🏁 Script executed: #!/bin/bash
# repo 내 남은 'storePayment' 패키지 경로 탐색
rg --fixed-strings 'applicationadmin.storePayment' -nLength of output: 53 추가 검증을 위해 다양한 케이스로 검색을 재시도합니다. 🏁 Script executed: #!/bin/bash
# 케이스에 관계없이 'storePayment' 문자열 검색
rg -n 'storePayment'
rg -n 'storepayment'
# 파일 및 디렉토리 이름에 'storePayment' 포함 여부 확인
find . -type f -iname '*storePayment*'
find . -type d -iname '*storePayment*'Length of output: 19778 레거시 패키지명( 아래 경로들을 점검 및 수정해야 합니다:
🤖 Prompt for AI Agents |
||
| import com.nowait.common.enums.Role; | ||
| import com.nowait.domaincorerdb.storepayment.entity.StorePayment; | ||
| import com.nowait.domaincorerdb.storepayment.exception.StorePaymentAlreadyExistsException; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| package com.nowait.domaincorerdb.config; | ||
|
|
||
| import org.springframework.context.annotation.Bean; | ||
| import org.springframework.context.annotation.Configuration; | ||
|
|
||
| import com.querydsl.jpa.impl.JPAQueryFactory; | ||
|
|
||
| import jakarta.persistence.EntityManager; | ||
| import jakarta.persistence.PersistenceContext; | ||
|
|
||
| @Configuration | ||
| public class QueryDslConfig { | ||
| @PersistenceContext | ||
| private EntityManager entityManager; | ||
|
|
||
| @Bean | ||
| public JPAQueryFactory jpaQueryFactory() { | ||
| return new JPAQueryFactory(entityManager); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,24 @@ | ||||||||||||||||||||||||||
| package com.nowait.domaincorerdb.department.entity; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| import jakarta.persistence.Column; | ||||||||||||||||||||||||||
| import jakarta.persistence.Entity; | ||||||||||||||||||||||||||
| import jakarta.persistence.Id; | ||||||||||||||||||||||||||
| import jakarta.persistence.Table; | ||||||||||||||||||||||||||
| import lombok.AccessLevel; | ||||||||||||||||||||||||||
| import lombok.AllArgsConstructor; | ||||||||||||||||||||||||||
| import lombok.Getter; | ||||||||||||||||||||||||||
| import lombok.NoArgsConstructor; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @Entity | ||||||||||||||||||||||||||
| @Table(name = "departments") | ||||||||||||||||||||||||||
| @Getter | ||||||||||||||||||||||||||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||||||||||||||||||||||||||
| @AllArgsConstructor(access = AccessLevel.PRIVATE) | ||||||||||||||||||||||||||
|
Comment on lines
+15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 엔티티 생성을 위한 팩토리 메서드 추가를 고려하세요. 현재 @AllArgsConstructor(access = AccessLevel.PRIVATE)
public class Department {
+
+ public static Department create(String name) {
+ return new Department(null, name);
+ }📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| public class Department { | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @Id | ||||||||||||||||||||||||||
| private Long id; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @Column(nullable = false) | ||||||||||||||||||||||||||
| private String name; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package com.nowait.domaincorerdb.order.dto; | ||
|
|
||
| import lombok.Builder; | ||
| import lombok.Getter; | ||
|
|
||
| @Getter | ||
| @Builder | ||
| public class OrderSalesSumDetail { | ||
| private Long storeId; | ||
| private Integer todaySalesSum; | ||
| private Integer yesterdaySalesSum; | ||
| private Integer cumulativeSalesBeforeYesterday; | ||
|
|
||
| public OrderSalesSumDetail(Long storeId, Integer todaySalesSum, Integer yesterdaySalesSum, | ||
| Integer cumulativeSalesBeforeYesterday) { | ||
| this.storeId = storeId; | ||
| this.todaySalesSum = todaySalesSum; | ||
| this.yesterdaySalesSum = yesterdaySalesSum; | ||
| this.cumulativeSalesBeforeYesterday = cumulativeSalesBeforeYesterday; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package com.nowait.domaincorerdb.order.dto; | ||
|
|
||
| import lombok.Builder; | ||
| import lombok.Getter; | ||
|
|
||
| @Getter | ||
| @Builder | ||
| public class TopSalesStoresDetail { | ||
| private Long storeId; | ||
| private String storeName; | ||
| private Long departmentId; | ||
| private String departmentName; | ||
| private Integer totalSales; | ||
| private Long storeRank; | ||
|
|
||
| public TopSalesStoresDetail(Long storeId, String storeName, Long departmentId, String departmentName, Integer totalSales, | ||
| Long storeRank) { | ||
| this.storeId = storeId; | ||
| this.storeName = storeName; | ||
| this.departmentId = departmentId; | ||
| this.departmentName = departmentName; | ||
| this.totalSales = totalSales; | ||
| this.storeRank = storeRank; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package com.nowait.domaincorerdb.order.repository; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import com.nowait.domaincorerdb.order.dto.OrderSalesSumDetail; | ||
| import com.nowait.domaincorerdb.order.dto.TopSalesStoresDetail; | ||
|
|
||
| public interface OrderCustomRepository { | ||
|
|
||
| OrderSalesSumDetail findSalesSumByStoreId(Long storeId); | ||
|
|
||
| List<TopSalesStoresDetail> getTop4PlusMine(Long storeId); | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.