package com.vci.server.bof.server.delete;
|
|
import com.vci.corba.common.data.VCIInvocationInfo;
|
import com.vci.server.base.persistence.dao.HibernateSessionFactory;
|
import com.vci.server.base.utility.LogRecordUtil;
|
import com.vci.server.bof.server.ServiceFacadeExecuteHelper;
|
import com.vci.server.bof.service.BOFactoryServices;
|
|
public class BatchDeleteBO extends ServiceFacadeExecuteHelper{
|
|
private static ServiceFacadeExecuteHelper instance = null;
|
|
public static ServiceFacadeExecuteHelper getInstance() {
|
if(instance == null) {
|
instance = new BatchDeleteBO();
|
}
|
return instance;
|
}
|
|
@Override
|
protected Object doAction() throws Throwable {
|
boolean rs = false;
|
try {
|
BOFactoryServices services = BOFactoryServices.getInstance();
|
rs = services.batchDeleteBusinessObject(params.getBos(), params.getType());
|
if (!rs) {
|
return rs;
|
}
|
//日志记录
|
VCIInvocationInfo info = HibernateSessionFactory.getVciSessionInfo();
|
@SuppressWarnings("unused")
|
String ip = "127.0.0.1";
|
if(info!=null){
|
ip = info.clientIPInfo == null||"".equals(info.clientIPInfo) ?"127.0.0.1":info.clientIPInfo;
|
}
|
//batchRecordLog(params.getBos(), ip, "删除");
|
LogRecordUtil.batchWriteLog(params.getBos(), "删除");
|
|
} catch (Exception e) {
|
//e.printStackTrace();
|
|
throw this.getLocalString("P0010SOF-00003", e);
|
} catch (Throwable t) {
|
|
//t.printStackTrace();
|
throw this.getLocalString("P0010SOF-00003", t);
|
}
|
return rs;
|
}
|
|
}
|