OperateLogManagerImpl.java
2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package com.diligrp.website.manager.impl;
import java.util.List;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import com.diligrp.website.dao.OperateLogDao;
import com.diligrp.website.domain.OperateLog;
import com.diligrp.website.manager.OperateLogManager;
/**
* <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:13:59
* @author liujie
*/
@Component
public class OperateLogManagerImpl implements OperateLogManager {
@Resource
private OperateLogDao operateLogDao;
private static final Logger logger = LoggerFactory.getLogger(OperateLogManagerImpl.class);
/* (non-Javadoc)
* @see com.diligrp.website.manager.OperateLogManager#operateLog(com.diligrp.website.domain.OperateLog)
*/
@Override
public boolean saveOperateLog(OperateLog operateLog) {
try{
logger.info("操作:记录操作日志,方法:saveOperateLog,参数:"+operateLog);
return operateLogDao.saveOperateLog(operateLog);
}catch(Exception e){
logger.error("操作:记录操作日志失败,方法:saveOperateLog,参数:"+operateLog,e);
e.printStackTrace();
return false;
}
}
/* (non-Javadoc)
* @see com.diligrp.website.manager.OperateLogManager#getOperateLogInfoByDataId(java.lang.Long)
*/
@Override
public List<OperateLog> getOperateLogInfoByDataId(OperateLog operateLog) {
try{
logger.info("操作:获取操作记录日志,方法:getOperateLogInfoByDataId,参数:OperateLog :"+operateLog);
return operateLogDao.getOperateLogInfoByDataId( operateLog) ;
}catch(Exception e){
logger.error("操作:获取操作记录日志失败,方法:getOperateLogInfoByDataId,参数::operateLog:"+operateLog,e);
e.printStackTrace();
return null;
}
}
/* (non-Javadoc)
* @see com.diligrp.website.manager.OperateLogManager#updaateOperateLogInfoByDataId(com.diligrp.website.domain.OperateLog)
*/
@Override
public boolean updaateOperateLogInfoByDataId(OperateLog operateLog) {
try{
logger.info("操作:修改操作记录日志,方法:updaateOperateLogInfoByDataId,参数:operateLog:"+operateLog);
return operateLogDao.updaateOperateLogInfoByDataId(operateLog);
}catch(Exception e){
logger.error("操作:修改操作记录日志失败,方法:updaateOperateLogInfoByDataId,参数:operateLog:"+operateLog,e);
e.printStackTrace();
return false;
}
}
}