|
@@ -15,6 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.time.ZoneId;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
|
|
|
|
@Service
|
|
@@ -596,12 +598,12 @@ public class BrandServiceImpl implements BrandService {
|
|
|
vos.addAll(evolveVos);
|
|
|
}
|
|
|
Map<String,List<BrandEvolveVo>> times = new HashMap<>();
|
|
|
+ for (int i = 0; i < 12; i++){
|
|
|
+ List<BrandEvolveVo> evos = new ArrayList<>();
|
|
|
+ times.put(LocalDateTime.now(ZoneId.of("Asia/Shanghai")).plusMonths(-i).format(DateTimeFormatter.ofPattern("yyyy-MM")),evos);
|
|
|
+ }
|
|
|
for (BrandEvolveVo vo : vos){
|
|
|
- if (times.get(vo.getTime()) == null){
|
|
|
- List<BrandEvolveVo> evos = new ArrayList<>();
|
|
|
- evos.add(vo);
|
|
|
- times.put(vo.getTime(),evos);
|
|
|
- }else{
|
|
|
+ if (times.get(vo.getTime()) != null){
|
|
|
List<BrandEvolveVo> brandEvolveVos = times.get(vo.getTime());
|
|
|
brandEvolveVos.add(vo);
|
|
|
}
|