package com.kym.miniapp.controller;

import com.kym.common.R;
import com.kym.entity.admin.queryParams.RightsQueryParam;
import com.kym.service.admin.RechargeRightsService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户优惠券 前端控制器
 * </p>
 *
 * @author skyline
 * @since 2024-04-29
 */
@RestController
@RequestMapping("/rechargeRights")
public class RechargeRightsController {

    private final RechargeRightsService rechargeRightsService;


    public RechargeRightsController(RechargeRightsService rechargeRightsService) {
        this.rechargeRightsService = rechargeRightsService;
    }

    /**
     * 获取当前站点参与的充值权益活动列表
     *
     * @param params
     * @return
     */
    @GetMapping(value = "/listAvailableRechargeRights")
    public R<?> listAvailableCoupons(@ModelAttribute RightsQueryParam params) {
        return R.success(rechargeRightsService.listAvailableRechargeRights(params));
    }

}
