package com.gic.haoban.manage.service.service.hm.impl;

import java.util.Date;

import org.apache.logging.log4j.LogManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.UniqueIdUtils;
import com.gic.haoban.manage.api.dto.hm.HmLinkVisitLogDTO;
import com.gic.haoban.manage.service.dao.mapper.hm.HmLinkVisitLogMapper;
import com.gic.haoban.manage.service.entity.hm.TabHmLinkVisitLog;
import com.gic.haoban.manage.service.pojo.bo.hm.HmLinkBO;
import com.gic.haoban.manage.service.service.hm.HmLinkService;
import com.gic.haoban.manage.service.service.hm.HmLinkVisitLogService;

@Service("hmLinkVisitLogService")
public class HmLinkVisitLogServiceImpl implements HmLinkVisitLogService {

    private static org.apache.logging.log4j.Logger log = LogManager.getLogger(HmLinkVisitLogService.class);

    @Autowired
    private HmLinkVisitLogMapper hmLinkVisitLogMapper;

    @Override
    public void save(HmLinkVisitLogDTO dto) {
        TabHmLinkVisitLog entity = EntityUtil.changeEntityByJSON(TabHmLinkVisitLog.class, dto);
        entity.setCreateTime(new Date());
        entity.setLogId(UniqueIdUtils.uniqueLong());
        this.hmLinkVisitLogMapper.insert(entity);
    }

}
