package com.mosty.wzzx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mosty.base.model.entity.wzzx.TbWzXfwz;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 位置-巡防位置表(TbWzXfwz)表数据库访问层
 *
 * @author zhangHaiJun
 * @since 2022-07-14 15:37:38
 */
@Mapper
public interface TbWzXfwzMapper extends BaseMapper<TbWzXfwz> {

    @ApiOperation("查询所有数据")
    List<TbWzXfwz> queryAll();

    @ApiOperation("通过ID查询单条数据")
    TbWzXfwz queryById(String id);

    @ApiOperation("统计总行数")
    long count(TbWzXfwz tbWzXfwz);

    @ApiOperation("新增数据")
    int insert(TbWzXfwz tbWzXfwz);

    @ApiOperation("批量新增数据（MyBatis原生foreach方法）")
    int insertBatch(@Param("entities") List<TbWzXfwz> entities);

    @ApiOperation("批量新增或按主键更新数据（MyBatis原生foreach方法）")
    int insertOrUpdateBatch(@Param("entities") List<TbWzXfwz> entities);

    @ApiOperation("修改数据")
    int update(TbWzXfwz tbWzXfwz);

    @ApiOperation("通过主键删除数据")
    int deleteById(String id);

    @ApiOperation("查询所有数据")
    TbWzXfwz queryByBbid(@Param("bbid") String bbid);
}


