package com.tcm.training.admin.statistics.controller; import cn.dev33.satoken.stp.StpUtil; import com.tcm.training.admin.common.ApiResponse; import com.tcm.training.admin.statistics.service.AppUserEntryLogAppService; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @Validated @RestController @RequestMapping({"/api/v1", "/api"}) public class UserEntryLogController { private final AppUserEntryLogAppService appUserEntryLogAppService; public UserEntryLogController(AppUserEntryLogAppService appUserEntryLogAppService) { this.appUserEntryLogAppService = appUserEntryLogAppService; } @PostMapping("/user-entry-logs") public ApiResponse record() { appUserEntryLogAppService.record(StpUtil.getLoginIdAsLong()); return ApiResponse.ok(null); } }