package com.djhk.uav.label.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.djhk.uav.label.domain.Plotting;
import com.djhk.uav.label.domain.PlottingQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 标绘Mapper接口
 *
 * @author myk
 * @date 2023-07-22
 */
public interface PlottingMappers extends BaseMapper<Plotting>
{
    /**
     * 查询标绘
     *
     * @param id 标绘主键
     * @return 标绘
     */
    public Plotting selectPlottingById(Long id);


    public Plotting selectPlottingByUUId(String uuid);
    public Plotting selectPlottingUUId();

    /**
     * 查询标绘列表
     *
     * @param plotting 标绘
     * @return 标绘集合
     */
    public List<Plotting> selectPlottingList(Plotting plotting);

    /**
     * 新增标绘
     *
     * @param plotting 标绘
     * @return 结果
     */
    public int insertPlotting(Plotting plotting);

    /**
     * 修改标绘
     *
     * @param plotting 标绘
     * @return 结果
     */
    public int updatePlotting(Plotting plotting);


    public int updatePlottingByUUId(Plotting plotting);

    /**
     * 删除标绘
     *
     * @param id 标绘主键
     * @return 结果
     */
    public int deletePlottingById(Long id);

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

    public int deletePlottingByUUId(String uuid);

    /**
     * 根据标绘名称 查出最大值
     *
     * @param name 用户名称
     * @return 结果
     */
    public Integer selectSeqByPlottingName(@Param("name") String name);

    int updateLockStatusByFolderId(@Param("folderId") Long folderId, @Param("lockStatus") Integer lockStatus);

    Integer selectMaxLockStatusByFolderIdIds(@Param("folderIds") List<Long> folderIds);

    int batchUpdateShowStatusAppByFolderId(@Param("folderIds") List<Long> folderIds, @Param("showStatusApp") Integer showStatusApp);

    int batchUpdateShowStatusWebByFolderId(@Param("folderIds") List<Long> folderIds, @Param("showStatusWeb")Integer showStatusWeb);

    int batchUpdateShareStatusByFolderId(@Param("folderIds") List<Long> ids, @Param("shareStatus") Integer shareStatus);

    int batchInsertPlotting(@Param("plottings") List<Plotting> plotting);

    int selectLockedNum(@Param("ids") Long[] ids);

    int selectLockedNumByUUId(@Param("ids") String[] ids);

    int changeLockStatus(@Param("id") Long id, @Param("lockStatus") Integer lockStatus);

    int changeShareStatus(@Param("id") Long id, @Param("shareStatus") Integer shareStatus );

    int changeShowStatusWeb(@Param("id") Long id, @Param("showStatus") Integer showStatus);

    int changeShowStatusApp(@Param("id") Long id, @Param("showStatus") Integer showStatus);

    List<Plotting> selectPlottingListById(PlottingQuery query);



}
