这是出于测试目的(自动测试)SoapUI
def status = testRunner.testCase.getPropertyValue( "Status" )
def grid = testRunner.testCase.getPropertyValue( "Grid" )+"_V"
def grid1
if (["TABLE1","TABLE2"].contains(grid))
grid1 ="HUBCFG."+grid
else grid1 = "SDM."+grid
选项1
sql.executeUpdate "UPDATE " +grid1+" t0 set XXX='$status' WHERE t0.YYY='$grid'"
选项2
String bql = "UPDATE $grid1 t0 set XXX='$status' WHERE t0.YYY='$grid'" sql.executeUpdate bql
sql.commit()
log.info("Successfully committed "+grid1+ " To " + status)
我没有在任何地方找到明确的答案,所以我将它们拼凑在一起。
希望这可以帮助某人