Checkpoint kinda workls. Ill take a nap and go bacjk to work
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package com.plannaplan.services;
|
||||
|
||||
import com.plannaplan.abstracts.EventWatcher;
|
||||
import com.plannaplan.entities.Assignment;
|
||||
import com.plannaplan.repositories.AssignmentRepository;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -14,4 +15,8 @@ public class AssignmentService extends EventWatcher {
|
||||
public AssignmentService() {
|
||||
super();
|
||||
}
|
||||
|
||||
public void save(Assignment assignment) {
|
||||
this.repo.save(assignment);
|
||||
}
|
||||
}
|
22
buisnesslogic/src/main/java/com/plannaplan/services/CommisionService.java
Executable file
22
buisnesslogic/src/main/java/com/plannaplan/services/CommisionService.java
Executable file
@ -0,0 +1,22 @@
|
||||
package com.plannaplan.services;
|
||||
|
||||
import com.plannaplan.entities.Commision;
|
||||
import com.plannaplan.repositories.CommisionRepository;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class CommisionService {
|
||||
@Autowired
|
||||
private CommisionRepository repo;
|
||||
|
||||
public CommisionService() {
|
||||
}
|
||||
|
||||
public Commision save(Commision commision) {
|
||||
this.repo.save(commision);
|
||||
return commision;
|
||||
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package com.plannaplan.services;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import com.plannaplan.entities.Groups;
|
||||
import com.plannaplan.repositories.GroupRepository;
|
||||
@ -28,11 +29,15 @@ public class GroupService {
|
||||
this.repo.save(group);
|
||||
}
|
||||
|
||||
public void delete(Groups groups){
|
||||
public void delete(Groups groups) {
|
||||
this.repo.delete(groups);
|
||||
}
|
||||
|
||||
public int getGroupsAmmount(){
|
||||
return (int)this.repo.count();
|
||||
public int getGroupsAmmount() {
|
||||
return (int) this.repo.count();
|
||||
}
|
||||
|
||||
public Optional<Groups> getGroupById(Long id) {
|
||||
return this.repo.findById(id);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user