| | |
| | | import com.ruoyi.system.service.ISysOssService; |
| | | import io.swagger.annotations.*; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | */ |
| | | @Validated |
| | | @Api(value = "OSS对象存储控制器", tags = {"OSS对象存储管理"}) |
| | | @RequiredArgsConstructor(onConstructor_ = @Autowired) |
| | | @RequiredArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/system/oss") |
| | | public class SysOssController extends BaseController { |
| | |
| | | @PutMapping("/changePreviewListResource") |
| | | public AjaxResult<Void> changePreviewListResource(@RequestBody String body) { |
| | | Map<String, Boolean> map = JsonUtils.parseMap(body); |
| | | SysConfig config = iSysConfigService.getOne(new SysConfig().setConfigKey(OssConstant.PEREVIEW_LIST_RESOURCE_KEY)); |
| | | SysConfig sysConfig = new SysConfig(); |
| | | sysConfig.setConfigKey(OssConstant.PEREVIEW_LIST_RESOURCE_KEY); |
| | | SysConfig config = iSysConfigService.getOne(sysConfig); |
| | | config.setConfigValue(map.get("previewListResource").toString()); |
| | | return toAjax(iSysConfigService.updateConfig(config)); |
| | | } |