Pu Zhibing
2024-11-29 d2542a6123fa6834e01ed3af23c7ba0a02696bc6
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java
@@ -8,6 +8,8 @@
import com.ruoyi.other.api.dto.IndexConfigSetDto;
import com.ruoyi.other.service.SystemConfigService;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.ApiOperation;
import javax.annotation.Resource;
@@ -49,6 +51,19 @@
        return R.ok(indexConfigSetDto);
    }
   /**
    * 根据类型获取系统配置
    * @param type
    * @return
    */
   @ResponseBody
   @PostMapping("/getSystemConfig")
   public R<SystemConfig> getSystemConfig(@RequestParam("type") Integer type){
      SystemConfig one = systemConfigService.lambdaQuery().eq(SystemConfig::getType, type).last("limit 1").one();
      return R.ok(one);
   }
}