| | |
| | | |
| | | @PostMapping("/view/record") |
| | | @ApiOperation(value = "保存观看记录", notes = "保存观看记录") |
| | | public Result saveViewRecord(VideoFootPrintForm form) { |
| | | public Result saveViewRecord(@RequestBody VideoFootPrintForm form) { |
| | | return videoService.saveViewRecord(form); |
| | | } |
| | | } |
| | |
| | | |
| | | //记录用户足迹 |
| | | if (currentUser != null) { |
| | | FootPrint footPrint = new FootPrint(currentUser.getId(), goodsIndex.getStoreId(), goodsId, skuId, ViewTypeEnum.GOODS.getValue(), null); |
| | | FootPrint footPrint = new FootPrint(currentUser.getId(), goodsIndex.getStoreId(), goodsId, skuId, ViewTypeEnum.GOODS.getValue(), null, null); |
| | | String destination = rocketmqCustomProperties.getGoodsTopic() + ":" + GoodsTagsEnum.VIEW_GOODS.name(); |
| | | rocketMQTemplate.asyncSend(destination, footPrint, RocketmqSendCallbackBuilder.commonCallback()); |
| | | } |
| | |
| | | @ApiModelProperty("观看时长") |
| | | private Long viewDuration; |
| | | |
| | | @ApiModelProperty("视频播放至") |
| | | private String playAt; |
| | | |
| | | } |
| | |
| | | footPrint.setRefId(form.getVideoId()); |
| | | footPrint.setMemberId(UserContext.getCurrentUserId()); |
| | | footPrint.setViewDuration(form.getViewDuration()); |
| | | footPrint.setPlayAt(form.getPlayAt()); |
| | | footprintService.saveFootprint(footPrint); |
| | | return Result.ok(); |
| | | } |
| | |
| | | @ApiModelProperty(value = "浏览类型:goods商品、view视频") |
| | | private String viewType; |
| | | |
| | | @ApiModelProperty(value = "观看时长:秒") |
| | | @ApiModelProperty(value = "观看时长:毫秒") |
| | | private Long viewDuration; |
| | | |
| | | @ApiModelProperty(value = "播放至:毫秒") |
| | | private String playAt; |
| | | } |