Commit f19d8656 by Administrator

Merge branch 'feature/1003377' into 'master'

feat: [1003377] 第三方群链接做埋点统计

See merge request rays/pcloud-book!864
parents a81905ec 356c8ee9
......@@ -17,7 +17,18 @@ public enum DataTypeEnum {
/**
* 2券库
*/
gift_coupon(2);
gift_coupon(2),
/**
* 官方群
*/
rays_group(3),
/**
*
*/
third_group(4);
public final Integer code;
......
......@@ -28,6 +28,7 @@ import com.pcloud.book.applet.vo.AppletNewsClassifyVO;
import com.pcloud.book.applet.vo.AppletNewsShowStateVO;
import com.pcloud.book.base.exception.BookBizException;
import com.pcloud.book.skill.biz.PcloudGroupActivityBiz;
import com.pcloud.book.skill.facade.response.QueryGroupActivityResponseVO;
import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.page.PageBeanNew;
import com.pcloud.common.permission.PermissionException;
......
......@@ -15,6 +15,7 @@ import com.pcloud.book.group.entity.BookGroupClassify;
import com.pcloud.book.group.vo.AddClassifyVO;
import com.pcloud.book.group.vo.AdviserClassifyParam;
import com.pcloud.book.group.vo.AdviserClassifyVO;
import com.pcloud.book.group.vo.BookGroupClassifyAnalysisVO;
import com.pcloud.book.group.vo.BookGroupClassifyVO;
import com.pcloud.book.group.vo.BookGroupQrcodeStatisticVO;
import com.pcloud.book.group.vo.ClassifyAndGroupCountVO;
......@@ -287,4 +288,5 @@ public interface BookGroupClassifyBiz {
List<BookGroupClassifyDTO> getBookGroupClassifyByClassifyIds(List<Long> classifyIds);
PageBeanNew<BookGroupClassifyAnalysisVO> listGroupClassify4Analysis(String name, Long proLabelId, Long depLabelId, Long purLabelId, Long firstClassify, Long secondClassify, Long gradeLabelId, Long subjectLabelId, Integer linkOnly, Integer browseQty, Integer clickQty, Integer currentPage, Integer numPerPage, String cityCode);
}
......@@ -5,6 +5,7 @@ import com.pcloud.book.group.dto.GroupQrcode4ClassifyDTO;
import com.pcloud.book.group.vo.AddClassifyVO;
import com.pcloud.book.group.vo.AdviserClassifyParam;
import com.pcloud.book.group.vo.AdviserClassifyVO;
import com.pcloud.book.group.vo.BookGroupClassifyAnalysisVO;
import com.pcloud.book.group.vo.BookGroupClassifyVO;
import com.pcloud.book.group.vo.BookGroupQrcodeStatisticVO;
import com.pcloud.book.group.vo.ClassifyAndGroupCountVO;
......@@ -288,6 +289,26 @@ public interface BookGroupClassifyFacade {
@RequestParam("numPerPage") Integer numPerPage,
@RequestParam(value = "cityCode",required = false) String cityCode) throws BizException, PermissionException;
@ApiOperation("平台端获取群分类统计分析数据")
@GetMapping("listGroupClassify4Analysis")
ResponseDto<PageBeanNew<BookGroupClassifyAnalysisVO>> listGroupClassify4Analysis(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestParam(value = "name", required = false) @ApiParam("群分类名 | 书刊名") String name,
@RequestParam(value = "proLabelId", required = false) @ApiParam("专业标签") Long proLabelId,
@RequestParam(value = "depLabelId", required = false) @ApiParam("深度标签") Long depLabelId,
@RequestParam(value = "purLabelId", required = false) @ApiParam("目的") Long purLabelId,
@RequestParam(value = "firstClassify", required = false) @ApiParam("一级分类") Long firstClassify,
@RequestParam(value = "secondClassify", required = false) @ApiParam("二级分类") Long secondClassify,
@RequestParam(value = "gradeLabelId", required = false) @ApiParam("年级") Long gradeLabelId,
@RequestParam(value = "subjectLabelId", required = false) @ApiParam("科目") Long subjectLabelId,
@RequestParam(value = "linkOnly", required = false) @ApiParam("只看第三方") Integer linkOnly,
@RequestParam(value = "browseQty", required = false) @ApiParam("浏览量") Integer browseQty,
@RequestParam(value = "clickQty", required = false) @ApiParam("点击量") Integer clickQty,
@RequestParam("currentPage") Integer currentPage,
@RequestParam("numPerPage") Integer numPerPage,
@RequestParam(value = "cityCode",required = false) String cityCode
) throws BizException, PermissionException;
@ApiOperation("根据群分类ID获取群二维码")
@GetMapping("getGroupQrcodeByClassify")
ResponseDto<String> getGroupQrcodeByClassify(@RequestHeader("token") String token,@RequestParam("classifyId") Integer classifyId) throws BizException,PermissionException;
......
......@@ -327,6 +327,30 @@ public class BookGroupClassifyFacadeImpl implements BookGroupClassifyFacade {
}
@Override
@GetMapping("listGroupClassify4Analysis")
public ResponseDto<PageBeanNew<BookGroupClassifyAnalysisVO>> listGroupClassify4Analysis(
@RequestHeader("token") @ApiParam("token信息") String token,
@RequestParam(value = "name", required = false) @ApiParam("群分类名 | 书刊名") String name,
@RequestParam(value = "proLabelId", required = false) @ApiParam("专业标签") Long proLabelId,
@RequestParam(value = "depLabelId", required = false) @ApiParam("深度标签") Long depLabelId,
@RequestParam(value = "purLabelId", required = false) @ApiParam("目的") Long purLabelId,
@RequestParam(value = "firstClassify", required = false) @ApiParam("一级分类") Long firstClassify,
@RequestParam(value = "secondClassify", required = false) @ApiParam("二级分类") Long secondClassify,
@RequestParam(value = "gradeLabelId", required = false) @ApiParam("年级") Long gradeLabelId,
@RequestParam(value = "subjectLabelId", required = false) @ApiParam("科目") Long subjectLabelId,
@RequestParam(value = "linkOnly", required = false) @ApiParam("只看第三方") Integer linkOnly,
@RequestParam(value = "browseQty", required = false) @ApiParam("浏览量") Integer browseQty,
@RequestParam(value = "clickQty", required = false) @ApiParam("点击量") Integer clickQty,
@RequestParam("currentPage") Integer currentPage,
@RequestParam("numPerPage") Integer numPerPage,
@RequestParam(value = "cityCode",required = false) String cityCode
) throws BizException, PermissionException {
SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
return new ResponseDto<>(bookGroupClassifyBiz.listGroupClassify4Analysis(name, proLabelId, depLabelId, purLabelId,
firstClassify, secondClassify, gradeLabelId, subjectLabelId, linkOnly,browseQty,clickQty,currentPage, numPerPage,cityCode));
}
@Override
@GetMapping("getGroupQrcodeByClassify")
public ResponseDto<String> getGroupQrcodeByClassify(@RequestHeader("token") String token, @RequestParam("classifyId") Integer classifyId) throws BizException, PermissionException {
SessionUtil.getVlaue(token, SessionUtil.PARTY_ID);
......
package com.pcloud.book.group.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class BookGroupClassifyAnalysisVO {
@ApiModelProperty("ID")
private Long id;
@ApiModelProperty("群分类名称")
private String classifyName;
@ApiModelProperty("群分类介绍")
private String desc;
@ApiModelProperty("专业")
private Long proLabelId;
@ApiModelProperty("深度")
private Long depLabelId;
@ApiModelProperty("目的")
private Long purLabelId;
@ApiModelProperty("专业标签名称")
private String proLabelName;
@ApiModelProperty("深度标签名称")
private String depLabelName;
@ApiModelProperty("目的标签名称")
private String purLabelName;
@ApiModelProperty("目的标签名称")
private Integer groupType;
@ApiModelProperty("城市编码")
private String cityCode;
@ApiModelProperty("城市名称")
private String cityName;
@ApiModelProperty("点击量pv/uv")
private String clickPVUV;
@ApiModelProperty("浏览量pv/uv")
private String browsePVUV;
@ApiModelProperty("微信入群文章链接")
private String wxArticleUrl;
@ApiModelProperty("第一级类型标识")
private Long firstClassify;
@ApiModelProperty("第一级类型标识名称")
private String firstClassifyName;
@ApiModelProperty("第二级类型标识")
private Long secondClassify;
@ApiModelProperty("第二级类型标识名称")
private String secondClassifyName;
@ApiModelProperty("年级标签id")
private Long gradeLabelId;
@ApiModelProperty("年级标签名称")
private String gradeLabelName;
@ApiModelProperty("科目标签id")
private Long subjectLabelId;
@ApiModelProperty("科目标签名称")
private String subjectLabelName;
}
......@@ -5,8 +5,12 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.pcloud.appcenter.assist.dto.AssistTempletDTO;
import com.pcloud.book.applet.biz.AppletGroupSearchRecordBiz;
import com.pcloud.book.applet.dao.AppletLinkClickDao;
import com.pcloud.book.applet.dto.AppletGroupManageDTO;
import com.pcloud.book.applet.dto.AppletGroupStatementDTO;
import com.pcloud.book.applet.dto.PvuvDTO;
import com.pcloud.book.applet.enums.DataRecordTypeEnum;
import com.pcloud.book.applet.enums.DataTypeEnum;
import com.pcloud.book.base.exception.BookBizException;
import com.pcloud.book.book.biz.BookBiz;
import com.pcloud.book.book.dao.BookDao;
......@@ -132,6 +136,8 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
private BookBrowseRecordBiz bookBrowseRecordBiz;
@Autowired
private BookGroupBiz bookGroupBiz;
@Autowired
private AppletLinkClickDao appletLinkClickDao;
@ParamLog("批量分类")
@Override
......
......@@ -96,5 +96,11 @@ public class QueryGroupActivityResponseVO {
@ApiModelProperty("城市名称")
private String cityCode;
@ApiModelProperty("点击量pv/uv")
private String clickPVUV;
@ApiModelProperty("浏览量pv/uv")
private String browsePVUV;
}
......@@ -1170,6 +1170,96 @@
ORDER BY a.create_time DESC
</select>
<select id="listGroupClassify4Analysis" parameterType="map" resultType="com.pcloud.book.group.vo.BookGroupClassifyAnalysisVO">
SELECT * FROM(
<if test="linkOnly == null or linkOnly == 0">
SELECT
a.id,
a.classify classifyName,
a.classify_introduce AS `desc`,
c.pro_label_id AS proLabelId,
c.dep_label_id AS depLabelId,
c.pur_label_id AS purLabelId,
0 firstClassify,
0 secondClassify,
0 gradeLabelId,
0 subjectLabelId,
0 groupType,
city_code cityCode,
a.create_time
FROM book_group_classify a
LEFT JOIN book_group_qrcode b ON a.id = b.classify_id AND b.is_delete = 0 AND a.is_delete = 0
LEFT JOIN book_group c ON a.book_group_id = c.id
<where>
a.is_delete=0
<if test="firstClassify != null">
AND 1=2
</if>
<if test="secondClassify != null">
AND 1=2
</if>
<if test="gradeLabelId != null">
AND 1=2
</if>
<if test="subjectLabelId != null">
AND 1=2
</if>
</where>
GROUP BY b.classify_id
HAVING count(b.classify_id) > 0
UNION
</if>
SELECT
a.id,
a.`name` classifyName,
a.description as `desc`,
a.pro_label_id AS proLabelId,
a.dep_label_id AS depLabelId,
a.pur_label_id AS purLabelId,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
a.grade_label_id AS gradeLabelId,
a.subject_label_id AS subjectLabelId,
a.group_type as groupType,
'' cityCode,
a.create_time
FROM pcloud_group_activity a
WHERE
a.is_delete = 0
AND a.group_type = 1
<if test="firstClassify != null">
AND a.first_classify = #{firstClassify}
</if>
<if test="secondClassify != null">
AND a.second_classify = #{secondClassify}
</if>
<if test="gradeLabelId != null">
AND a.grade_label_id = #{gradeLabelId}
</if>
<if test="subjectLabelId != null">
AND a.subject_label_id = #{subjectLabelId}
</if>
) temp_tb
<where>
<if test="name!=null">
classifyName LIKE CONCAT("%",#{name},"%")
</if>
<if test="proLabelId!=null">
AND proLabelId = #{proLabelId}
</if>
<if test="depLabelId!=null">
AND depLabelId = #{depLabelId}
</if>
<if test="purLabelId!=null">
AND purLabelId = #{purLabelId}
</if>
<if test="cityCode != null">
and cityCode = #{cityCode}
</if>
</where>
ORDER BY create_time DESC
</select>
<select id="listClassify4Heals" resultType="com.pcloud.book.group.dto.ListClassify4WechatDTO" parameterType="map">
SELECT
c.id classifyId,
......@@ -1238,4 +1328,4 @@
</select>
</mapper>
\ No newline at end of file
</mapper>
......@@ -613,4 +613,4 @@
ORDER BY a.id DESC
</select>
</mapper>
\ No newline at end of file
</mapper>
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