| | |
| | | package com.ruoyi.web.controller.common; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.project.domain.BaseAnnextype; |
| | |
| | | if (tempSql.getApiSql().toLowerCase().matches(SQL_REG_EXP)) { |
| | | return AjaxResult.error("sql中有非法字符,只应许select"); |
| | | } |
| | | return AjaxResult.success(service.getListSql(tempSql.getApiSql(),DTO)); |
| | | lists = service.getListSql(tempSql.getApiSql(), DTO); |
| | | return AjaxResult.success(JSON.toJSON(lists)); |
| | | }else |
| | | return AjaxResult.error("sql代码没有对应的sql请核对"); |
| | | }else { |
| | |
| | | return AjaxResult.error("表名不能为空"); |
| | | } |
| | | } |
| | | |
| | | } |