“mitao”
2026-03-27 cde5977f64ff1dfa928d1076c059e8865c02d70b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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<Void> record() {
        appUserEntryLogAppService.record(StpUtil.getLoginIdAsLong());
        return ApiResponse.ok(null);
    }
}