mirror of
https://gitea.gofwd.group/Forward_Group/ballistic-builder-spring.git
synced 2025-12-05 18:46:44 -05:00
adding package-info files and move a controller to the package with tthe res of them
This commit is contained in:
@@ -7,7 +7,9 @@ import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||
|
||||
@SpringBootApplication
|
||||
//@ComponentScan(basePackages = "group.goforward.ballistic")
|
||||
@ComponentScan("group.goforward.ballistic.controllers")
|
||||
@ComponentScan("group.goforward.ballistic.repos")
|
||||
@ComponentScan("group.goforward.ballistic.services")
|
||||
@EntityScan(basePackages = "group.goforward.ballistic.model")
|
||||
@EnableJpaRepositories(basePackages = "group.goforward.ballistic.repos")
|
||||
public class BallisticApplication {
|
||||
|
||||
@@ -1 +1,13 @@
|
||||
/**
|
||||
* Provides the classes necessary for the Spring Configurations for the ballistic -Builder application.
|
||||
* This package includes Configurations for Spring-Boot application
|
||||
*
|
||||
*
|
||||
* <p>The main entry point for managing the inventory is the
|
||||
* {@link group.goforward.ballistic.BallisticApplication} class.</p>
|
||||
*
|
||||
* @since 1.0
|
||||
* @author Don Strawsburg
|
||||
* @version 1.1
|
||||
*/
|
||||
package group.goforward.ballistic.configuration;
|
||||
@@ -1,6 +1,6 @@
|
||||
package group.goforward.ballistic.controllers;
|
||||
|
||||
import group.goforward.ballistic.imports.MerchantFeedImportService;
|
||||
import group.goforward.ballistic.services.MerchantFeedImportService;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package group.goforward.ballistic.controllers;
|
||||
import group.goforward.ballistic.model.Merchant;
|
||||
import group.goforward.ballistic.model.MerchantCategoryMapping;
|
||||
import group.goforward.ballistic.repos.MerchantRepository;
|
||||
import group.goforward.ballistic.service.MerchantCategoryMappingService;
|
||||
import group.goforward.ballistic.services.MerchantCategoryMappingService;
|
||||
import group.goforward.ballistic.web.dto.MerchantCategoryMappingDto;
|
||||
import group.goforward.ballistic.web.dto.UpsertMerchantCategoryMappingRequest;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package group.goforward.ballistic.controllers;
|
||||
|
||||
import group.goforward.ballistic.model.Psa;
|
||||
import group.goforward.ballistic.service.PsaService;
|
||||
import group.goforward.ballistic.services.PsaService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -3,7 +3,7 @@ package group.goforward.ballistic.controllers;
|
||||
import group.goforward.ballistic.ApiResponse;
|
||||
import group.goforward.ballistic.model.State;
|
||||
import group.goforward.ballistic.repos.StateRepository;
|
||||
import group.goforward.ballistic.service.StatesService;
|
||||
import group.goforward.ballistic.services.StatesService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
package group.goforward.ballistic.controllers;
|
||||
@@ -0,0 +1 @@
|
||||
package group.goforward.ballistic.imports.dto;
|
||||
@@ -0,0 +1 @@
|
||||
package group.goforward.ballistic.model;
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Provides the classes necessary for the Spring Repository for the ballistic -Builder application.
|
||||
* This package includes Repository for Spring-Boot application
|
||||
*
|
||||
*
|
||||
* <p>The main entry point for managing the inventory is the
|
||||
* {@link group.goforward.ballistic.BallisticApplication} class.</p>
|
||||
*
|
||||
* @since 1.0
|
||||
* @author Sean Strawsburg
|
||||
* @version 1.1
|
||||
*/
|
||||
package group.goforward.ballistic.repos;
|
||||
@@ -1,4 +1,4 @@
|
||||
package group.goforward.ballistic.service;
|
||||
package group.goforward.ballistic.services;
|
||||
|
||||
import group.goforward.ballistic.model.Merchant;
|
||||
import group.goforward.ballistic.model.MerchantCategoryMapping;
|
||||
@@ -1,4 +1,4 @@
|
||||
package group.goforward.ballistic.imports;
|
||||
package group.goforward.ballistic.services;
|
||||
|
||||
public interface MerchantFeedImportService {
|
||||
|
||||
@@ -1,36 +1,40 @@
|
||||
package group.goforward.ballistic.service;
|
||||
import group.goforward.ballistic.model.Psa;
|
||||
import group.goforward.ballistic.repos.PsaRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
public class PsaService {
|
||||
|
||||
private final PsaRepository psaRepository;
|
||||
|
||||
@Autowired
|
||||
public PsaService(PsaRepository psaRepository) {
|
||||
this.psaRepository = psaRepository;
|
||||
}
|
||||
|
||||
public List<Psa> findAll() {
|
||||
return psaRepository.findAll();
|
||||
}
|
||||
|
||||
public Optional<Psa> findById(UUID id) {
|
||||
return psaRepository.findById(id);
|
||||
}
|
||||
|
||||
public Psa save(Psa psa) {
|
||||
return psaRepository.save(psa);
|
||||
}
|
||||
|
||||
public void deleteById(UUID id) {
|
||||
psaRepository.deleteById(id);
|
||||
}
|
||||
}
|
||||
package group.goforward.ballistic.services;
|
||||
import group.goforward.ballistic.model.Psa;
|
||||
import group.goforward.ballistic.repos.PsaRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
public class PsaService implements group.goforward.ballistic.services.impl.PsaService {
|
||||
|
||||
private final PsaRepository psaRepository;
|
||||
|
||||
@Autowired
|
||||
public PsaService(PsaRepository psaRepository) {
|
||||
this.psaRepository = psaRepository;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Psa> findAll() {
|
||||
return psaRepository.findAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Psa> findById(UUID id) {
|
||||
return psaRepository.findById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Psa save(Psa psa) {
|
||||
return psaRepository.save(psa);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteById(UUID id) {
|
||||
psaRepository.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
package group.goforward.ballistic.service;
|
||||
|
||||
import group.goforward.ballistic.model.State;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface StatesService {
|
||||
|
||||
List<State> findAll();
|
||||
|
||||
Optional<State> findById(Integer id);
|
||||
|
||||
State save(State item);
|
||||
void deleteById(Integer id);
|
||||
}
|
||||
package group.goforward.ballistic.services;
|
||||
|
||||
import group.goforward.ballistic.model.State;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface StatesService {
|
||||
|
||||
List<State> findAll();
|
||||
|
||||
Optional<State> findById(Integer id);
|
||||
|
||||
State save(State item);
|
||||
void deleteById(Integer id);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package group.goforward.ballistic.imports;
|
||||
package group.goforward.ballistic.services.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
@@ -9,6 +9,8 @@ import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import group.goforward.ballistic.imports.MerchantFeedRow;
|
||||
import group.goforward.ballistic.services.MerchantFeedImportService;
|
||||
import org.apache.commons.csv.CSVFormat;
|
||||
import org.apache.commons.csv.CSVParser;
|
||||
import org.apache.commons.csv.CSVRecord;
|
||||
@@ -19,8 +21,7 @@ import group.goforward.ballistic.model.Product;
|
||||
import group.goforward.ballistic.repos.BrandRepository;
|
||||
import group.goforward.ballistic.repos.MerchantRepository;
|
||||
import group.goforward.ballistic.repos.ProductRepository;
|
||||
import group.goforward.ballistic.service.MerchantCategoryMappingService;
|
||||
import group.goforward.ballistic.service.MerchantCategoryMappingService;
|
||||
import group.goforward.ballistic.services.MerchantCategoryMappingService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import group.goforward.ballistic.repos.ProductOfferRepository;
|
||||
@@ -0,0 +1,17 @@
|
||||
package group.goforward.ballistic.services.impl;
|
||||
|
||||
import group.goforward.ballistic.model.Psa;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
public interface PsaService {
|
||||
List<Psa> findAll();
|
||||
|
||||
Optional<Psa> findById(UUID id);
|
||||
|
||||
Psa save(Psa psa);
|
||||
|
||||
void deleteById(UUID id);
|
||||
}
|
||||
@@ -1,38 +1,38 @@
|
||||
package group.goforward.ballistic.service.impl;
|
||||
|
||||
|
||||
import group.goforward.ballistic.model.State;
|
||||
import group.goforward.ballistic.repos.StateRepository;
|
||||
import group.goforward.ballistic.service.StatesService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Service
|
||||
public class StatesServiceImpl implements StatesService {
|
||||
|
||||
@Autowired
|
||||
private StateRepository repo;
|
||||
|
||||
@Override
|
||||
public List<State> findAll() {
|
||||
return repo.findAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<State> findById(Integer id) {
|
||||
return repo.findById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public State save(State item) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteById(Integer id) {
|
||||
deleteById(id);
|
||||
}
|
||||
}
|
||||
package group.goforward.ballistic.services.impl;
|
||||
|
||||
|
||||
import group.goforward.ballistic.model.State;
|
||||
import group.goforward.ballistic.repos.StateRepository;
|
||||
import group.goforward.ballistic.services.StatesService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Service
|
||||
public class StatesServiceImpl implements StatesService {
|
||||
|
||||
@Autowired
|
||||
private StateRepository repo;
|
||||
|
||||
@Override
|
||||
public List<State> findAll() {
|
||||
return repo.findAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<State> findById(Integer id) {
|
||||
return repo.findById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public State save(State item) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteById(Integer id) {
|
||||
deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
package group.goforward.ballistic.services.impl;
|
||||
@@ -0,0 +1 @@
|
||||
package group.goforward.ballistic.services;
|
||||
Reference in New Issue
Block a user