package com.fkzy.warn.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fkzy.warn.common.request.RequestParameter;
import com.fkzy.warn.common.response.ApiResponse;
import com.fkzy.warn.mapper.InvocationRecordMapper;
import com.fkzy.warn.model.InvocationRecord;
import com.fkzy.warn.model.User;
import com.fkzy.warn.service.InvocationRecordService;
import com.fkzy.warn.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author zhangjing
 * @date 2023/10/16 18:17
 * @description
 */
@Service
public class InvocationRecordServiceImpl extends ServiceImpl<InvocationRecordMapper, InvocationRecord> implements
    InvocationRecordService {

    @Autowired
    private UserService userService;




    @Override
    public ApiResponse saveModel(InvocationRecord entity) {
        ApiResponse apiResponse = new ApiResponse();
        save(entity);
        return apiResponse;
    }

    @Override
    public boolean updateModel(InvocationRecord entity) {
        boolean result = this.updateById(entity);
        return result;
    }

    @Override
    public boolean deleteModel(InvocationRecord entity) {
        boolean result = this.removeById(entity);
        
        return result;
    }

    @Override
    public Page<User> queryPage(RequestParameter parameter) {

        return userService.queryPage(parameter);
    }


}
