|
@@ -32,13 +32,12 @@
|
|
|
</update>
|
|
|
|
|
|
<select id="findList" resultType="com.caimei365.manager.entity.caimei.KeyWord">
|
|
|
- SELECT cusf.id AS id, COUNT(cls.keyWordId) AS frequency, cusf.keyword as keyword,addTime,
|
|
|
+ SELECT cusf.id AS id, frequency, cusf.keyword as keyword,addTime,
|
|
|
cusf.searchTime as searchTime,cusf.trueStatus as labelStatus,cusf.fromSearch as fromSearch
|
|
|
FROM cm_user_search_frequency cusf
|
|
|
- LEFT JOIN cm_label_source cls ON cls.keywordid = cusf.id
|
|
|
WHERE cusf.delStatus = 1
|
|
|
<if test="beginTime !=null and beginTime !=''">
|
|
|
- AND saveTime BETWEEN #{beginTime} AND #{endTime}
|
|
|
+ AND searchTime BETWEEN #{beginTime} AND #{endTime}
|
|
|
</if>
|
|
|
<if test="keyword !=null and keyword !=''">
|
|
|
AND keyword LIKE CONCAT('%',#{keyword},'%')
|
|
@@ -49,8 +48,7 @@
|
|
|
<if test="fromSearch != null">
|
|
|
AND fromSearch = #{fromSearch}
|
|
|
</if>
|
|
|
- GROUP BY cusf.id
|
|
|
- ORDER BY frequency DESC
|
|
|
+ ORDER BY frequency DESC,searchTime DESC
|
|
|
</select>
|
|
|
|
|
|
<select id="findRecommendList" resultType="com.caimei365.manager.entity.caimei.KeyWord">
|
|
@@ -59,6 +57,7 @@
|
|
|
where trueStatus = 0
|
|
|
and delStatus = 1
|
|
|
and recommendFlag = 0
|
|
|
+ and recommendStatus = 1
|
|
|
<if test="beginTime !=null and beginTime !=''">
|
|
|
AND recommendTime BETWEEN #{beginTime} AND #{endTime}
|
|
|
</if>
|