package com.talentcard.server.business.portal;
|
|
import java.util.Map;
|
|
import com.talentcard.server.business.PageResult;
|
import com.talentcard.server.common.ApiResponse;
|
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;
|
|
@RestController
|
@RequestMapping("/api/app/usage-records")
|
public class UsageRecordPortalController {
|
|
private final UsageRecordPortalService usageRecordPortalService;
|
|
public UsageRecordPortalController(UsageRecordPortalService usageRecordPortalService) {
|
this.usageRecordPortalService = usageRecordPortalService;
|
}
|
|
@GetMapping
|
public ApiResponse<PageResult<Map<String, Object>>> list(
|
@RequestParam Long talentId,
|
@RequestParam(required = false) String status,
|
@RequestParam(defaultValue = "1") int page,
|
@RequestParam(defaultValue = "8") int size
|
) {
|
return ApiResponse.success(usageRecordPortalService.list(talentId, status, page, size));
|
}
|
}
|