Fetch the repository succeeded.
在配置里面 用get或者post 请求,用sql的形式,执行,可以返回结果
在这个接口页面,只有post 可以正常 查询返回值,而GET请求,不能返回值
确实有这个问题,目前的方式只能是通过这样来解决。 userName 传进去的是个数组。 获取第一个值要用 userName[0]
select * from user_info where name
like concat('%',#{userName[0]},'%')
产生这个原因主要是因为表单上 get /post 中是允许同名 表单或参数出现多次。 这样后端获取参数就需要用 getParameterValues。 这正是 Dataway 的处理方式,但确实会产生一些误解。
下一个 4.1.4 版本里面我用两个变量名来加以区分。
目前建议用下列办法:
建议先通过 DataQL 语言模式下做一个简单处理。换成这种写法都兼容了。
var fourceOne = (mabeArray) -> {
var tmpVar = mabeArray => [ # ]
return tmpVar[0]
}
var tempCall = @@sql(userName
)<% select * from user_info where name
like concat('%',#{userName},'%')
%>;
return tempCall(
fourceOne(${userName})
);
Sign in to comment