基本上,我是 mirth connect 的新手。请给我这方面的建议。
当我在运行后处理脚本上使用这样的东西时:
try {
dbConn = DatabaseConnectionFactory.createDatabaseConnection('com.mysql.jdbc.Driver','jdbc:mysql://localhost:3306/mirth','XYZ','XYZ');
a =$('his_user_id');
responseStatus=Response.getStatus();
loger.info(responseStatus);
if(responseStatus == SENT) {
var result = dbConn.executeUpdate("UPDATE his_user SET status =0 where id"+a);
return result;
}
}
finally {
if (dbConn) {
dbConn.close();
}
}
我收到以下错误:
源代码:
53: var dbConn;54: 55: 尝试 {56:
dbConn = DatabaseConnectionFactory.createDatabaseConnection
('com.mysql.jdbc.Driver','jdbc:mysql://localhost:3306/mirth','root','root');57:a =$('his_user_id');58:responseStatus=Response .getStatus();59: logger.info(responseStatus);60: if(responseStatus == SENT)61:
{62:行号:58 详细信息:
Java 类“com.mirth.connect.userutil.Response”有
没有名为“getStatus”的公共实例字段或方法。在 0462ff2d-8942-4898-9afb-802bfe68a63d:58
(doScript) 在 0462ff2d-8942-4898-9afb-802bfe68a63d:74
这是我在 db writer 中的预处理脚本
var dbConn;
try {
dbConn = DatabaseConnectionFactory.createDatabaseConnection('com.mysql.jdbc.Driver','jdbc:mysql://localhost:3306/mirth','root','root');
var result = dbConn.executeCachedQuery("SELECT his_user.Id AS his_user_Id, his_user.His_username AS his_user_His_username, his_user.His_useraddress AS his_user_His_useraddress, his_user.status AS his_user_status FROM his_user where his_user.status='1'");
return result;
}
finally {
if (dbConn) {
dbConn.close();
}
}