Commit b5305922 by “Kongxiangkun”

工作台互动分析优化

parent b22cc161
......@@ -28,7 +28,7 @@ public interface EventTrackMapper extends BaseMapper<EventTrack> {
DayNumVo getTgNumByType(@Param("date") String date,@Param("dateString") String dateString,@Param("siteId") Long siteId);
List<EventTrackTypeNumVo> queryNumByType(@Param("deptId") Long deptId,@Param("date") String date,@Param("dateString") String dateString,@Param("types")List<Integer> types,@Param("subNameList")List<String> subNameList,@Param("siteId") Long siteId,
@Param("isPre") Boolean isPre);
@Param("isPre") Boolean isPre, @Param("remark2") String remark2);
List<EventTrackTypeNumVo> queryNumByTypeInformation(@Param("deptId") Long deptId,@Param("date") String date,@Param("dateString") String dateString,@Param("types")List<Integer> types,@Param("subNameList")List<Long> subNameList,@Param("siteId") Long siteId,
@Param("isPre") Boolean isPre);
......
......@@ -94,10 +94,19 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
eventTrack.setDeptId(authzUserGroupVo.getId());
eventTrack.setDeptName(authzUserGroupVo.getName());
}
String tp;
if(type.startsWith("event_tp_comment_")) {
//保存评论业务类型
eventTrack.setRemark2(type.substring(type.lastIndexOf("_") + 1, type.length()));
tp = type.substring(0, type.lastIndexOf("_"));
} else {
tp = type;
}
String key = "event_track_type";
List<Dictionary> dictionaryList = dictionaryFeignClients.listChildDictionary(key,false,1);
if(CollUtil.isNotEmpty(dictionaryList)){
Optional<Dictionary> optional = dictionaryList.stream().filter(d-> Objects.equals(d.getCode(),type)).findFirst();
Optional<Dictionary> optional = dictionaryList.stream().filter(d-> Objects.equals(d.getCode(),tp)).findFirst();
if(optional!=null&&optional.isPresent()){
Dictionary dictionary = optional.get();
eventTrack.setSubType(dictionary.getCnName());
......@@ -430,7 +439,7 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
if(types.size() == 1){
eventTrackTypeNumVoList = this.baseMapper.queryNumByTypeInformation(null,date,dateString,types,subIdList,context.getSiteId(), isPre);
} else {
eventTrackTypeNumVoList = this.baseMapper.queryNumByType(null,date,dateString,types,subNameList,context.getSiteId(), isPre);
eventTrackTypeNumVoList = this.baseMapper.queryNumByType(null,date,dateString,types,subNameList,context.getSiteId(), isPre, null);
}
logger.info("埋点统计行为统计查询结果:{}", JSONUtil.toJsonStr(eventTrackTypeNumVoList));
if(CollectionUtil.isNotEmpty(subNameList)){
......@@ -499,7 +508,7 @@ public class EventTrackServiceImpl extends ServiceImpl<EventTrackMapper, EventTr
if(CollUtil.isNotEmpty(eventTrackDeptNumVoList)){
String finalDate = date;
eventTrackDeptNumVoList.stream().forEach(eventTrackDeptNumVo -> {
List<EventTrackTypeNumVo> eventTrackTypeNumVoList = this.baseMapper.queryNumByType(eventTrackDeptNumVo.getDeptId(),finalDate, dateString,types,null,context.getSiteId(), false);
List<EventTrackTypeNumVo> eventTrackTypeNumVoList = this.baseMapper.queryNumByType(eventTrackDeptNumVo.getDeptId(),finalDate, dateString,types,null,context.getSiteId(), false, "1");
if(CollectionUtil.isNotEmpty(eventTrackTypeNumVoList)){
List<EventTrackTypeNumVo> voList = Lists.newArrayList();
eventTrackTypeNumVoList.stream().forEach(numVo->{
......
......@@ -60,6 +60,9 @@
<if test="deptId!=null">
and e.dept_id = #{deptId}
</if>
<if test="remark2!=null">
and e.remark2 = #{remark2}
</if>
group by e.type,e.sub_type
order by e.type
</select>
......
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