package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.KwMeter;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface KwMeterMapper extends CommonMapper<KwMeter, Long> {

    List<KwMeter> findList(KwMeter param);
    List<KwMeter> findVoList(KwMeter param); //with merchant info

    int onlineBatch(@Param("list")List<KwMeter> list);
    int offlineBatch(KwMeter param);

    int bind(@Param("boxId")Long boxId,@Param("id")Long id);
    int bindBatch(@Param("boxId")Long boxId, @Param("ids")List<Long> ids);

    int unbind(@Param("meterId")Long meterId);
    int unbindBatch(@Param("boxId")Long boxId);

    int offlineScan(@Param("expiredTime") Date expiredTime);
}
