package cn.superdesk.uniorder.dubbo.provider.unified;

import cn.superdesk.uniorder.dao.entity.unified.UnifiedUserlog;
import cn.superdesk.uniorder.dubbo.facade.unified.DubboUnifiedUserlogService;
import cn.superdesk.uniorder.service.common.UnifiedUserlogService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

@Service(version = "1.0.0", retries = -1, timeout = 10000)
public class DubboUnifiedUserlogServiceImpl implements DubboUnifiedUserlogService {

	@Autowired
	private UnifiedUserlogService userlogService;

	@Override
	public void createLog(Date date, String ctype, String localIp, String outIp, String remarks, Long userId) {

		UnifiedUserlog userlog = new UnifiedUserlog();

		userlog.setCreateTime(date);
		userlog.setCtype(ctype);
		userlog.setLocalIp(localIp);
		userlog.setOutIp(outIp);
		userlog.setRemarks(remarks);
		userlog.setUserId(userId);

		userlogService.insertSelective(userlog);
	}

}
