package nc.impl.sap.log;

import java.util.List;

import nc.bs.dao.BaseDAO;
import nc.bs.dao.DAOException;
import nc.itf.sap.log.IExtLogService;
import nc.vo.pub.BusinessException;
import nc.vo.pub.SuperVO;
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
import nc.vo.pubapp.pattern.pub.PubAppTool;
	
public class ExtLogServiceImpl implements IExtLogService {

	@Override
	public void insertLog_RequiresNew(SuperVO logVo) throws BusinessException {
		BaseDAO dao  = new BaseDAO();
		dao.insertVO(logVo);
	}

	@Override
	public void insertLogList_RequiresNew(List<SuperVO> list) throws BusinessException {
		BaseDAO dao  = new BaseDAO();
		dao.insertVOList(list);
	}

	@Override
	public void updatedb_RequiresNew(String upsql, String content) throws BusinessException {
		// TODO Auto-generated method stub
        try {
			if(PubAppTool.isNull(content)) {
				new BaseDAO().executeUpdate(upsql);
			}else {
				new BaseDAO().executeUpdate(upsql+content);
				
			}
		} catch (DAOException e) {
			// TODO Auto-generated catch block
			ExceptionUtils.wrappBusinessException("¸üÐÂÊý¾ÝÊ§°Ü£¡");
		}
		
		
	}
	
}
