# DbS3Controller.java

    package cloud.wconnect.workperformance.controller.database;

    import cloud.wconnect.commonlib.annotation.ApiId;
    import cloud.wconnect.commonlib.pojo.dto.result.ResultDTO;
    import cloud.wconnect.commonlib.pojo.query.s3.DownloadFileUrlQuery;
    import cloud.wconnect.commonlib.util.S3ControllerUtil;
    import jakarta.annotation.Resource;
    import jakarta.validation.Valid;
    import org.springframework.web.bind.annotation.GetMapping;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RestController;

    /**
     * Database S3 控制层
     *
     * @author zc
     * @date 2025/12/04
     */
    @RestController
    @RequestMapping("/database")
    public class DbS3Controller {

        @Resource
        private S3ControllerUtil s3ControllerUtil;

        /**
         * 获取s3下载文件的url
         *
         * @param downloadFileUrlQuery 查询对象
         * @return java.util.Map
         * @author zc
         * @date 2025/12/04
         */
        @ApiId(1660)
        @GetMapping("/s3/download-file-url")
        public ResultDTO<String> getDownloadFileUrl(@Valid DownloadFileUrlQuery downloadFileUrlQuery) {
            return ResultDTO.success(s3ControllerUtil.getDownloadFileUrl(downloadFileUrlQuery).get("url"));
        }

    }