This commit is contained in:
@@ -21,7 +21,7 @@ public class TariffService {
|
||||
private final TariffRepository tariffRepository;
|
||||
|
||||
public void addTariff(String tariffName, double price, String type, int tokens, long diskSize, long maxUsers,
|
||||
int maxFilesCount, String tariffTerm) {
|
||||
int maxFilesCount, String tariffTerm, String description) {
|
||||
Tariff tariff = new Tariff();
|
||||
tariff.setName(tariffName);
|
||||
tariff.setPrice(price);
|
||||
@@ -31,6 +31,7 @@ public class TariffService {
|
||||
tariff.setMaxUsers(maxUsers);
|
||||
tariff.setMaxFilesCount(maxFilesCount);
|
||||
tariff.setTariffTerm(TariffTimeTerm.valueOf(tariffTerm.toUpperCase()));
|
||||
tariff.setDescription(description);
|
||||
|
||||
tariffRepository.save(tariff);
|
||||
}
|
||||
@@ -113,7 +114,8 @@ public class TariffService {
|
||||
tariff.getMaxFilesCount(),
|
||||
tariff.getDiskSize(),
|
||||
tariff.getMaxUsers(),
|
||||
tariffTerm == null ? "" : tariffTerm.name()
|
||||
tariffTerm == null ? "" : tariffTerm.name(),
|
||||
tariff.getDescription() == null ? "" : tariff.getDescription()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -125,6 +127,7 @@ public class TariffService {
|
||||
tariff.setMaxFilesCount(dto.getMaxFilesCount());
|
||||
tariff.setDiskSize(dto.getDiskSize());
|
||||
tariff.setMaxUsers(dto.getMaxUsers());
|
||||
tariff.setDescription(dto.getDescription());
|
||||
tariff.setTariffTerm(TariffTimeTerm.valueOf(dto.getTariffTerm().toUpperCase()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user