package cn.newfeifan.mall.module.distri.controller.app.integralchangelog;

import cn.newfeifan.mall.module.distri.controller.app.integralchangelog.vo.IntegralChangeLogPageReqVO;
import cn.newfeifan.mall.module.distri.controller.app.integralchangelog.vo.IntegralChangeLogRespVO;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;

import javax.validation.*;
import cn.newfeifan.mall.framework.common.pojo.PageResult;
import cn.newfeifan.mall.framework.common.pojo.CommonResult;
import static cn.newfeifan.mall.framework.common.pojo.CommonResult.success;

import cn.newfeifan.mall.module.distri.service.integralchangelog.IntegralChangeLogService;

@Tag(name = "管理后台 - 平台消费分变动记录")
@RestController
@RequestMapping("/distri/consumption-change-log")
@Validated
public class IntegralChangeLogController {

    @Resource
    private IntegralChangeLogService integralChangeLogService;

    @GetMapping("/page")
    @Operation(summary = "获得积分变动记录分页")
    public CommonResult<PageResult<IntegralChangeLogRespVO>> getConsumptionChangeLogPage(@Valid IntegralChangeLogPageReqVO pageReqVO) {
        PageResult<IntegralChangeLogRespVO> pageResult = integralChangeLogService.getConsumptionChangeLogPage(pageReqVO);
        return success(pageResult);
    }

}