更多ruoyi-nbcio功能请看演示系统
gitee源代码地址
前后端代码: https://gitee.com/nbacheng/ruoyi-nbcio
演示地址:RuoYi-Nbcio后台管理系统
更多nbcio-boot功能请看演示系统
gitee源代码地址
后端代码: https://gitee.com/nbacheng/nbcio-boot
前端代码:https://gitee.com/nbacheng/nbcio-vue.git
在线演示(包括H5) : http://218.75.87.38:9888
1、在使用form generator的时候调用数据库表信息与字段信息的时候出现
结果点了系统工具里的代码生成后就又正常了,所以跟这个有关,看代码应该是前端要进行数据源的设置才行,否则出现上面错误,这个是调用gen模块需要的。
localStorage.setItem("dataName", "master");
这个主要原因如下,headers需要加上数据源
/** * 业务 服务层实现 * * @author superfusion */ @DS("#header.datasource") //请求头header里增加一个datasource by nacheng @Slf4j @RequiredArgsConstructor @Service public class GenTableServiceImpl implements IGenTableService { private final GenTableMapper baseMapper; private final GenTableColumnMapper genTableColumnMapper; private final IdentifierGenerator identifierGenerator; /** * 查询业务字段列表 * * @param tableId 业务字段编号 * @return 业务字段集合 */ @Override public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId) { return genTableColumnMapper.selectList(new LambdaQueryWrapper<GenTableColumn>() .eq(GenTableColumn::getTableId, tableId) .orderByAsc(GenTableColumn::getSort)); }
// 查询生成表数据 export function listTable(query) { return request({ headers: { 'datasource': localStorage.getItem("dataName") }, url: '/tool/gen/list', method: 'get', params: query }) }
上面调用的时候加了headers的数据源信息