package com.chinaweal.aiccs.aiccs.market.service.impl;

import com.chinaweal.aiccs.aiccs.market.entity.TSUsualInspectEntList;
import com.chinaweal.aiccs.aiccs.market.mapper.TSUsualInspectEntListMapper;
import com.chinaweal.aiccs.aiccs.market.service.ITSUsualInspectEntListService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chinaweal.youfool.framework.springboot.mybatis.plus.BaseServiceImpl;
import org.springframework.stereotype.Service;
import com.chinaweal.youfool.framework.springboot.base.query.BaseQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;

/**
 * <p>
 * 现场核查企业列表 服务实现类
 * </p>
 *
 * @author chinaweal
 * @since 2022-08-09
 */
@Service
public class TSUsualInspectEntListServiceImpl extends BaseServiceImpl<TSUsualInspectEntListMapper, TSUsualInspectEntList> implements ITSUsualInspectEntListService {

    @Override
    public TSUsualInspectEntList saveTSUsualInspectEntList(TSUsualInspectEntList tSUsualInspectEntList) {
        save(tSUsualInspectEntList);
        return tSUsualInspectEntList;
    }

    @Override
    public void updateTSUsualInspectEntList(TSUsualInspectEntList tSUsualInspectEntList) {
        updateById(tSUsualInspectEntList);
    }

    @Override
    public IPage<TSUsualInspectEntList> listTSUsualInspectEntList(BaseQuery<TSUsualInspectEntList> query) {
        TSUsualInspectEntList entity = query.getEntity(TSUsualInspectEntList.class);
        Page<TSUsualInspectEntList> page = query.getPage();

        LambdaQueryWrapper<TSUsualInspectEntList> lambdaQueryWrapper = Wrappers.lambdaQuery();

        return page(page, lambdaQueryWrapper);
    }

}
