- 浏览: 12035 次
- 性别:
- 来自: 广州
最新评论
在不用Hibernate 域 IBATIS等框架写DAO一般都像如下:
public void save(Bean bean){
Connection con = null;
Statement stmt = null;
try{
//从连接工厂获取连接
con = ConnectionFactory.getConnection();
stmt = con.createStatement();
String sql = "insert ....";
stmt.execute(sql);
}catch(Exception e){
}finally{
//释放资源
try{
if(con != null)con.close();
if(stmt != null)stmt.close();
}catch(Exception e){
}
}
}
上面是一个保存的方法,其它的删除,查询和更新基本都差不多,不同的只有sql和执行的方法:execute域executeQuery,查询时会多了一个返回值
那么就是说在增删查改会有大量代码重复,所以我每次在不用框架下看写完的DAO都会比较不爽
昨天把那些重复的代码抽离出来,重复代码抽离后的DAO如下:
public class StudentDAO {
......
......
......
public void add(Statement stmt, Map map){
String sql = "insert into student(name, sex, age)"
+ " values('" + (String)map.get("name")
+ "', '" + (String)map.get("sex")
+ "', " + (String)map.get("age") + ")";
try{
stmt.execute(sql);
}catch(Exception e){
e.printStackTrace();
}
}
.......
.......
.......
}
只需要编写必要的代码,那些重复的代码都被我抽到别的类统一调用
下面是完整代码:
Student Bean
----------------------------------------------------------------------------------
public class Student {
private int id;
private String name;
private String sex;
private int age;
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public Map toMap(){
Map map = new HashMap();
map.put("id", String.valueOf(id));
map.put("name", name);
map.put("sex", sex);
map.put("age", String.valueOf(age));
return map;
}
}
IBuilder 类建造器接口
---------------------------------------------------------------------------------
public interface IBuilder {
public void build(ResultSet rs) throws SQLException;
public Object getResult();
}
StudentBuilder 学生类的建造器
---------------------------------------------------------------------------------
public class StudentBuilder implements IBuilder{
private Student student = new Student();
public void build(ResultSet rs) throws SQLException{
// TODO Auto-generated method stub
student.setId(rs.getInt("id"));
student.setName(rs.getString("name"));
student.setSex(rs.getString("sex"));
student.setAge(rs.getInt("age"));
}
public Object getResult() {
// TODO Auto-generated method stub
return student;
}
}
StudentDAO student表的操作DAO
---------------------------------------------------------------------------------
public class StudentDAO {
private static StudentDAO instance = new StudentDAO();
private StudentDAO(){
}
public static StudentDAO getInstance(){
return instance;
}
public void add(Statement stmt, Map map){
String sql = "insert into student(name, sex, age)"
+ " values('" + (String)map.get("name")
+ "', '" + (String)map.get("sex")
+ "', " + (String)map.get("age") + ")";
try{
stmt.execute(sql);
}catch(Exception e){
e.printStackTrace();
}
}
public void delete(Statement stmt, Map map){
String sql = "delete from student"
+ " where id = " + (String)map.get("id");
try{
stmt.execute(sql);
}catch(Exception e){
e.printStackTrace();
}
}
public ResultSet query(Statement stmt, Map map){
ResultSet rs = null;
String sql = "select * from student"
+ " where name='" + (String)map.get("name") + "'";
try{
rs = stmt.executeQuery(sql);
}catch(Exception e){
e.printStackTrace();
}
return rs;
}
public ResultSet queryById(Statement stmt, Map map){
ResultSet rs = null;
String sql = "select * from student"
+ " where id=" + (String)map.get("id");
try{
rs = stmt.executeQuery(sql);
}catch(Exception e){
e.printStackTrace();
}
return rs;
}
public void update(Statement stmt, Map map){
String sql = "update student"
+ " set name = '" + (String)map.get("name")
+ "', sex = '" + (String)map.get("sex")
+ "', age = " + (String)map.get("age")
+ " where id = " + (String)map.get("id");
try{
stmt.execute(sql);
}catch(Exception e){
e.printStackTrace();
}
}
}
IBuilderFactory 类建造器工厂接口
----------------------------------------------------------------------------------
public interface IBuilderFactory {
public IBuilder getBuilder(Class classType);
}
BuilderFactory 类建造器工厂实现类
----------------------------------------------------------------------------------
public class BuilderFactory implements IBuilderFactory {
public IBuilder getBuilder(Class classType) {
// TODO Auto-generated method stub
IBuilder builder = null;
try{
builder = (IBuilder)Class.forName(classType.getName()).newInstance();
}catch(Exception e){
e.printStackTrace();
}
return builder;
}
}
IConnectionFactory 连接工厂接口
---------------------------------------------------------------------------------
public interface IConnectionFactory {
public Connection getConnection() throws SQLException, ClassNotFoundException;
}
ConnectionFactory 连接工厂实现类
----------------------------------------------------------------------------------
public class ConnectionFactory implements IConnectionFactory {
private static ConnectionFactory instance = new ConnectionFactory();
private String driver = "com.mysql.jdbc.Driver";
private String username = "root";
private String password = "123456";
private String url = "jdbc:mysql://localhost:3306/xin";
private ConnectionFactory(){
}
public static ConnectionFactory getInstance(){
return instance;
}
public Connection getConnection() throws SQLException, ClassNotFoundException {
// TODO Auto-generated method stub
Class.forName(driver);
return DriverManager.getConnection(url, username, password);
}
}
StudentDAOService StudentDAO的外层服务
---------------------------------------------------------------------------------
public class StudentDAOService {
private IDAOFlayweight fw = DAOFlayweight.getInstance();
private StudentDAO dao = StudentDAO.getInstance();
public void add(Student student){
fw.request(dao, "add", student.toMap(), true, StudentBuilder.class);
}
public void delete(int id){
Map map = new HashMap();
map.put("id", String.valueOf(id));
fw.request(dao, "delete", map, true, StudentBuilder.class);
}
public List query(String name){
Map map = new HashMap();
map.put("name", name);
List list = fw.request(dao, "query", map, true, StudentBuilder.class);
return list;
}
public Student queryById(int id){
Map map = new HashMap();
map.put("id", String.valueOf(id));
List list = fw.request(dao, "queryById", map, true, StudentBuilder.class);
if(list != null && list.size() == 1)
return (Student)list.get(0);
else
return null;
}
public void update(Student student){
fw.request(dao, "update", student.toMap(), true, StudentBuilder.class);
}
}
BackInvoker 类方法回调
----------------------------------------------------------------------------------
public class BackInvoker {
private static BackInvoker instance = new BackInvoker();
private BackInvoker(){
}
public static BackInvoker getInstance(){
return instance;
}
public Object invokeMethod(Object invoke, String methodName, Class[] paramTypes, Object[] params){
Object result = null;
try{
Class invokeClass = invoke.getClass();
Method method = invokeClass.getMethod(methodName, paramTypes);
result = method.invoke(invoke, params);
}catch(Exception e){
e.printStackTrace();
}
return result;
}
}
IDAOFlayweight 真正调用DAO的类接口
---------------------------------------------------------------------------------
public interface IDAOFlayweight {
public List request(Object invoke, String methodName, Map map, boolean isAutoCommit, Class classType);
}
DAOFlayweight 真正调用DAO的类实现类
---------------------------------------------------------------------------------
public class DAOFlayweight implements IDAOFlayweight{
private static DAOFlayweight instance;
private static String key = "key";
private DAOFlayweight(){
}
public static DAOFlayweight getInstance(){
if(instance == null){
synchronized(key){
if(instance == null){
instance = new DAOFlayweight();
}
}
}
return instance;
}
public List put(Object result, ResultSet rs, Class classType) throws SQLException{
List list = null;
//对结果进行处理
if(result != null){
//对查询结果进行封装
if(result instanceof ResultSet){
list = new ArrayList();
rs = (ResultSet)result;
IBuilderFactory factory = new BuilderFactory();
while(rs.next()){
IBuilder builder = factory.getBuilder(classType);
builder.build(rs);
list.add(builder.getResult());
}
}
}
return list;
}
public List request(Object invoke, String methodName, Map map, boolean isAutoCommit, Class classType){
List list = null;
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try{
//创建所需的操作数据库对象
con = ConnectionFactory.getInstance().getConnection();
con.setAutoCommit(isAutoCommit);
stmt = con.createStatement();
//调用DAO的方法
Object result = BackInvoker.getInstance().invokeMethod(invoke, methodName, new Class[]{Statement.class, Map.class}, new Object[]{stmt, map});
list = put(result, rs, classType);
if(isAutoCommit == false)con.commit();
}catch(Exception e){
if(isAutoCommit == false)
try {
con.rollback();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
e.printStackTrace();
}finally{
try{
if(rs != null)
rs.close();
if(stmt != null)
stmt.close();
if(con != null)
con.close();
}catch(Exception e){}
}
return list;
}
}
Main
---------------------------------------------------------------------------------
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
StudentDAOService service = new StudentDAOService();
Student student = new Student();
student.setName("XiaoLi");
student.setSex("male");
student.setAge(22);
System.out.println("----------- 添加记录 ----------");
service.add(student);
System.out.println("----------- 查询1 ----------");
Student stu = service.queryById(1);
System.out.println("id = " + stu.getId()
+ ", name = " + stu.getName()
+ ", sex = " + stu.getSex()
+ ", age = " + stu.getAge());
System.out.println("----------- 查询2 ----------");
List list = service.query("XiaoLi");
for(int i = 0; i < list.size(); i++){
stu = (Student)list.get(i);
System.out.println("id = " + stu.getId()
+ ", name = " + stu.getName()
+ ", sex = " + stu.getSex()
+ ", age = " + stu.getAge());
}
System.out.println("----------- 信息更新 ----------");
stu.setAge(27);
service.update(stu);
// System.out.println("----------- 删除记录 ----------");
// service.delete(2);
}
}
源码:
public void save(Bean bean){
Connection con = null;
Statement stmt = null;
try{
//从连接工厂获取连接
con = ConnectionFactory.getConnection();
stmt = con.createStatement();
String sql = "insert ....";
stmt.execute(sql);
}catch(Exception e){
}finally{
//释放资源
try{
if(con != null)con.close();
if(stmt != null)stmt.close();
}catch(Exception e){
}
}
}
上面是一个保存的方法,其它的删除,查询和更新基本都差不多,不同的只有sql和执行的方法:execute域executeQuery,查询时会多了一个返回值
那么就是说在增删查改会有大量代码重复,所以我每次在不用框架下看写完的DAO都会比较不爽
昨天把那些重复的代码抽离出来,重复代码抽离后的DAO如下:
public class StudentDAO {
......
......
......
public void add(Statement stmt, Map map){
String sql = "insert into student(name, sex, age)"
+ " values('" + (String)map.get("name")
+ "', '" + (String)map.get("sex")
+ "', " + (String)map.get("age") + ")";
try{
stmt.execute(sql);
}catch(Exception e){
e.printStackTrace();
}
}
.......
.......
.......
}
只需要编写必要的代码,那些重复的代码都被我抽到别的类统一调用
下面是完整代码:
Student Bean
----------------------------------------------------------------------------------
public class Student {
private int id;
private String name;
private String sex;
private int age;
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public Map toMap(){
Map map = new HashMap();
map.put("id", String.valueOf(id));
map.put("name", name);
map.put("sex", sex);
map.put("age", String.valueOf(age));
return map;
}
}
IBuilder 类建造器接口
---------------------------------------------------------------------------------
public interface IBuilder {
public void build(ResultSet rs) throws SQLException;
public Object getResult();
}
StudentBuilder 学生类的建造器
---------------------------------------------------------------------------------
public class StudentBuilder implements IBuilder{
private Student student = new Student();
public void build(ResultSet rs) throws SQLException{
// TODO Auto-generated method stub
student.setId(rs.getInt("id"));
student.setName(rs.getString("name"));
student.setSex(rs.getString("sex"));
student.setAge(rs.getInt("age"));
}
public Object getResult() {
// TODO Auto-generated method stub
return student;
}
}
StudentDAO student表的操作DAO
---------------------------------------------------------------------------------
public class StudentDAO {
private static StudentDAO instance = new StudentDAO();
private StudentDAO(){
}
public static StudentDAO getInstance(){
return instance;
}
public void add(Statement stmt, Map map){
String sql = "insert into student(name, sex, age)"
+ " values('" + (String)map.get("name")
+ "', '" + (String)map.get("sex")
+ "', " + (String)map.get("age") + ")";
try{
stmt.execute(sql);
}catch(Exception e){
e.printStackTrace();
}
}
public void delete(Statement stmt, Map map){
String sql = "delete from student"
+ " where id = " + (String)map.get("id");
try{
stmt.execute(sql);
}catch(Exception e){
e.printStackTrace();
}
}
public ResultSet query(Statement stmt, Map map){
ResultSet rs = null;
String sql = "select * from student"
+ " where name='" + (String)map.get("name") + "'";
try{
rs = stmt.executeQuery(sql);
}catch(Exception e){
e.printStackTrace();
}
return rs;
}
public ResultSet queryById(Statement stmt, Map map){
ResultSet rs = null;
String sql = "select * from student"
+ " where id=" + (String)map.get("id");
try{
rs = stmt.executeQuery(sql);
}catch(Exception e){
e.printStackTrace();
}
return rs;
}
public void update(Statement stmt, Map map){
String sql = "update student"
+ " set name = '" + (String)map.get("name")
+ "', sex = '" + (String)map.get("sex")
+ "', age = " + (String)map.get("age")
+ " where id = " + (String)map.get("id");
try{
stmt.execute(sql);
}catch(Exception e){
e.printStackTrace();
}
}
}
IBuilderFactory 类建造器工厂接口
----------------------------------------------------------------------------------
public interface IBuilderFactory {
public IBuilder getBuilder(Class classType);
}
BuilderFactory 类建造器工厂实现类
----------------------------------------------------------------------------------
public class BuilderFactory implements IBuilderFactory {
public IBuilder getBuilder(Class classType) {
// TODO Auto-generated method stub
IBuilder builder = null;
try{
builder = (IBuilder)Class.forName(classType.getName()).newInstance();
}catch(Exception e){
e.printStackTrace();
}
return builder;
}
}
IConnectionFactory 连接工厂接口
---------------------------------------------------------------------------------
public interface IConnectionFactory {
public Connection getConnection() throws SQLException, ClassNotFoundException;
}
ConnectionFactory 连接工厂实现类
----------------------------------------------------------------------------------
public class ConnectionFactory implements IConnectionFactory {
private static ConnectionFactory instance = new ConnectionFactory();
private String driver = "com.mysql.jdbc.Driver";
private String username = "root";
private String password = "123456";
private String url = "jdbc:mysql://localhost:3306/xin";
private ConnectionFactory(){
}
public static ConnectionFactory getInstance(){
return instance;
}
public Connection getConnection() throws SQLException, ClassNotFoundException {
// TODO Auto-generated method stub
Class.forName(driver);
return DriverManager.getConnection(url, username, password);
}
}
StudentDAOService StudentDAO的外层服务
---------------------------------------------------------------------------------
public class StudentDAOService {
private IDAOFlayweight fw = DAOFlayweight.getInstance();
private StudentDAO dao = StudentDAO.getInstance();
public void add(Student student){
fw.request(dao, "add", student.toMap(), true, StudentBuilder.class);
}
public void delete(int id){
Map map = new HashMap();
map.put("id", String.valueOf(id));
fw.request(dao, "delete", map, true, StudentBuilder.class);
}
public List query(String name){
Map map = new HashMap();
map.put("name", name);
List list = fw.request(dao, "query", map, true, StudentBuilder.class);
return list;
}
public Student queryById(int id){
Map map = new HashMap();
map.put("id", String.valueOf(id));
List list = fw.request(dao, "queryById", map, true, StudentBuilder.class);
if(list != null && list.size() == 1)
return (Student)list.get(0);
else
return null;
}
public void update(Student student){
fw.request(dao, "update", student.toMap(), true, StudentBuilder.class);
}
}
BackInvoker 类方法回调
----------------------------------------------------------------------------------
public class BackInvoker {
private static BackInvoker instance = new BackInvoker();
private BackInvoker(){
}
public static BackInvoker getInstance(){
return instance;
}
public Object invokeMethod(Object invoke, String methodName, Class[] paramTypes, Object[] params){
Object result = null;
try{
Class invokeClass = invoke.getClass();
Method method = invokeClass.getMethod(methodName, paramTypes);
result = method.invoke(invoke, params);
}catch(Exception e){
e.printStackTrace();
}
return result;
}
}
IDAOFlayweight 真正调用DAO的类接口
---------------------------------------------------------------------------------
public interface IDAOFlayweight {
public List request(Object invoke, String methodName, Map map, boolean isAutoCommit, Class classType);
}
DAOFlayweight 真正调用DAO的类实现类
---------------------------------------------------------------------------------
public class DAOFlayweight implements IDAOFlayweight{
private static DAOFlayweight instance;
private static String key = "key";
private DAOFlayweight(){
}
public static DAOFlayweight getInstance(){
if(instance == null){
synchronized(key){
if(instance == null){
instance = new DAOFlayweight();
}
}
}
return instance;
}
public List put(Object result, ResultSet rs, Class classType) throws SQLException{
List list = null;
//对结果进行处理
if(result != null){
//对查询结果进行封装
if(result instanceof ResultSet){
list = new ArrayList();
rs = (ResultSet)result;
IBuilderFactory factory = new BuilderFactory();
while(rs.next()){
IBuilder builder = factory.getBuilder(classType);
builder.build(rs);
list.add(builder.getResult());
}
}
}
return list;
}
public List request(Object invoke, String methodName, Map map, boolean isAutoCommit, Class classType){
List list = null;
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try{
//创建所需的操作数据库对象
con = ConnectionFactory.getInstance().getConnection();
con.setAutoCommit(isAutoCommit);
stmt = con.createStatement();
//调用DAO的方法
Object result = BackInvoker.getInstance().invokeMethod(invoke, methodName, new Class[]{Statement.class, Map.class}, new Object[]{stmt, map});
list = put(result, rs, classType);
if(isAutoCommit == false)con.commit();
}catch(Exception e){
if(isAutoCommit == false)
try {
con.rollback();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
e.printStackTrace();
}finally{
try{
if(rs != null)
rs.close();
if(stmt != null)
stmt.close();
if(con != null)
con.close();
}catch(Exception e){}
}
return list;
}
}
Main
---------------------------------------------------------------------------------
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
StudentDAOService service = new StudentDAOService();
Student student = new Student();
student.setName("XiaoLi");
student.setSex("male");
student.setAge(22);
System.out.println("----------- 添加记录 ----------");
service.add(student);
System.out.println("----------- 查询1 ----------");
Student stu = service.queryById(1);
System.out.println("id = " + stu.getId()
+ ", name = " + stu.getName()
+ ", sex = " + stu.getSex()
+ ", age = " + stu.getAge());
System.out.println("----------- 查询2 ----------");
List list = service.query("XiaoLi");
for(int i = 0; i < list.size(); i++){
stu = (Student)list.get(i);
System.out.println("id = " + stu.getId()
+ ", name = " + stu.getName()
+ ", sex = " + stu.getSex()
+ ", age = " + stu.getAge());
}
System.out.println("----------- 信息更新 ----------");
stu.setAge(27);
service.update(stu);
// System.out.println("----------- 删除记录 ----------");
// service.delete(2);
}
}
源码:
- TestDAOModule.rar (392.1 KB)
- 下载次数: 1
相关推荐
**逻辑函数公式化简器详解** 在数字电路和计算机科学领域,逻辑函数是研究和设计电子电路的基础。这些函数通常由逻辑变量表示,通过与(AND)、或(OR)、非(NOT)等基本逻辑运算符组合而成。面对复杂的逻辑表达式...
卡诺图化简是数字电路...通过使用这样的软件,工程师可以大大提高工作效率,特别是在设计数字集成电路、编写逻辑设计和验证等场景下。对于学习数字逻辑和电子工程的学生来说,这样的工具也是极其实用的学习辅助手段。
在数字电路设计领域中,化简布尔表达式是优化电路设计的关键步骤。卡诺图化简方法是其中的一种有效方式,它利用图形化的手段对布尔表达式进行化简,以简化逻辑电路,减少电路的复杂度。当前,随着技术的进步,卡诺图...
本实验报告的目的是编写文法的化简和改造程序,实现文法的化简和改造,以便更好地理解编译原理的基础知识。实验中,我们将使用 C/C++ 语言编写程序,实现文法的化简和改造,包括无用符号和无用产生式的删除、ε-产生...
卡诺图化简是数字逻辑设计中的一个重要环节,主要用于布尔函数的最简表达式求解。在FPGA(Field Programmable Gate Array)设计中,电路的优化和简化至关重要,因为这直接影响到硬件资源的利用率和系统的运行速度。...
在编译原理中,文法化简与改造是构建解析器和编译器的重要步骤,它们主要用于优化形式文法,使其更加简洁且易于处理。本文将深入探讨文法化简和改造的过程,以及它们在实际应用中的作用。 一、文法化简 1. 消除空...
这一过程对于手工化简来说既繁琐又容易出错,而4变量卡诺图化简软件的出现,提供了一种更加快捷准确的方法。它不仅仅是一个辅助工具,更是深入理解数字逻辑的重要途径。 卡诺图的原理基于一个基本的事实:在逻辑...
在编程领域,与或表达式化简是一种常见的优化技术,特别是在...通过理解和应用这些定律,我们可以编写函数来化简表达式,提高代码执行效率。在实际项目中,我们可以选择手动简化,也可以利用现有库来自动化这个过程。
同时,为了测试你的化简算法,可以创建一个名为`test`的测试文件,包含一系列输入和预期输出的布尔表达式,然后编写单元测试来验证化简算法的正确性。 总的来说,理解与或表达式的化简是数字逻辑和计算机科学基础的...
本次实验旨在让学生通过编写程序实现DFA的化简过程,掌握这一过程中涉及的概念和方法。具体来说,实验目标包括: - **理解**:深入理解DFA的基本概念及其在编译原理中的作用。 - **掌握**:熟练掌握DFA化简的基本...
标题中的“根式化简(未成熟)VB制作”表明这是一个使用Visual Basic(VB)编程语言编写的程序,它的主要功能是对数学中的根式进行化简。VB是一种面向对象的编程语言,常用于开发Windows应用软件,对于初学者来说...
这些代码可能用某种编程语言编写,如C++、Python或Java,它们实现了算法来对输入的文法进行分析和转换,达到化简的目的。对于学习编译原理和实际开发编译器的学生来说,这些代码是非常有价值的参考资料。 总的来说...
用C语言来“教会”你电脑化简卡诺图!_哔哩哔哩 (゜-゜)つロ 干杯~-bilibili https://www.bilibili.com/video/BV1YK4y1k7VY/ 化简的算法其实就是 把卡诺图所有的圈法写成函数, 再根据不同的情况对圈法进行优先级...
标题“逻辑化简仿真logic化简”指的是通过某种软件工具(如压缩包内的“逻辑函数化简.exe”)来模拟和简化逻辑函数的过程。 逻辑化简的基本原理基于布尔代数,主要利用摩尔斯定律、代数恒等式和卡诺图等方法来消除...
比的基本性质和化简比是数学中的重要概念,主要涉及比例和分数的处理。在解决这类问题时,我们需要理解以下几个核心知识点: 1. **比的基本性质**:比的前项和后项同时乘以或除以同一个非零数,比值保持不变。这被...
卡诺图化简是数字逻辑设计中的一个重要方法,主要用于简化布尔函数,提高逻辑电路的效率。在本场景中,我们讨论的是一个针对4输入布尔函数的卡诺图化简软件——"kmap12.exe"。 卡诺图,也称为Karnaugh地图或卡诺...
在数电中,花间逻辑函数四很重要的。所以我们要找有个好用的逻辑函数花间其。这就是一个。你可以使用他来花间逻辑函数。如果你感兴趣,请联系我。