Pu Zhibing
2024-12-02 e68c33e84e7f85fe8504de9c105d8597b996a906
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);
   }
}