package com.tcm.training.admin.app.share.controller;
|
|
import com.tcm.training.admin.app.share.service.AppShareService;
|
import com.tcm.training.admin.app.share.vo.AppInviteLandingVO;
|
import com.tcm.training.admin.common.ApiResponse;
|
import org.springframework.validation.annotation.Validated;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
|
/**
|
* 邀请下载页公开接口。
|
*/
|
@Validated
|
@RestController
|
@RequestMapping({"/api/open/app-invite", "/api/v1/open/app-invite"})
|
public class OpenAppInviteController {
|
|
private final AppShareService appShareService;
|
|
/**
|
* 注入邀请分享服务。
|
*/
|
public OpenAppInviteController(AppShareService appShareService) {
|
this.appShareService = appShareService;
|
}
|
|
/**
|
* 获取邀请下载页聚合数据。
|
*/
|
@GetMapping("/landing")
|
public ApiResponse<AppInviteLandingVO> getInviteLanding(@RequestParam(value = "inviteCode", required = false) String inviteCode) {
|
return ApiResponse.ok(appShareService.getInviteLanding(inviteCode));
|
}
|
}
|