Commit b9a09f70 by Administrator

Merge branch 'feature/1003597' into 'master'

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

See merge request rays/pcloud-book!966
parents 9bd56f2f b2f4baa7
......@@ -16,4 +16,16 @@ public class AppletThirdResourcesClick extends BaseEntity {
private String link;
@ApiModelProperty("1:点击,2:浏览")
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 {
public ResponseDto<?> addClickRecord(@CookieValue("userInfo") String userInfo,
@RequestBody @ApiParam AppletThirdResourcesClick thirdResourcesClick) {
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, "缺失参数");
}
thirdResourcesClick.setWechatUserId(wechatUserId);
thirdResourcesBiz.addServiceRecord(thirdResourcesClick);
return new ResponseDto<>();
}
......
......@@ -15,8 +15,36 @@
<!--新增所有列-->
<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)
values (#{wechatUserId}, #{thirdResourcesId}, #{thirdResourcesName}, #{link}, #{recordType}, now(), now())
insert into
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>
<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