放实体类里
//深度克隆 拷贝的是值 字节数组输出 出入流 拷贝对象 内存地址不一样 改变其中一个对象的属性值,对应的
//原型对象属性值不发生变化
public MtOrderRule deepClone() {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(this);
ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
ObjectInputStream iis = new ObjectInputStream(bis);
return (MtOrderRule) iis.readObject();
} catch (Exception e) {
e.printStackTrace();
return null;
}