package com.zfire.mall.manager.logic;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zfire.mall.manager.plus.entity.OperatorLog;
import com.zfire.mall.manager.plus.service.OperatorLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OperatorLogic {

    @Autowired
    OperatorLogService operatorLogService;



    /**
     * 日志记录
     */
    public IPage<OperatorLog> LogList(String objId,Integer pageNum,Integer pageSize){
        return operatorLogService.lambdaQuery()
                .eq(OperatorLog::getObjId,objId)
                .orderByDesc(OperatorLog::getCreateTime)
                .page(new Page<>(pageNum,pageSize));
    }

}
