29 lines
707 B
Java
29 lines
707 B
Java
|
|
package com.ai.da.controller;
|
||
|
|
|
||
|
|
import com.ai.da.common.response.Response;
|
||
|
|
import com.ai.da.service.CreditsService;
|
||
|
|
import io.swagger.annotations.Api;
|
||
|
|
import io.swagger.annotations.ApiOperation;
|
||
|
|
import lombok.extern.slf4j.Slf4j;
|
||
|
|
import org.springframework.web.bind.annotation.*;
|
||
|
|
|
||
|
|
import javax.annotation.Resource;
|
||
|
|
|
||
|
|
@CrossOrigin
|
||
|
|
@RestController
|
||
|
|
@RequestMapping("/api/credits")
|
||
|
|
@Api(tags = "积分")
|
||
|
|
@Slf4j
|
||
|
|
public class CreditsController {
|
||
|
|
|
||
|
|
@Resource
|
||
|
|
private CreditsService creditsService;
|
||
|
|
|
||
|
|
@ApiOperation("获取积分")
|
||
|
|
@GetMapping("/getCredits")
|
||
|
|
public Response<String> getCredits(){
|
||
|
|
String credits = creditsService.getCredits();
|
||
|
|
return Response.success(credits);
|
||
|
|
}
|
||
|
|
}
|