疯狂的狮子li
2021-08-04 08db4a5f53e17f3224e4f0caa66f1b76e3971aaf
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java
@@ -16,11 +16,12 @@
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
 * 参数配置 信息操作处理
 *
 *
 * @author ruoyi
 */
@RestController
@@ -43,11 +44,10 @@
    @Log(title = "参数管理", businessType = BusinessType.EXPORT)
    @PreAuthorize("@ss.hasPermi('system:config:export')")
    @GetMapping("/export")
    public AjaxResult export(SysConfig config)
    public void export(SysConfig config, HttpServletResponse response)
    {
        List<SysConfig> list = configService.selectConfigList(config);
        ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
        return util.exportExcel(list, "参数数据");
      ExcelUtil.exportExcel(list, "参数数据", SysConfig.class, response);
    }
    /**
@@ -110,18 +110,19 @@
    @DeleteMapping("/{configIds}")
    public AjaxResult remove(@PathVariable Long[] configIds)
    {
        return toAjax(configService.deleteConfigByIds(configIds));
        configService.deleteConfigByIds(configIds);
        return success();
    }
    /**
     * 清空缓存
     * 刷新参数缓存
     */
    @PreAuthorize("@ss.hasPermi('system:config:remove')")
    @Log(title = "参数管理", businessType = BusinessType.CLEAN)
    @DeleteMapping("/clearCache")
    public AjaxResult clearCache()
    @DeleteMapping("/refreshCache")
    public AjaxResult refreshCache()
    {
        configService.clearCache();
        configService.resetConfigCache();
        return AjaxResult.success();
    }
}