Pu Zhibing
2024-11-29 2ccdf86ac2599562ca994bc4047ded2d925e8bae
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java
@@ -4,9 +4,7 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.other.api.domain.SystemConfig;
import com.ruoyi.other.service.SystemConfigService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -31,5 +29,18 @@
        SystemConfig one = systemConfigService.lambdaQuery().eq(SystemConfig::getType, type).last("limit 1").one();
        return R.ok(one);
    }
   /**
    * 根据类型获取系统配置
    * @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);
   }
}