|
@@ -19,6 +19,8 @@ import org.springframework.stereotype.Service;
|
|
|
import javax.annotation.Resource;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.time.ZoneId;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -336,12 +338,15 @@ public class AppHomeServiceImpl implements IAppHomeService {
|
|
|
.eq(AppSearchHot::getSearchContent, searchDTO.getKeyword())
|
|
|
.last("LIMIT 1"));
|
|
|
if(null == appSearchHot){
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
+ Date tenYearsLater = Date.from(now.plusYears(10).atZone(ZoneId.systemDefault()).toInstant());
|
|
|
appSearchHotMapper.insert(new AppSearchHot()
|
|
|
.setSearchContent(searchDTO.getKeyword())
|
|
|
.setSearchCount(1)
|
|
|
.setIsActive(1)
|
|
|
.setVenueType(searchDTO.getVenueType())
|
|
|
- .setIsRecommend(0));
|
|
|
+ .setIsRecommend(0)
|
|
|
+ .setStartTime(new Date()).setEndTime(tenYearsLater));
|
|
|
}else {
|
|
|
appSearchHotMapper.updateById(appSearchHot.setSearchCount(appSearchHot.getSearchCount() + 1));
|
|
|
}
|