Changeset 4a93293


Ignore:
Timestamp:
01/08/23 21:27:17 (23 months ago)
Author:
Bojan <bojantrpeski123@…>
Branches:
main
Children:
c579aef
Parents:
0afa35a
Message:

Add article functionality implemented

Location:
FullyStocked/src/main
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • FullyStocked/src/main/java/com/bazi/fullystocked/Services/ArticlesService.java

    r0afa35a r4a93293  
    55import com.bazi.fullystocked.Models.SqlViews.ArticlesAtLocationReport;
    66import com.bazi.fullystocked.Models.SqlViews.SupplierSuppliesArticleReport;
    7 
    87import java.util.*;
    98
    109public interface ArticlesService {
     10
    1111    Optional<Articles> create(String description, String articlename, int maxquantityperlocation);
     12
    1213    Optional<Articles> create(String description, String articlename, String imageurl, int maxquantityperlocation);
     14
    1315    Optional<Articles> addToCategory(Integer articleId, Integer categoryId);
    1416    List<Categories> findAllCategoriesByArticle(Integer articleId);
     17
    1518    List<SupplierSuppliesArticleReport> findAllBySupplier(Integer id);
     19
    1620    List<ArticlesAtLocationReport> findAvailabilityAtAllLocations(Integer id);
    1721
  • FullyStocked/src/main/java/com/bazi/fullystocked/Services/Implementations/ArticlesServiceImpl.java

    r0afa35a r4a93293  
    3232
    3333    @Override
     34    @Transactional
    3435    public Optional<Articles> create(String description, String articlename, int maxquantityperlocation) {
    3536        if(description==null || description.isEmpty() || articlename==null || articlename.isEmpty() || maxquantityperlocation<=0)
     
    4142
    4243    @Override
     44    @Transactional
    4345    public Optional<Articles> create(String description, String articlename, String imageurl, int maxquantityperlocation) {
    4446        if(description==null || description.isEmpty() || articlename==null || articlename.isEmpty() || maxquantityperlocation<=0)
Note: See TracChangeset for help on using the changeset viewer.