|
@@ -68,8 +68,8 @@ public class ProductServiceImpl implements ProductService {
|
|
|
PageInfo<ProductVo> pageInfo = new PageInfo<>(productList);
|
|
|
|
|
|
//搜索关键字
|
|
|
- if (StringUtils.isNotBlank(name) && userId != null) {
|
|
|
- Integer recordId = productMapper.findSearchHistory(name);
|
|
|
+ if (StringUtils.isNotBlank(name) && userId != null && userId > 0) {
|
|
|
+ Integer recordId = productMapper.findSearchHistory(userId, name);
|
|
|
if (recordId != null && recordId > 0) {
|
|
|
productMapper.updateHistoryByDate(recordId);
|
|
|
} else {
|
|
@@ -159,4 +159,10 @@ public class ProductServiceImpl implements ProductService {
|
|
|
}
|
|
|
return ResponseJson.success(searchList);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ResponseJson<String> deleteHistory(Integer userId) {
|
|
|
+ productMapper.deleteHistory(userId);
|
|
|
+ return ResponseJson.success(null);
|
|
|
+ }
|
|
|
}
|