管道基础大数据平台系统开发-【后端】-Server
13693261870
2023-08-28 d565e050f3188fc729cb8178be7d5cc04844ce0d
src/main/java/com/lf/server/controller/sys/ResController.java
@@ -7,6 +7,7 @@
import com.lf.server.entity.sys.UserEntity;
import com.lf.server.service.all.PermsService;
import com.lf.server.service.all.UploadAttachService;
import com.lf.server.service.data.DownloadService;
import com.lf.server.service.sys.ResService;
import com.lf.server.service.sys.TokenService;
import io.swagger.annotations.Api;
@@ -37,10 +38,13 @@
    TokenService tokenService;
    @Autowired
    UploadAttachService uploadAttachService;
    PermsService permsService;
    @Autowired
    PermsService permsService;
    DownloadService downloadService;
    @Autowired
    UploadAttachService uploadAttachService;
    private final static String TAB_NAME = "lf.sys_res";
@@ -147,10 +151,8 @@
                entity.setCreateUser(ue.getId());
            }
            permsService.clearPermsCache();
            int count = resService.insertRes(entity);
            if (count > 0) {
                permsService.clearResCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -173,10 +175,8 @@
                }
            }
            permsService.clearPermsCache();
            int count = resService.insertRess(list);
            if (count > 0) {
                permsService.clearResCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -192,10 +192,8 @@
    @GetMapping(value = "/deleteRes")
    public ResponseMsg<Integer> deleteRes(int id) {
        try {
            permsService.clearPermsCache();
            int count = resService.deleteRes(id);
            if (count > 0) {
                permsService.clearResCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -215,10 +213,8 @@
                return fail("id数组不能为空", -1);
            }
            permsService.clearPermsCache();
            int count = resService.deleteRess(ids);
            if (count > 0) {
                permsService.clearResCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -240,10 +236,8 @@
                entity.setUpdateUser(ue.getId());
            }
            permsService.clearPermsCache();
            int count = resService.updateRes(entity);
            if (count > 0) {
                permsService.clearResCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -301,7 +295,7 @@
    }
    @SysLog()
    @ApiOperation(value = "查看下载文件")
    @ApiOperation(value = "查看文件")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "guid", value = "附件Guid", dataType = "String", paramType = "body")
    })