#21 -- Init default dated
This commit is contained in:
parent
e7ef4099fa
commit
fcdd90924c
@ -12,11 +12,11 @@ import java.util.Date;
|
||||
public class ReportPeriod extends BaseEntity {
|
||||
@Temporal(TemporalType.DATE)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startDate;
|
||||
private Date startDate = new Date();
|
||||
|
||||
@Temporal(TemporalType.DATE)
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endDate;
|
||||
private Date endDate = new Date();
|
||||
|
||||
public Date getStartDate() {
|
||||
return startDate;
|
||||
|
@ -31,7 +31,7 @@ public class ReportPeriodService {
|
||||
}
|
||||
|
||||
public void delete(ReportPeriod reportPeriod) {
|
||||
reportPeriodRepository.delete(reportPeriod);
|
||||
reportPeriodRepository.deleteById(reportPeriod.getId());
|
||||
}
|
||||
|
||||
public ReportPeriod getById(Integer reportPeriodId) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user