parent
2086213009
commit
a94172ece1
@ -0,0 +1,37 @@
|
||||
package Tools.ZhengZhou103;
|
||||
|
||||
import com.jfinal.kit.PropKit;
|
||||
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
|
||||
import com.jfinal.plugin.activerecord.Db;
|
||||
import com.jfinal.plugin.activerecord.Record;
|
||||
import com.jfinal.plugin.activerecord.dialect.MysqlDialect;
|
||||
import com.jfinal.plugin.druid.DruidPlugin;
|
||||
|
||||
public class Db103Init {
|
||||
public static void Init(){
|
||||
//加载配置文件
|
||||
String configFile = "103.properties";
|
||||
PropKit.use(configFile);
|
||||
|
||||
// 数据库配置
|
||||
DruidPlugin druidPlugin = new DruidPlugin(PropKit.get("jdbcUrl"), PropKit.get("user"),
|
||||
PropKit.get("password").trim(), PropKit.get("driverClassName"));
|
||||
druidPlugin.start();
|
||||
|
||||
ActiveRecordPlugin arp = new ActiveRecordPlugin(druidPlugin);
|
||||
arp.setDialect(new MysqlDialect());
|
||||
arp.start();
|
||||
}
|
||||
|
||||
public static void showUpdateSql(){
|
||||
String sql = "select field_id,field_attribute from t_intellioa_flow_form_field where form_id=36 and field_label='原文号' and is_deleted=0;";
|
||||
Record record = Db.findFirst(sql);
|
||||
String field_attribute = record.getStr("field_attribute");
|
||||
|
||||
sql = "select form_id,form_json from t_intellioa_flow_form where form_id=?";
|
||||
String form_json = Db.findFirst(sql, 36).getStr("form_json");
|
||||
|
||||
System.out.println("更新语句\n" + "update t_intellioa_flow_form set form_json='" + form_json + "' where form_id=36;");
|
||||
System.out.println("update t_intellioa_flow_form_field set field_attribute='" + field_attribute + "' where form_id=36 and field_label='原文号' and is_deleted=0;");
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package Tools.ZhengZhou103;
|
||||
|
||||
public class Test_ShowUpdateSql {
|
||||
public static void main(String[] args) {
|
||||
Db103Init.Init();
|
||||
//3、显示更新脚本
|
||||
Db103Init.showUpdateSql();
|
||||
}
|
||||
}
|
Binary file not shown.
Loading…
Reference in new issue