package com.czg.controller.admin;

import com.czg.account.dto.points.MemberPointsLogDTO;
import com.czg.account.service.MemberPointsLogService;
import com.czg.log.annotation.OperationLog;
import com.czg.resp.CzgResult;
import com.mybatisflex.core.paginate.Page;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 会员积分变动记录
 *
 * @author Tankaikai tankaikai@aliyun.com
 * @since 1.0 2025-02-25
 */
@AllArgsConstructor
@RestController
@RequestMapping("/admin/points/memberPointsLog")
public class MemberPointsLogController {

    private final MemberPointsLogService memberPointsLogService;

    /**
     * 分页
     */
    @GetMapping("page")
    @OperationLog("会员积分变动记录-分页")
    //@SaAdminCheckPermission("memberPointsLog:page")
    public CzgResult<Page<MemberPointsLogDTO>> getMemberPointsLogPage(MemberPointsLogDTO param) {
        Page<MemberPointsLogDTO> page = memberPointsLogService.getMemberPointsLogPage(param);
        return CzgResult.success(page);
    }
}