Commit b2f4baa7 by 吴博

feat:[1003597] 小程序第三方资源新增书刊埋点一期

parent 9bd56f2f
...@@ -16,4 +16,16 @@ public class AppletThirdResourcesClick extends BaseEntity { ...@@ -16,4 +16,16 @@ public class AppletThirdResourcesClick extends BaseEntity {
private String link; private String link;
@ApiModelProperty("1:点击,2:浏览") @ApiModelProperty("1:点击,2:浏览")
private Integer recordType; private Integer recordType;
@ApiModelProperty("书籍id")
private Long bookId;
@ApiModelProperty("编辑id")
private Long adviserId;
@ApiModelProperty("渠道id")
private Long channelId;
@ApiModelProperty("来源页面")
private String page;
@ApiModelProperty("权益分类id")
private Long rightsSettingClassifyId;
@ApiModelProperty("权益分类id")
private Long newsId;
} }
\ No newline at end of file
...@@ -39,10 +39,9 @@ public class AppletThirdResourcesFacade { ...@@ -39,10 +39,9 @@ public class AppletThirdResourcesFacade {
public ResponseDto<?> addClickRecord(@CookieValue("userInfo") String userInfo, public ResponseDto<?> addClickRecord(@CookieValue("userInfo") String userInfo,
@RequestBody @ApiParam AppletThirdResourcesClick thirdResourcesClick) { @RequestBody @ApiParam AppletThirdResourcesClick thirdResourcesClick) {
Long wechatUserId = Cookie.getId(userInfo, Cookie._WECHAT_USER_ID); Long wechatUserId = Cookie.getId(userInfo, Cookie._WECHAT_USER_ID);
if (null == thirdResourcesClick || null == thirdResourcesClick.getThirdResourcesId()) { if (null == thirdResourcesClick || null == thirdResourcesClick.getThirdResourcesId() || null == thirdResourcesClick.getWechatUserId()) {
throw new WechatUserException(WechatUserException.FIELD_IS_NULL, "缺失参数"); throw new WechatUserException(WechatUserException.FIELD_IS_NULL, "缺失参数");
} }
thirdResourcesClick.setWechatUserId(wechatUserId);
thirdResourcesBiz.addServiceRecord(thirdResourcesClick); thirdResourcesBiz.addServiceRecord(thirdResourcesClick);
return new ResponseDto<>(); return new ResponseDto<>();
} }
......
...@@ -15,8 +15,36 @@ ...@@ -15,8 +15,36 @@
<!--新增所有列--> <!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true"> <insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into applet_thirdresources_click_record(wechat_user_id, third_resources_id, third_resources_name, link,record_type, create_time, update_time) insert into
values (#{wechatUserId}, #{thirdResourcesId}, #{thirdResourcesName}, #{link}, #{recordType}, now(), now()) applet_thirdresources_click_record(
wechat_user_id,
third_resources_id,
third_resources_name,
link,record_type,
create_time,
update_time,
book_id,
adviser_id,
channel_id,
page,
rights_setting_classify_id,
news_id
)
values (
#{wechatUserId},
#{thirdResourcesId},
#{thirdResourcesName},
#{link},
#{recordType},
now(),
now(),
#{bookId},
#{adviserId},
#{channelId},
#{page},
#{rightsSettingClassifyId},
#{newsId}
)
</insert> </insert>
<select id="mapPVUV" parameterType="map" resultType="com.pcloud.book.applet.dto.PvuvDTO"> <select id="mapPVUV" parameterType="map" resultType="com.pcloud.book.applet.dto.PvuvDTO">
......
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