package com.izouma.nineth.web.mobile.v1.rewardpoints;


import com.izouma.nineth.domain.UserIntegral;
import com.izouma.nineth.service.rewardpoints.UserIntegralService;
import com.izouma.nineth.web.BaseController;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户积分
 *
 */
@RestController
@RequestMapping("/userIntegral/v1")
@AllArgsConstructor
public class UserIntegralControllerV1 extends BaseController {

    private UserIntegralService userIntegralService;

    /**
     * 获取用户积分信息
     * @return
     */
    @RequestMapping("getInfo")
    public UserIntegral getInfo(){
        return userIntegralService.getAndInitUserIntegral(currentUser().getId());
    }




}
