package com.reptileclient.jlifeapp.dao.hm;

import cn.hutool.core.date.DateTime;
import com.reptileclient.jlifeapp.entity.hm.HmBookTradeOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface HmBookTradeOrderMapper {

    /**
     * 获取所有加密手机号的工单
     * @return
     */
    List<HmBookTradeOrder> selectEncrypt();

    int deleteByPrimaryKey(Long id);

    int insert(HmBookTradeOrder record);

    int insertSelective(HmBookTradeOrder record);

    HmBookTradeOrder selectByPrimaryKey(Long id);


    HmBookTradeOrder selectByBookTradeNo(Integer tradeNo);

    int updateByPrimaryKeySelective(HmBookTradeOrder record);

    int updateByPrimaryKey(HmBookTradeOrder record);

    HmBookTradeOrder selectNewOne(@Param("stationCode") String stationCode);

    int insertByBatch(List<HmBookTradeOrder> hmBookTradeOrders);

    int deleteByStartTime(String date);

    int deleteByUserPhone(String userPhone);

    int deleteByServantPhone(String servantPhone);

    int deleteDistinctData(@Param("dateTime") DateTime dateTime);


    int deleteByBetWeenTime(@Param("startTime") String startTime, @Param("endTime") String endTime);

    void deleteByServiceContraceNo(@Param("rightOrderNo") String rightOrderNo);

    int deleteByBookTradeNoList(@Param("subList") List<String> subList);

    void deleteWorkerOrderList(@Param("subList") List<String> subList);
    
    //跟新盒马工单取消状态
    Integer updateHmBookTradeState(@Param("subList") List<String> subList);
}
