加入积分系统,将充值与积分关联
This commit is contained in:
28
src/main/java/com/ai/da/controller/CreditsController.java
Normal file
28
src/main/java/com/ai/da/controller/CreditsController.java
Normal file
@@ -0,0 +1,28 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user