package cn.newfeifan.mall.module.distri.tools;


import cn.newfeifan.mall.module.distri.controller.admin.ptprofitlog.vo.PtProfitLogSaveReqVO;
import cn.newfeifan.mall.module.distri.dal.dataobject.ptprofitlog.PtProfitLogDO;
import cn.newfeifan.mall.module.distri.enums.CaclEnum;
import cn.newfeifan.mall.module.distri.service.ptprofitlog.PtProfitLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.function.Function;
import java.util.function.Supplier;

@Component
public class LoginMessageTool {


    private static PtProfitLogService ptProfitLogService;


    @Autowired
    LoginMessageTool(PtProfitLogService ptProfitLogService) {
        LoginMessageTool.ptProfitLogService = ptProfitLogService;
    }

    public static void messageSave(Supplier<PtProfitLogSaveReqVO> createProfitLogFunction) {
        PtProfitLogSaveReqVO ptProfitLogSaveReqVO = createProfitLogFunction.get();
        ptProfitLogService.createPtProfitLog(ptProfitLogSaveReqVO);
    }

}
