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

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

/**
 * AS 公用API
 * 注：不需要访问权限
 * 注2：限制请求频次
 *
 * @author amigo
 * @date 2023-8
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/asApi")
@Tag(description = "AS-public-api", name = "AS-公用API")
//@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class AsApi {

    //传参二进制加密？

    private final AsPlatformService asPlatformService;
    private final AsSubPayrollService asSubPayrollService;

    /**
     * 获取首页产品、用户订单、评价等 展示信息
     * todo 静态缓存，限流
     * @return
     */
    @Operation(summary = "首页产品、订单信息", description = "首页产品、订单信息")
    @GetMapping("/indexInfo")
    public R indexInfo(){

//        asPlatformService.getById();
//        AsSubPayroll byId = asSubPayrollService.getById();


        return null;
    }

    //首页信息

}
