package com.uas.platform.b2b.manage.service.impl;

import com.uas.platform.b2b.manage.model.UseLog;
import com.uas.platform.b2b.manage.dao.UseLogDao;
import com.uas.platform.b2b.manage.service.UseLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 日志记录
 *
 * Created by hejq on 2018-04-26.
 */
@Service
public class UseLogServiceImpl implements UseLogService {

    @Autowired
    private UseLogDao useLogDao;

    /**
     * 增加日志
     *
     * @param title   标题
     * @param message 详情
     * @param ip      ip
     */
    @Override
    public void appendLog(String title, String message, String ip) {
        UseLog log = new UseLog(title, message, ip);
        useLogDao.save(log);
    }
}
