package com.izouma.nineth.service.realname;

import com.izouma.nineth.domain.RealNameLog;
import com.izouma.nineth.repo.realnam.RealNameLogRepo;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


/**
 * 实名认证相关日志
 * @author ZouYuHong
 */
@Slf4j
@Service
@AllArgsConstructor
public class RealNameLogService {
    private final RealNameLogRepo realNameLogRepo;

    public void insert(RealNameLog realNameLog) {
        String content = "用户" + realNameLog.getOperatorName() + "对用户" + realNameLog.getChangeUserName() + "进行了" +
                realNameLog.getOperateType();
        realNameLog.setContent(content);
        realNameLogRepo.save(realNameLog);
    }
}
