package com.xhpc.charging.station.mapper;

import com.xhpc.charging.station.pojo.XhpcImg;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 图片表
 *
 * @author WH
 */
public interface XhpcImgMapper {

    /**
     * 新增 上传图片
     *
     *
     * @param imgUrl 图片的url
     * @param terminalId 图片所对应的终端的id
     * @return
     */
    void insert(@Param("imgUrl") String imgUrl, @Param("terminalId") Long terminalId);

    /**
     * @param terminalIds 终端id集合
     * @return 返回带有url和对应终端id编号的集合实体类
     */
    List<Map<String, Object>> selectImgUrlByTerminal_id(List<Integer> terminalIds);

    /**
     * query XhpcTerminal by terminal id
     *
     * @author WH
     * @date 2022/2/17 11:28
     * @since version-1.0
     */
    List<XhpcImg> selectByTerminalId(ArrayList<Long> terminalIds);

    /**
     * Update del flag status of img record by terminal id
     *
     * @author WH
     * @date 2022/2/17 12:56
     * @since version-1.0
     */
    void updateDelFlagByTerminalId(Long terminalId);

}
