package com.bizzan.bitrade.service;

import com.bizzan.bitrade.constant.MemberOperationType;
import com.bizzan.bitrade.dao.MemberOperationLogDao;
import com.bizzan.bitrade.entity.MemberOperationLog;
import com.bizzan.bitrade.service.Base.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MemberOperationLogService extends BaseService {

    @Autowired
    private MemberOperationLogDao memberOperationLogDao;

    public MemberOperationLog save(Long memberId, MemberOperationType operationType, String ip, Integer deviceType, String remark) {
        MemberOperationLog log = new MemberOperationLog();
        log.setMemberId(memberId);
        log.setOperationType(operationType);
        log.setIp(ip);
        log.setDeviceType(deviceType);
        log.setRemark(remark);
        return memberOperationLogDao.save(log);
    }
}
