# SalesKpiS3Controller.java

    package cloud.wconnect.workperformance.controller.saleskpi;

    import cloud.wconnect.commonlib.annotation.ApiId;
    import cloud.wconnect.commonlib.pojo.query.s3.DownloadFileUrlQuery;
    import cloud.wconnect.commonlib.pojo.query.s3.UploadFileUrlQuery;
    import cloud.wconnect.commonlib.util.S3ControllerUtil;
    import jakarta.validation.Valid;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.web.bind.annotation.GetMapping;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RestController;

    import java.util.Map;

    /**
     * S3 控制层
     *
     * @author lichen
     * @date 2023/11/2
     */
    @RestController
    @RequestMapping("/sales-kpi")
    public class SalesKpiS3Controller {

        @Autowired
        private S3ControllerUtil s3ControllerUtil;

        /**
         * 获取s3下载文件的url
         *
         * @param downloadFileUrlQuery 查询对象
         * @return java.util.Map
         * @author lichen
         * @date 2023/11/2
         */
        @ApiId(1504)
        @GetMapping("/s3/download-file-url")
        public Map getDownloadFileUrl(@Valid DownloadFileUrlQuery downloadFileUrlQuery) {
            return s3ControllerUtil.getDownloadFileUrl(downloadFileUrlQuery);
        }

        /**
         * 获取s3上传文件的url
         *
         * @param tenant             租户简称
         * @param property           资产标识
         * @param uploadFileUrlQuery 查询对象
         * @return java.util.Map
         * @author lichen
         * @date 2023/11/2
         */
        @ApiId(1505)
        @GetMapping("/s3/upload-file-url")
        public Map getUploadFileUrl(String tenant, String property, @Valid UploadFileUrlQuery uploadFileUrlQuery) {
            return s3ControllerUtil.getUploadFileUrl(tenant, property, uploadFileUrlQuery);
        }

    }