package com.yami.shop.user.api.controller;
/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yami.shop.bean.dto.ScoreDataDto;
import com.yami.shop.bean.model.PointsRecord;
import com.yami.shop.common.bean.SysConfig;
import com.yami.shop.common.config.Constant;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.security.api.util.SecurityUtils;
import com.yami.shop.service.PointsRecordService;
import com.yami.shop.service.SysConfigService;
import com.yami.shop.user.comment.service.UserScoreDetailService;
import com.yami.shop.user.comment.service.UserScoreLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.Objects;

/**
 * 定时任务处理模块
 *
 * @author LHD
 * @version 1.0.0
 * @since 2019-03-18
 */
@RestController
@RequestMapping("/solve")
@Api(tags = "定时任务处理模块")
@AllArgsConstructor
public class TaskSolveController {

    @Autowired
    private PointsRecordService pointsRecordService;

    @GetMapping("/scoreInfo")
    @ApiOperation(value = "定时任务处理模块", notes = "定时任务处理模块")
    public ResponseEntity<String> scoreInfo(@RequestParam("todayStr") String todayStr,@RequestParam("yesterdayStr") String yesterdayStr) {
        pointsRecordService.expiredPoints(todayStr, yesterdayStr);
        return ResponseEntity.ok("处理成功");
    }

}
