|
@@ -266,7 +266,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectTrafficNew" resultType="com.fs.course.vo.FsCourseTrafficLogListVO">
|
|
<select id="selectTrafficNew" resultType="com.fs.course.vo.FsCourseTrafficLogListVO">
|
|
|
- select company_id,project,course_id,SUM(internet_traffic) AS total_internet_traffic
|
|
|
|
|
|
|
+ select company_id,course_id,SUM(internet_traffic) AS total_internet_traffic
|
|
|
,DATE_FORMAT(create_time, '%Y-%m-%d') AS `month` from fs_course_traffic_log
|
|
,DATE_FORMAT(create_time, '%Y-%m-%d') AS `month` from fs_course_traffic_log
|
|
|
<where>
|
|
<where>
|
|
|
<if test="startDate != null and endDate != null">
|
|
<if test="startDate != null and endDate != null">
|
|
@@ -276,24 +276,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and company_id = #{companyId}
|
|
and company_id = #{companyId}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="courseId != null">
|
|
<if test="courseId != null">
|
|
|
- and course_id = ${courseId}
|
|
|
|
|
|
|
+ and course_id = #{courseId}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="project != null">
|
|
|
|
|
- and project = ${project}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="common == null">
|
|
|
|
|
- AND company_id IS not NULL
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="common != null ">
|
|
|
|
|
|
|
+ <if test='common != null and common == "common"'>
|
|
|
AND company_id IS NULL
|
|
AND company_id IS NULL
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test='!(common != null and common == "common")'>
|
|
|
|
|
+ AND company_id IS NOT NULL
|
|
|
|
|
+ </if>
|
|
|
</where>
|
|
</where>
|
|
|
|
|
|
|
|
<if test="tabType==null or tabType==''">
|
|
<if test="tabType==null or tabType==''">
|
|
|
- group by company_id,`month`,course_id,project
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tabType!=null and tabType=='project'">
|
|
|
|
|
- group by project,`month`
|
|
|
|
|
|
|
+ group by company_id,`month`,course_id
|
|
|
</if>
|
|
</if>
|
|
|
<if test="tabType!=null and tabType=='course'">
|
|
<if test="tabType!=null and tabType=='course'">
|
|
|
group by course_id,`month`
|
|
group by course_id,`month`
|