|
|
@@ -25,6 +25,7 @@ import com.etotem.cfc.service.UserService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
@@ -33,6 +34,7 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@Tag(name = "用户接口", description = "用户相关接口")
|
|
|
+@Slf4j
|
|
|
@RestController
|
|
|
@RequestMapping("/api/user")
|
|
|
public class UserController {
|
|
|
@@ -208,7 +210,7 @@ public class UserController {
|
|
|
// 1. 总积分
|
|
|
Integer totalPoints = 0;
|
|
|
try {
|
|
|
- Object points = userService.getPointsBalance(userId);
|
|
|
+ Integer totalPoints = user.getTotalPoints() != null ? user.getTotalPoints() : 0;
|
|
|
if (points != null) {
|
|
|
if (points instanceof Map) {
|
|
|
Object v = ((Map<?, ?>) points).get("totalPoints");
|