package com.cool.store.controller.webb;

import com.cool.store.enums.fees.AllocationPayStatusEnum;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.fees.WalletPayInfoService;
import com.cool.store.vo.fees.WalletPayInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <p>
 * 门店缴费信息
 * </p>
 *
 * @author wangff
 * @since 2026/2/3
 */
@RestController
@Api(tags ="门店缴费信息")
@RequestMapping({"/pc/fees/shopAllocation"})
@RequiredArgsConstructor
@Validated
public class ShopAllocationController {
    private final WalletPayInfoService walletPayInfoService;

    @ApiOperation("缴费信息列表")
    @GetMapping("/payInfoList")
    public ResponseResult<List<WalletPayInfoVO>> payInfoList(@NotNull(message = "门店id不能为空") Long shopId) {
        return ResponseResult.success(walletPayInfoService.payInfoList(shopId, AllocationPayStatusEnum.PAID.getStatus()));
    }
}
