@@ -53,4 +53,6 @@ public interface ProductModuleDao {
List<ProductVo> getRecommendByIds(List<Integer> productIDs);
List<ProductVo> getDeFaultRecommend(Integer tinyTypeID);
+
+ void deleteAllSearchHistory(Integer userId);
}
@@ -32,6 +32,10 @@ public interface ProductModuleService {
* 商品搜索历史记录
*/
List<SearchHistoryVo> getSearchHistory(Integer userId);
+ /**
+ * 根据用户ID删除历史记录
+ */
/**
* 商品详情页
@@ -154,6 +154,16 @@ public class ProductModuleServiceImpl implements ProductModuleService {
return productModuleDao.getSearchHistoryList(userId);
+ *
+ * @param userId
+ @Override
+ public void deleteAllSearchHistory(Integer userId) {
+ productModuleDao.deleteAllSearchHistory(userId);
+ }
* @param productID
@@ -227,6 +227,12 @@
WHERE userId=#{userId,jdbcType=BIGINT}
AND (temp.id > tb.id)
</delete>
+ <delete id="deleteAllSearchHistory">
+ DELETE FROM
+ user_search_history
+ WHERE
+ userId=#{userId,jdbcType=BIGINT}
+ </delete>
<select id="findLadderPrice" resultType="com.caimei.module.product.entity.vo.LadderPriceVo">
SELECT
<include refid="LadderPrice_Column_List" />