Commit 905c07ec by 朱亚洁

feat:[none]H5埋点

parent 2a5bf72d
......@@ -320,4 +320,11 @@ public interface AppletNewsBiz {
* @return
*/
AppletThirdResourcesDTO getThirdResourceById(Long thirdResourcesId);
/**
* H5首页-待上线应用点赞数量
* @author:zhuyajie
* @date:2021/6/1 11:18
* * @param null
*/
Map<Long, Integer> getStayOnlineAppClickCount();
}
......@@ -1350,4 +1350,16 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
appletNewsClassifyDao.insert(appletNewsClassify);
}
@Override
public Map<Long, Integer> getStayOnlineAppClickCount() {
Map<Long, Integer> map = new HashMap<>();
List<PvuvDTO> list = appletLinkClickDao.getStayOnlineAppClickCount();
if (!ListUtils.isEmpty(list)) {
for (PvuvDTO dto:list){
map.put(dto.getFromId(), dto.getCount());
}
}
return map;
}
}
......@@ -45,4 +45,5 @@ public interface AppletLinkClickDao extends BaseDao<AppletLinkClick> {
List<ExportClickDTO> getNews(Integer count, String startDate, String endDate);
List<PvuvDTO> getStayOnlineAppClickCount();
}
\ No newline at end of file
......@@ -75,4 +75,9 @@ public class AppletLinkClickDaoImpl extends BaseDaoImpl<AppletLinkClick> impleme
map.put("endDate", endDate);
return getSessionTemplate().selectList(getStatement("getNews"), map);
}
@Override
public List<PvuvDTO> getStayOnlineAppClickCount() {
return getSessionTemplate().selectList(getStatement("getStayOnlineAppClickCount"));
}
}
......@@ -24,7 +24,7 @@ public class AppletLinkClick extends BaseEntity {
*/
private Long wechatUserId;
/**
* 1资讯/2券库/3编辑群/4第三方群/5书单
* 1资讯/2券库/3编辑群/4第三方群/5书单/6H5首页待上线应用点赞统计
*/
@NotNull
private Integer typeId;
......
......@@ -31,7 +31,11 @@ public enum DataTypeEnum {
/**
*外部书单中的书刊
*/
booklist(5);
booklist(5),
/**
*H5首页待上线应用点赞统计
*/
stay_online_app(6);
public final Integer code;
......
......@@ -1293,6 +1293,13 @@ public class AppletHomeFacade {
}
return new ResponseDto<>(appletBannerBiz.getBannerByGradeLabel4ResourcePage(gradeLabelId, currentPage, numPerPage));
}
@ApiOperation("H5首页-待上线应用点赞数量")
@GetMapping("getStayOnlineAppClickCount")
public ResponseDto<?> getStayOnlineAppClickCount(@CookieValue("userInfo") String userInfo) {
Cookie.getId(userInfo, Cookie._WECHAT_USER_ID);
return new ResponseDto<>(appletNewsBiz.getStayOnlineAppClickCount());
}
}
......
......@@ -178,6 +178,16 @@
LIMIT #{count}
</select>
<select id="getStayOnlineAppClickCount" resultType="com.pcloud.book.applet.dto.PvuvDTO" parameterType="map">
SELECT
from_id fromId,
COUNT(DISTINCT wechat_user_id) count
FROM
applet_link_click
WHERE
type_id = 6
GROUP BY
from_id
</select>
</mapper>
\ No newline at end of file
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