|
@@ -3,26 +3,28 @@
|
|
|
<mapper namespace="com.redxun.knowledge.analysis.mapper.PvLogMapper">
|
|
|
|
|
|
<resultMap id="PvLog" type="com.redxun.knowledge.analysis.entity.dao.PvLog">
|
|
|
- <id property="pkId" column="PK_ID" jdbcType="VARCHAR"/>
|
|
|
- <result property="module" column="MODULE" jdbcType="VARCHAR"/>
|
|
|
- <result property="subModule" column="SUB_MODULE" jdbcType="VARCHAR"/>
|
|
|
- <result property="userId" column="USER_ID" jdbcType="VARCHAR"/>
|
|
|
- <result property="companyId" column="COMPANY_ID" jdbcType="VARCHAR"/>
|
|
|
- <result property="page" column="PAGE" jdbcType="VARCHAR"/>
|
|
|
- <result property="platform" column="PLATFORM" jdbcType="VARCHAR"/>
|
|
|
- <result property="ussd" column="USSD" jdbcType="VARCHAR"/>
|
|
|
- <result property="companyId" column="COMPANY_ID_" jdbcType="VARCHAR"/>
|
|
|
- <result property="createDepId" column="CREATE_DEP_ID_" jdbcType="VARCHAR"/>
|
|
|
- <result property="tenantId" column="TENANT_ID_" jdbcType="VARCHAR"/>
|
|
|
- <result property="createBy" column="CREATE_BY_" jdbcType="VARCHAR"/>
|
|
|
- <result property="createTime" column="CREATE_TIME_" jdbcType="DATE"/>
|
|
|
- <result property="updateBy" column="UPDATE_BY_" jdbcType="VARCHAR"/>
|
|
|
- <result property="updateTime" column="UPDATE_TIME_" jdbcType="DATE"/>
|
|
|
+ <id property="pkId" column="PK_ID" jdbcType="VARCHAR"/>
|
|
|
+ <result property="module" column="MODULE" jdbcType="VARCHAR"/>
|
|
|
+ <result property="subModule" column="SUB_MODULE" jdbcType="VARCHAR"/>
|
|
|
+ <result property="userId" column="USER_ID" jdbcType="VARCHAR"/>
|
|
|
+ <result property="companyId" column="COMPANY_ID" jdbcType="VARCHAR"/>
|
|
|
+ <result property="page" column="PAGE" jdbcType="VARCHAR"/>
|
|
|
+ <result property="platform" column="PLATFORM" jdbcType="VARCHAR"/>
|
|
|
+ <result property="ussd" column="USSD" jdbcType="VARCHAR"/>
|
|
|
+ <result property="companyId" column="COMPANY_ID_" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createDepId" column="CREATE_DEP_ID_" jdbcType="VARCHAR"/>
|
|
|
+ <result property="tenantId" column="TENANT_ID_" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createBy" column="CREATE_BY_" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createTime" column="CREATE_TIME_" jdbcType="DATE"/>
|
|
|
+ <result property="updateBy" column="UPDATE_BY_" jdbcType="VARCHAR"/>
|
|
|
+ <result property="updateTime" column="UPDATE_TIME_" jdbcType="DATE"/>
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
<select id="query" resultType="com.redxun.knowledge.analysis.entity.dao.PvLog" parameterType="java.util.Map">
|
|
|
- select PK_ID,MODULE,SUB_MODULE,USER_ID,COMPANY_ID,PAGE,PLATFORM,USSD,COMPANY_ID_,CREATE_DEP_ID_,TENANT_ID_,CREATE_BY_,CREATE_TIME_,UPDATE_BY_,UPDATE_TIME_ from KM_PV_LOG
|
|
|
+ select
|
|
|
+ PK_ID,MODULE,SUB_MODULE,USER_ID,COMPANY_ID,PAGE,PLATFORM,USSD,COMPANY_ID_,CREATE_DEP_ID_,TENANT_ID_,CREATE_BY_,CREATE_TIME_,UPDATE_BY_,UPDATE_TIME_
|
|
|
+ from KM_PV_LOG
|
|
|
<where>
|
|
|
<if test="@rx.Ognl@isNotEmpty(w.whereSql)">
|
|
|
${w.whereSql}
|
|
@@ -32,10 +34,41 @@
|
|
|
ORDER BY ${w.orderBySql}
|
|
|
</if>
|
|
|
<if test="@rx.Ognl@isEmpty(w.orderBySql)">
|
|
|
- ORDER BY PK_ID DESC
|
|
|
+ ORDER BY PK_ID DESC
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <insert id="insert">
|
|
|
+ insert into KM_PV_LOG (PK_ID, MODULE, SUB_MODULE, USER_ID, COMPANY_ID, PAGE, PLATFORM, USSD, COMPANY_ID_,
|
|
|
+ CREATE_DEP_ID_, TENANT_ID_, CREATE_BY_, CREATE_TIME_, UPDATE_BY_, UPDATE_TIME_)
|
|
|
+ values (#{pkId}, #{module}, #{subModule}, #{userId}, #{companyId}, #{page}, #{platform}, #{ussd}, #{companyId},
|
|
|
+ #{createDepId},
|
|
|
+ #{tenantId},
|
|
|
+ #{createBy},
|
|
|
+ #{createTime},
|
|
|
+ #{updateBy},
|
|
|
+ #{updateTime})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <select id="selectYearTotal" resultType="int">
|
|
|
+ select count(*) from KM_PV_LOG
|
|
|
+ where
|
|
|
+ TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') >= #{firstYearDate}
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') <= #{lastYearDate}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectSearchVisitHistogramByMonth" resultType="int">
|
|
|
+ select count(*)
|
|
|
+ from KM_PV_LOG
|
|
|
+ <where>
|
|
|
+ TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') >= #{firstOfMonth}
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') <= #{lastOfMonth}
|
|
|
+ <if test="platform != null">
|
|
|
+ and PLATFORM = #{platform}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|
|
|
|
|
|
|