|
@@ -53,15 +53,15 @@ public class AnalysisAlbumServiceImpl {
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
int year = calendar.get(Calendar.YEAR);
|
|
|
if (("total").equals(type)) {
|
|
|
- createCountLabel = analysisAlbumMapper.albumAmount(null, null);
|
|
|
+ createCountLabel = analysisAlbumMapper.albumAmount(null, null,"total");
|
|
|
} else if ("year".equals(type)) {
|
|
|
createCountLabel = analysisAlbumMapper.albumAmount(DateUtils.format(DateUtils.getFirstOfYear(year)),
|
|
|
- DateUtils.format(DateUtils.getLastOfYear(year)));
|
|
|
+ DateUtils.format(DateUtils.getLastOfYear(year)),"year");
|
|
|
} else if ("month".equals(type)) {
|
|
|
int month = calendar.get(Calendar.MONTH);
|
|
|
String firstOfMonth = DateUtils.getFirstOfMonth(year, month + 1, 15);
|
|
|
String lastOfMonth = DateUtils.getLastOfMonth(year, month + 1, 15);
|
|
|
- createCountLabel = analysisAlbumMapper.albumAmount(firstOfMonth, lastOfMonth);
|
|
|
+ createCountLabel = analysisAlbumMapper.albumAmount(firstOfMonth, lastOfMonth,"month");
|
|
|
}
|
|
|
int sum = createCountLabel.stream().mapToInt(CreateCountLabel::getValue).sum();
|
|
|
createCountTotal.setTotal(sum);
|