管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-03-06 8c10eb7086cb61712747b96dae712526d90e5269
src/main/java/com/lf/server/controller/sys/ResController.java
@@ -3,6 +3,7 @@
import com.lf.server.annotation.SysLog;
import com.lf.server.controller.all.BaseController;
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.entity.ctrl.DownloadReqEntity;
import com.lf.server.entity.sys.ResEntity;
import com.lf.server.entity.sys.UserEntity;
import com.lf.server.helper.StringHelper;
@@ -321,17 +322,17 @@
            @ApiImplicitParam(name = "guids", value = "附件Guid数组", dataType = "String", paramType = "body", allowMultiple = true, example = "e5b6ae0889b88111f13a4b6e048348db,fa4f299e901a0c46e634f8fcc8185c0c")
    })
    @ResponseBody
    @PostMapping(value = "/downloadReq")
    public ResponseMsg<Object> downloadReqForGuids(String[] guids, HttpServletRequest req, HttpServletResponse res) {
    @PostMapping(value = "/downloadReqForGuids")
    public ResponseMsg<Object> downloadReqForGuids(@RequestBody DownloadReqEntity dre, HttpServletRequest req, HttpServletResponse res) {
        try {
            if (null == guids || guids.length == 0) {
            if (null == dre || null == dre.getGuids() || dre.getGuids().isEmpty()) {
                return fail("Guid数组为空");
            }
            UserEntity ue = tokenService.getCurrentUser(req);
            String guid = uploadAttachService.downloadReqForGuids(ue, guids);
            String guid = uploadAttachService.downloadReqForGuids(ue, dre.getGuids());
            return success("");
            return success(guid);
        } catch (Exception ex) {
            return fail(ex, null);
        }
@@ -344,18 +345,18 @@
            @ApiImplicitParam(name = "guids", value = "附件Guid数组", dataType = "String", paramType = "body", allowMultiple = true, example = "08e5b4ad-93b8-46f6-adaa-46a6274af4ce,6f94f4f8-6e8d-44e7-8803-3d068d34983f")
    })
    @ResponseBody
    @PostMapping(value = "/downloadReq")
    public ResponseMsg<Object> downloadReqForTabGuids(String tab, String[] guids, HttpServletRequest req, HttpServletResponse res) {
    @PostMapping(value = "/downloadReqForTabGuids")
    public ResponseMsg<Object> downloadReqForTabGuids(@RequestBody DownloadReqEntity dre, HttpServletRequest req, HttpServletResponse res) {
        try {
            if (StringHelper.isEmpty(tab)) {
            if (null == dre || StringHelper.isEmpty(dre.getTab())) {
                return fail("表名为空");
            }
            if (null != guids && guids.length == 0) {
                guids = null;
            if (null != dre.getGuids() && dre.getGuids().size() == 0) {
                dre.setIds(null);
            }
            UserEntity ue = tokenService.getCurrentUser(req);
            String guid = uploadAttachService.downloadReqForTabGuids(ue, tab, guids);
            String guid = uploadAttachService.downloadReqForTabGuids(ue, dre.getTab(), dre.getGuids());
            return success(guid);
        } catch (Exception ex) {