package cn.iocoder.yudao.module.inspection.mapper;

import java.util.List;

import cn.iocoder.yudao.module.inspection.entity.NweUsers;
import cn.iocoder.yudao.module.inspection.entity.SiteInfo;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * inspectionMapper接口
 *
 * @author zcy
 * @date 2023-09-01
 */
@Mapper
public interface SiteInfoMapper
{
    /**
     * 查询inspection
     *
     * @param id inspection主键
     * @return inspection
     */
    public SiteInfo selectSiteInfoById(Long id);

    /**
     * 查询inspection列表
     *
     * @param siteInfo inspection
     * @return inspection集合
     */
    public IPage<SiteInfo> selectSiteInfoList(Page<SiteInfo> page, @Param("vo") SiteInfo siteInfo);

    /**
     * 新增inspection
     *
     * @param siteInfo inspection
     * @return 结果
     */
    public int insertSiteInfo(SiteInfo siteInfo);

    /**
     * 修改inspection
     *
     * @param siteInfo inspection
     * @return 结果
     */
    public int updateSiteInfo(SiteInfo siteInfo);

    /**
     * 删除inspection
     *
     * @param id inspection主键
     * @return 结果
     */
    public int deleteSiteInfoById(Long id);

    /**
     * 批量删除inspection
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSiteInfoByIds(Long[] ids);

    /**
     * 迁移数据库：查询老表数据
     *
     * @return JSONObject集合
     */
    public List<JSONObject> selectAll();

    /**
     * 迁移数据库：向新表中插入数据
     *
     * @return 返回影响行数
     */
    public int addAll(NweUsers user);

    /**
     * 修改user_id
     */
    public int updateUserId1(@Param("newUserId") int newUserId,@Param("oldUserId") int oldUserId);
    public int updateUserId2(@Param("newUserId") int newUserId,@Param("oldUserId") int oldUserId);
    public int updateUserId3(@Param("newUserId") int newUserId,@Param("oldUserId") int oldUserId);
    public int updateUserId4(@Param("newUserId") int newUserId,@Param("oldUserId") int oldUserId);
    public int updateUserId5(@Param("newUserId") int newUserId,@Param("oldUserId") int oldUserId);
}
