Commit 5326b27b by zhiwj

添加一个重载接口

parent bf701b47
......@@ -66,4 +66,45 @@ public class LogUtils {
}
});
}
/**
* 添加日志
* @Title: createLog

* @Description:

 * @author guojuxing
* @param content 操作内容
* @param operationObject
 操作对象
* @return void


 */
public static void createLog(String content, String operationObject, String username, Integer enterpriseId, String enterpriseName) {
UserDetail userDetail = UserDetailUtils.getUserDetail();
SystemSetLogDTO logDTO = new SystemSetLogDTO();
//操作时间
logDTO.setCreateTime(new Date());
//操作人
// logDTO.setUserId(Long.valueOf(userDetail.getUserInfo().getUserId()));
logDTO.setUserName(username);
//操作内容
logDTO.setContent(content);
//操作模块
// String moduleMenuName = (String) RequestContext.getContext().getRequest().getAttribute("moduleMenuName");
// Integer moduleMenuId = (Integer) RequestContext.getContext().getRequest().getAttribute("moduleMenuId");
// if (moduleMenuId != null) {
// logDTO.setRelationId(Long.valueOf(moduleMenuId));
// } else {
// LOGGER.info("操作模块数据有误");
// }
//操作对象
//账号(手机号)?
logDTO.setEnterpriesId(Long.valueOf(enterpriseId));
logDTO.setEnterpriseName(enterpriseName);
ExecutorPoolSingleton.getInstance().executeTask(new Runnable() {
@Override
public void run() {
LOGGER.info("添加日志了,恭喜发财。{}", JSON.toJSONString(logDTO));
logApiService.saveSystemSetLog(logDTO);
}
});
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment