Skip to content
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

Feature/seller sales statistics #58

Merged
merged 8 commits into from
Apr 10, 2024
Merged

Commits on Mar 30, 2024

  1. feat: Implement sales data analytics endpoints

    - Add endpoints to fetch sales data for the last 30 days, the last year, and the last three years for sellers.
    - Implement user role validation to ensure that only sellers can access these services.
    - Sort returned sales data by period for better analytics insight.
    
    This commit enhances the SalesVolumeAPIController by providing comprehensive sales data analytics over various periods. It ensures that these analytics are securely accessible only to users with the seller role, thereby enhancing the application's security posture.
    krkarma777 committed Mar 30, 2024
    Configuration menu
    Copy the full SHA
    7546a7c View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2024

  1. feat: Add SalesVolumeAPIControllerTest for unit testing

    Added unit tests to verify the behavior of the SalesVolumeAPIController. These tests ensure the successful retrieval of sales data for the last 30 days and its accurate return in JSON format. Utilizing MockMvc for mocking API requests and Mockito for mocking the behaviors of OrderService and UserAuthValidator, the tests effectively simulate the operation of the actual service logic without the need for real data interactions.
    krkarma777 committed Mar 31, 2024
    Configuration menu
    Copy the full SHA
    76d738c View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

  1. Refactor SalesVolumeAPIController to Use GetMapping

    - Update methods in SalesVolumeAPIController to use @GetMapping instead of default visibility
    - Define explicit endpoints for the last 30 days, last year, and last three years sales data
    - Ensure consistency and clarity in API route definitions
    krkarma777 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    bdaff2e View commit details
    Browse the repository at this point in the history
  2. Add New Tests for Sales Data with @WithMockUser

    - Added tests for fetching sales data over the last year and the last three years
    - Utilized @WithMockUser to simulate authenticated user scenarios in tests
    - Adjusted date formatting to "yyyy-MM-dd" for consistent date handling
    - Ensured the setup of a mock user with ROLE_판매자 to test role-based access control
    krkarma777 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    9d08f5b View commit details
    Browse the repository at this point in the history
  3. feat: Add endpoint for current day sales data in SalesVolumeAPIContro…

    …ller
    
    - Implement a new GET endpoint to fetch sales data for the current day.
    - Import BigDecimal for handling precise sales calculations.
    - Ensure the functionality aligns with existing sales data retrieval patterns for consistency.
    krkarma777 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    4a3366f View commit details
    Browse the repository at this point in the history
  4. Refactor SalesVolumeAPIControllerTest for clarity and functionality

    - Renamed test methods to better reflect their purpose and functionality
    - Added testFindSalesDataForCurrentDay() to test daily sales calculation
    - Updated existing tests to match changes in controller functionality
    - Improved code readability and removed redundant code
    krkarma777 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    78b4d3e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c6dafe1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2a32b9f View commit details
    Browse the repository at this point in the history