|
@@ -3,6 +3,7 @@ package com.caimei365.tools.service.impl;
|
|
|
import com.caimei365.tools.mapper.BaseMapper;
|
|
|
import com.caimei365.tools.model.po.SearchFrequencyVo;
|
|
|
import com.caimei365.tools.service.ProductService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -19,6 +20,7 @@ import java.util.List;
|
|
|
* @date : 2021/10/26
|
|
|
*/
|
|
|
@Service
|
|
|
+@Slf4j
|
|
|
public class ProductServiceImpl implements ProductService {
|
|
|
@Resource
|
|
|
private BaseMapper baseMapper;
|
|
@@ -40,9 +42,9 @@ public class ProductServiceImpl implements ProductService {
|
|
|
*/
|
|
|
SearchFrequencyVo sea = new SearchFrequencyVo();
|
|
|
SearchFrequencyVo id = baseMapper.findKeywordId(keyword);
|
|
|
- if (null != id & null != id.getId()) {
|
|
|
+ if (id != null) {
|
|
|
//已存在改次数,不存在插入 如果加上本次查询,有三次,则立即修改推荐标记,置入推荐列表
|
|
|
- if (2 == id.getFrequency()) {
|
|
|
+ if (id.getFrequency() >= 2 && id.getRecommendStatus() != 1) {
|
|
|
baseMapper.updateKeywordRecommend(id.getId());
|
|
|
} else {
|
|
|
baseMapper.updateKeywordTimes(id.getId());
|