package com.xinquan.user.controller.client;
|
|
|
import com.xinquan.common.core.domain.R;
|
import com.xinquan.user.service.AppUserViewingHistoryService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.RequiredArgsConstructor;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
|
/**
|
* <p>
|
* 用户观看历史 前端控制器
|
* </p>
|
*
|
* @author mitao
|
* @since 2024-09-06
|
*/
|
@Api(tags = {"用户端-观看历史相关接口"})
|
@RestController
|
@RequiredArgsConstructor
|
@RequestMapping("/user/app-user-viewing-history")
|
public class ClientAppUserViewingHistoryController {
|
|
private final AppUserViewingHistoryService appUserViewingHistoryService;
|
|
/**
|
* 记录用户观看记录
|
*
|
* @param bizId 业务id
|
* @param viewingType 观看类型 1=疗愈 2=课程
|
*/
|
@PostMapping("/saveViewingHistory")
|
@ApiOperation(value = "记录用户观看记录", tags = {"用户端-用户相关接口"})
|
@ApiImplicitParams({
|
@ApiImplicitParam(name = "bizId", value = "业务id", dataType = "Long", required = true),
|
@ApiImplicitParam(name = "viewingType", value = "观看类型 1=疗愈 2=课程", dataType = "Integer", required = true)
|
})
|
public R<?> saveViewingRecord(@RequestParam("bizId") Long bizId,
|
@RequestParam("viewingType") Integer viewingType) {
|
appUserViewingHistoryService.saveViewingRecord(bizId, viewingType);
|
return R.ok();
|
}
|
}
|