package com.reptileclient.jlifeapp.dao.hm;

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

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

public interface HmBookOrderMapper {
    /**
     * 获取所有加密手机号的工单
     * @return
     */
    List<HmBookOrder> selectEncrypt();


    int deleteByPrimaryKey(Long id);

    int insert(HmBookOrder record);

    int insertSelective(HmBookOrder record);

    HmBookOrder selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(HmBookOrder record);

    int updateByPrimaryKey(HmBookOrder record);

    int insertByBatch(List<HmBookOrder> hmBookOrders);

    HmBookOrder selectNewOne(@Param("shopName") String shopName);

    int deleteByCreateTime(@Param("createTime") String createTime, @Param("shopName") String shopName);

    long selectCountByPhone(String phone);

    int deleteByPhone(String phone);

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

    int insertClientByBatch(@Param("createTime") String createTime);

    HmBookOrder selectByPaymentNo(@Param("paymentNo") String paymentNo);

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

    int deleteByBookTime(@Param("startTime") DateTime startTime, @Param("endTime") DateTime endTime, @Param("shopName") String shopName);

    List<HmBookOrder> selectListByPaymentNo();

    List<Map<String, Object>> selectMatchList();

    HmBookOrder selectByBookOrderNo(@Param("bookOrderNo") String bookOrderNo);

    int deleteByBookOrderNo(@Param("bookOrderNo") String bookOrderNo);

    void deleteByServiceContractNo(@Param("rightOrderNo") String rightOrderNo);
}
