package com.sqx.modules.integral.controller;

import com.sqx.common.utils.Result;
import com.sqx.modules.integral.service.UserIntegralService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags={"管理端-积分"})
@RestController
@RequestMapping("/admin/userintegral")
public class AdminUserIntegralController {

    @Autowired
    private UserIntegralService userIntegralService;

    @ApiOperation("管理端给用户添加积分")
    @PostMapping(value = "addAdminIntegral")
    public Result addAdminIntegral(Long userId, Integer sum, Integer type){

        return userIntegralService.addAdminIntegral(userId, sum, type);
    }


}
