package com.pig4cloud.pigx.app.controller.as;

import com.pig4cloud.pigx.app.service.as.AsSubPayrollService;
import com.pig4cloud.pigx.common.core.util.R;
import com.pig4cloud.pigx.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * as 订阅付费计划
 *
 * @author amigo
 * @date 2023-8
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/asSubPayroll")
@Tag(description = "AS-subPayroll-manage", name = "AS-订阅付费计划")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class AsSubPayrollController {

    private final AsSubPayrollService asSubPayrollService;

    /**
     	 * 返回订阅计划集合
     	 * @param platId 平台id
     	 * @return 订阅计划集合
     	 */
	@Inner(value = false)
	@Operation(summary = "获取订阅计划", description = "获取订阅计划")
	@GetMapping("/getSubPayrollBy")
	public R getSubPayrollBy(Long platId,String region) {
		return R.ok(asSubPayrollService.listByPlatId(platId,region));
	}
}
