测试接口
http://localhost:5901/bo/api/v3/db/help/sql/regex?ownerId=bt&_sysId=abcded&ignore=true&a=2
{
"value":"select * from tb where and {s-if:b}bab{e-if:b}{s-if:a}{op-eq:1} bb {op-eq:1}{e-if:a} "
}
空:{s-if:fieldName}value{e-if:fieldName}
等于:{s-if:fieldName}{op-eq:Value}value{op-eq:Value}{e-if:fieldName}
大于:{s-if:fieldName}{op-gt:Value}value{op-gt:Value}{e-if:fieldName}
小于:{s-if:fieldName}{op-lt:Value}value{op-lt:Value}{e-if:fieldName}
大于等于:{s-if:fieldName}{op-gte:Value}value{op-gte:Value}{e-if:fieldName}
小于等于:{s-if:fieldName}{op-lte:Value}value{op-lte:Value}{e-if:fieldName}
案例
//#endregion 设置默认值 user_id,
"bridgeColumn": "address_id,telephone,real_name,nation,province,city,address,geography,is_enabled",
"auth": false,
"viewCountClosed": false,
//#region 设置主键
"primaryWhere": " {s-if:addressId}{op-neq:0} address_id=@addressId {op-neq:0}{e-if:addressId} {s-if:addressId}{op-eq:0}is_default=1 {op-eq:0}{e-if:addressId} and user_id=@_userId",
//把内部值赋予key,用于解决内部参数,导致的错误
"primaryWhereMapper": [
{
"key": "userId",
"value": "@_userId"
}
]
//#endregion 设置主键
文档更新时间: 2022-05-26 20:53 作者:admin