OperateLogDaoImpl.java 1.69 KB
package com.diligrp.website.dao.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.diligrp.website.dao.OperateLogDao;
import com.diligrp.website.domain.OperateLog;
import com.diligrp.website.util.dao.impl.BaseDaoImpl;


/**
 * <B>Description</B> TODO <br />
 * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
 * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
 * <B>Company</B> 地利集团
 * @createTime 2014年6月19日 下午3:15:26
 * @author liujie
 */
@Component
public class OperateLogDaoImpl extends BaseDaoImpl<OperateLog> implements OperateLogDao {
    private static final String STATEMENT = OperateLogDaoImpl.class.getCanonicalName();
    /* (non-Javadoc)
     * @see com.diligrp.website.dao.OperateLogDao#operateLog(com.diligrp.website.domain.OperateLog)
     */
    @Override
    public boolean saveOperateLog(OperateLog operateLog) {
        return getSqlSessionTemplate().insert(STATEMENT+".INSERT-OPERATE-LOG-INFO", operateLog)>0?true:false;
    }
    /* (non-Javadoc)
     * @see com.diligrp.website.dao.OperateLogDao#getOperateLogInfoByDataId(java.lang.Long)
     */
    @Override
    public List<OperateLog> getOperateLogInfoByDataId(OperateLog operateLog) {
        return getSqlSessionTemplate().selectList (STATEMENT+".SELECT-OPERATE-LOG-INFO-BY-ID", operateLog);
    }
    /* (non-Javadoc)
     * @see com.diligrp.website.dao.OperateLogDao#updaateOperateLogInfoByDataId(java.lang.Long)
     */
    @Override
    public boolean updaateOperateLogInfoByDataId( OperateLog operateLog) {
        return getSqlSessionTemplate().update(STATEMENT+".UPDATE-OPERATE-LOG-INFO-BY-ID", operateLog)>0;
    }

}