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

import com.gic.log.record.bean.GicLogRecordBean;
import com.gic.log.record.service.LogRecordAfterService;
import com.gic.log.record.util.GicLogRecordEvaluationContext;
import org.slf4j.Logger;
import org.springframework.stereotype.Service;

import static org.slf4j.LoggerFactory.getLogger;

@Service
public class LogRecordAfterServiceImpl extends LogRecordAfterService {

    private static final Logger logger = getLogger(LogRecordAfterServiceImpl.class);

    @Override
    public void deal(GicLogRecordBean gicLogRecordBean) {
        logger.info("之后执行");
        gicLogRecordBean.setEnterpriseId(GicLogRecordEvaluationContext.getAttribute("enterpriseId", String.class));
        gicLogRecordBean.setWxEnterpriseId(GicLogRecordEvaluationContext.getAttribute("wxEnterpriseId", String.class));
        gicLogRecordBean.setUserId(GicLogRecordEvaluationContext.getAttribute("userId", String.class));
        gicLogRecordBean.setUserName(GicLogRecordEvaluationContext.getAttribute("userName", String.class));
        gicLogRecordBean.setPhoneNumber(GicLogRecordEvaluationContext.getAttribute("phoneNumber", String.class));
        gicLogRecordBean.setYwName(GicLogRecordEvaluationContext.getAttribute("ywName", String.class));
    }
}
