package com.sqx.modules.userSign.controller;


import com.sqx.common.utils.Result;
import com.sqx.modules.sys.controller.AbstractController;
import com.sqx.modules.userSign.service.UserSignRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@Api(value = "用户签到", tags = {"用户签到"})
@RequestMapping(value = "/userSignRecord")
public class UserSignRecordController extends AbstractController {
    /**
     * 服务对象
     */
    @Autowired
    private UserSignRecordService userSignRecordService;

    /**
     * 获取用户连续签到数据
     */
    @GetMapping("/getUserSignData")
    @ApiOperation("获取用户连续签到数据")
    public Result getUserSignData() {
        //UserSignDTO data = userSignRecordService.getUserSignData();
        return Result.success().put("data", null);
    }

    /**
     * 获取连续签到奖励配置
     */
    @GetMapping("/getUserSignAwardConfig")
    @ApiOperation(value = "获取连续签到奖励配置", notes = "如：[7,7] = 连续签到7天奖励7元")
    public Result getUserSignAwardConfig() {
        String[] data = userSignRecordService.getUserSignAwardConfig();
        return Result.success().put("data", data);
    }
}

