Commit 6d60d149 authored by jiaorz's avatar jiaorz

Merge remote-tracking branch 'origin/dev' into dev

parents 858da483 3a5f4727
......@@ -125,7 +125,7 @@ public class CustomerBehaviorNotesBiz extends BaseBiz<CustomerBehaviorNotesMappe
//App访问量统计
case APP_VISIT_COUNT:
actionAcount = new ActionAcount();
default_p_total = mapper.selectAppVvisitsByType(BehaviorEnum.APP_VISIT_COUNT.getCode());
default_p_total = mapper.selectAppVvisitsByTypeAndTime(BehaviorEnum.APP_VISIT_COUNT.getCode(),startAtomic.get(),endAtomic.get());
default_p_avg = default_p_total / between_day;
actionAcount.setDefault_p_total(default_p_total);
actionAcount.setDefault_p_avg(default_p_avg);
......
......@@ -17,7 +17,7 @@ public interface CustomerBehaviorNotesMapper extends Mapper<CustomerBehaviorNote
List<CustomerBehaviorNotes> selectByActivityIdAndTime(@Param("activityId") Integer activityId,@Param("startTime") Long startTime,@Param("endTime") Long endTime);
long selectAppVvisitsByType(@Param("code") int code);
long selectAppVvisitsByTypeAndTime(@Param("code") int code,@Param("startTime") Long startTime,@Param("endTime") Long endTime);
List<CustomerBehaviorNotes> selectAllByTypeIdsAndTime(@Param("bizIds") List<Integer> bizIds,@Param("startTime") Long startTime,@Param("endTime") Long endTime);
}
......@@ -27,8 +27,17 @@
</if>
</select>
<select id="selectAppVvisitsByType" resultType="long">
<select id="selectAppVvisitsByTypeAndTime" resultType="long">
select count(id) from `customer_behavior_notes` where `type`=#{code}
<if test="startTime != null != null and endTime !=null">
and `crt_time` between #{startTime} and #{endTime}
</if>
<if test="startTime != null and endTime == null">
and <![CDATA[`crt_time` >= #{startTime}]]>
</if>
<if test="endTime != null and startTime == null">
and <![CDATA[ `crt_time` <= #{endTime}]]>
</if>
</select>
<select id="selectAllByTypeIdsAndTime" resultMap="customerBehaviorNotesMap">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment