package com.bonus.material.devchange.mapper;

import com.bonus.material.devchange.domain.*;
import com.bonus.material.device.domain.vo.DevInfoPropertyVo;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface MaDevInfoMapper {
    /**
     * select by primary key
     *
     * @param o primary key
     * @return object by primary key
     */
    List<MaDevInfo> list(MaDevInfo o);

    void delFileList(@Param("maId") Integer maId, @Param("fileType") Integer fileType);


    List<MaDevFile> getFileList(@Param("maId") Integer maId, @Param("fileType") Integer fileType);

    // 批量更新装备上下架状态
    Integer updateDeviceStatus(List<MapBean> list);

    Integer delDevice(String[] list);

    List<DeviceTreeBean> deviceTree(String id);

    DeviceCountBean deviceCount(MaDevInfo o);

    List<DevInfoPropertyVo> getProperties(MaDevInfo item);

    List<MapBean> deviceLocationSel(String id);

    List<MapBean> companySel(@Param("id") String id);

    Integer updateDeviceApi(MaDevInfo o);

    void delProperties(MaDevInfo item);

    void insertDevInfoProperties(@Param("list") List<DevInfoPropertyVo> item, @Param("maId") Integer maId);

    MaDevInfo getDevice(Integer maId);

    List<MaDevInfo> getDeviceByMaIds(String[] maIdArray);

    //查询装备总数
    Integer selectTotalDeviceCount(Long companyId);

    List<DevInfoPropertyVo> batchGetProperties(@Param("mainIds") List<Integer> mainIds);

    List<MaDevInfoXlsx> listXlsx(MaDevInfo o);

    void updatePrice(@Param("maId") Integer maId, @Param("value") BigDecimal value);

}

