|
@@ -471,5 +471,64 @@
|
|
|
</set>
|
|
|
where clubID = #{clubId}
|
|
|
</update>
|
|
|
+ <select id="getShopId" resultType="java.lang.Integer">
|
|
|
+ select shopId from cm_shop_statistics where delFlag= 0 and status = 0
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getProductId" resultType="java.lang.Integer">
|
|
|
+ SELECT productId FROM product WHERE shopId = #{shopId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getShopInfoId" resultType="java.lang.Integer">
|
|
|
+ select infoId from cm_shop_info where shopId = #{shopId} and delFlag = 0 and status = 0
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getShopKeywordId" resultType="com.caimei365.tools.model.po.SearchFrequencyVo">
|
|
|
+ SELECT ifnull(cusf.keyword, '') as keyword, ifnull(csk.searchId, 0) as id
|
|
|
+ FROM cm_shop_keyword csk
|
|
|
+ LEFT JOIN cm_user_search_frequency cusf ON cusf.id = csk.searchId
|
|
|
+ WHERE csk.shopId = #{shopId} AND csk.delFlag = 0 AND csk.status = 0
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getBehaviorList" resultType="com.caimei365.tools.model.po.CmBehaviorRecordPo">
|
|
|
+ SELECT ifnull((select pagePath from cm_behavior_record where pagePath like concat('%',#{pagePath},'%') order by accessDate desc LIMIT 1), '') as pagePath,
|
|
|
+ count(recordID) as number,
|
|
|
+ ifnull(sum(accessDuration), 0) as accessDuration
|
|
|
+ from cm_behavior_record
|
|
|
+ <where>
|
|
|
+ delFlag = 0 and accessDate = #{accessDate}
|
|
|
+ <if test="pageType != null">
|
|
|
+ and pageType = #{pageType}
|
|
|
+ </if>
|
|
|
+ <if test="pageType != 8">
|
|
|
+ <if test="pagePath != null and pagePath != ''">
|
|
|
+ and pagePath like concat('%',#{pagePath},'%')
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="pageType == 8">
|
|
|
+ and pageLabel like concat('%',#{pagePath},'%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertPageShop">
|
|
|
+ INSERT INTO cm_page_shop (shopId, shopLink, accessNumber, accessDuration, accessDate)
|
|
|
+ VALUES (#{shopId}, #{shopLink}, #{accessNumber}, #{accessDuration}, #{accessDate})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertPageProduct">
|
|
|
+ insert into cm_page_shop_product (shopId, productId, link, accessNumber, accessDuration, accessDate)
|
|
|
+ values (#{shopId}, #{productId}, #{link}, #{accessNumber}, #{accessDuration}, #{accessDate})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertPageInfo">
|
|
|
+ insert into cm_page_shop_info (shopId, infoId, link, accessNumber, accessDuration, accessDate)
|
|
|
+ values (#{shopId}, #{infoId}, #{link}, #{accessNumber}, #{accessDuration}, #{accessDate})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertPageKeyword">
|
|
|
+ insert into cm_page_shop_keyword (shopId, searchId, link, accessNumber, accessDuration, accessDate)
|
|
|
+ values (#{shopId}, #{searchId}, #{link}, #{accessNumber}, #{accessDuration}, #{accessDate})
|
|
|
+ </insert>
|
|
|
</mapper>
|
|
|
|